Skip to content

Commit

Permalink
Adding new argument to define G4 Physics List (#278)
Browse files Browse the repository at this point in the history
* Replacing AliESDfriends.root with AliESDfriends_EMB.root in case of embedding

See https://alice.its.cern.ch/jira/browse/ALIROOT-8277?focusedCommentId=232931&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-232931

* Adding new argument to define G4 Physics List

Default is now INCLXX (no biasing). We can change it after timing tests.

* Monopoles cannot be used with BERT+biasing
  • Loading branch information
chiarazampolli authored Jul 16, 2019
1 parent 817a5ed commit a7828f4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
5 changes: 5 additions & 0 deletions MC/Config.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static Float_t pttrigmaxConfig = -1.; // pt-trigger max
static Int_t quenchingConfig = 0; // quenching
static Float_t qhatConfig = 1.7; // q-hat
static Bool_t isGeant4 = kFALSE; // geant4 flag
static TString g4PhysList = ""; // geant4 Phys List
static Bool_t purifyKine = kTRUE; // purifyKine flag
static Bool_t isFluka = kFALSE; // fluka flag

Expand Down Expand Up @@ -100,6 +101,7 @@ Config()
printf(">>>>> crossing angle: %f \n", crossingConfig);
printf(">>>>> random seed: %d \n", seedConfig);
printf(">>>>> geant4: %d \n", isGeant4);
printf(">>>>> g4PhysList: %s \n", g4PhysList);
printf(">>>>> purifyKine: %d \n", purifyKine);
printf(">>>>> fluka: %d \n", isFluka);
printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
Expand Down Expand Up @@ -364,6 +366,9 @@ ProcessEnvironment()
isGeant4 = kFALSE;
if (gSystem->Getenv("CONFIG_GEANT4"))
isGeant4 = kTRUE;
g4PhysList = "";
if (gSystem->Getenv("CONFIG_GEANT4PHYSLIST"))
g4PhysList = gSystem->Getenv("CONFIG_GEANT4PHYSLIST");

// PurifyKine OFF
purifyKine = kTRUE;
Expand Down
27 changes: 22 additions & 5 deletions MC/Geant4Config.C
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,28 @@ void Geant4Config()
TGeant4 *geant4 = 0;
if ( ! gMC ) {
TG4RunConfiguration* runConfiguration = NULL;

TString configPhysList = "FTFP_INCLXX_EMV+optical";
if (g4PhysList == "BERT") configPhysList = "FTFP_BERT_EMV+optical";
else if (g4PhysList == "BERT+biasing") configPhyList = "FTFP_BERT_EMV+optical+biasing";
// check if monopole injection requested
if(abs(pdgConfig)<60000000 || abs(pdgConfig)>=70000000){

runConfiguration = new TG4RunConfiguration("geomRoot",
"FTFP_INCLXX_EMV+optical",
Form("%s", configPhysList.Data()),
"specialCuts+stackPopper+stepLimiter",
true);
geant4 = new TGeant4("TGeant4",
"The Geant4 Monte Carlo : FTFP_INCLXX_EMV+optical",
Form("The Geant4 Monte Carlo : %s", configPhysList.Data()),
runConfiguration);
}
else{
Printf("\n\nSET UP GEANT4 for magnetic monopoles\n\n");
if (g4PhysList == "BERT+biasing") {
Printf("We cannot use the BERT+biasing with the monopoles, we will unset the pointer to geant4");
delete geant4;
geant4 = 0;
return;
}
//decode mass, electric charge and magnetic charge: pdgConfig= sign 6abcdefg -> mass= c.defg*10^g; el charge=sign a; mag. charge= sign b
Double_t mass=Double_t (int(abs(pdgConfig)%(int(1e5))/10)/1000.)*pow(10,(int(abs(pdgConfig)%10)));
Double_t eCh=(abs(pdgConfig)/pdgConfig)*abs(pdgConfig)/(int(1e6))%10;
Expand All @@ -40,7 +49,7 @@ void Geant4Config()


runConfiguration = new TG4RunConfiguration("geomRoot",
"FTFP_INCLXX_EMV+optical+monopole",
Form("%s+monopole", configPhysList.Data()),
"specialCuts+stackPopper+stepLimiter",
true);

Expand All @@ -49,7 +58,7 @@ void Geant4Config()
runConfiguration->SetParameter("monopoleMagCharge", mCh);

geant4 = new TGeant4("TGeant4",
"The Geant4 Monte Carlo : FTFP_INCLXX_EMV+optical+monopole",
Form("The Geant4 Monte Carlo : %s+monopole", configPhysList.Data()),
runConfiguration);
}

Expand Down Expand Up @@ -122,5 +131,13 @@ void Geant4Config()
geant4->ProcessGeantCommand("/mcMagField/setDeltaIntersection 1.0e-05 mm");
geant4->ProcessGeantCommand("/mcMagField/setMinimumEpsilonStep 0.5e-05");
geant4->ProcessGeantCommand("/mcMagField/setMaximumEpsilonStep 1.0e-05");

if (g4PhysList == "BERT+biasing") {
geant4->ProcessGeantCommand("/mcVerbose/biasingConfigurationManager 1");
geant4->ProcessGeantCommand("/mcPhysics/biasing/setModel inclxx");
geant4->ProcessGeantCommand("/mcPhysics/biasing/setRegions ITS_AIR$ ITS_WATER$ ITS_COPPER$ ITS_KAPTON(POLYCH2)$ ITS_GLUE_IBFPC$ ITS_CERAMIC$ ITS_K13D2U2k$ ITS_K13D2U120$ ITS_F6151B05M$ ITS_M60J3K$ ITS_M55J6K$ ITS_FGS003$ ITS_CarbonFleece$ ITS_PEEKCF30$ ITS_GLUE$ ITS_ALUMINUM$ ITS_INOX304$ ALPIDE_METALSTACK$ ALPIDE_SI$");
geant4->ProcessGeantCommand("/mcPhysics/biasing/setParticles proton neutron pi+ pi-");
}

}

7 changes: 7 additions & 0 deletions MC/dpgsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function COMMAND_HELP(){
echo "--purifyKineOff Switch off the PurifyKine step in simulation"
echo "--fluka Use FLUKA instead of GEANT3"
echo "--geant4 Use GEANT4 instead of GEANT3"
echo "--geant4PhysList <g4PhysList> Which Physics List in case of GEANT4"
echo "--nofastB Switch off usage of fast B field"
echo "--novdt Switch off usage of VDT library"
echo "--genpkg if using ALIGENMC as generator: package version"
Expand Down Expand Up @@ -224,6 +225,7 @@ CONFIG_OCDBRUN3=""
CONFIG_PURIFYKINEOFF=""
CONFIG_HLT=""
CONFIG_GEANT4=""
CONFIG_GEANT4PHYSLIST=""
CONFIG_FLUKA=""
CONFIG_FASTB=""
CONFIG_VDT="on"
Expand Down Expand Up @@ -429,6 +431,10 @@ while [ ! -z "$1" ]; do
elif [ "$option" = "--geant4" ]; then
CONFIG_GEANT4="on"
export CONFIG_GEANT4
elif [ "$option" = "--geant4PhysList" ] && [[ CONFIG_GEANT4 == "on" ]]; then
CONFIG_GEANT4PHYSLIST="$1"
export CONFIG_GEANT4PHYSLIST
shift
elif [ "$option" = "--fluka" ]; then
CONFIG_FLUKA="on"
export CONFIG_FLUKA
Expand Down Expand Up @@ -843,6 +849,7 @@ echo "No. Events....... $CONFIG_NBKG"
echo "============================================"
echo "Detector......... $CONFIG_DETECTOR"
echo "GEANT4........... $CONFIG_GEANT4"
echo "GEANT4 Phy List...$CONFIG_GEANT4PHYSLIST"
echo "FLUKA............ $CONFIG_FLUKA"
echo "PurifyKineOff.... $CONFIG_PURIFYKINEOFF"
echo "Fast-B........... $CONFIG_FASTB"
Expand Down

0 comments on commit a7828f4

Please sign in to comment.