#include <G4DecayTable.hh>
Public Types | |
typedef std::vector< G4VDecayChannel * > | G4VDecayChannelVector |
Public Member Functions | |
G4DecayTable () | |
~G4DecayTable () | |
G4int | operator== (const G4DecayTable &right) const |
G4int | operator!= (const G4DecayTable &right) const |
void | Insert (G4VDecayChannel *aChannel) |
G4int | entries () const |
G4VDecayChannel * | SelectADecayChannel () |
G4VDecayChannel * | GetDecayChannel (G4int index) const |
G4VDecayChannel * | operator[] (G4int index) |
void | DumpInfo () const |
Definition at line 50 of file G4DecayTable.hh.
typedef std::vector<G4VDecayChannel*> G4DecayTable::G4VDecayChannelVector |
Definition at line 58 of file G4DecayTable.hh.
G4DecayTable::G4DecayTable | ( | ) |
Definition at line 43 of file G4DecayTable.cc.
00043 :parent(0) 00044 { 00045 channels = new G4VDecayChannelVector; 00046 }
G4DecayTable::~G4DecayTable | ( | ) |
Definition at line 48 of file G4DecayTable.cc.
00049 { 00050 // remove and delete all contents 00051 G4VDecayChannelVector::iterator i; 00052 for (i = channels->begin(); i!= channels->end(); ++i) { 00053 delete (*i); 00054 } 00055 channels->clear(); 00056 delete channels; 00057 channels = 0; 00058 }
void G4DecayTable::DumpInfo | ( | ) | const |
Definition at line 101 of file G4DecayTable.cc.
References G4cout, G4endl, and G4ParticleDefinition::GetParticleName().
Referenced by G4RadioactiveDecay::DecayIt(), G4RadioactiveDecay::DoDecay(), G4IsotopeProperty::DumpInfo(), G4ParticleDefinition::DumpTable(), G4RadioactiveDecay::LoadDecayTable(), and G4DecayTableMessenger::SetNewValue().
00102 { 00103 G4cout << "G4DecayTable: " << parent->GetParticleName() << G4endl; 00104 G4int index =0; 00105 G4VDecayChannelVector::iterator i; 00106 for (i = channels->begin(); i!= channels->end(); ++i) { 00107 G4cout << index << ": "; 00108 (*i)->DumpInfo(); 00109 index +=1; 00110 } 00111 G4cout << G4endl; 00112 }
G4int G4DecayTable::entries | ( | ) | const [inline] |
Definition at line 100 of file G4DecayTable.hh.
Referenced by G4RadioactiveDecay::AddDecayRateTable(), G4RadioactiveDecay::DecayIt(), G4KineticTrack::G4KineticTrack(), G4TextPPReporter::GeneratePropertyTable(), G4SampleResonance::GetMinimumMass(), G4RadioactiveDecay::LoadDecayTable(), and G4TextPPRetriever::ModifyPropertyTable().
G4VDecayChannel * G4DecayTable::GetDecayChannel | ( | G4int | index | ) | const [inline] |
Definition at line 113 of file G4DecayTable.hh.
Referenced by G4RadioactiveDecay::AddDecayRateTable(), G4KineticTrack::Decay(), G4RadioactiveDecay::DecayIt(), G4KineticTrack::G4KineticTrack(), G4TextPPReporter::GeneratePropertyTable(), G4SampleResonance::GetMinimumMass(), G4RadioactiveDecay::LoadDecayTable(), G4TextPPRetriever::ModifyPropertyTable(), and G4DecayTableMessenger::SetNewValue().
00114 { 00115 G4VDecayChannel* selectedChannel = 0; 00116 if ( (index>=0) && (index<G4int(channels->size())) ){ 00117 selectedChannel = (*channels)[index]; 00118 } 00119 return selectedChannel; 00120 }
void G4DecayTable::Insert | ( | G4VDecayChannel * | aChannel | ) |
Definition at line 60 of file G4DecayTable.cc.
References G4cerr, G4endl, G4VDecayChannel::GetBR(), G4VDecayChannel::GetParent(), and G4ParticleDefinition::GetParticleName().
Referenced by G4ExcitedMesonConstructor::Add2EtaMode(), G4ExcitedMesonConstructor::Add2KMode(), G4ExcitedMesonConstructor::Add2KPiMode(), G4ExcitedMesonConstructor::Add2PiEtaMode(), G4ExcitedMesonConstructor::Add2PiMode(), G4ExcitedMesonConstructor::Add2PiOmegaMode(), G4ExcitedMesonConstructor::Add2PiRhoMode(), G4ExcitedMesonConstructor::Add3PiMode(), G4ExcitedMesonConstructor::Add4PiMode(), G4RadioactiveDecay::AddDecayRateTable(), G4ExcitedMesonConstructor::AddKEtaMode(), G4ExcitedMesonConstructor::AddKKStarMode(), G4ExcitedMesonConstructor::AddKOmegaMode(), G4ExcitedMesonConstructor::AddKPiMode(), G4ExcitedMesonConstructor::AddKRhoMode(), G4ExcitedMesonConstructor::AddKStar2PiMode(), G4ExcitedMesonConstructor::AddKStarPiMode(), G4ExcitedMesonConstructor::AddKTwoPiMode(), G4ExcitedMesonConstructor::AddPiA2Mode(), G4ExcitedMesonConstructor::AddPiEtaMode(), G4ExcitedMesonConstructor::AddPiF0Mode(), G4ExcitedMesonConstructor::AddPiF2Mode(), G4ExcitedMesonConstructor::AddPiGammaMode(), G4ExcitedMesonConstructor::AddPiOmegaMode(), G4ExcitedMesonConstructor::AddPiRhoMode(), G4ExcitedMesonConstructor::AddRhoEtaMode(), G4ExcitedMesonConstructor::AddRhoGammaMode(), G4ShortLivedConstructor::ConstructBaryons(), G4ShortLivedConstructor::ConstructMesons(), G4XiZero::Definition(), G4XiMinus::Definition(), G4TauPlus::Definition(), G4TauMinus::Definition(), G4SigmaZero::Definition(), G4SigmaPlus::Definition(), G4SigmaMinus::Definition(), G4SigmacZero::Definition(), G4SigmacPlusPlus::Definition(), G4SigmacPlus::Definition(), G4SigmabZero::Definition(), G4SigmabPlus::Definition(), G4SigmabMinus::Definition(), G4PionZero::Definition(), G4PionPlus::Definition(), G4PionMinus::Definition(), G4OmegaMinus::Definition(), G4Neutron::Definition(), G4MuonPlus::Definition(), G4MuonMinus::Definition(), G4Lambda::Definition(), G4KaonZeroShort::Definition(), G4KaonZeroLong::Definition(), G4KaonZero::Definition(), G4KaonPlus::Definition(), G4KaonMinus::Definition(), G4EtaPrime::Definition(), G4Eta::Definition(), G4AntiXiZero::Definition(), G4AntiXiMinus::Definition(), G4AntiSigmaZero::Definition(), G4AntiSigmaPlus::Definition(), G4AntiSigmaMinus::Definition(), G4AntiSigmacZero::Definition(), G4AntiSigmacPlusPlus::Definition(), G4AntiSigmacPlus::Definition(), G4AntiSigmabZero::Definition(), G4AntiSigmabPlus::Definition(), G4AntiSigmabMinus::Definition(), G4AntiOmegaMinus::Definition(), G4AntiNeutron::Definition(), G4AntiLambda::Definition(), G4AntiKaonZero::Definition(), and G4RadioactiveDecay::LoadDecayTable().
00060 { 00061 if (parent == 0) { parent = (G4ParticleDefinition*)(aChannel->GetParent()); } 00062 if (parent != aChannel->GetParent()) { 00063 #ifdef G4VERBOSE 00064 G4cerr << " G4DecayTable::Insert :: bad G4VDecayChannel (mismatch parent) " 00065 << " " << parent->GetParticleName() 00066 << " input:" << aChannel->GetParent()->GetParticleName() << G4endl; 00067 #endif 00068 } else { 00069 G4double r = aChannel->GetBR(); 00070 G4VDecayChannelVector::iterator i; 00071 for (i = channels->begin(); i!= channels->end(); ++i) { 00072 if (r > (*i)->GetBR()) { 00073 channels->insert(i,aChannel); 00074 return; 00075 } 00076 } 00077 channels->push_back(aChannel); 00078 } 00079 }
G4int G4DecayTable::operator!= | ( | const G4DecayTable & | right | ) | const [inline] |
G4int G4DecayTable::operator== | ( | const G4DecayTable & | right | ) | const [inline] |
G4VDecayChannel * G4DecayTable::operator[] | ( | G4int | index | ) | [inline] |
G4VDecayChannel * G4DecayTable::SelectADecayChannel | ( | ) |
Definition at line 81 of file G4DecayTable.cc.
References G4UniformRand.
Referenced by G4DecayWithSpin::DecayIt(), G4Decay::DecayIt(), G4IntraNucleiCascader::decayTrappedParticle(), and G4RadioactiveDecay::DoDecay().
00082 { 00083 // check if contents exist 00084 if (channels->size()<1) return 0; 00085 00086 while (1) { 00087 G4double sumBR = 0.0; 00088 G4double r= G4UniformRand(); 00089 // select decay channel 00090 G4VDecayChannelVector::iterator i; 00091 for (i = channels->begin(); i!= channels->end(); ++i) { 00092 sumBR += (*i)->GetBR(); 00093 if (r < sumBR) { 00094 return (*i); 00095 } 00096 } 00097 } 00098 return 0; 00099 }