#include "CbmGeant4Settings.h" #include #include #include #include #include void CbmGeant4Settings::Init(TVirtualMC* vmc) { CbmVMCSettings::Init(vmc); TGeant4* vmcg4 = dynamic_cast(vmc); assert(vmcg4); // TODO: These settings were taken over from g4Config.C. To be documented. // --- Set external decayer (Pythia) if required if(FairRunSim::Instance()->IsExtDecayer()){ TVirtualMCDecayer* decayer = TPythia6Decayer::Instance(); vmcg4->SetExternalDecayer(decayer); LOG(info) << ": Using Phythia6 decayer"; } // --- Random seed and maximum number of steps Text_t buffer[50]; sprintf(buffer,"/random/setSeeds %i %i ",gRandom->GetSeed(), gRandom->GetSeed()); vmcg4->ProcessGeantCommand(buffer); vmcg4->SetMaxNStep(10000000); // default is 30000 // --- Execute Geant4 configuration macro /* TString configMacro(gSystem->Getenv("VMCWORKDIR")); configMacro += "/gconfig/g4config.in"; LOG(info) << ": Using Geant4 configuration from " << configMacro; vmcg4->ProcessGeantMacro(configMacro.Data()); */ // for (std::string command: fG4Commands) { LOG(info) << "Passing the following command to Geant4: " << command; vmcg4->ProcessGeantCommand(command.c_str()); } } ClassImp(CbmGeant4Settings);