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;