59 msg +=
"> not found.";
60 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
"DetPS0101",
63 thePdef.push_back(pd);
67 G4String name,
const std::vector<G4String>& particleNames)
70 for(
const auto & particleName : particleNames)
78 msg +=
"> not found.";
79 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
"DetPS0102",
82 thePdef.push_back(pd);
87 G4String name,
const std::vector<G4ParticleDefinition*>& particleDef)
89 , thePdef(particleDef)
91 for(
auto i : particleDef)
94 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
"DetPS0103",
96 "NULL pointer is found in the given particleDef vector.");
102 for(
auto i : thePdef)
109 for(
size_t i = 0; i < theIonZ.size(); i++)
129 msg +=
"> not found.";
132 for(
auto & i : thePdef)
137 thePdef.push_back(pd);
142 for(
size_t i = 0; i < theIonZ.size(); i++)
144 if(theIonZ[i] ==
Z && theIonA[i] ==
A)
146 G4cout <<
"G4SDParticleFilter:: Ion has been already registered."
151 theIonZ.push_back(
Z);
152 theIonA.push_back(
A);
157 G4cout <<
"----G4SDParticleFileter particle list------" <<
G4endl;
158 for(
auto & i : thePdef)
162 for(
size_t i = 0; i < theIonZ.size(); i++)
164 G4cout <<
" Ion PrtclDef (" << theIonZ[i] <<
"," << theIonA[i] <<
")"
167 G4cout <<
"-------------------------------------------" <<
G4endl;
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()
G4bool Accept(const G4Step *) const override
G4SDParticleFilter(G4String name)
void addIon(G4int Z, G4int A)
void add(const G4String &particleName)
G4Track * GetTrack() const
G4ParticleDefinition * GetDefinition() const