21 TGeant4* vmcg4 =
dynamic_cast<TGeant4*
>(vmc);
28 if (FairRunSim::Instance()->IsExtDecayer()) {
29 TVirtualMCDecayer* decayer = TPythia6Decayer::Instance();
30 vmcg4->SetExternalDecayer(decayer);
31 LOG(info) <<
": Using Phythia6 decayer";
35 size_t buf_size = 100;
40 LOG(info) <<
"Set Geant4 random seed to " <<
fRandomSeed;
42 if (!(result_length > 0 && result_length <
static_cast<int>(buf_size))) {
43 LOG(fatal) <<
"Buffer overrun. Random seed for Geant4 would be improper.";
45 vmcg4->ProcessGeantCommand(
buffer);
50 LOG(info) <<
"Passing the following command to Geant4: " << command;
51 vmcg4->ProcessGeantCommand(command.c_str());
54 LOG(warning) <<
"Fix for Geant4 bug applied (see "
55 "https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2226)";
56 G4NuclearLevelData::GetInstance()->GetParameters()->SetMaxLifeTime(1 * CLHEP::microsecond);