10 #include "G4hMultipleScattering.hh"
11 #include "G4hIonisation.hh"
12 #include "G4ProcessManager.hh"
14 #include "G4LeptonConstructor.hh"
15 #include "G4MesonConstructor.hh"
16 #include "G4BaryonConstructor.hh"
17 #include "G4ShortLivedConstructor.hh"
18 #include "G4IonConstructor.hh"
20 #include "SimG4Core/CustomPhysics/interface/FullModelHadronicProcess.hh"
21 #include "SimG4Core/CustomPhysics/interface/ToyModelHadronicProcess.hh"
47 LogDebug(
"CustomPhysics") <<
" CustomPhysics: adding CustomPhysics processes";
48 theParticleIterator->reset();
50 while((*theParticleIterator)()) {
52 G4ParticleDefinition* particle = theParticleIterator->value();
55 LogDebug(
"CustomPhysics") << particle->GetParticleName()<<
", "<<particle->GetPDGEncoding()
56 <<
" is Custom. Mass is "
57 <<particle->GetPDGMass()/GeV <<
" GeV.";
59 LogDebug(
"CustomPhysics")<<
"Cloud mass is "
61 <<
" GeV. Spectator mass is "
62 <<
static_cast<CustomParticle*
>(particle)->GetSpectator()->GetPDGMass()/GeV
65 G4ProcessManager* pmanager = particle->GetProcessManager();
68 if(particle->GetParticleType()==
"rhadron" || particle->GetParticleType()==
"mesonino" || particle->GetParticleType() ==
"sbaryon"){
70 pmanager->AddDiscreteProcess(
new FullModelHadronicProcess(
myHelper));
73 if(particle->GetPDGCharge()/eplus != 0) {
74 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1,i+1);
75 pmanager->AddProcess(
new G4hIonisation, -1, 2,i+2);
78 else LogDebug(
"CustomPhysics") <<
" No pmanager";
91 LogDebug(
"CustomPhysics")<<
"Cloud mass is "
93 <<
" GeV. Spectator mass is "
94 <<
static_cast<CustomParticle*
>(particle)->GetSpectator()->GetPDGMass()/GeV
97 G4ProcessManager* pmanager = particle->GetProcessManager();
100 pmanager->AddDiscreteProcess(
new FullModelHadronicProcess(
myHelper));
101 if(particle->GetPDGCharge()/eplus != 0){
102 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1,1);
103 pmanager->AddProcess(
new G4hIonisation, -1, 2,2);
106 else LogDebug(
"CustomPhysics") <<
" No pmanager";
113 G4ProcessManager* pmanager = particle->GetProcessManager();
115 pmanager->AddProcess(
new G4Decay,1, 1,1);
116 if(particle->GetPDGCharge()/eplus != 0){
117 pmanager->AddProcess(
new G4hMultipleScattering,-1, 2,2);
118 pmanager->AddProcess(
new G4hIonisation, -1, 3,3);
121 else LogDebug(
"CustomPhysics") <<
" No pmanager";
T getParameter(std::string const &) const
edm::ParameterSet myConfig
std::string particleDefFilePath
G4ParticleDefinition * GetCloud()
void setupRHadronPhycis(G4ParticleDefinition *particle)
static void loadCustomParticles(const std::string &filePath)
virtual ~CustomPhysicsList()
void setupSUSYPhycis(G4ParticleDefinition *particle)
G4ProcessHelper * myHelper
CustomPhysicsList(std::string name, const edm::ParameterSet &p)
static bool isCustomParticle(G4ParticleDefinition *particle)
std::string fullPath() const
virtual void ConstructParticle()
virtual void ConstructProcess()