35 #include <Geant4/G4Decay.hh>
36 #include <Geant4/G4ParticleDefinition.hh>
37 #include <Geant4/G4ParticleTable.hh>
38 #include <Geant4/G4ProcessManager.hh>
39 #include <Geant4/G4ProcessVector.hh>
40 #include <Geant4/G4String.hh>
41 #include <Geant4/G4VPhysicsConstructor.hh>
42 #include <Geant4/G4VProcess.hh>
43 #include <Geant4/G4Version.hh>
45 #include <boost/io/ios_state.hpp>
55 #ifndef aParticleIterator
56 #define aParticleIterator ((subInstanceManager.offset[g4vpcInstanceID])._aParticleIterator)
60 : G4VPhysicsConstructor(name)
88 boost::io::ios_all_saver ias_cout(std::cout);
89 boost::io::ios_all_saver ias_cerr(std::cerr);
108 const char* CALIBRATIONROOT = getenv(
"CALIBRATIONROOT");
109 if (!CALIBRATIONROOT)
115 std::ifstream f_calib(DecayFileCalibrationRepo);
123 std::cout << __PRETTY_FUNCTION__ <<
" : Fatal error. Decay file can not be found at "
124 <<
DecayFile <<
" nor at " << DecayFileCalibrationRepo << std::endl;
132 int decayer_used = 0;
136 G4ProcessManager* pmanager = particle->GetProcessManager();
138 if (verboseLevel > 1)
140 std::cout <<
"Setting ext decayer for: "
145 G4ProcessVector* processVector = pmanager->GetProcessList();
146 #if G4VERSION_NUMBER >= 1060
147 for (
size_t i = 0;
i < processVector->length();
i++)
149 for (G4int
i = 0;
i < processVector->length();
i++)
152 G4Decay* decay =
dynamic_cast<G4Decay*
>((*processVector)[
i]);
173 if (verboseLevel > 0)
175 std::cout <<
"External decayer physics constructed." << std::endl;