4 #include "SimG4Core/CustomPhysics/interface/G4ProcessHelper.hh"
11 #include "G4hMultipleScattering.hh"
12 #include "G4hIonisation.hh"
13 #include "G4ProcessManager.hh"
15 #include "G4LeptonConstructor.hh"
16 #include "G4MesonConstructor.hh"
17 #include "G4BaryonConstructor.hh"
18 #include "G4ShortLivedConstructor.hh"
19 #include "G4IonConstructor.hh"
21 #include "SimG4Core/CustomPhysics/interface/FullModelHadronicProcess.hh"
22 #include "SimG4Core/CustomPhysics/interface/ToyModelHadronicProcess.hh"
23 #include "SimG4Core/CustomPhysics/interface/CMSDarkPairProductionProcess.hh"
25 using namespace CLHEP;
29 : G4VPhysicsConstructor(name)
35 edm::LogInfo(
"CustomPhysics")<<
"Path for custom particle definition file: "
36 <<particleDefFilePath<<
"\n" <<
" dark_factor= " <<
dfactor;
54 edm::LogInfo(
"CustomPhysics") <<
" CustomPhysicsList: adding CustomPhysics processes "
55 <<
"for the list of particles: \n";
56 aParticleIterator->reset();
58 while((*aParticleIterator)()) {
59 G4ParticleDefinition* particle = aParticleIterator->value();
62 edm::LogInfo(
"CustomPhysics") << particle->GetParticleName()
63 <<
" PDGcode= "<<particle->GetPDGEncoding()
65 <<particle->GetPDGMass()/
GeV <<
" GeV.";
67 edm::LogInfo(
"CustomPhysics") << particle->GetParticleName()
70 <<
" GeV; SpectatorMass= "
74 G4ProcessManager* pmanager = particle->GetProcessManager();
76 if(particle->GetPDGCharge() != 0.0) {
77 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1, 1);
78 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
81 if(particle->GetParticleType()==
"rhadron" ||
82 particle->GetParticleType()==
"mesonino" ||
83 particle->GetParticleType() ==
"sbaryon"){
85 pmanager->AddDiscreteProcess(
new FullModelHadronicProcess(
myHelper));
87 if(particle->GetParticleType()==
"darkpho"){
88 CMSDarkPairProductionProcess * darkGamma =
new CMSDarkPairProductionProcess(
dfactor);
89 pmanager->AddDiscreteProcess(darkGamma);
93 else LogDebug(
"CustomPhysics") <<
" No pmanager";
109 <<
" GeV. Spectator mass is "
113 G4ProcessManager* pmanager = particle->GetProcessManager();
116 if(particle->GetPDGCharge()/eplus != 0){
117 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1, 1);
118 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
120 pmanager->AddDiscreteProcess(
new FullModelHadronicProcess(
myHelper));
122 else LogDebug(
"CustomPhysics") <<
" No pmanager";
127 G4ProcessManager* pmanager = particle->GetProcessManager();
129 if(particle->GetPDGCharge()/eplus != 0){
130 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1, 1);
131 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
133 pmanager->AddProcess(
new G4Decay, 1, -1, 3);
135 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)
G4ParticleDefinition * GetSpectator()
G4ProcessHelper * myHelper
CustomPhysicsList(std::string name, const edm::ParameterSet &p)
static bool isCustomParticle(G4ParticleDefinition *particle)
virtual void ConstructParticle()
virtual void ConstructProcess()