diff --git a/MC/Config.C b/MC/Config.C index efe5330a..44822890 100644 --- a/MC/Config.C +++ b/MC/Config.C @@ -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 @@ -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"); @@ -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; diff --git a/MC/Geant4Config.C b/MC/Geant4Config.C index 72704948..f8ed1e02 100644 --- a/MC/Geant4Config.C +++ b/MC/Geant4Config.C @@ -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; @@ -40,7 +49,7 @@ void Geant4Config() runConfiguration = new TG4RunConfiguration("geomRoot", - "FTFP_INCLXX_EMV+optical+monopole", + Form("%s+monopole", configPhysList.Data()), "specialCuts+stackPopper+stepLimiter", true); @@ -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); } @@ -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-"); + } + } diff --git a/MC/dpgsim.sh b/MC/dpgsim.sh index ac70e7e7..9d862cd9 100755 --- a/MC/dpgsim.sh +++ b/MC/dpgsim.sh @@ -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 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" @@ -224,6 +225,7 @@ CONFIG_OCDBRUN3="" CONFIG_PURIFYKINEOFF="" CONFIG_HLT="" CONFIG_GEANT4="" +CONFIG_GEANT4PHYSLIST="" CONFIG_FLUKA="" CONFIG_FASTB="" CONFIG_VDT="on" @@ -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 @@ -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"