1576 fParticleChangeForRadDecay.
Initialize(theTrack);
1582 if (!isAllVolumesMode) {
1583 if (!std::binary_search(ValidVolumes.begin(), ValidVolumes.end(),
1587 G4cout <<
"G4RadioactiveDecay::DecayIt : "
1589 <<
" is not selected for the RDM"<<
G4endl;
1590 G4cout <<
" There are " << ValidVolumes.size() <<
" volumes" <<
G4endl;
1592 for (
size_t i = 0; i< ValidVolumes.size(); i++)
1593 G4cout << ValidVolumes[i] << G4endl;
1602 return &fParticleChangeForRadDecay;
1612 G4cerr <<
"G4RadioactiveDecay::DecayIt : "
1614 <<
" is not a valid nucleus for the RDM"<<
G4endl;
1623 return &fParticleChangeForRadDecay;
1627 if (theDecayTable == 0 || theDecayTable->
entries() == 0) {
1632 G4cerr <<
"G4RadioactiveDecay::DecayIt : decay table not defined for ";
1642 return &fParticleChangeForRadDecay;
1664 if ( products->
entries() == 1) {
1669 return &fParticleChangeForRadDecay;
1693 if (temptime < 0.) temptime = 0.;
1694 finalGlobalTime += temptime;
1695 finalLocalTime += temptime;
1698 products->
Boost(ParentEnergy, ParentDirection);
1705 G4cout <<
"G4RadioactiveDecay::DecayIt : Decay vertex :";
1706 G4cout <<
" Time: " <<finalGlobalTime/
ns <<
"[ns]";
1711 G4cout <<
"G4Decay::DecayIt : decay products in Lab. Frame" <<
G4endl;
1716 for (index=0; index < numberOfSecondaries; index++) {
1718 finalGlobalTime, currentPosition);
1730 G4cout <<
"DecayIt: Variance Reduction version " <<
G4endl;
1747 std::vector<G4double> PT;
1748 std::vector<G4double> PR;
1750 long double decayRate;
1754 G4int numberOfSecondaries;
1755 G4int totalNumberOfSecondaries = 0;
1759 std::vector<G4DynamicParticle*> secondaryparticles;
1760 std::vector<G4double> pw;
1761 std::vector<G4double> ptime;
1766 for (
G4int n = 0;
n < NSplit;
n++) {
1775 weight1 = 1./DProfile[nbin-1]
1776 *(DBin[nbin]-DBin[nbin-1])/NSplit;
1777 }
else if (nbin > 1) {
1778 weight1 = 1./(DProfile[nbin]-DProfile[nbin-2])
1779 *(DBin[nbin]-DBin[nbin-1])/NSplit;
1787 for (i = 0; i < theDecayRateVector.size(); i++) {
1788 PZ = theDecayRateVector[i].GetZ();
1789 PA = theDecayRateVector[i].GetA();
1790 PE = theDecayRateVector[i].GetE();
1791 PT = theDecayRateVector[i].GetTaos();
1792 PR = theDecayRateVector[i].GetDecayRateC();
1802 for (j = 0; j < PT.size(); j++) {
1806 decayRate -= PR[j] * (
long double)taotime;
1819 theRadioactivityTables[decayWindows[nbin-1]]->AddIsotope(PZ,PA,PE,weight1*decayRate,theTrack.
GetWeight());
1828 parentNucleus = theIonTable->
GetIon(PZ,PA,PE);
1840 if (theDecayChannel == 0) {
1844 G4cerr <<
" G4RadioactiveDecay::DoIt : cannot determine decay channel ";
1845 G4cerr <<
" for this nucleus; decay as if no biasing active ";
1850 tempprods =
DoDecay(*parentNucleus);
1855 tempprods = theDecayChannel->DecayIt(tempmass);
1856 weight *= (theDecayChannel->GetBR())*(decayTable->
entries());
1859 tempprods =
DoDecay(*parentNucleus);
1864 numberOfSecondaries = tempprods->
entries();
1865 currentTime = finalGlobalTime + theDecayTime;
1866 for (index = 0; index < numberOfSecondaries; index++) {
1869 pw.push_back(weight);
1870 ptime.push_back(currentTime);
1871 secondaryparticles.push_back(asecondaryparticle);
1874 else if (((
const G4Ions*)(asecondaryparticle->
GetDefinition()))->GetExcitationEnergy()>0. && weight>0.){
1886 totalNumberOfSecondaries = pw.size();
1888 for (index=0; index < totalNumberOfSecondaries; index++) {
1890 ptime[index], currentPosition);
1910 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)
void ProposeWeight(G4double finalWeight)
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