Loading code/BoGEMMSApplication.cc +23 −6 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ GeoClassFactory::map_type * GeoClassFactory::map = NULL; PhysClassFactory::map_type * PhysClassFactory::map = NULL; #include "PhysClassFactory.hh" #include "FTFP_BERT.hh" #include "G4PhysListFactory.hh" //std::map<std::string, std::function<std::shared_ptr<G4VUserDetectorConstruction>()>> ClassFactory::classMap; Loading @@ -86,15 +86,32 @@ BoGEMMSApplication::~BoGEMMSApplication() {} void BoGEMMSApplication::DefinePhysicList(G4RunManager * runManager) { G4PhysListFactory factory; cout << "Physics class activated: " << gm.physVersion << endl; if (factory.IsReferencePhysList(gm.physVersion)) { cout << "* Geant4 reference physics list *" << endl; G4VModularPhysicsList* refPhysList = factory.GetReferencePhysList(gm.physVersion); //cut off G4double inputCutValue = 1.*mm; G4String prefix = gm.physVersion; gm.config->readInto(inputCutValue, prefix + ".DEFAULT.CUT"); G4cout << prefix + ".DEFAULT.CUT: " << inputCutValue << G4endl; G4double defaultCutValue = inputCutValue*mm; refPhysList->SetDefaultCutValue(defaultCutValue); runManager->SetUserInitialization(refPhysList); } else { auto obj = PhysClassFactory::createInstance(gm.physVersion); if (obj) { runManager->SetUserInitialization(obj); //obj->AddPhysicsList(hadronname); } else { std::cout << "Physics class not found." << std::endl; } } } Loading Loading
code/BoGEMMSApplication.cc +23 −6 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ GeoClassFactory::map_type * GeoClassFactory::map = NULL; PhysClassFactory::map_type * PhysClassFactory::map = NULL; #include "PhysClassFactory.hh" #include "FTFP_BERT.hh" #include "G4PhysListFactory.hh" //std::map<std::string, std::function<std::shared_ptr<G4VUserDetectorConstruction>()>> ClassFactory::classMap; Loading @@ -86,15 +86,32 @@ BoGEMMSApplication::~BoGEMMSApplication() {} void BoGEMMSApplication::DefinePhysicList(G4RunManager * runManager) { G4PhysListFactory factory; cout << "Physics class activated: " << gm.physVersion << endl; if (factory.IsReferencePhysList(gm.physVersion)) { cout << "* Geant4 reference physics list *" << endl; G4VModularPhysicsList* refPhysList = factory.GetReferencePhysList(gm.physVersion); //cut off G4double inputCutValue = 1.*mm; G4String prefix = gm.physVersion; gm.config->readInto(inputCutValue, prefix + ".DEFAULT.CUT"); G4cout << prefix + ".DEFAULT.CUT: " << inputCutValue << G4endl; G4double defaultCutValue = inputCutValue*mm; refPhysList->SetDefaultCutValue(defaultCutValue); runManager->SetUserInitialization(refPhysList); } else { auto obj = PhysClassFactory::createInstance(gm.physVersion); if (obj) { runManager->SetUserInitialization(obj); //obj->AddPhysicsList(hadronname); } else { std::cout << "Physics class not found." << std::endl; } } } Loading