G4ParticleTable Class Reference

#include <G4ParticleTable.hh>


Public Types

typedef G4ParticleTableIterator<
G4String, G4ParticleDefinition
* >::Map 
G4PTblDictionary
typedef G4ParticleTableIterator<
G4String, G4ParticleDefinition * > 
G4PTblDicIterator
typedef G4ParticleTableIterator<
G4int, G4ParticleDefinition
* >::Map 
G4PTblEncodingDictionary
typedef G4ParticleTableIterator<
G4int, G4ParticleDefinition * > 
G4PTblEncodingDicIterator

Public Member Functions

virtual ~G4ParticleTable ()
G4bool contains (const G4ParticleDefinition *particle)
G4bool contains (const G4String &particle_name)
G4int entries () const
G4int size () const
G4ParticleDefinitionGetParticle (G4int index)
const G4StringGetParticleName (G4int index)
G4ParticleDefinitionFindParticle (G4int PDGEncoding)
G4ParticleDefinitionFindParticle (const G4String &particle_name)
G4ParticleDefinitionFindParticle (const G4ParticleDefinition *particle)
G4ParticleDefinitionFindAntiParticle (G4int PDGEncoding)
G4ParticleDefinitionFindAntiParticle (const G4String &particle_name)
G4ParticleDefinitionFindAntiParticle (const G4ParticleDefinition *particle)
G4ParticleDefinitionFindIon (G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
G4ParticleDefinitionFindIon (G4int atomicNumber, G4int atomicMass, G4int numberOfLambda, G4double excitationEnergy)
G4ParticleDefinitionGetIon (G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
G4ParticleDefinitionGetIon (G4int atomicNumber, G4int atomicMass, G4int numberOfLambda, G4double excitationEnergy)
G4ParticleDefinitionFindIon (G4int atomicNumber, G4int atomicMass, G4int dummy1, G4int dummy2)
G4PTblDicIteratorGetIterator ()
void DumpTable (const G4String &particle_name="ALL")
G4IonTableGetIonTable ()
const G4ShortLivedTableGetShortLivedTable ()
G4ParticleDefinitionInsert (G4ParticleDefinition *particle)
G4ParticleDefinitionRemove (G4ParticleDefinition *particle)
void RemoveAllParticles ()
void DeleteAllParticles ()
G4UImessengerCreateMessenger ()
void DeleteMessenger ()
void SetVerboseLevel (G4int value)
G4int GetVerboseLevel () const
void SetReadiness (G4bool val=true)
G4bool GetReadiness () const

Static Public Member Functions

static G4ParticleTableGetParticleTable ()

Protected Member Functions

 G4ParticleTable ()
 G4ParticleTable (const G4ParticleTable &right)
G4ParticleTableoperator= (const G4ParticleTable &)
G4PTblDictionaryGetDictionary ()
const G4StringGetKey (const G4ParticleDefinition *particle) const
const G4PTblEncodingDictionaryGetEncodingDictionary ()


Detailed Description

Definition at line 64 of file G4ParticleTable.hh.


Member Typedef Documentation

typedef G4ParticleTableIterator<G4String, G4ParticleDefinition*> G4ParticleTable::G4PTblDicIterator

Definition at line 77 of file G4ParticleTable.hh.

typedef G4ParticleTableIterator<G4String, G4ParticleDefinition*>::Map G4ParticleTable::G4PTblDictionary

Definition at line 76 of file G4ParticleTable.hh.

typedef G4ParticleTableIterator<G4int, G4ParticleDefinition*> G4ParticleTable::G4PTblEncodingDicIterator

Definition at line 79 of file G4ParticleTable.hh.

typedef G4ParticleTableIterator<G4int, G4ParticleDefinition*>::Map G4ParticleTable::G4PTblEncodingDictionary

Definition at line 78 of file G4ParticleTable.hh.


Constructor & Destructor Documentation

G4ParticleTable::G4ParticleTable (  )  [protected]

Definition at line 73 of file G4ParticleTable.cc.

00074      :verboseLevel(1),fParticleMessenger(0),
00075       noName(" "),
00076       readyToUse(false)
00077 {
00078   fDictionary = new G4PTblDictionary();
00079   fIterator   = new G4PTblDicIterator( *fDictionary );
00080   fEncodingDictionary = new G4PTblEncodingDictionary();
00081 
00082  // Ion Table
00083   fIonTable = new G4IonTable();
00084 
00085   // short lived table
00086   fShortLivedTable = new G4ShortLivedTable();
00087 }

G4ParticleTable::G4ParticleTable ( const G4ParticleTable right  )  [protected]

Definition at line 130 of file G4ParticleTable.cc.

References FatalException, fDictionary, and G4Exception().

00131   :verboseLevel(1),fParticleMessenger(0),
00132    noName(" "),
00133    readyToUse(false)
00134 {
00135   G4Exception("G4ParticleTable::G4ParticleTable()",
00136               "PART001", FatalException,
00137               "Illegal call of copy constructor for G4ParticleTable");    
00138   fDictionary = new G4PTblDictionary(*(right.fDictionary));
00139   fIterator   = new G4PTblDicIterator(*fDictionary);
00140 }

G4ParticleTable::~G4ParticleTable (  )  [virtual]

Definition at line 90 of file G4ParticleTable.cc.

References RemoveAllParticles().

00091 {
00092    readyToUse = false;
00093    
00094    // remove all items from G4ParticleTable
00095    RemoveAllParticles();
00096 
00097   // delete Short Lived table 
00098   if (fShortLivedTable!=0) delete fShortLivedTable;
00099   fShortLivedTable =0;
00100 
00101 
00102   //delete Ion Table 
00103   if (fIonTable!=0) delete fIonTable;
00104   fIonTable =0;
00105 
00106   // delete dictionary for encoding
00107   if (fEncodingDictionary!=0){
00108     fEncodingDictionary -> clear();
00109     delete fEncodingDictionary;
00110     fEncodingDictionary =0;
00111   }
00112 
00113   if(fDictionary){
00114     if (fIterator!=0 )delete fIterator;
00115     fIterator =0;
00116 
00117     fDictionary->clear();
00118     delete fDictionary;
00119     fDictionary =0;
00120   }
00121 
00122   if (fParticleMessenger!=0) delete fParticleMessenger;  
00123   fParticleMessenger =0;
00124 
00125   fgParticleTable =0;
00126 
00127 }


Member Function Documentation

G4bool G4ParticleTable::contains ( const G4String particle_name  )  [inline]

Definition at line 103 of file G4ParticleTable.icc.

00104 {
00105   G4PTblDictionary::iterator it =  fDictionary->find(particle_name);
00106   return (it != fDictionary->end());
00107 }

G4bool G4ParticleTable::contains ( const G4ParticleDefinition particle  )  [inline]

Definition at line 110 of file G4ParticleTable.icc.

References GetKey().

Referenced by Insert(), and G4ProcessTableMessenger::SetNewValue().

00111 {
00112  return contains(GetKey(particle));
00113 }

G4UImessenger * G4ParticleTable::CreateMessenger (  ) 

Definition at line 156 of file G4ParticleTable.cc.

Referenced by G4RunManager::G4RunManager().

00157 {
00158   if (fParticleMessenger== 0) {
00159     //UI messenger
00160     fParticleMessenger = new G4ParticleMessenger(this);
00161   }
00162   return fParticleMessenger;
00163 }

void G4ParticleTable::DeleteAllParticles (  ) 

Definition at line 177 of file G4ParticleTable.cc.

References G4cout, G4endl, GetParticleName(), RemoveAllParticles(), and G4ParticleTableIterator< K, V >::value().

Referenced by G4VUserPhysicsList::~G4VUserPhysicsList().

00178 {
00179   //set readyToUse false  
00180   readyToUse = false;
00181 
00182   //G4StateManager* pStateManager = G4StateManager::GetStateManager();
00183   //G4ApplicationState currentState = pStateManager->GetCurrentState();
00184   //if (currentState != G4State_Quit) {
00185   //  G4Exception("G4ParticleTable::DeleteAllParticle()",
00186   //            "PART114", JustWarning,
00187   //            "Try to delete particles in state other than State_Quit");    
00188   //}
00189 
00190 #ifdef G4VERBOSE
00191   if (verboseLevel>1){
00192     G4cout << "G4ParticleTable::DeleteAllParticles() " << G4endl;
00193   }
00194 #endif
00195 
00196   // delete all particles 
00197   G4PTblDicIterator *piter = fIterator; 
00198   piter -> reset();
00199   while( (*piter)() ){
00200 #ifdef G4VERBOSE
00201     if (verboseLevel>2){
00202       G4cout << "Delete " << (piter->value())->GetParticleName() 
00203              << " " << (piter->value()) << G4endl;
00204     }
00205 #endif
00206     delete (piter->value());
00207   }
00208   RemoveAllParticles();
00209 }

void G4ParticleTable::DeleteMessenger (  ) 

Definition at line 166 of file G4ParticleTable.cc.

Referenced by G4RunManager::~G4RunManager().

00167 {
00168   if (fParticleMessenger!= 0) {
00169     //UI messenger
00170     delete fParticleMessenger;
00171     fParticleMessenger= 0;
00172   }
00173 
00174 }

void G4ParticleTable::DumpTable ( const G4String particle_name = "ALL"  ) 

Definition at line 502 of file G4ParticleTable.cc.

References G4ParticleDefinition::DumpTable(), FindParticle(), G4cerr, G4endl, and G4ParticleTableIterator< K, V >::value().

Referenced by Insert(), G4ParticleGunMessenger::SetNewValue(), G4GeneralParticleSourceMessenger::SetNewValue(), and G4RunManagerKernel::SetPhysics().

00503 {
00504   CheckReadiness();
00505   if (( particle_name == "ALL" ) || (particle_name == "all")){
00506     // dump all particles 
00507     G4PTblDicIterator *piter = fIterator; 
00508     piter -> reset();
00509     while( (*piter)() ){
00510       (piter->value())->DumpTable();
00511     }
00512   } else {
00513     // dump only particle with name of  particle_name
00514     G4ParticleDefinition *ptr;
00515     ptr = FindParticle(particle_name);
00516     if ( ptr != 0) {
00517       ptr->DumpTable();
00518     } else { 
00519       G4cerr << " G4ParticleTable::DumpTable : " 
00520              << particle_name << " does not exist in ParticleTable " <<G4endl;
00521     }
00522   }
00523 }

G4int G4ParticleTable::entries (  )  const [inline]

Definition at line 116 of file G4ParticleTable.icc.

Referenced by G4ParticleGunMessenger::G4ParticleGunMessenger(), G4RunManagerKernel::G4RunManagerKernel(), GetParticle(), G4FastSimulationManager::ListModels(), G4VisCommandSceneAddGhosts::SetNewValue(), G4RunManagerKernel::SetPhysics(), and G4GlobalFastSimulationManager::ShowSetup().

00117 {
00118   return fDictionary->size();
00119 }

G4ParticleDefinition * G4ParticleTable::FindAntiParticle ( const G4ParticleDefinition particle  )  [inline]

Definition at line 96 of file G4ParticleTable.icc.

References FindParticle().

00097 {
00098   G4int pcode = particle -> GetAntiPDGEncoding();
00099   return FindParticle(pcode);
00100 }

G4ParticleDefinition * G4ParticleTable::FindAntiParticle ( const G4String particle_name  )  [inline]

Definition at line 89 of file G4ParticleTable.icc.

References FindParticle().

00090 {
00091   G4int pcode = FindParticle(particle_name) -> GetAntiPDGEncoding();
00092   return FindParticle(pcode);
00093 }

G4ParticleDefinition * G4ParticleTable::FindAntiParticle ( G4int  PDGEncoding  )  [inline]

Definition at line 83 of file G4ParticleTable.icc.

References FindParticle().

00084 {
00085   return FindParticle( FindParticle(aPDGEncoding)->GetAntiPDGEncoding() );
00086 }

G4ParticleDefinition * G4ParticleTable::FindIon ( G4int  atomicNumber,
G4int  atomicMass,
G4int  dummy1,
G4int  dummy2 
)

Definition at line 369 of file G4ParticleTable.cc.

References G4IonTable::GetIon().

00370 {
00371    CheckReadiness();
00372    if (Z<=0) return 0;
00373    if (A<Z) return 0;
00374    return fIonTable->GetIon(Z, A);
00375 }

G4ParticleDefinition * G4ParticleTable::FindIon ( G4int  atomicNumber,
G4int  atomicMass,
G4int  numberOfLambda,
G4double  excitationEnergy 
)

Definition at line 409 of file G4ParticleTable.cc.

References G4IonTable::FindIon().

00410 {
00411    CheckReadiness();
00412    if (Z<=0) return 0;
00413    if (A-L<Z) return 0;
00414    if (L<0) return 0;
00415    if (E<0.) return 0;
00416    return fIonTable->FindIon(Z, A, L, E);
00417 }

G4ParticleDefinition * G4ParticleTable::FindIon ( G4int  atomicNumber,
G4int  atomicMass,
G4double  excitationEnergy 
)

Definition at line 399 of file G4ParticleTable.cc.

References G4IonTable::FindIon().

Referenced by G4NeutronHPCaptureFS::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LElastic::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4QCaptureAtRest::AtRestDoIt(), G4AblaEvaporation::BreakItUp(), G4EmCalculator::FindIon(), G4NuclNuclDiffuseElastic::GetInvCoulombElasticXsc(), G4DiffuseElastic::GetInvCoulombElasticXsc(), G4NuclNuclDiffuseElastic::GetInvElasticSumXsc(), G4DiffuseElastic::GetInvElasticSumXsc(), G4NuclNuclDiffuseElastic::GetInvElasticXsc(), G4DiffuseElastic::GetInvElasticXsc(), G4QNGamma::PostStepDoIt(), G4QLowEnergy::PostStepDoIt(), G4QIonIonElastic::PostStepDoIt(), G4QInelastic::PostStepDoIt(), G4QElastic::PostStepDoIt(), G4QDiffraction::PostStepDoIt(), G4QCoherentChargeExchange::PostStepDoIt(), G4QAtomicElectronScattering::PostStepDoIt(), G4StringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), and G4QuasiElasticChannel::Scatter().

00400 {
00401    CheckReadiness();
00402    if (Z<=0) return 0;
00403    if (A<Z) return 0;
00404    if (E<0.) return 0;
00405    return fIonTable->FindIon(Z, A, E);
00406 }

G4ParticleDefinition * G4ParticleTable::FindParticle ( const G4ParticleDefinition particle  ) 

Definition at line 464 of file G4ParticleTable.cc.

References FindParticle(), and GetKey().

00465 {
00466   CheckReadiness();
00467   G4String key = GetKey(particle);
00468   return FindParticle(key);
00469 }

G4ParticleDefinition * G4ParticleTable::FindParticle ( const G4String particle_name  ) 

Definition at line 453 of file G4ParticleTable.cc.

00454 {
00455   G4PTblDictionary::iterator it =  fDictionary->find(particle_name);
00456   if (it != fDictionary->end()) {
00457     return (*it).second;
00458   } else {
00459     return 0;
00460   }
00461 }

G4ParticleDefinition * G4ParticleTable::FindParticle ( G4int  PDGEncoding  ) 

Definition at line 472 of file G4ParticleTable.cc.

References G4cerr, and G4endl.

Referenced by G4SDParticleFilter::add(), G4VHadronPhysics::AddElasticCrossSection(), G4VHadronPhysics::AddInelasticCrossSection(), G4ITTransportation::AlongStepDoIt(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ErrorTrajState::BuildCharge(), G4VUserPhysicsList::BuildPhysicsTable(), G4PrimaryTransformer::CheckUnknown(), G4PionDecayMakeSpin::DaughterPolarization(), G4XiZero::Definition(), G4XiMinus::Definition(), G4XicZero::Definition(), G4XicPlus::Definition(), G4XibZero::Definition(), G4XibMinus::Definition(), G4Upsiron::Definition(), G4UnknownParticle::Definition(), G4Triton::Definition(), G4TauPlus::Definition(), G4TauMinus::Definition(), G4SigmaZero::Definition(), G4SigmaPlus::Definition(), G4SigmaMinus::Definition(), G4SigmacZero::Definition(), G4SigmacPlusPlus::Definition(), G4SigmacPlus::Definition(), G4SigmabZero::Definition(), G4SigmabPlus::Definition(), G4SigmabMinus::Definition(), G4Proton::Definition(), G4Positron::Definition(), G4PionZero::Definition(), G4PionPlus::Definition(), G4PionMinus::Definition(), G4OpticalPhoton::Definition(), G4OmegaMinus::Definition(), G4OmegacZero::Definition(), G4OmegabMinus::Definition(), G4OH::Definition(), G4Neutron::Definition(), G4NeutrinoTau::Definition(), G4NeutrinoMu::Definition(), G4NeutrinoE::Definition(), G4MuonPlus::Definition(), G4MuonMinus::Definition(), G4LambdacPlus::Definition(), G4Lambdab::Definition(), G4Lambda::Definition(), G4KaonZeroShort::Definition(), G4KaonZeroLong::Definition(), G4KaonZero::Definition(), G4KaonPlus::Definition(), G4KaonMinus::Definition(), G4JPsi::Definition(), G4Hydrogen::Definition(), G4He3::Definition(), G4H3O::Definition(), G4H2O2::Definition(), G4H2O::Definition(), G4H2::Definition(), G4GenericIon::Definition(), G4Geantino::Definition(), G4Gamma::Definition(), G4EtaPrime::Definition(), G4Etac::Definition(), G4Eta::Definition(), G4Electron_aq::Definition(), G4Electron::Definition(), G4DsMesonPlus::Definition(), G4DsMesonMinus::Definition(), G4DMesonZero::Definition(), G4DMesonPlus::Definition(), G4DMesonMinus::Definition(), G4Deuteron::Definition(), G4ChargedGeantino::Definition(), G4BsMesonZero::Definition(), G4BMesonZero::Definition(), G4BMesonPlus::Definition(), G4BMesonMinus::Definition(), G4BcMesonPlus::Definition(), G4BcMesonMinus::Definition(), G4AntiXiZero::Definition(), G4AntiXiMinus::Definition(), G4AntiXicZero::Definition(), G4AntiXicPlus::Definition(), G4AntiXibZero::Definition(), G4AntiXibMinus::Definition(), G4AntiTriton::Definition(), G4AntiSigmaZero::Definition(), G4AntiSigmaPlus::Definition(), G4AntiSigmaMinus::Definition(), G4AntiSigmacZero::Definition(), G4AntiSigmacPlusPlus::Definition(), G4AntiSigmacPlus::Definition(), G4AntiSigmabZero::Definition(), G4AntiSigmabPlus::Definition(), G4AntiSigmabMinus::Definition(), G4AntiProton::Definition(), G4AntiOmegaMinus::Definition(), G4AntiOmegacZero::Definition(), G4AntiOmegabMinus::Definition(), G4AntiNeutron::Definition(), G4AntiNeutrinoTau::Definition(), G4AntiNeutrinoMu::Definition(), G4AntiNeutrinoE::Definition(), G4AntiLambdacPlus::Definition(), G4AntiLambdab::Definition(), G4AntiLambda::Definition(), G4AntiKaonZero::Definition(), G4AntiHe3::Definition(), G4AntiDMesonZero::Definition(), G4AntiDeuteron::Definition(), G4AntiBsMesonZero::Definition(), G4AntiBMesonZero::Definition(), G4AntiAlpha::Definition(), G4Alpha::Definition(), G4AdjointTriton::Definition(), G4AdjointProton::Definition(), G4AdjointPositron::Definition(), G4AdjointHe3::Definition(), G4AdjointGenericIon::Definition(), G4AdjointGamma::Definition(), G4AdjointElectron::Definition(), G4AdjointDeuteron::Definition(), G4AdjointAlpha::Definition(), DumpTable(), G4DiffractiveExcitation::ExciteParticipants(), G4VDecayChannel::FillDaughters(), G4VDecayChannel::FillParent(), G4HEInelastic::FillParticleChange(), FindAntiParticle(), G4VHadronPhysics::FindElasticProcess(), G4VHadronPhysics::FindInelasticProcess(), G4VLongitudinalStringDecay::FindParticle(), FindParticle(), G4EmCalculator::FindParticle(), G4CollisionMesonBaryonToResonance::G4CollisionMesonBaryonToResonance(), G4Parton::G4Parton(), G4PrimaryParticle::G4PrimaryParticle(), G4ResonanceNames::G4ResonanceNames(), G4RToEConvForElectron::G4RToEConvForElectron(), G4RToEConvForGamma::G4RToEConvForGamma(), G4RToEConvForPositron::G4RToEConvForPositron(), G4RToEConvForProton::G4RToEConvForProton(), G4SDParticleFilter::G4SDParticleFilter(), G4Track::G4Track(), G4VUserPhysicsList::GetApplyCuts(), G4PrimaryTransformer::GetDefinition(), G4DynamicParticle::GetElectronMass(), G4IonTable::GetLightAntiIon(), G4IonTable::GetLightIon(), G4NucleiProperties::GetNuclearMass(), G4HyperNucleiProperties::GetNuclearMass(), G4ParticlePropertyTable::GetParticleProperty(), G4ErrorPropagator::InitG4Track(), G4INCL::ParticleTable::initialize(), Insert(), G4ResonanceNames::MinMass(), G4CollisionComposite::Resolve::operator()(), G4TextPPReporter::Print(), G4HtmlPPReporter::Print(), G4StringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), G4AdjointSimManager::RegisterAtEndOfAdjointTrack(), G4ProjectileDiffractiveChannel::Scatter(), G4VUserPhysicsList::SetApplyCuts(), G4VisCommandSceneAddGhosts::SetNewValue(), G4ProcessTableMessenger::SetNewValue(), G4ParticleMessenger::SetNewValue(), G4ParticleGunMessenger::SetNewValue(), G4GeneralParticleSourceMessenger::SetNewValue(), G4PSNofSecondary::SetParticle(), G4ParticlePropertyTable::SetParticleProperty(), G4PrimaryParticle::SetPDGcode(), G4RayShooter::Shoot(), and G4AdjointPrimaryGeneratorAction::UpdateListOfPrimaryParticles().

00473 {
00474    CheckReadiness();
00475     // check aPDGEncoding is valid
00476     if (aPDGEncoding == 0){ 
00477 #ifdef G4VERBOSE
00478       if (verboseLevel>1){
00479         G4cerr << "PDGEncoding  [" <<  aPDGEncoding << "] is not valid " << G4endl;
00480       }
00481 #endif
00482       return 0;
00483     }
00484     
00485     G4PTblEncodingDictionary *pedic =  fEncodingDictionary;
00486     G4ParticleDefinition* particle =0;  
00487 
00488     G4PTblEncodingDictionary::iterator it =  pedic->find(aPDGEncoding );
00489     if (it != pedic->end()) {
00490       particle = (*it).second;
00491     }
00492 
00493 #ifdef G4VERBOSE
00494     if ((particle == 0) && (verboseLevel>1) ){
00495       G4cerr << "CODE:" << aPDGEncoding << " does not exist in ParticleTable " << G4endl;
00496     }
00497 #endif
00498     return particle;
00499 }

G4ParticleTable::G4PTblDictionary * G4ParticleTable::GetDictionary (  )  [inline, protected]

Definition at line 59 of file G4ParticleTable.icc.

00060 {
00061   return fDictionary;
00062 }

const G4ParticleTable::G4PTblEncodingDictionary * G4ParticleTable::GetEncodingDictionary (  )  [inline, protected]

Definition at line 71 of file G4ParticleTable.icc.

00072 {
00073   return fEncodingDictionary;
00074 }

G4ParticleDefinition * G4ParticleTable::GetIon ( G4int  atomicNumber,
G4int  atomicMass,
G4int  numberOfLambda,
G4double  excitationEnergy 
)

Definition at line 388 of file G4ParticleTable.cc.

References G4IonTable::GetIon().

00389 {
00390    CheckReadiness();
00391    if (Z<=0) return 0;
00392    if (A-L<Z) return 0;
00393    if (L<0) return 0; 
00394    if (E<0.) return 0;
00395    return fIonTable->GetIon(Z, A, L, E);
00396 }

G4ParticleDefinition * G4ParticleTable::GetIon ( G4int  atomicNumber,
G4int  atomicMass,
G4double  excitationEnergy 
)

Definition at line 378 of file G4ParticleTable.cc.

References G4IonTable::GetIon().

Referenced by G4NeutronHPFinalState::adjust_final_state(), G4QMDReaction::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPChannelList::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4InuclNuclei::makeDefinition(), G4IonCoulombScatteringModel::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), G4eSingleCoulombScatteringModel::SampleSecondaries(), G4eCoulombScatteringModel::SampleSecondaries(), and G4ProjectileDiffractiveChannel::Scatter().

00379 {
00380    CheckReadiness();
00381    if (Z<=0) return 0;
00382    if (A<Z) return 0;
00383    if (E<0.) return 0;
00384    return fIonTable->GetIon(Z, A, E);
00385 }

G4IonTable * G4ParticleTable::GetIonTable (  )  [inline]

Definition at line 41 of file G4ParticleTable.icc.

Referenced by G4TheoFSGenerator::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4WilsonAblationModel::BreakItUp(), G4CompetitiveFission::BreakUp(), TLBE< T >::ConstructGeneral(), G4ParticleDefinition::DumpTable(), G4EmCorrections::G4EmCorrections(), G4ExcitationHandler::G4ExcitationHandler(), G4ParticleDefinition::G4ParticleDefinition(), G4GGNuclNuclCrossSection::GetCoulombBarier(), G4ComponentGGNuclNuclXsc::GetCoulombBarier(), G4TripathiCrossSection::GetElementCrossSection(), G4StatMFFragment::GetNuclearMass(), G4INCL::ParticleTable::initialize(), G4GeneratorPrecompoundInterface::Propagate(), G4VPartonStringModel::Scatter(), and G4ParticleMessenger::SetNewValue().

00042 {
00043   return fIonTable;
00044 }

G4ParticleTable::G4PTblDicIterator * G4ParticleTable::GetIterator (  )  [inline]

Definition at line 65 of file G4ParticleTable.icc.

Referenced by G4ITStepProcessor::ActiveOnlyITProcess(), G4RunManager::ConstructScoringWorlds(), G4VParticlePropertyReporter::FillList(), G4ErrorTrackLengthTarget::G4ErrorTrackLengthTarget(), G4HyperonCHIPSBuilder::G4HyperonCHIPSBuilder(), G4MiscCHIPSBuilder::G4MiscCHIPSBuilder(), G4MiscQGSCBuilder::G4MiscQGSCBuilder(), G4QInelasticCHIPS_HPBuilder::G4QInelasticCHIPS_HPBuilder(), G4QInelasticCHIPSBuilder::G4QInelasticCHIPSBuilder(), G4VPhysicsConstructor::G4VPhysicsConstructor(), G4VUserPhysicsList::G4VUserPhysicsList(), G4ProcessTableMessenger::GetCurrentValue(), G4ParticleMessenger::GetCurrentValue(), G4TextPPRetriever::Retrieve(), and G4ParticleMessenger::SetNewValue().

00066 {
00067   return fIterator;
00068 }

const G4String & G4ParticleTable::GetKey ( const G4ParticleDefinition particle  )  const [inline, protected]

Definition at line 77 of file G4ParticleTable.icc.

References G4ParticleDefinition::GetParticleName().

Referenced by contains(), FindParticle(), Insert(), and Remove().

00078 {
00079   return particle->GetParticleName();
00080 }

G4ParticleDefinition * G4ParticleTable::GetParticle ( G4int  index  ) 

Definition at line 420 of file G4ParticleTable.cc.

References entries(), G4cerr, G4endl, and G4ParticleTableIterator< K, V >::value().

Referenced by G4ParticleGunMessenger::G4ParticleGunMessenger(), G4RunManagerKernel::G4RunManagerKernel(), GetParticleName(), G4VisCommandSceneAddGhosts::SetNewValue(), and G4GlobalFastSimulationManager::ShowSetup().

00421 {
00422    CheckReadiness();
00423   if ( (index >=0) && (index < entries()) ) {
00424     G4PTblDicIterator *piter = fIterator; 
00425     piter -> reset();
00426     G4int counter = 0;
00427     while( (*piter)() ){
00428       if ( counter == index ) return piter->value();
00429       counter++;
00430     }
00431   } 
00432 #ifdef G4VERBOSE
00433   if (verboseLevel>1){
00434     G4cerr << " G4ParticleTable::GetParticle"
00435            << " invalid index (=" << index << ")" << G4endl;
00436   }
00437 #endif
00438   return 0;
00439 }

const G4String & G4ParticleTable::GetParticleName ( G4int  index  ) 

Definition at line 442 of file G4ParticleTable.cc.

References GetParticle(), and G4ParticleDefinition::GetParticleName().

Referenced by DeleteAllParticles(), and G4FastSimulationManager::ListModels().

00443 {
00444   G4ParticleDefinition* aParticle =GetParticle(index);
00445   if (aParticle != 0) {
00446     return aParticle->GetParticleName();
00447   } else {
00448     return noName;
00449   }
00450 }

G4ParticleTable * G4ParticleTable::GetParticleTable (  )  [static]

Definition at line 63 of file G4ParticleTable.cc.

Referenced by G4ITStepProcessor::ActiveOnlyITProcess(), G4SDParticleFilter::add(), G4RadioactiveDecay::AddDecayRateTable(), G4VHadronPhysics::AddElasticCrossSection(), G4VHadronPhysics::AddInelasticCrossSection(), G4VUserPhysicsList::AddProcessManager(), G4NeutronHPFinalState::adjust_final_state(), G4ITTransportation::AlongStepDoIt(), G4TheoFSGenerator::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4NeutronRadCapture::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPChannelList::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LENDInelastic::ApplyYourself(), G4LENDFission::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4LENDCapture::ApplyYourself(), G4LElastic::ApplyYourself(), G4INCLXXInterface::ApplyYourself(), G4HadronElastic::ApplyYourself(), G4EMDissociation::ApplyYourself(), G4ChiralInvariantPhaseSpace::ApplyYourself(), G4ChargeExchange::ApplyYourself(), G4BinaryLightIonReaction::ApplyYourself(), G4QCaptureAtRest::AtRestDoIt(), G4NeutronHPInelasticBaseFS::BaseApply(), G4WilsonAblationModel::BreakItUp(), G4AblaEvaporation::BreakItUp(), G4CompetitiveFission::BreakUp(), G4ErrorTrajState::BuildCharge(), G4ShortLivedTable::clear(), G4IonTable::clear(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ExcitedMesonConstructor::Construct(), G4ExcitedBaryonConstructor::Construct(), TLBE< T >::ConstructGeneral(), G4RunManager::ConstructScoringWorlds(), G4PionDecayMakeSpin::DaughterPolarization(), G4RadioactiveDecay::DecayIt(), G4NuclearDecayChannel::DecayIt(), G4XiZero::Definition(), G4XiMinus::Definition(), G4XicZero::Definition(), G4XicPlus::Definition(), G4XibZero::Definition(), G4XibMinus::Definition(), G4Upsiron::Definition(), G4UnknownParticle::Definition(), G4UnboundPN::Definition(), G4Triton::Definition(), G4TauPlus::Definition(), G4TauMinus::Definition(), G4SigmaZero::Definition(), G4SigmaPlus::Definition(), G4SigmaMinus::Definition(), G4SigmacZero::Definition(), G4SigmacPlusPlus::Definition(), G4SigmacPlus::Definition(), G4SigmabZero::Definition(), G4SigmabPlus::Definition(), G4SigmabMinus::Definition(), G4Proton::Definition(), G4Positron::Definition(), G4PionZero::Definition(), G4PionPlus::Definition(), G4PionMinus::Definition(), G4OpticalPhoton::Definition(), G4OmegaMinus::Definition(), G4OmegacZero::Definition(), G4OmegabMinus::Definition(), G4OH::Definition(), G4Neutron::Definition(), G4NeutrinoTau::Definition(), G4NeutrinoMu::Definition(), G4NeutrinoE::Definition(), G4MuonPlus::Definition(), G4MuonMinus::Definition(), G4LambdacPlus::Definition(), G4Lambdab::Definition(), G4Lambda::Definition(), G4KaonZeroShort::Definition(), G4KaonZeroLong::Definition(), G4KaonZero::Definition(), G4KaonPlus::Definition(), G4KaonMinus::Definition(), G4JPsi::Definition(), G4Hydrogen::Definition(), G4He3::Definition(), G4H3O::Definition(), G4H2O2::Definition(), G4H2O::Definition(), G4H2::Definition(), G4GenericIon::Definition(), G4Geantino::Definition(), G4Gamma::Definition(), G4EtaPrime::Definition(), G4Etac::Definition(), G4Eta::Definition(), G4Electron_aq::Definition(), G4Electron::Definition(), G4DsMesonPlus::Definition(), G4DsMesonMinus::Definition(), G4DMesonZero::Definition(), G4DMesonPlus::Definition(), G4DMesonMinus::Definition(), G4Diproton::Definition(), G4Dineutron::Definition(), G4Deuteron::Definition(), G4ChargedGeantino::Definition(), G4BsMesonZero::Definition(), G4BMesonZero::Definition(), G4BMesonPlus::Definition(), G4BMesonMinus::Definition(), G4BcMesonPlus::Definition(), G4BcMesonMinus::Definition(), G4AntiXiZero::Definition(), G4AntiXiMinus::Definition(), G4AntiXicZero::Definition(), G4AntiXicPlus::Definition(), G4AntiXibZero::Definition(), G4AntiXibMinus::Definition(), G4AntiTriton::Definition(), G4AntiSigmaZero::Definition(), G4AntiSigmaPlus::Definition(), G4AntiSigmaMinus::Definition(), G4AntiSigmacZero::Definition(), G4AntiSigmacPlusPlus::Definition(), G4AntiSigmacPlus::Definition(), G4AntiSigmabZero::Definition(), G4AntiSigmabPlus::Definition(), G4AntiSigmabMinus::Definition(), G4AntiProton::Definition(), G4AntiOmegaMinus::Definition(), G4AntiOmegacZero::Definition(), G4AntiOmegabMinus::Definition(), G4AntiNeutron::Definition(), G4AntiNeutrinoTau::Definition(), G4AntiNeutrinoMu::Definition(), G4AntiNeutrinoE::Definition(), G4AntiLambdacPlus::Definition(), G4AntiLambdab::Definition(), G4AntiLambda::Definition(), G4AntiKaonZero::Definition(), G4AntiHe3::Definition(), G4AntiDMesonZero::Definition(), G4AntiDeuteron::Definition(), G4AntiBsMesonZero::Definition(), G4AntiBMesonZero::Definition(), G4AntiAlpha::Definition(), G4Alpha::Definition(), G4AdjointTriton::Definition(), G4AdjointProton::Definition(), G4AdjointPositron::Definition(), G4AdjointHe3::Definition(), G4AdjointGenericIon::Definition(), G4AdjointGamma::Definition(), G4AdjointElectron::Definition(), G4AdjointDeuteron::Definition(), G4AdjointAlpha::Definition(), G4DiffractiveExcitation::ExciteParticipants(), G4VParticlePropertyReporter::FillList(), G4HEInelastic::FillParticleChange(), G4BaryonSplitter::FindDiquark(), G4VHadronPhysics::FindElasticProcess(), G4VHadronPhysics::FindInelasticProcess(), G4EmCalculator::FindIon(), G4VLongitudinalStringDecay::FindParticle(), G4EmCalculator::FindParticle(), G4ProcessTable::FindProcess(), G4BaryonSplitter::G4BaryonSplitter(), G4CollisionMesonBaryonToResonance::G4CollisionMesonBaryonToResonance(), G4DecayTableMessenger::G4DecayTableMessenger(), G4eCoulombScatteringModel::G4eCoulombScatteringModel(), G4EmCorrections::G4EmCorrections(), G4ErrorTrackLengthTarget::G4ErrorTrackLengthTarget(), G4eSingleCoulombScatteringModel::G4eSingleCoulombScatteringModel(), G4ExcitationHandler::G4ExcitationHandler(), G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger(), G4hCoulombScatteringModel::G4hCoulombScatteringModel(), G4HyperonCHIPSBuilder::G4HyperonCHIPSBuilder(), G4IonCoulombScatteringModel::G4IonCoulombScatteringModel(), G4MiscCHIPSBuilder::G4MiscCHIPSBuilder(), G4MiscQGSCBuilder::G4MiscQGSCBuilder(), G4ParticleDefinition::G4ParticleDefinition(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4ParticleMessenger::G4ParticleMessenger(), G4ParticlePropertyMessenger::G4ParticlePropertyMessenger(), G4ParticlePropertyTable::G4ParticlePropertyTable(), G4ParticleTypeConverter::G4ParticleTypeConverter(), G4Parton::G4Parton(), G4PrimaryParticle::G4PrimaryParticle(), G4PrimaryTransformer::G4PrimaryTransformer(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4QInelasticCHIPS_HPBuilder::G4QInelasticCHIPS_HPBuilder(), G4QInelasticCHIPSBuilder::G4QInelasticCHIPSBuilder(), G4RadioactiveDecay::G4RadioactiveDecay(), G4ResonanceNames::G4ResonanceNames(), G4RToEConvForElectron::G4RToEConvForElectron(), G4RToEConvForGamma::G4RToEConvForGamma(), G4RToEConvForPositron::G4RToEConvForPositron(), G4RToEConvForProton::G4RToEConvForProton(), G4RunManager::G4RunManager(), G4RunManagerKernel::G4RunManagerKernel(), G4SDParticleFilter::G4SDParticleFilter(), G4SPBaryon::G4SPBaryon(), G4Track::G4Track(), G4UserEventAction::G4UserEventAction(), G4UserRunAction::G4UserRunAction(), G4UserStackingAction::G4UserStackingAction(), G4UserSteppingAction::G4UserSteppingAction(), G4UserTrackingAction::G4UserTrackingAction(), G4VDecayChannel::G4VDecayChannel(), G4VPhysicsConstructor::G4VPhysicsConstructor(), G4VUserPhysicsList::G4VUserPhysicsList(), G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction(), G4HyperNucleiProperties::GetAtomicMass(), G4GGNuclNuclCrossSection::GetCoulombBarier(), G4ComponentGGNuclNuclXsc::GetCoulombBarier(), G4UserPhysicsListMessenger::GetCurrentValue(), G4ProcessTableMessenger::GetCurrentValue(), G4DynamicParticle::GetElectronMass(), G4TripathiCrossSection::GetElementCrossSection(), G4GGNuclNuclCrossSection::GetHadronNucleonXsc(), G4ComponentGGNuclNuclXsc::GetHadronNucleonXsc(), G4GlauberGribovCrossSection::GetHadronNucleonXscNS(), G4ComponentGGHadronNucleusXsc::GetHadronNucleonXscNS(), G4GlauberGribovCrossSection::GetHadronNucleonXscPDG(), G4ComponentGGHadronNucleusXsc::GetHadronNucleonXscPDG(), G4NuclNuclDiffuseElastic::GetInvCoulombElasticXsc(), G4DiffuseElastic::GetInvCoulombElasticXsc(), G4NuclNuclDiffuseElastic::GetInvElasticSumXsc(), G4DiffuseElastic::GetInvElasticSumXsc(), G4NuclNuclDiffuseElastic::GetInvElasticXsc(), G4DiffuseElastic::GetInvElasticXsc(), G4IonTable::GetLightAntiIon(), G4IonTable::GetLightIon(), G4NucleiProperties::GetMassExcess(), G4StatMFFragment::GetNuclearMass(), G4NucleiProperties::GetNuclearMass(), G4HyperNucleiProperties::GetNuclearMass(), G4Trajectory::GetParticleDefinition(), G4SmoothTrajectory::GetParticleDefinition(), G4BaryonSplitter::GetSPBaryon(), G4ShortLivedTable::GetVerboseLevel(), G4IonTable::GetVerboseLevel(), G4ErrorPropagator::InitG4Track(), G4INCL::ParticleTable::initialize(), G4EMDissociationCrossSection::IsElementApplicable(), G4NucleiProperties::IsInStableTable(), G4FastSimulationManager::ListModels(), G4InuclNuclei::makeDefinition(), G4ResonanceNames::MinMass(), G4CollisionComposite::Resolve::operator()(), G4VDecayChannel::operator=(), G4QNGamma::PostStepDoIt(), G4QLowEnergy::PostStepDoIt(), G4QIonIonElastic::PostStepDoIt(), G4QInelastic::PostStepDoIt(), G4QElastic::PostStepDoIt(), G4QDiffraction::PostStepDoIt(), G4QCoherentChargeExchange::PostStepDoIt(), G4QAtomicElectronScattering::PostStepDoIt(), G4TextPPReporter::Print(), G4HtmlPPReporter::Print(), G4StringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), G4GeneratorPrecompoundInterface::Propagate(), G4AdjointSimManager::RegisterAtEndOfAdjointTrack(), G4ShortLivedTable::Remove(), G4IonTable::Remove(), G4TextPPRetriever::Retrieve(), G4NeutronHPIsotropic::Sample(), G4NeutronHPContAngularPar::Sample(), G4VPartonStringModel::Scatter(), G4QuasiElasticChannel::Scatter(), G4ProjectileDiffractiveChannel::Scatter(), G4VisCommandSceneAddGhosts::SetNewValue(), G4UserPhysicsListMessenger::SetNewValue(), G4ProcessTableMessenger::SetNewValue(), G4FastSimulationMessenger::SetNewValue(), G4PSNofSecondary::SetParticle(), G4PrimaryParticle::SetPDGcode(), G4RunManagerKernel::SetPhysics(), G4ProcessTable::SetProcessActivation(), G4RayShooter::Shoot(), G4GlobalFastSimulationManager::ShowSetup(), G4BaryonSplitter::SplitBarion(), G4ProductionCutsTable::UpdateCoupleTable(), G4AdjointPrimaryGeneratorAction::UpdateListOfPrimaryParticles(), G4ParticleDefinition::~G4ParticleDefinition(), and G4RunManager::~G4RunManager().

00064 {
00065     static G4ParticleTable theParticleTable;
00066     if (!fgParticleTable){
00067       fgParticleTable =  &theParticleTable;
00068     }
00069     return fgParticleTable;
00070 }

G4bool G4ParticleTable::GetReadiness (  )  const [inline]

Definition at line 134 of file G4ParticleTable.icc.

00135 {
00136   return readyToUse;
00137 }

const G4ShortLivedTable * G4ParticleTable::GetShortLivedTable (  )  [inline]

Definition at line 35 of file G4ParticleTable.icc.

00036 {
00037   return fShortLivedTable;
00038 }

G4int G4ParticleTable::GetVerboseLevel (  )  const [inline]

Definition at line 53 of file G4ParticleTable.icc.

Referenced by G4ParticleDefinition::G4ParticleDefinition(), G4ParticleMessenger::GetCurrentValue(), G4HyperNucleiProperties::GetNuclearMass(), G4ShortLivedTable::GetVerboseLevel(), and G4IonTable::GetVerboseLevel().

00054 { 
00055   return verboseLevel; 
00056 }

G4ParticleDefinition * G4ParticleTable::Insert ( G4ParticleDefinition particle  ) 

Definition at line 249 of file G4ParticleTable.cc.

References contains(), DumpTable(), FindParticle(), G4cerr, G4cout, G4endl, GetKey(), G4ParticleDefinition::GetParticleName(), G4ShortLivedTable::Insert(), G4IonTable::Insert(), and G4IonTable::IsIon().

Referenced by G4ParticleDefinition::G4ParticleDefinition().

00250 {
00251 
00252   // check particle name
00253   if ((particle == 0) || (GetKey(particle).isNull())) {
00254 #ifdef G4VERBOSE
00255     if (verboseLevel>0){
00256       G4cerr << "The particle[Addr:" << particle << "] has no name "<< G4endl;
00257     }
00258 #endif
00259     return 0;
00260 
00261   }else {  
00262 
00263     if (contains(particle)) {
00264 #ifdef G4VERBOSE
00265       if (verboseLevel>0){
00266         G4cerr << "The particle " << particle->GetParticleName() 
00267                << "has been already registered in the Particle Table "<< G4endl;
00268       }
00269       if (verboseLevel>1){
00270         FindParticle(particle) -> DumpTable();
00271       }
00272 #endif
00273       return  FindParticle(particle);
00274 
00275     } else {
00276       G4PTblDictionary *pdic =  fDictionary;
00277       G4PTblEncodingDictionary *pedic =  fEncodingDictionary;  
00278 
00279       // insert into Dictionary
00280       pdic->insert( std::pair<G4String, G4ParticleDefinition*>(GetKey(particle), particle) );
00281 
00282       // insert into EncodingDictionary
00283       G4int code = particle->GetPDGEncoding();
00284       if (code !=0 ) {
00285         pedic->insert( std::pair<G4int, G4ParticleDefinition*>(code ,particle) );
00286       }       
00287 
00288       // insert it in IonTable if "nucleus"
00289       if (fIonTable->IsIon(particle) ){
00290         fIonTable->Insert(particle);
00291       }
00292 
00293       // insert it in ShortLivedTable if "shortlived"
00294       if (particle->IsShortLived() ){
00295         fShortLivedTable->Insert(particle);
00296       }
00297 
00298       // set Verbose Level same as ParticleTable
00299       particle->SetVerboseLevel(verboseLevel);
00300 
00301 #ifdef G4VERBOSE
00302       if (verboseLevel>3){
00303         G4cout << "The particle "<< particle->GetParticleName() 
00304                << " is inserted in the ParticleTable " << G4endl;
00305       }
00306 #endif
00307 
00308       return particle;
00309     }
00310   }
00311 }

G4ParticleTable & G4ParticleTable::operator= ( const G4ParticleTable  )  [protected]

Definition at line 143 of file G4ParticleTable.cc.

References FatalException, fDictionary, and G4Exception().

00144 {
00145   if (this != &right) {
00146     G4Exception("G4ParticleTable::G4ParticleTable()",
00147                 "PART001", FatalException,
00148                 "Illegal call of assignment operator for G4ParticleTable");    
00149     fDictionary = new G4PTblDictionary(*(right.fDictionary));
00150     fIterator   = new G4PTblDicIterator(*fDictionary);
00151   }
00152   return *this;
00153 }

G4ParticleDefinition * G4ParticleTable::Remove ( G4ParticleDefinition particle  ) 

Definition at line 314 of file G4ParticleTable.cc.

References G4cout, G4endl, G4Exception(), G4State_PreInit, G4StateManager::GetCurrentState(), GetKey(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGEncoding(), G4StateManager::GetStateManager(), G4IonTable::IsIon(), G4ParticleDefinition::IsShortLived(), JustWarning, G4ShortLivedTable::Remove(), and G4IonTable::Remove().

Referenced by G4UnboundPN::Definition(), G4Diproton::Definition(), and G4Dineutron::Definition().

00315 {
00316   if (readyToUse) {
00317     G4StateManager* pStateManager = G4StateManager::GetStateManager();
00318     G4ApplicationState currentState = pStateManager->GetCurrentState();
00319     if (currentState != G4State_PreInit) {
00320       G4String msg = "Request of removing ";
00321       msg += particle->GetParticleName();  
00322       msg += " has No effects other than Pre_Init";
00323       G4Exception("G4ParticleTable::Remove()",
00324                 "PART117", JustWarning, msg);
00325       return 0;
00326     } else {
00327 #ifdef G4VERBOSE
00328       if (verboseLevel>0){
00329         G4cout << particle->GetParticleName()
00330                << " will be removed from the ParticleTable " << G4endl;
00331       }
00332 #endif
00333     }
00334   }
00335   
00336   G4PTblDictionary::iterator it =  fDictionary->find(GetKey(particle));
00337   if (it != fDictionary->end()) {
00338     fDictionary->erase(it);
00339     // remove from EncodingDictionary
00340     G4int code = particle->GetPDGEncoding();
00341     if (code !=0 ) {
00342       fEncodingDictionary->erase(fEncodingDictionary->find(code)); 
00343     }
00344   } else {
00345     return 0;
00346   }
00347 
00348   // remove it from IonTable if "nucleus"
00349   if (fIonTable->IsIon(particle) ){
00350     fIonTable->Remove(particle);
00351   }
00352   
00353   // Remove it from ShortLivedTable if "shortlived"
00354   if (particle->IsShortLived() ){
00355     fShortLivedTable->Remove(particle);
00356   }
00357 
00358 #ifdef G4VERBOSE
00359   if (verboseLevel>3){
00360     G4cout << "The particle "<< particle->GetParticleName()
00361            << " is removed from the ParticleTable " << G4endl;
00362   }
00363 #endif
00364 
00365   return particle;
00366 }

void G4ParticleTable::RemoveAllParticles (  ) 

Definition at line 212 of file G4ParticleTable.cc.

References G4ShortLivedTable::clear(), G4IonTable::clear(), G4cout, G4endl, G4Exception(), and JustWarning.

Referenced by DeleteAllParticles(), and ~G4ParticleTable().

00213 {
00214   if (readyToUse) {
00215     G4Exception("G4ParticleTable::RemoveAllParticle()",
00216                 "PART115", JustWarning,
00217                 "No effects because readyToUse is true.");    
00218     return;
00219   }
00220   
00221 #ifdef G4VERBOSE
00222   if (verboseLevel>1){
00223     G4cout << "G4ParticleTable::RemoveAllParticles() " << G4endl;
00224   }
00225 #endif
00226 
00227   //remove all contnts in Ion Table
00228   if (fIonTable!=0) {
00229     fIonTable->clear();
00230   }
00231 
00232   // remomve all contents in hort Lived table 
00233   if (fShortLivedTable!=0) {
00234     fShortLivedTable->clear();
00235  }
00236 
00237   // clear dictionary for encoding
00238   if (fEncodingDictionary) {
00239       fEncodingDictionary->clear();
00240   }
00241 
00242   // clear dictionary
00243   if (fDictionary) {
00244     fDictionary->clear();
00245   }
00246 }

void G4ParticleTable::SetReadiness ( G4bool  val = true  )  [inline]

Definition at line 128 of file G4ParticleTable.icc.

Referenced by G4UnboundPN::Definition(), G4Diproton::Definition(), G4Dineutron::Definition(), and G4RunManagerKernel::SetPhysics().

00129 {
00130   readyToUse = val;
00131 }

void G4ParticleTable::SetVerboseLevel ( G4int  value  )  [inline]

Definition at line 47 of file G4ParticleTable.icc.

Referenced by G4ParticleMessenger::SetNewValue().

00048 { 
00049   verboseLevel = value; 
00050 }

G4int G4ParticleTable::size (  )  const [inline]

Definition at line 122 of file G4ParticleTable.icc.

00123 {
00124   return fDictionary->size();
00125 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:51 2013 for Geant4 by  doxygen 1.4.7