1576 fParticleChangeForRadDecay.
Initialize(theTrack);
1581 if (!isAllVolumesMode) {
1582 if (!std::binary_search(ValidVolumes.begin(), ValidVolumes.end(),
1586 G4cout <<
"G4RadioactiveDecay::DecayIt : "
1588 <<
" is not selected for the RDM"<<
G4endl;
1589 G4cout <<
" There are " << ValidVolumes.size() <<
" volumes" <<
G4endl;
1591 for (
size_t i = 0; i< ValidVolumes.size(); i++)
1592 G4cout << ValidVolumes[i] << G4endl;
1601 return &fParticleChangeForRadDecay;
1611 G4cerr <<
"G4RadioactiveDecay::DecayIt : "
1613 <<
" is not a valid nucleus for the RDM"<<
G4endl;
1622 return &fParticleChangeForRadDecay;
1626 if (theDecayTable == 0 || theDecayTable->
entries() == 0) {
1631 G4cerr <<
"G4RadioactiveDecay::DecayIt : decay table not defined for ";
1641 return &fParticleChangeForRadDecay;
1663 if ( products->
entries() == 1) {
1668 return &fParticleChangeForRadDecay;
1692 if (temptime < 0.) temptime = 0.;
1693 finalGlobalTime += temptime;
1694 finalLocalTime += temptime;
1697 products->
Boost(ParentEnergy, ParentDirection);
1704 G4cout <<
"G4RadioactiveDecay::DecayIt : Decay vertex :";
1705 G4cout <<
" Time: " <<finalGlobalTime/
ns <<
"[ns]";
1710 G4cout <<
"G4Decay::DecayIt : decay products in Lab. Frame" <<
G4endl;
1715 for (index=0; index < numberOfSecondaries; index++) {
1717 finalGlobalTime, currentPosition);
1729 G4cout <<
"DecayIt: Variance Reduction version " <<
G4endl;
1746 std::vector<G4double> PT;
1747 std::vector<G4double> PR;
1749 long double decayRate;
1753 G4int numberOfSecondaries;
1754 G4int totalNumberOfSecondaries = 0;
1758 std::vector<G4DynamicParticle*> secondaryparticles;
1759 std::vector<G4double> pw;
1760 std::vector<G4double> ptime;
1765 for (
G4int n = 0;
n < NSplit;
n++) {
1774 weight1 = 1./DProfile[nbin-1]
1775 *(DBin[nbin]-DBin[nbin-1])/NSplit;
1776 }
else if (nbin > 1) {
1777 weight1 = 1./(DProfile[nbin]-DProfile[nbin-2])
1778 *(DBin[nbin]-DBin[nbin-1])/NSplit;
1786 for (i = 0; i < theDecayRateVector.size(); i++) {
1787 PZ = theDecayRateVector[i].GetZ();
1788 PA = theDecayRateVector[i].GetA();
1789 PE = theDecayRateVector[i].GetE();
1790 PT = theDecayRateVector[i].GetTaos();
1791 PR = theDecayRateVector[i].GetDecayRateC();
1801 for (j = 0; j < PT.size(); j++) {
1805 decayRate -= PR[j] * (
long double)taotime;
1818 theRadioactivityTables[decayWindows[nbin-1]]->AddIsotope(PZ,PA,PE,weight1*decayRate,theTrack.
GetWeight());
1827 parentNucleus = theIonTable->
GetIon(PZ,PA,PE);
1839 if (theDecayChannel == 0) {
1843 G4cerr <<
" G4RadioactiveDecay::DoIt : cannot determine decay channel ";
1844 G4cerr <<
" for this nucleus; decay as if no biasing active ";
1849 tempprods =
DoDecay(*parentNucleus);
1854 tempprods = theDecayChannel->DecayIt(tempmass);
1855 weight *= (theDecayChannel->GetBR())*(decayTable->
entries());
1858 tempprods =
DoDecay(*parentNucleus);
1863 numberOfSecondaries = tempprods->
entries();
1864 currentTime = finalGlobalTime + theDecayTime;
1865 for (index = 0; index < numberOfSecondaries; index++) {
1868 pw.push_back(weight);
1869 ptime.push_back(currentTime);
1870 secondaryparticles.push_back(asecondaryparticle);
1873 else if (((
const G4Ions*)(asecondaryparticle->
GetDefinition()))->GetExcitationEnergy()>0. && weight>0.){
1885 totalNumberOfSecondaries = pw.size();
1887 for (index=0; index < totalNumberOfSecondaries; index++) {
1889 ptime[index], currentPosition);
1909 return &fParticleChangeForRadDecay ;
G4DecayProducts * DoDecay(const G4ParticleDefinition &theParticleDef)
G4double GetLocalTime() const
G4double GetKineticEnergy() const
G4bool IsRateTableReady(const G4ParticleDefinition &)
const G4DynamicParticle * GetDynamicParticle() const
G4double ConvolveSourceTimeProfile(const G4double, const G4double)
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
const G4ThreeVector & GetPosition() const
void AddSecondary(G4Track *aSecondary)
G4TrackStatus GetTrackStatus() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4VDecayChannel * GetDecayChannel(G4int index) const
G4int GetVerboseLevel() const
G4ParticleDefinition * GetDefinition() const
G4bool IsApplicable(const G4ParticleDefinition &)
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
void ClearNumberOfInteractionLengthLeft()
const G4String & GetParticleName() const
void SetWeight(G4double aValue)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
virtual void Initialize(const G4Track &)
G4IonTable * GetIonTable() const
G4GLOB_DLL std::ostream G4cout
void ProposeLocalTime(G4double t)
const G4ThreeVector & GetMomentumDirection() const
static constexpr double cm
G4int GetDecayTimeBin(const G4double aDecayTime)
const G4ParticleDefinition * GetParticleDefinition() const
G4double GetGlobalTime() const
const G4TouchableHandle & GetTouchableHandle() const
G4DecayTable * GetDecayTable(const G4ParticleDefinition *)
G4LogicalVolume * GetLogicalVolume() const
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
void GetDecayRateTable(const G4ParticleDefinition &)
void SetNumberOfSecondaries(G4int totSecondaries)
G4DynamicParticle * PopProducts()
void AddDecayRateTable(const G4ParticleDefinition &)
G4VPhysicalVolume * GetVolume() const
G4double GetWeight() const
G4double GetPDGLifeTime() const
const G4String & GetName() const
void ProposeTrackStatus(G4TrackStatus status)
void AddDeexcitationSpectrumForBiasMode(G4ParticleDefinition *apartDef, G4double weight, G4double currenTime, std::vector< double > &weights_v, std::vector< double > ×_v, std::vector< G4DynamicParticle * > &secondaries_v)
void SetGoodForTrackingFlag(G4bool value=true)
G4GLOB_DLL std::ostream G4cerr
G4int GetBaryonNumber() const