Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DecayTable Class Reference

#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
 
G4VDecayChannelSelectADecayChannel ()
 
G4VDecayChannelGetDecayChannel (G4int index) const
 
G4VDecayChanneloperator[] (G4int index)
 
void DumpInfo () const
 

Detailed Description

Definition at line 50 of file G4DecayTable.hh.

Member Typedef Documentation

◆ G4VDecayChannelVector

Definition at line 58 of file G4DecayTable.hh.

Constructor & Destructor Documentation

◆ G4DecayTable()

G4DecayTable::G4DecayTable ( )

Definition at line 43 of file G4DecayTable.cc.

43 :parent(0)
44{
45 channels = new G4VDecayChannelVector;
46}
std::vector< G4VDecayChannel * > G4VDecayChannelVector
Definition: G4DecayTable.hh:58

◆ ~G4DecayTable()

G4DecayTable::~G4DecayTable ( )

Definition at line 48 of file G4DecayTable.cc.

49{
50 // remove and delete all contents
51 G4VDecayChannelVector::iterator i;
52 for (i = channels->begin(); i!= channels->end(); ++i) {
53 delete (*i);
54 }
55 channels->clear();
56 delete channels;
57 channels = 0;
58}

Member Function Documentation

◆ DumpInfo()

void G4DecayTable::DumpInfo ( ) const

Definition at line 101 of file G4DecayTable.cc.

102{
103 G4cout << "G4DecayTable: " << parent->GetParticleName() << G4endl;
104 G4int index =0;
105 G4VDecayChannelVector::iterator i;
106 for (i = channels->begin(); i!= channels->end(); ++i) {
107 G4cout << index << ": ";
108 (*i)->DumpInfo();
109 index +=1;
110 }
111 G4cout << G4endl;
112}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
const G4String & GetParticleName() const

Referenced by G4RadioactiveDecay::DecayIt(), G4RadioactiveDecay::DoDecay(), G4IsotopeProperty::DumpInfo(), G4ParticleDefinition::DumpTable(), G4RadioactiveDecay::LoadDecayTable(), and G4DecayTableMessenger::SetNewValue().

◆ entries()

◆ GetDecayChannel()

G4VDecayChannel * G4DecayTable::GetDecayChannel ( G4int  index) const
inline

◆ Insert()

void G4DecayTable::Insert ( G4VDecayChannel aChannel)

Definition at line 60 of file G4DecayTable.cc.

60 {
61 if (parent == 0) { parent = (G4ParticleDefinition*)(aChannel->GetParent()); }
62 if (parent != aChannel->GetParent()) {
63#ifdef G4VERBOSE
64 G4cerr << " G4DecayTable::Insert :: bad G4VDecayChannel (mismatch parent) "
65 << " " << parent->GetParticleName()
66 << " input:" << aChannel->GetParent()->GetParticleName() << G4endl;
67#endif
68 } else {
69 G4double r = aChannel->GetBR();
70 G4VDecayChannelVector::iterator i;
71 for (i = channels->begin(); i!= channels->end(); ++i) {
72 if (r > (*i)->GetBR()) {
73 channels->insert(i,aChannel);
74 return;
75 }
76 }
77 channels->push_back(aChannel);
78 }
79}
double G4double
Definition: G4Types.hh:64
G4DLLIMPORT std::ostream G4cerr
G4double GetBR() const
G4ParticleDefinition * GetParent()

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(), G4AntiLambda::Definition(), G4AntiNeutron::Definition(), G4AntiOmegaMinus::Definition(), G4AntiSigmabMinus::Definition(), G4AntiSigmabPlus::Definition(), G4AntiSigmabZero::Definition(), G4AntiSigmacPlus::Definition(), G4AntiSigmacPlusPlus::Definition(), G4AntiSigmacZero::Definition(), G4AntiSigmaMinus::Definition(), G4AntiSigmaPlus::Definition(), G4AntiSigmaZero::Definition(), G4AntiXiMinus::Definition(), G4AntiXiZero::Definition(), G4Lambda::Definition(), G4Neutron::Definition(), G4OmegaMinus::Definition(), G4SigmabMinus::Definition(), G4SigmabPlus::Definition(), G4SigmabZero::Definition(), G4SigmacPlus::Definition(), G4SigmacPlusPlus::Definition(), G4SigmacZero::Definition(), G4SigmaMinus::Definition(), G4SigmaPlus::Definition(), G4SigmaZero::Definition(), G4XiMinus::Definition(), G4XiZero::Definition(), G4AntiKaonZero::Definition(), G4Eta::Definition(), G4EtaPrime::Definition(), G4KaonMinus::Definition(), G4KaonPlus::Definition(), G4KaonZero::Definition(), G4KaonZeroLong::Definition(), G4KaonZeroShort::Definition(), G4PionMinus::Definition(), G4PionPlus::Definition(), G4PionZero::Definition(), G4MuonMinus::Definition(), G4MuonPlus::Definition(), G4TauMinus::Definition(), G4TauPlus::Definition(), and G4RadioactiveDecay::LoadDecayTable().

◆ operator!=()

G4int G4DecayTable::operator!= ( const G4DecayTable right) const
inline

Definition at line 74 of file G4DecayTable.hh.

74{return (this != &right);};

◆ operator==()

G4int G4DecayTable::operator== ( const G4DecayTable right) const
inline

Definition at line 73 of file G4DecayTable.hh.

73{return (this == &right);};

◆ operator[]()

G4VDecayChannel * G4DecayTable::operator[] ( G4int  index)
inline

Definition at line 106 of file G4DecayTable.hh.

107{
108 return (*channels)[index];
109}

◆ SelectADecayChannel()

G4VDecayChannel * G4DecayTable::SelectADecayChannel ( )

Definition at line 81 of file G4DecayTable.cc.

82{
83 // check if contents exist
84 if (channels->size()<1) return 0;
85
86 while (1) {
87 G4double sumBR = 0.0;
89 // select decay channel
90 G4VDecayChannelVector::iterator i;
91 for (i = channels->begin(); i!= channels->end(); ++i) {
92 sumBR += (*i)->GetBR();
93 if (r < sumBR) {
94 return (*i);
95 }
96 }
97 }
98 return 0;
99}
#define G4UniformRand()
Definition: Randomize.hh:53

Referenced by G4Decay::DecayIt(), G4DecayWithSpin::DecayIt(), G4IntraNucleiCascader::decayTrappedParticle(), and G4RadioactiveDecay::DoDecay().


The documentation for this class was generated from the following files: