CMS 3D CMS Logo

CustomParticleFactory.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CustomPhysics_CustomParticleFactory_h
2 #define SimG4Core_CustomPhysics_CustomParticleFactory_h 1
3 
4 #include "G4Threading.hh"
5 #include <vector>
6 #include <string>
7 #include <fstream>
8 
9 class G4DecayTable;
10 class G4ParticleDefinition;
11 
13 public:
14  explicit CustomParticleFactory();
16 
18  const std::vector<G4ParticleDefinition *> &GetCustomParticles();
19 
20 private:
21  void addCustomParticle(int pdgCode, double mass, const std::string &name);
22  void getMassTable(std::ifstream *configFile);
23  G4DecayTable *getDecayTable(std::ifstream *configFile, int pdgId);
24  G4DecayTable *getAntiDecayTable(int pdgId, G4DecayTable *theDecayTable);
26 
27  static bool loaded;
28  static std::vector<G4ParticleDefinition *> m_particles;
29 #ifdef G4MULTITHREADED
30  static G4Mutex customParticleFactoryMutex;
31 #endif
32 };
33 
34 #endif
CustomParticleFactory::ToLower
std::string ToLower(std::string str)
Definition: CustomParticleFactory.cc:430
CustomParticleFactory::m_particles
static std::vector< G4ParticleDefinition * > m_particles
Definition: CustomParticleFactory.h:28
CustomParticleFactory::addCustomParticle
void addCustomParticle(int pdgCode, double mass, const std::string &name)
Definition: CustomParticleFactory.cc:93
CustomParticleFactory::getMassTable
void getMassTable(std::ifstream *configFile)
Definition: CustomParticleFactory.cc:249
CustomParticleFactory::getDecayTable
G4DecayTable * getDecayTable(std::ifstream *configFile, int pdgId)
Definition: CustomParticleFactory.cc:338
str
#define str(s)
Definition: TestProcessor.cc:48
CustomParticleFactory::loaded
static bool loaded
Definition: CustomParticleFactory.h:27
dt4ml_dqm_sourceclient-live_cfg.filePath
filePath
CUSTOMIZE FOR ML.
Definition: dt4ml_dqm_sourceclient-live_cfg.py:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CustomParticleFactory::GetCustomParticles
const std::vector< G4ParticleDefinition * > & GetCustomParticles()
Definition: CustomParticleFactory.cc:437
CustomParticleFactory::~CustomParticleFactory
~CustomParticleFactory()
Definition: CustomParticleFactory.cc:31
CustomParticleFactory::loadCustomParticles
void loadCustomParticles(const std::string &filePath)
Definition: CustomParticleFactory.cc:33
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
CustomParticleFactory
Definition: CustomParticleFactory.h:12
CustomParticleFactory::getAntiDecayTable
G4DecayTable * getAntiDecayTable(int pdgId, G4DecayTable *theDecayTable)
Definition: CustomParticleFactory.cc:399
CustomParticleFactory::CustomParticleFactory
CustomParticleFactory()
Definition: CustomParticleFactory.cc:29
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17