Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: Em5CalorHit.cc,v 1.4 2001/10/16 11:56:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em5CalorimeterSD.cc,v 1.4 2001/10/16 11:56:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em5DetectorConstruction.cc,v 1.7 2001/10/16 11:56:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5DetectorMessenger.cc,v 1.5 2001/11/05 17:58:02 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5DetectorMessenger.cc,v 1.6 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -49,59 +49,59 @@ Em5DetectorMessenger::Em5DetectorMessenger(Em5DetectorConstruction * Em5Det)
AbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
AbsMaterCmd->SetGuidance("Select Material of the Absorber.");
AbsMaterCmd->SetParameterName("choice",false);
AbsMaterCmd->AvailableForStates(PreInit,Idle);
AbsMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WorldMaterCmd = new G4UIcmdWithAString("/calor/setWorldMat",this);
WorldMaterCmd->SetGuidance("Select Material of the World.");
WorldMaterCmd->SetParameterName("wchoice",false);
WorldMaterCmd->AvailableForStates(PreInit,Idle);
WorldMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsThick",this);
AbsThickCmd->SetGuidance("Set Thickness of the Absorber");
AbsThickCmd->SetParameterName("SizeZ",false);
AbsThickCmd->SetRange("SizeZ>0.");
AbsThickCmd->SetUnitCategory("Length");
AbsThickCmd->AvailableForStates(PreInit,Idle);
AbsThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AbsSizYZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsYZ",this);
AbsSizYZCmd->SetGuidance("Set sizeYZ of the Absorber");
AbsSizYZCmd->SetParameterName("SizeYZ",false);
AbsSizYZCmd->SetRange("SizeYZ>0.");
AbsSizYZCmd->SetUnitCategory("Length");
AbsSizYZCmd->AvailableForStates(PreInit,Idle);
AbsSizYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AbsXposCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsXpos",this);
AbsXposCmd->SetGuidance("Set X pos. of the Absorber");
AbsXposCmd->SetParameterName("Xpos",false);
AbsXposCmd->SetUnitCategory("Length");
AbsXposCmd->AvailableForStates(PreInit,Idle);
AbsXposCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WorldXCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldX",this);
WorldXCmd->SetGuidance("Set X size of the World");
WorldXCmd->SetParameterName("WSizeX",false);
WorldXCmd->SetRange("WSizeX>0.");
WorldXCmd->SetUnitCategory("Length");
WorldXCmd->AvailableForStates(PreInit,Idle);
WorldXCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WorldYZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldYZ",this);
WorldYZCmd->SetGuidance("Set sizeYZ of the World");
WorldYZCmd->SetParameterName("WSizeYZ",false);
WorldYZCmd->SetRange("WSizeYZ>0.");
WorldYZCmd->SetUnitCategory("Length");
WorldYZCmd->AvailableForStates(PreInit,Idle);
WorldYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(Idle);
UpdateCmd->AvailableForStates(G4State_Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/calor/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
MagFieldCmd->SetUnitCategory("Magnetic flux density");
MagFieldCmd->AvailableForStates(PreInit,Idle);
MagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
@@ -22,7 +22,7 @@
//
//
// $Id: Em5EventAction.cc,v 1.9 2002/06/06 17:23:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5EventActionMessenger.cc,v 1.4 2001/10/16 11:56:29 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5EventActionMessenger.cc,v 1.5 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -53,13 +53,13 @@ Em5EventActionMessenger::Em5EventActionMessenger(Em5EventAction* EvAct)
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("all");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(Idle);
DrawCmd->AvailableForStates(G4State_Idle);
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
PrintCmd->AvailableForStates(Idle);
PrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5PhysicsList.cc,v 1.11 2002/06/05 15:43:43 urban Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5PhysicsList.cc,v 1.12 2002/08/09 14:21:30 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -342,7 +342,7 @@ void Em5PhysicsList::GetRange(G4double val)
void Em5PhysicsList::SetMaxStep(G4double step)
{
pStepCut->SetMaxStep(step);
G4cout << " MaxChargedStep=" << G4BestUnit(step,"length") << G4endl;
G4cout << " MaxChargedStep=" << G4BestUnit(step,"Length") << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5PhysicsListMessenger.cc,v 1.7 2002/06/05 15:43:43 urban Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5PhysicsListMessenger.cc,v 1.8 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -44,28 +44,28 @@ Em5PhysicsListMessenger::Em5PhysicsListMessenger(Em5PhysicsList * List)
cutGCmd->SetParameterName("Gcut",false);
cutGCmd->SetRange("Gcut>0.");
cutGCmd->SetUnitCategory("Length");
cutGCmd->AvailableForStates(PreInit,Idle);
cutGCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setECut",this);
cutECmd->SetGuidance("Set electron cut.");
cutECmd->SetParameterName("Ecut",false);
cutECmd->SetRange("Ecut>0.");
cutECmd->SetUnitCategory("Length");
cutECmd->AvailableForStates(PreInit,Idle);
cutECmd->AvailableForStates(G4State_PreInit,G4State_Idle);
cutPCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setPCut",this);
cutPCmd->SetGuidance("Set proton cut.");
cutPCmd->SetParameterName("Pcut",false);
cutPCmd->SetRange("Pcut>0.");
cutPCmd->SetUnitCategory("Length");
cutPCmd->AvailableForStates(PreInit,Idle);
cutPCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
rCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/getRange",this);
rCmd->SetGuidance("get the electron cut for the current material.");
rCmd->SetParameterName("energy",false);
rCmd->SetRange("energy>0.");
rCmd->SetUnitCategory("Energy");
rCmd->AvailableForStates(PreInit,Idle);
rCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
setMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/step/setMaxStep",this);
setMaxStepCmd->SetGuidance("Set max. step length in the detector");
@@ -22,7 +22,7 @@
//
//
// $Id: Em5PrimaryGeneratorAction.cc,v 1.6 2002/06/05 15:43:43 urban Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5PrimaryGeneratorMessenger.cc,v 1.7 2002/06/05 15:43:43 urban Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5PrimaryGeneratorMessenger.cc,v 1.8 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -43,14 +43,14 @@ Em5PrimaryGeneratorMessenger::Em5PrimaryGeneratorMessenger(
{
DefaultCmd = new G4UIcmdWithoutParameter("/gun/setDefault",this);
DefaultCmd->SetGuidance("set/reset the kinematic defined in PrimaryGenerator");
DefaultCmd->AvailableForStates(PreInit,Idle);
DefaultCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
RndmCmd = new G4UIcmdWithADouble("/gun/rndm",this);
RndmCmd->SetGuidance("random lateral extension on the beam");
RndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
RndmCmd->SetParameterName("rBeam",false);
RndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
RndmCmd->AvailableForStates(Idle);
RndmCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5RunAction.cc,v 1.13 2002/06/06 17:23:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5RunAction.cc,v 1.15 2002/12/12 13:26:51 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -41,15 +41,7 @@
#include "Randomize.hh"
#ifndef G4NOHIST
#include "AIDA/IAnalysisFactory.h"
#include "AIDA/ITreeFactory.h"
#include "AIDA/ITree.h"
#include "AIDA/IHistogramFactory.h"
#include "AIDA/IHistogram1D.h"
#include "AIDA/IAxis.h"
#include "AIDA/IAnnotation.h"
#include "AIDA/ITupleFactory.h"
#include "AIDA/ITuple.h"
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -80,69 +72,72 @@ void Em5RunAction::bookHisto()
{
#ifndef G4NOHIST
// Creating the analysis factory
IAnalysisFactory* af = AIDA_createAnalysisFactory();
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
// Creating the tree factory
ITreeFactory* tf = af->createTreeFactory();
AIDA::ITreeFactory* tf = af->createTreeFactory();
// Creating a tree mapped to an hbook file.
tree = tf->create(histName, false, false, "hbook");
G4bool readOnly = false;
G4bool createNew = true;
tree = tf->create(histName, "hbook", readOnly, createNew);
// Creating a histogram factory, whose histograms will be handled by the tree
IHistogramFactory* hf = af->createHistogramFactory(*tree);
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
// creating histograms
//
if(nbinStep>0)
{
histo[0] = hf->create1D("1","number of steps/event"
histo[0] = hf->createHistogram1D("1","number of steps/event"
,nbinStep,Steplow,Stephigh);
}
if(nbinEn>0)
{
histo[1] = hf->create1D("2","energy deposit in absorber(in MeV)"
histo[1] = hf->createHistogram1D("2","energy deposit in absorber(in MeV)"
,nbinEn,Enlow,Enhigh);
}
if(nbinTh>0)
{
histo[2] = hf->create1D("3","angle distribution at exit(deg)"
histo[2] = hf->createHistogram1D("3","angle distribution at exit(deg)"
,nbinTh,Thlow/deg,Thhigh/deg);
}
if(nbinR>0)
{
histo[3] = hf->create1D("4","lateral distribution at exit(mm)"
histo[3] = hf->createHistogram1D("4","lateral distribution at exit(mm)"
,nbinR ,Rlow,Rhigh);
}
if(nbinTt>0)
{
histo[4] = hf->create1D("5","kinetic energy of the primary at exit(MeV)"
histo[4] = hf->createHistogram1D("5","kine energy of primary at exit(MeV)"
,nbinTt,Ttlow,Tthigh);
}
if(nbinThback>0)
{
histo[5] = hf->create1D("6",
histo[5] = hf->createHistogram1D("6",
"angle distribution of backscattered primaries(deg)"
,nbinThback,Thlowback/deg,Thhighback/deg);
}
if(nbinTb>0)
{
histo[6] = hf->create1D("7",
histo[6] = hf->createHistogram1D("7",
"kinetic energy of the backscattered primaries (MeV)"
,nbinTb,Tblow,Tbhigh);
}
if(nbinTsec>0)
{
histo[7] = hf->create1D("8","kinetic energy of the charged secondaries(MeV)"
histo[7] = hf->createHistogram1D("8",
"kinetic energy of the charged secondaries(MeV)"
,nbinTsec,Tseclow,Tsechigh);
}
if(nbinvertexz>0)
{
histo[8] = hf->create1D("9","x of secondary charged vertices(mm)"
histo[8] = hf->createHistogram1D("9","x of secondary charged vertices(mm)"
,nbinvertexz ,zlow,zhigh);
}
if(nbinGamma>0)
{
histo[9]= hf->create1D("10",
histo[9]= hf->createHistogram1D("10",
"kinetic energy of gammas escaping the absorber(MeV)"
// ,nbinGamma,ElowGamma,EhighGamma);
,nbinGamma,log10(ElowGamma),log10(EhighGamma));
@@ -192,7 +187,7 @@ void Em5RunAction::BeginOfRunAction(const G4Run* aRun)
if(nbinThback>0)
dThback = (Thhighback-Thlowback)/nbinThback ;
bookHisto();
if (aRun->GetRunID() == 0) bookHisto();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em5RunMessenger.cc,v 1.6 2001/11/28 16:08:19 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em5SteppingAction.cc,v 1.9 2002/06/06 17:23:22 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em5SteppingMessenger.cc,v 1.4 2001/10/16 11:56:29 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em5SteppingVerbose.cc,v 1.8 2001/10/16 11:56:29 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+5 -3
View File
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: Em5VisManager.cc,v 1.6 2001/11/15 13:09:49 johna Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em5VisManager.cc,v 1.7 2002/11/13 21:39:59 duns Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,6 +41,7 @@
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
@@ -97,6 +98,7 @@ void Em5VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);