Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: Em5CalorHit.cc,v 1.4 2001/10/16 11:56:28 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: Em5CalorimeterSD.cc,v 1.4 2001/10/16 11:56:28 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5DetectorConstruction.cc,v 1.7 2001/10/16 11:56:28 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5DetectorConstruction.cc,v 1.10 2003/04/01 16:51:51 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -251,9 +251,9 @@ G4VPhysicalVolume* Em5DetectorConstruction::ConstructCalorimeter()
physiWorld = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
"World", //its name
logicWorld, //its logical volume
NULL, //its mother volume
"World", //its name
0, //its mother volume
false, //no boolean operation
0); //copy number
@@ -264,14 +264,14 @@ G4VPhysicalVolume* Em5DetectorConstruction::ConstructCalorimeter()
AbsorberThickness/2,AbsorberSizeYZ/2,AbsorberSizeYZ/2);
logicAbsorber = new G4LogicalVolume(solidAbsorber, //its solid
AbsorberMaterial, //its material
"Absorber"); //its name
AbsorberMaterial, //its material
"Absorber"); //its name
physiAbsorber = new G4PVPlacement(0, //no rotation
G4ThreeVector(XposAbs,0.,0.), //its position
"Absorber", //its name
logicAbsorber, //its logical volume
physiWorld, //its mother
"Absorber", //its name
logicWorld, //its mother
false, //no boulean operat
0); //copy number
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5DetectorMessenger.cc,v 1.6 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5DetectorMessenger.cc,v 1.7 2002/12/16 16:30:08 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -43,60 +43,60 @@
Em5DetectorMessenger::Em5DetectorMessenger(Em5DetectorConstruction * Em5Det)
:Em5Detector(Em5Det)
{
Em5detDir = new G4UIdirectory("/calor/");
Em5detDir->SetGuidance("Em5 detector control.");
testemDir = new G4UIdirectory("/testem/");
testemDir->SetGuidance("UI commands specific to this example.");
AbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
AbsMaterCmd = new G4UIcmdWithAString("/testem/det/setAbsMat",this);
AbsMaterCmd->SetGuidance("Select Material of the Absorber.");
AbsMaterCmd->SetParameterName("choice",false);
AbsMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WorldMaterCmd = new G4UIcmdWithAString("/calor/setWorldMat",this);
WorldMaterCmd = new G4UIcmdWithAString("/testem/det/setWorldMat",this);
WorldMaterCmd->SetGuidance("Select Material of the World.");
WorldMaterCmd->SetParameterName("wchoice",false);
WorldMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsThick",this);
AbsThickCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setAbsThick",this);
AbsThickCmd->SetGuidance("Set Thickness of the Absorber");
AbsThickCmd->SetParameterName("SizeZ",false);
AbsThickCmd->SetRange("SizeZ>0.");
AbsThickCmd->SetUnitCategory("Length");
AbsThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AbsSizYZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsYZ",this);
AbsSizYZCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setAbsYZ",this);
AbsSizYZCmd->SetGuidance("Set sizeYZ of the Absorber");
AbsSizYZCmd->SetParameterName("SizeYZ",false);
AbsSizYZCmd->SetRange("SizeYZ>0.");
AbsSizYZCmd->SetUnitCategory("Length");
AbsSizYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AbsXposCmd = new G4UIcmdWithADoubleAndUnit("/calor/setAbsXpos",this);
AbsXposCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setAbsXpos",this);
AbsXposCmd->SetGuidance("Set X pos. of the Absorber");
AbsXposCmd->SetParameterName("Xpos",false);
AbsXposCmd->SetUnitCategory("Length");
AbsXposCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WorldXCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldX",this);
WorldXCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setWorldX",this);
WorldXCmd->SetGuidance("Set X size of the World");
WorldXCmd->SetParameterName("WSizeX",false);
WorldXCmd->SetRange("WSizeX>0.");
WorldXCmd->SetUnitCategory("Length");
WorldXCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WorldYZCmd = new G4UIcmdWithADoubleAndUnit("/calor/setWorldYZ",this);
WorldYZCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setWorldYZ",this);
WorldYZCmd->SetGuidance("Set sizeYZ of the World");
WorldYZCmd->SetParameterName("WSizeYZ",false);
WorldYZCmd->SetRange("WSizeYZ>0.");
WorldYZCmd->SetUnitCategory("Length");
WorldYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd = new G4UIcmdWithoutParameter("/testem/det/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(G4State_Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/calor/setField",this);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
@@ -118,7 +118,7 @@ Em5DetectorMessenger::~Em5DetectorMessenger()
delete WorldYZCmd;
delete UpdateCmd;
delete MagFieldCmd;
delete Em5detDir;
delete testemDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em5EventAction.cc,v 1.9 2002/06/06 17:23:22 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5EventActionMessenger.cc,v 1.5 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5EventActionMessenger.cc,v 1.6 2002/12/16 16:30:08 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -42,12 +42,12 @@
Em5EventActionMessenger::Em5EventActionMessenger(Em5EventAction* EvAct)
:eventAction(EvAct)
{
setVerboseCmd = new G4UIcmdWithAnInteger("/event/setverbose",this);
setVerboseCmd = new G4UIcmdWithAnInteger("/testem/event/setverbose",this);
setVerboseCmd->SetGuidance("Set verbose level ." );
setVerboseCmd->SetParameterName("level",true);
setVerboseCmd->SetDefaultValue(0);
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
DrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none,charged, all");
DrawCmd->SetParameterName("choice",true);
@@ -55,7 +55,7 @@ Em5EventActionMessenger::Em5EventActionMessenger(Em5EventAction* EvAct)
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(G4State_Idle);
PrintCmd = new G4UIcmdWithAnInteger("/event/printModulo",this);
PrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5PhysicsList.cc,v 1.12 2002/08/09 14:21:30 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5PhysicsList.cc,v 1.14 2003/03/06 17:55:09 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -56,7 +56,6 @@ Em5PhysicsList::Em5PhysicsList(Em5DetectorConstruction* p)
currentDefaultCut = defaultCutValue = 1*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForProton = defaultCutValue;
SetVerboseLevel(1);
physicsListMessenger = new Em5PhysicsListMessenger(this);
@@ -198,7 +197,7 @@ void Em5PhysicsList::ConstructEM()
pmanager->AddProcess(new G4MuPairProduction, -1,-1,4);
} else if (
particleName == "proton"
particleName == "proton"
|| particleName == "antiproton"
|| particleName == "pi+"
|| particleName == "pi-"
@@ -246,46 +245,34 @@ void Em5PhysicsList::SetCuts()
{
////G4Timer theTimer ;
////theTimer.Start() ;
// reactualise cutValues
if (currentDefaultCut != defaultCutValue)
{
if(cutForGamma == currentDefaultCut) cutForGamma = defaultCutValue;
if(cutForElectron == currentDefaultCut) cutForElectron = defaultCutValue;
if(cutForProton == currentDefaultCut) cutForProton = defaultCutValue;
currentDefaultCut = defaultCutValue;
}
if (verboseLevel >0){
G4cout << "Em5PhysicsList::SetCuts:";
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
}
//special for low energy physics
//
G4double lowlimit=250*eV;
G4double lowlimit=250*eV;
G4Gamma ::SetEnergyRange(lowlimit,100*GeV);
G4Electron::SetEnergyRange(lowlimit,100*GeV);
G4Positron::SetEnergyRange(lowlimit,100*GeV);
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
// because some processes for e+/e- need cut values for gamma
//
SetCutValue(cutForGamma,"gamma");
SetCutValue(cutForElectron,"e-");
SetCutValue(cutForElectron,"e+");
SetCutValue(defaultCutValue,"mu-");
SetCutValue(defaultCutValue,"mu+");
// set cut values for proton and anti_proton before all other hadrons
// because some processes for hadrons need cut values for proton/anti_proton
SetCutValue(defaultCutValue, "proton");
SetCutValue(defaultCutValue, "anti_proton");
SetCutValueForOthers(defaultCutValue);
if (verboseLevel>0) DumpCutValuesTable();
////theTimer.Stop();
@@ -314,14 +301,6 @@ void Em5PhysicsList::SetElectronCut(G4double val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em5PhysicsList::SetProtonCut(G4double val)
{
ResetCuts();
cutForProton = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Em5PhysicsList::GetRange(G4double val)
{
G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5PhysicsListMessenger.cc,v 1.8 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5PhysicsListMessenger.cc,v 1.10 2003/03/06 17:55:09 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -39,39 +39,32 @@
Em5PhysicsListMessenger::Em5PhysicsListMessenger(Em5PhysicsList * List)
:Em5List(List)
{
cutGCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setGCut",this);
cutGCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
cutGCmd->SetGuidance("Set gamma cut.");
cutGCmd->SetParameterName("Gcut",false);
cutGCmd->SetRange("Gcut>0.");
cutGCmd->SetUnitCategory("Length");
cutGCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
cutECmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setECut",this);
cutECmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
cutECmd->SetGuidance("Set electron cut.");
cutECmd->SetParameterName("Ecut",false);
cutECmd->SetRange("Ecut>0.");
cutECmd->SetUnitCategory("Length");
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(G4State_PreInit,G4State_Idle);
rCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/getRange",this);
rCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/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(G4State_PreInit,G4State_Idle);
setMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/step/setMaxStep",this);
setMaxStepCmd->SetGuidance("Set max. step length in the detector");
setMaxStepCmd->SetParameterName("mxStep",false);
setMaxStepCmd->SetRange("mxStep>0.");
setMaxStepCmd->SetUnitCategory("Length");
MaxStepCmd = new G4UIcmdWithADoubleAndUnit("/testem/tracking/stepMax",this);
MaxStepCmd->SetGuidance("Set max allowed step length");
MaxStepCmd->SetParameterName("mxStep",false);
MaxStepCmd->SetRange("mxStep>0.");
MaxStepCmd->SetUnitCategory("Length");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -80,9 +73,8 @@ Em5PhysicsListMessenger::~Em5PhysicsListMessenger()
{
delete cutGCmd;
delete cutECmd;
delete cutPCmd;
delete rCmd;
delete setMaxStepCmd;
delete MaxStepCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -94,12 +86,10 @@ void Em5PhysicsListMessenger::SetNewValue(G4UIcommand* command,
{ Em5List->SetGammaCut(cutGCmd->GetNewDoubleValue(newValue));}
if(command == cutECmd)
{ Em5List->SetElectronCut(cutECmd->GetNewDoubleValue(newValue));}
if(command == cutPCmd)
{ Em5List->SetProtonCut(cutPCmd->GetNewDoubleValue(newValue));}
if(command == rCmd)
{ Em5List->GetRange(rCmd->GetNewDoubleValue(newValue));}
if(command == setMaxStepCmd)
{ Em5List->SetMaxStep(setMaxStepCmd->GetNewDoubleValue(newValue));}
if(command == MaxStepCmd)
{ Em5List->SetMaxStep(MaxStepCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: Em5PrimaryGeneratorAction.cc,v 1.6 2002/06/05 15:43:43 urban Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5PrimaryGeneratorMessenger.cc,v 1.8 2002/12/05 00:24:25 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5PrimaryGeneratorMessenger.cc,v 1.9 2002/12/16 16:30:08 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -41,11 +41,11 @@ Em5PrimaryGeneratorMessenger::Em5PrimaryGeneratorMessenger(
Em5PrimaryGeneratorAction* Em5Gun)
:Em5Action(Em5Gun)
{
DefaultCmd = new G4UIcmdWithoutParameter("/gun/setDefault",this);
DefaultCmd = new G4UIcmdWithoutParameter("/testem/gun/setDefault",this);
DefaultCmd->SetGuidance("set/reset the kinematic defined in PrimaryGenerator");
DefaultCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
RndmCmd = new G4UIcmdWithADouble("/gun/rndm",this);
RndmCmd = new G4UIcmdWithADouble("/testem/gun/rndm",this);
RndmCmd->SetGuidance("random lateral extension on the beam");
RndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
RndmCmd->SetParameterName("rBeam",false);
@@ -22,7 +22,7 @@
//
//
// $Id: Em5RunAction.cc,v 1.15 2002/12/12 13:26:51 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5RunMessenger.cc,v 1.6 2001/11/28 16:08:19 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5RunMessenger.cc,v 1.7 2002/12/16 16:30:08 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -45,133 +45,133 @@
Em5RunMessenger::Em5RunMessenger(Em5RunAction* RA)
:runAction (RA)
{
plotDir = new G4UIdirectory("/plots/");
plotDir = new G4UIdirectory("/testem/plots/");
plotDir->SetGuidance("plot control");
sethistNameCmd = new G4UIcmdWithAString("/plots/sethistName",this);
sethistNameCmd = new G4UIcmdWithAString("/testem/plots/sethistName",this);
sethistNameCmd->SetGuidance("set name for the histogram file");
setnbinStepCmd = new G4UIcmdWithAnInteger("/plots/setnbinStep",this);
setnbinStepCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinStep",this);
setnbinStepCmd->SetGuidance("set nb of bins in #step plot");
setnbinStepCmd->SetParameterName("nbinStep",false);
setSteplowCmd = new G4UIcmdWithADouble("/plots/setSteplow",this);
setSteplowCmd = new G4UIcmdWithADouble("/testem/plots/setSteplow",this);
setSteplowCmd->SetGuidance("set lower limit for #step plot ");
setSteplowCmd->SetParameterName("Steplow",false);
setStephighCmd = new G4UIcmdWithADouble("/plots/setStephigh",this);
setStephighCmd = new G4UIcmdWithADouble("/testem/plots/setStephigh",this);
setStephighCmd->SetGuidance("set upper limit for #step plot ");
setStephighCmd->SetParameterName("Stephigh",false);
setnbinEnCmd = new G4UIcmdWithAnInteger("/plots/setnbinEn",this);
setnbinEnCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinEn",this);
setnbinEnCmd->SetGuidance("set nb of bins in Edep plot");
setnbinEnCmd->SetParameterName("nbinE",false);
setEnlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setEnlow",this);
setEnlowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setEnlow",this);
setEnlowCmd->SetGuidance("set lower limit for Edep plot ");
setEnlowCmd->SetParameterName("Elow",false);
setEnlowCmd->SetUnitCategory("Energy");
setEnhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setEnhigh",this);
setEnhighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setEnhigh",this);
setEnhighCmd->SetGuidance("set upper limit for Edep plot ");
setEnhighCmd->SetParameterName("Ehigh",false);
setEnhighCmd->SetUnitCategory("Energy");
setnbinGammaCmd = new G4UIcmdWithAnInteger("/plots/setnbinGamma",this);
setnbinGammaCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinGamma",this);
setnbinGammaCmd->SetGuidance("set nb of bins in gamma spectrum plot");
setnbinGammaCmd->SetParameterName("nbinGamma",false);
setElowGammaCmd = new G4UIcmdWithADoubleAndUnit("/plots/setElowGamma",this);
setElowGammaCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setElowGamma",this);
setElowGammaCmd->SetGuidance("set lower limit for gamma spectrum plot ");
setElowGammaCmd->SetParameterName("ElowGamma",false);
setElowGammaCmd->SetUnitCategory("Energy");
setEhighGammaCmd = new G4UIcmdWithADoubleAndUnit("/plots/setEhighGamma",this);
setEhighGammaCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setEhighGamma",this);
setEhighGammaCmd->SetGuidance("set upper limit for gamma spectrum plot ");
setEhighGammaCmd->SetParameterName("EhighGamma",false);
setEhighGammaCmd->SetUnitCategory("Energy");
setnbinTtCmd = new G4UIcmdWithAnInteger("/plots/setnbinTt",this);
setnbinTtCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinTt",this);
setnbinTtCmd->SetGuidance("set nb of bins in Etransmitted plot");
setnbinTtCmd->SetParameterName("nbinTt",false);
setTtlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTtlow",this);
setTtlowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setTtlow",this);
setTtlowCmd->SetGuidance("set lower limit for Etransmitted plot ");
setTtlowCmd->SetParameterName("Ttlow",false);
setTthighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTthigh",this);
setTthighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setTthigh",this);
setTthighCmd->SetGuidance("set upper limit for Etransmitted plot ");
setTthighCmd->SetParameterName("Tthigh",false);
setnbinTbCmd = new G4UIcmdWithAnInteger("/plots/setnbinTb",this);
setnbinTbCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinTb",this);
setnbinTbCmd->SetGuidance("set nb of bins in Ebackscattering plot");
setnbinTbCmd->SetParameterName("nbinTb",false);
setTblowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTblow",this);
setTblowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setTblow",this);
setTblowCmd->SetGuidance("set lower limit for Ebackscattered plot ");
setTblowCmd->SetParameterName("Tblow",false);
setTbhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTbhigh",this);
setTbhighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setTbhigh",this);
setTbhighCmd->SetGuidance("set upper limit for Ebackscattered plot ");
setTbhighCmd->SetParameterName("Tbhigh",false);
setnbinTsecCmd = new G4UIcmdWithAnInteger("/plots/setnbinTsec",this);
setnbinTsecCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinTsec",this);
setnbinTsecCmd->SetGuidance("set nb of bins in charged Tsecondary plot");
setnbinTsecCmd->SetParameterName("nbinTsec",false);
setTseclowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTseclow",this);
setTseclowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setTseclow",this);
setTseclowCmd->SetGuidance("set lower limit for charged Tsecondary plot ");
setTseclowCmd->SetParameterName("Tseclow",false);
setTsechighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setTsechigh",this);
setTsechighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setTsechigh",this);
setTsechighCmd->SetGuidance("set upper limit for charged Tsecondary plot ");
setTsechighCmd->SetParameterName("Tsechigh",false);
setnbinRCmd = new G4UIcmdWithAnInteger("/plots/setnbinR",this);
setnbinRCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinR",this);
setnbinRCmd->SetGuidance("set nb of bins in R plot");
setnbinRCmd->SetParameterName("nbinR",false);
setRlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setRlow",this);
setRlowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setRlow",this);
setRlowCmd->SetGuidance("set lower limit for R plot ");
setRlowCmd->SetParameterName("Rlow",false);
setRhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setRhigh",this);
setRhighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setRhigh",this);
setRhighCmd->SetGuidance("set upper limit for R plot ");
setRhighCmd->SetParameterName("Rhigh",false);
setnbinzvertexCmd = new G4UIcmdWithAnInteger("/plots/setnbinzvertex",this);
setnbinzvertexCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinzvertex",this);
setnbinzvertexCmd->SetGuidance("set nb of bins in Z vertex plot");
setnbinzvertexCmd->SetParameterName("nbinZ",false);
setzlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setzlow",this);
setzlowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setzlow",this);
setzlowCmd->SetGuidance("set lower limit for Z vertex plot ");
setzlowCmd->SetParameterName("zlow",false);
setzhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setzhigh",this);
setzhighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setzhigh",this);
setzhighCmd->SetGuidance("set upper limit for Z vertex plot ");
setzhighCmd->SetParameterName("zhigh",false);
setnbinThCmd = new G4UIcmdWithAnInteger("/plots/setnbinTh",this);
setnbinThCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinTh",this);
setnbinThCmd->SetGuidance("set nb of bins in Theta transmitted plot");
setnbinThCmd->SetParameterName("nbinTh",false);
setThlowCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThlow",this);
setThlowCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setThlow",this);
setThlowCmd->SetGuidance("set lower limit for Theta transmitted plot ");
setThlowCmd->SetParameterName("Thlow",false);
setThhighCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThhigh",this);
setThhighCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setThhigh",this);
setThhighCmd->SetGuidance("set upper limit for Theta transmitted plot ");
setThhighCmd->SetParameterName("Thhigh",false);
setnbinThbackCmd = new G4UIcmdWithAnInteger("/plots/setnbinThback",this);
setnbinThbackCmd = new G4UIcmdWithAnInteger("/testem/plots/setnbinThback",this);
setnbinThbackCmd->SetGuidance("set nb of bins in backscattering Theta plot");
setnbinThbackCmd->SetParameterName("nbinThback",false);
setThlowbackCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThlowback",this);
setThlowbackCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setThlowback",this);
setThlowbackCmd->SetGuidance("set lower limit for backscattering Theta plot");
setThlowbackCmd->SetParameterName("Thlowback",false);
setThhighbackCmd = new G4UIcmdWithADoubleAndUnit("/plots/setThhighback",this);
setThhighbackCmd = new G4UIcmdWithADoubleAndUnit("/testem/plots/setThhighback",this);
setThhighbackCmd->SetGuidance("set upper limit for backscattering Teta plot");
setThhighbackCmd->SetParameterName("Thhighback",false);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5SteppingAction.cc,v 1.9 2002/06/06 17:23:22 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5SteppingAction.cc,v 1.10 2003/04/05 17:33:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -70,7 +70,7 @@ Em5SteppingAction::~Em5SteppingAction()
void Em5SteppingAction::UserSteppingAction(const G4Step* aStep)
{
const G4Track* track = aStep->GetTrack();
#ifndef G4NOHIST
const G4double cn = pi/(64800.*runaction->GetdTh()) ;
const G4double cnback = pi/(64800.*runaction->GetdThback()) ;
@@ -79,38 +79,40 @@ void Em5SteppingAction::UserSteppingAction(const G4Step* aStep)
G4double Theta,Thetaback,Ttrans,Tback,Tsec,Egamma,yend,zend,rend;
G4int evno = eventaction->GetEventno();
IDnow = evno+10000*(aStep->GetTrack()->GetTrackID())+
100000000*(aStep->GetTrack()->GetParentID());
IDnow = evno+10000*(track->GetTrackID())+
100000000*(track->GetParentID());
if(IDnow != IDold)
{
IDold=IDnow ;
if(
(((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
(((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "e-") &&
((aStep->GetTrack()->GetTrackID() != 1) ||
(aStep->GetTrack()->GetParentID() != 0)) )
((track->GetTrackID() != 1) ||
(track->GetParentID() != 0)) )
||
(((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
(((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "e+") &&
((aStep->GetTrack()->GetTrackID() != 1) ||
(aStep->GetTrack()->GetParentID() != 0)) )
((track->GetTrackID() != 1) ||
(track->GetParentID() != 0)) )
)
#ifndef G4NOHIST
if(runaction->GetHisto(8) != 0)
runaction->GetHisto(8)->fill(
aStep->GetTrack()->GetVertexPosition().x());
track->GetVertexPosition().x());
#endif
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber")
{
if(((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
if(((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "e-") &&
((aStep->GetTrack()->GetTrackID() != 1) ||
(aStep->GetTrack()->GetParentID() != 0)) )
((track->GetTrackID() != 1) ||
(track->GetParentID() != 0)) )
{
eventaction->AddCharged() ;
eventaction->AddE() ;
Tsec = aStep->GetTrack()->GetKineticEnergy() ; // !!!!!!!!!!!!
Tsec = track->GetKineticEnergy() ; // !!!!!!!!!!!!
Tsec += aStep->GetTotalEnergyDeposit() ; // !!!!!!!!!!!!
#ifndef G4NOHIST
if(runaction->GetHisto(7) != 0)
@@ -119,14 +121,14 @@ void Em5SteppingAction::UserSteppingAction(const G4Step* aStep)
}
else
if(((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
if(((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "e+") &&
((aStep->GetTrack()->GetTrackID() != 1) ||
(aStep->GetTrack()->GetParentID() != 0)) )
((track->GetTrackID() != 1) ||
(track->GetParentID() != 0)) )
{
eventaction->AddCharged() ;
eventaction->AddP() ;
Tsec = aStep->GetTrack()->GetKineticEnergy() ; // !!!!!!!!!!!!
Tsec = track->GetKineticEnergy() ; // !!!!!!!!!!!!
Tsec += aStep->GetTotalEnergyDeposit() ; // !!!!!!!!!!!!
#ifndef G4NOHIST
if(runaction->GetHisto(7) != 0)
@@ -134,44 +136,47 @@ void Em5SteppingAction::UserSteppingAction(const G4Step* aStep)
#endif
}
else
if(((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
if(((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "gamma") &&
((aStep->GetTrack()->GetTrackID() != 1) ||
(aStep->GetTrack()->GetParentID() != 0)) )
((track->GetTrackID() != 1) ||
(track->GetParentID() != 0)) )
{
eventaction->AddNeutral() ;
}
}
}
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber")
{
if(((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
if(((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "e-")
||
((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "e+"))
eventaction->CountStepsCharged() ;
if ((aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->
if ((track->GetDynamicParticle()->GetDefinition()->
GetParticleName()) == "gamma")
eventaction->CountStepsNeutral() ;
}
if (
(((aStep->GetTrack()->GetTrackID() == 1) &&
(aStep->GetTrack()->GetParentID()== 0)))
G4String nextVolumeName = "OutOfWorld";
if (track->GetNextVolume())
nextVolumeName = track->GetNextVolume()->GetName();
if ( nextVolumeName != "OutOfWorld"
&&
(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber")
track->GetTrackID() == 1
&&
(aStep->GetTrack()->GetNextVolume()->GetName()=="World") &&
(aStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName() == "Transportation") &&
(aStep->GetTrack()->GetMomentumDirection().x()>0.)
)
aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber"
&&
nextVolumeName == "World"
&&
track->GetMomentumDirection().x() > 0. )
{
eventaction->SetTr();
Theta = acos(aStep->GetTrack()->GetMomentumDirection().x()) ;
Theta = acos(track->GetMomentumDirection().x()) ;
#ifndef G4NOHIST
if((runaction->GetHisto(2) != 0) && (Theta > 0.))
{
@@ -180,33 +185,34 @@ void Em5SteppingAction::UserSteppingAction(const G4Step* aStep)
}
#endif
Ttrans = aStep->GetTrack()->GetKineticEnergy() ;
Ttrans = track->GetKineticEnergy() ;
#ifndef G4NOHIST
if(runaction->GetHisto(4) != 0)
runaction->GetHisto(4)->fill(Ttrans/MeV) ;
#endif
yend= aStep->GetTrack()->GetPosition().y() ;
zend= aStep->GetTrack()->GetPosition().z() ;
yend= track->GetPosition().y() ;
zend= track->GetPosition().z() ;
rend = sqrt(yend*yend+zend*zend) ;
#ifndef G4NOHIST
if(runaction->GetHisto(3) != 0)
runaction->GetHisto(3)->fill(rend) ;
#endif
}
if (
(((aStep->GetTrack()->GetTrackID() == 1) &&
(aStep->GetTrack()->GetParentID()== 0)))
if ( nextVolumeName != "OutOfWorld"
&&
(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber") &&
(aStep->GetTrack()->GetNextVolume()->GetName()=="World") &&
(aStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName() == "Transportation") &&
(aStep->GetTrack()->GetMomentumDirection().x()<0.)
)
track->GetTrackID() == 1
&&
aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber"
&&
nextVolumeName =="World"
&&
track->GetMomentumDirection().x() < 0. )
{
eventaction->SetRef();
Thetaback = acos(aStep->GetTrack()->GetMomentumDirection().x()) ;
Thetaback = acos(track->GetMomentumDirection().x()) ;
Thetaback -= 0.5*pi ;
#ifndef G4NOHIST
if((runaction->GetHisto(5) != 0) && (Thetaback > 0.))
@@ -215,31 +221,33 @@ void Em5SteppingAction::UserSteppingAction(const G4Step* aStep)
runaction->GetHisto(5)->fill(Thetaback/deg,wg) ;
}
#endif
Tback = aStep->GetTrack()->GetKineticEnergy() ;
Tback = track->GetKineticEnergy() ;
#ifndef G4NOHIST
if(runaction->GetHisto(6) != 0)
runaction->GetHisto(6)->fill(Tback/MeV) ;
#endif
}
if (
((aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber") &&
(aStep->GetTrack()->GetNextVolume()->GetName()=="World") &&
(aStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName() == "Transportation") &&
(aStep->GetTrack()->GetMomentumDirection().x()>0.) &&
(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()
->GetParticleName() == "gamma"))
)
if ( nextVolumeName != "OutOfWorld"
&&
aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="Absorber"
&&
track->GetNextVolume()->GetName()=="World"
&&
track->GetMomentumDirection().x()>0.
&&
track->GetDynamicParticle()->GetDefinition()
->GetParticleName() == "gamma" )
{
Egamma = aStep->GetTrack()->GetKineticEnergy() ;
Egamma = track->GetKineticEnergy() ;
#ifndef G4NOHIST
if(runaction->GetHisto(9) != 0)
runaction->GetHisto(9)->fill(log10(Egamma/MeV)) ;
#endif
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5SteppingMessenger.cc,v 1.4 2001/10/16 11:56:29 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5SteppingMessenger.cc,v 1.5 2002/12/16 16:30:08 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -31,24 +31,18 @@
#include "Em5SteppingMessenger.hh"
#include "Em5SteppingAction.hh"
#include "G4UIdirectory.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em5SteppingMessenger::Em5SteppingMessenger(Em5SteppingAction* SA)
:steppingAction (SA)
{
steppingDir = new G4UIdirectory("/stepping/");
steppingDir->SetGuidance("stepping control");
}
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Em5SteppingMessenger::~Em5SteppingMessenger()
{
delete steppingDir;
}
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em5SteppingVerbose.cc,v 1.8 2001/10/16 11:56:29 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: Em5SteppingVerbose.cc,v 1.9 2003/02/10 17:30:05 maire Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,7 +73,8 @@ void Em5SteppingVerbose::StepInfo()
<< G4std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< " ";
// if( fStepStatus != fWorldBoundary){
if( fTrack->GetNextVolume() != 0 ) {
@@ -161,7 +162,8 @@ G4int prec = G4cout.precision(3);
<< G4std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< " ";
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(10) << fTrack->GetVolume()->GetName();
@@ -22,7 +22,7 @@
//
//
// $Id: Em5VisManager.cc,v 1.7 2002/11/13 21:39:59 duns Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// John Allison 24th January 1998.