/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimG4Core/CustomPhysics/interface/CustomParticleFactory.h
34 строки
969 B
Vladimir
code format
01 дек 2021, 15:05
01 дек 2021, 15:05
d992784
Код
Авторство
О чём код?
#ifndef SimG4Core_CustomPhysics_CustomParticleFactory_h #define SimG4Core_CustomPhysics_CustomParticleFactory_h 1 #include "G4Threading.hh" #include <vector> #include <string> #include <fstream> class G4DecayTable; class G4ParticleDefinition; class CustomParticleFactory { public: explicit CustomParticleFactory(); ~CustomParticleFactory() = default; void loadCustomParticles(const std::string &filePath); const std::vector<G4ParticleDefinition *> &getCustomParticles(); private: void addCustomParticle(int pdgCode, double mass, const std::string &name); void getMassTable(std::ifstream *configFile); G4DecayTable *getDecayTable(std::ifstream *configFile, int pdgId); G4DecayTable *getAntiDecayTable(int pdgId, G4DecayTable *theDecayTable); std::string ToLower(std::string str); static bool loaded; static std::vector<G4ParticleDefinition *> m_particles; #ifdef G4MULTITHREADED static G4Mutex customParticleFactoryMutex; #endif }; #endif