64 msg +=
"> not found.";
65 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
68 thePdef.push_back(pd);
74 const std::vector<G4String>& particleNames)
78 for (
size_t i = 0; i < particleNames.size(); i++){
83 msg += particleNames[i];
84 msg +=
"> not found.";
85 G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
88 thePdef.push_back(pd);
95 const std::vector<G4ParticleDefinition*>& particleDef)
98 for (
size_t i = 0; i < particleDef.size(); i++){
99 if(!particleDef[i])
G4Exception(
"G4SDParticleFilter::G4SDParticleFilter",
101 "NULL pointer is found in the given particleDef vector.");
117 for (
size_t i = 0; i < thePdef.size(); i++){
122 for (
size_t i = 0; i < theIonZ.size(); i++){
140 msg +=
"> not found.";
144 for (
size_t i = 0; i < thePdef.size(); i++){
145 if ( thePdef[i] == pd )
return;
147 thePdef.push_back(pd);
151 for (
size_t i = 0; i < theIonZ.size(); i++){
152 if ( theIonZ[i] == Z && theIonA[i] == A ){
153 G4cout <<
"G4SDParticleFilter:: Ion has been already registered."<<
G4endl;
157 theIonZ.push_back(Z);
158 theIonA.push_back(A);
162 G4cout <<
"----G4SDParticleFileter particle list------"<<
G4endl;
163 for (
size_t i = 0; i < thePdef.size(); i++){
166 for (
size_t i = 0; i < theIonZ.size(); i++){
167 G4cout <<
" Ion PrtclDef (" << theIonZ[i]<<
","<<theIonA[i]<<
")"
170 G4cout <<
"-------------------------------------------"<<
G4endl;
G4DLLIMPORT 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
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)