63 msg +=
"> not found.";
64 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
67 thePdef.push_back(pd);
73 const std::vector<G4String>& particleNames)
77 for (
size_t i = 0; i < particleNames.size(); i++){
82 msg += particleNames[i];
83 msg +=
"> not found.";
84 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
87 thePdef.push_back(pd);
94 const std::vector<G4ParticleDefinition*>& particleDef)
97 for (
size_t i = 0; i < particleDef.size(); i++){
98 if(!particleDef[i])
G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
100 "NULL pointer is found in the given particleDef vector.");
116 for (
size_t i = 0; i < thePdef.size(); i++){
121 for (
size_t i = 0; i < theIonZ.size(); i++){
139 msg +=
"> not found.";
143 for (
size_t i = 0; i < thePdef.size(); i++){
144 if ( thePdef[i] == pd )
return;
146 thePdef.push_back(pd);
150 for (
size_t i = 0; i < theIonZ.size(); i++){
151 if ( theIonZ[i] == Z && theIonA[i] ==
A ){
152 G4cout <<
"G4SDParticleFilter:: Ion has been already registered."<<
G4endl;
156 theIonZ.push_back(Z);
157 theIonA.push_back(
A);
161 G4cout <<
"----G4SDParticleFileter particle list------"<<
G4endl;
162 for (
size_t i = 0; i < thePdef.size(); i++){
165 for (
size_t i = 0; i < theIonZ.size(); i++){
166 G4cout <<
" Ion PrtclDef (" << theIonZ[i]<<
","<<theIonA[i]<<
")"
169 G4cout <<
"-------------------------------------------"<<
G4endl;
double A(double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
G4int GetAtomicNumber() const
G4int GetAtomicMass() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4SDParticleFilter(G4String name)
virtual ~G4SDParticleFilter()
void addIon(G4int Z, G4int A)
void add(const G4String &particleName)
virtual G4bool Accept(const G4Step *) const
G4Track * GetTrack() const
G4ParticleDefinition * GetDefinition() const