4 #include "SimG4Core/CustomPhysics/interface/G4ProcessHelper.hh"
12 #include "G4hMultipleScattering.hh"
13 #include "G4hIonisation.hh"
14 #include "G4ProcessManager.hh"
16 #include "SimG4Core/CustomPhysics/interface/FullModelHadronicProcess.hh"
17 #include "SimG4Core/CustomPhysics/interface/ToyModelHadronicProcess.hh"
19 using namespace CLHEP;
26 : G4VPhysicsConstructor(name)
34 <<
"CustomPhysicsList: Path for custom particle definition file: \n"
42 G4cout <<
"===== CustomPhysicsList::ConstructParticle " <<
this << G4endl;
52 <<
"CustomPhysicsList: adding CustomPhysics processes "
53 <<
"for the list of particles";
57 aParticleIterator->reset();
59 while((*aParticleIterator)()) {
60 G4ParticleDefinition* particle = aParticleIterator->value();
63 G4ProcessManager* pmanager = particle->GetProcessManager();
65 <<
"CustomPhysicsList: " << particle->GetParticleName()
66 <<
" PDGcode= " << particle->GetPDGEncoding()
67 <<
" Mass= " << particle->GetPDGMass()/
GeV <<
" GeV.";
69 if(particle->GetPDGCharge() != 0.0) {
70 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1, 1);
71 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
74 pmanager->AddProcess(
new G4Decay, 0, -1, 3);
79 <<
"CustomPhysicsList: " << particle->GetParticleName()
81 <<
" GeV; SpectatorMass= " << cp->
GetSpectator()->GetPDGMass()/
GeV<<
" GeV.";
84 pmanager->AddDiscreteProcess(
new FullModelHadronicProcess(
myHelper));
T getParameter(std::string const &) const
static G4ThreadLocal G4Decay * fDecayProcess
edm::ParameterSet myConfig
std::string particleDefFilePath
G4ParticleDefinition * GetCloud()
static void loadCustomParticles(const std::string &filePath)
virtual ~CustomPhysicsList()
static G4ThreadLocal G4ProcessHelper * myHelper
bool fHadronicInteraction
G4ParticleDefinition * GetSpectator()
static bool s_isRHadron(int pdg)
CustomPhysicsList(std::string name, const edm::ParameterSet &p)
static bool isCustomParticle(G4ParticleDefinition *particle)
std::string fullPath() const
static G4ThreadLocal bool fInitialized
virtual void ConstructParticle()
virtual void ConstructProcess()