43 for (
auto iCh = channels->cbegin(); iCh!= channels->cend(); ++iCh)
55 if (parent ==
nullptr)
62 G4cout <<
" G4DecayTable::Insert :: bad G4VDecayChannel (mismatch parent) "
70 for (
auto iCh = channels->cbegin(); iCh!= channels->cend(); ++iCh)
72 if (br > (*iCh)->GetBR())
74 channels->insert(iCh,aChannel);
78 channels->push_back(aChannel);
85 if (channels->size()<1)
return nullptr;
87 if(parentMass < 0.) parentMass=parent->
GetPDGMass();
90 for (
auto iCh = channels->cbegin(); iCh!= channels->cend(); ++iCh)
92 if ( !((*iCh)->IsOKWithParentMass(parentMass)) )
continue;
93 sumBR += (*iCh)->GetBR();
98 G4cout <<
" G4DecayTable::SelectADecayChannel :: no possible DecayChannel"
104 const std::size_t MAX_LOOP = 10000;
105 for (std::size_t loop_counter=0; loop_counter<MAX_LOOP; ++loop_counter)
110 for (
auto iCh = channels->cbegin(); iCh!= channels->cend(); ++iCh)
112 sum += (*iCh)->GetBR();
113 if ( !((*iCh)->IsOKWithParentMass(parentMass)) )
continue;
114 if (br < sum)
return (*iCh);
124 for (
auto iCh = channels->cbegin(); iCh!= channels->cend(); ++iCh)
G4GLOB_DLL std::ostream G4cout
void Insert(G4VDecayChannel *aChannel)
G4VDecayChannel * SelectADecayChannel(G4double parentMass=-1.)
std::vector< G4VDecayChannel * > G4VDecayChannelVector
G4double GetPDGMass() const
const G4String & GetParticleName() const
G4ParticleDefinition * GetParent()