#include <CustomPhysicsList.h>
Public Member Functions | |
CustomPhysicsList (std::string name, const edm::ParameterSet &p) | |
virtual | ~CustomPhysicsList () |
Protected Member Functions | |
void | addCustomPhysics () |
virtual void | ConstructParticle () |
virtual void | ConstructProcess () |
Private Member Functions | |
void | setupRHadronPhycis (G4ParticleDefinition *particle) |
void | setupSUSYPhycis (G4ParticleDefinition *particle) |
Private Attributes | |
edm::ParameterSet | myConfig |
G4ProcessHelper * | myHelper |
std::string | particleDefFilePath |
std::string | processDefFilePath |
Definition at line 13 of file CustomPhysicsList.h.
CustomPhysicsList::CustomPhysicsList | ( | std::string | name, |
const edm::ParameterSet & | p | ||
) |
Definition at line 24 of file CustomPhysicsList.cc.
References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), myConfig, myHelper, AlCaHLTBitMon_ParallelJobs::p, and particleDefFilePath.
: G4VPhysicsConstructor(name) { myConfig = p; edm::FileInPath fp = p.getParameter<edm::FileInPath>("particlesDef"); particleDefFilePath = fp.fullPath(); edm::LogInfo("CustomPhysics")<<"Path for custom particle definition file: "<<particleDefFilePath; myHelper = 0; }
CustomPhysicsList::~CustomPhysicsList | ( | ) | [virtual] |
void CustomPhysicsList::addCustomPhysics | ( | ) | [protected] |
Definition at line 46 of file CustomPhysicsList.cc.
References CommonMethods::cp(), CustomParticle::GetCloud(), i, CustomParticleFactory::isCustomParticle(), LogDebug, myConfig, and myHelper.
Referenced by ConstructProcess().
{ LogDebug("CustomPhysics") << " CustomPhysics: adding CustomPhysics processes"; theParticleIterator->reset(); while((*theParticleIterator)()) { int i = 0; G4ParticleDefinition* particle = theParticleIterator->value(); CustomParticle* cp = dynamic_cast<CustomParticle*>(particle); if(CustomParticleFactory::isCustomParticle(particle)) { LogDebug("CustomPhysics") << particle->GetParticleName()<<", "<<particle->GetPDGEncoding() << " is Custom. Mass is " <<particle->GetPDGMass()/GeV <<" GeV."; if(cp->GetCloud()!=0) { LogDebug("CustomPhysics")<<"Cloud mass is " <<cp->GetCloud()->GetPDGMass()/GeV <<" GeV. Spectator mass is " <<static_cast<CustomParticle*>(particle)->GetSpectator()->GetPDGMass()/GeV <<" GeV."; } G4ProcessManager* pmanager = particle->GetProcessManager(); if(pmanager) { if(cp!=0) { if(particle->GetParticleType()=="rhadron" || particle->GetParticleType()=="mesonino" || particle->GetParticleType() == "sbaryon"){ if(!myHelper) myHelper = new G4ProcessHelper(myConfig); pmanager->AddDiscreteProcess(new FullModelHadronicProcess(myHelper)); //GHEISHA } } if(particle->GetPDGCharge()/eplus != 0) { pmanager->AddProcess(new G4hMultipleScattering,-1, 1,i+1); pmanager->AddProcess(new G4hIonisation, -1, 2,i+2); } } else LogDebug("CustomPhysics") << " No pmanager"; } } }
void CustomPhysicsList::ConstructParticle | ( | ) | [protected, virtual] |
Definition at line 38 of file CustomPhysicsList.cc.
References CustomParticleFactory::loadCustomParticles(), and particleDefFilePath.
void CustomPhysicsList::ConstructProcess | ( | ) | [protected, virtual] |
Definition at line 42 of file CustomPhysicsList.cc.
References addCustomPhysics().
{ addCustomPhysics(); }
void CustomPhysicsList::setupRHadronPhycis | ( | G4ParticleDefinition * | particle | ) | [private] |
Definition at line 84 of file CustomPhysicsList.cc.
References CommonMethods::cp(), CustomParticle::GetCloud(), LogDebug, myConfig, and myHelper.
{ // LogDebug("CustomPhysics")<<"Configuring rHadron: " // <<cp-> CustomParticle* cp = dynamic_cast<CustomParticle*>(particle); if(cp->GetCloud()!=0) LogDebug("CustomPhysics")<<"Cloud mass is " <<cp->GetCloud()->GetPDGMass()/GeV <<" GeV. Spectator mass is " <<static_cast<CustomParticle*>(particle)->GetSpectator()->GetPDGMass()/GeV <<" GeV."; G4ProcessManager* pmanager = particle->GetProcessManager(); if(pmanager){ if(!myHelper) myHelper = new G4ProcessHelper(myConfig); pmanager->AddDiscreteProcess(new FullModelHadronicProcess(myHelper)); //GHEISHA if(particle->GetPDGCharge()/eplus != 0){ pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1); pmanager->AddProcess(new G4hIonisation, -1, 2,2); } } else LogDebug("CustomPhysics") << " No pmanager"; }
void CustomPhysicsList::setupSUSYPhycis | ( | G4ParticleDefinition * | particle | ) | [private] |
Definition at line 110 of file CustomPhysicsList.cc.
References LogDebug.
{ // CustomParticle* cp = dynamic_cast<CustomParticle*>(particle); G4ProcessManager* pmanager = particle->GetProcessManager(); if(pmanager){ pmanager->AddProcess(new G4Decay,1, 1,1); if(particle->GetPDGCharge()/eplus != 0){ pmanager->AddProcess(new G4hMultipleScattering,-1, 2,2); pmanager->AddProcess(new G4hIonisation, -1, 3,3); } } else LogDebug("CustomPhysics") << " No pmanager"; }
edm::ParameterSet CustomPhysicsList::myConfig [private] |
Definition at line 32 of file CustomPhysicsList.h.
Referenced by addCustomPhysics(), CustomPhysicsList(), and setupRHadronPhycis().
G4ProcessHelper* CustomPhysicsList::myHelper [private] |
Definition at line 30 of file CustomPhysicsList.h.
Referenced by addCustomPhysics(), CustomPhysicsList(), setupRHadronPhycis(), and ~CustomPhysicsList().
std::string CustomPhysicsList::particleDefFilePath [private] |
Definition at line 34 of file CustomPhysicsList.h.
Referenced by ConstructParticle(), and CustomPhysicsList().
std::string CustomPhysicsList::processDefFilePath [private] |
Definition at line 35 of file CustomPhysicsList.h.