98 const G4double theDaughterExcitation)
100 Qtransition(theQtransition), RandomEnergy(0)
104 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
129 const G4double theDaughterExcitation,
132 Qtransition(theQtransition), RandomEnergy(0)
136 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
165 const G4double theDaughterExcitation,
169 Qtransition(theQtransition)
173 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
197 const G4double theDaughterExcitation)
201 if (A < 1 || Z < 0 || theDaughterExcitation < 0.0) {
203 ed <<
"Inappropriate values of daughter A, Z or excitation: "
204 << A <<
" , " << Z <<
" , " << theDaughterExcitation*
MeV <<
" MeV "
206 G4Exception(
"G4NuclearDecayChannel::FillDaughterNucleus()",
"HAD_RDM_006",
214 if (Z == 1 && A == 1) {
216 }
else if (Z == 0 && A == 1) {
233 deltaM = CLHEP::electron_mass_c2;
235 deltaM = 2.*CLHEP::electron_mass_c2;
236 }
else if (decayMode < 6 && decayMode > 2) {
237 deltaM = -CLHEP::electron_mass_c2;
257 ed <<
" No daughters defined " <<
G4endl;
258 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_005",
276 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_007",
284 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_008",
292 G4int shellIndex = -1;
302 daughterMomentum.setE(daughterMomentum.e() + exe);
347 ed << nFrags <<
" No fragments produced by photon evaporation. " <<
G4endl;
348 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_012",
350 }
else if (nFrags > 1) {
355 for (
G4int i = 0; i < nFrags - 1; i++) {
356 eOrGamma = gammas->operator[](i);
366 gammas->operator[](nFrags-1)->GetExcitationEnergy();
367 if (finalDaughterExcitation <= 1.0*
keV) finalDaughterExcitation = 0;
372 daughterMomentum.setE(daughterMomentum.e() - eOrGammaEnergy);
375 while (!gammas->empty() ) {
376 delete *(gammas->end()-1);
382 G4ThreeVector const daughterMomentum1(static_cast<const G4LorentzVector> (daughterMomentum));
416 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_009",
441 std::vector<G4DynamicParticle*> armProducts;
444 size_t narm = armProducts.size();
450 for (
size_t i = 0; i<narm; ++i) {
523 for (
G4int index = 0; index < 3; index++) {
541 daughtermomentum[0] = std::sqrt(daughterenergy[0]*(daughterenergy[0] + 2.*daughtermass[0]) );
547 G4double K = 0.5 - daughtermass[1]*daughtermass[1]/(2*Mme*Mme-4*pmass*daughterenergy[0]);
549 daughterenergy[2] = K * (Mme - daughterenergy[0] + rd*daughtermomentum[0]);
550 daughtermomentum[2] = daughterenergy[2];
553 daughterenergy[1] = Qtransition - daughterenergy[0] - daughterenergy[2];
555 daughterenergy[1]*(daughterenergy[1] + 2.0*daughtermass[1]);
556 if (recoilmomentumsquared < 0.0) recoilmomentumsquared = 0.0;
557 daughtermomentum[1] = std::sqrt(recoilmomentumsquared);
561 G4cout <<
" G4NuclearDecayChannel::BetaDecayIt() " <<
G4endl;
562 G4cout <<
" e- momentum: " <<daughtermomentum[0]/
GeV <<
" [GeV/c]" <<
G4endl;
563 G4cout <<
" daughter momentum: " <<daughtermomentum[1]/
GeV <<
" [GeV/c]" <<
G4endl;
564 G4cout <<
" nu momentum: " <<daughtermomentum[2]/
GeV <<
" [GeV/c]" <<
G4endl;
565 G4cout <<
" e- energy: " << daughtermass[0] + daughterenergy[0] <<
G4endl;
566 G4cout <<
" daughter energy: " << daughtermass[1] + daughterenergy[1] <<
G4endl;
567 G4cout <<
" nu energy: " << daughtermass[2] + daughterenergy[2] <<
G4endl;
568 G4cout <<
" total of daughter energies: " << daughtermass[0] + daughtermass[1] +
569 daughtermass[2] + daughterenergy[0] + daughterenergy[1] + daughterenergy[2]
573 G4double costheta, sintheta, phi, sinphi, cosphi;
574 G4double costhetan, sinthetan, phin, sinphin, cosphin;
576 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
578 sinphi = std::sin(phi);
579 cosphi = std::cos(phi);
586 costhetan = (daughtermomentum[1]*daughtermomentum[1]-
587 daughtermomentum[2]*daughtermomentum[2]-
588 daughtermomentum[0]*daughtermomentum[0])/
589 (2.0*daughtermomentum[2]*daughtermomentum[0]);
591 if (costhetan > 1.) costhetan = 1.;
592 if (costhetan < -1.) costhetan = -1.;
593 sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
595 sinphin = std::sin(phin);
596 cosphin = std::cos(phin);
598 direction2.setX(sinthetan*cosphin*costheta*cosphi -
599 sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
600 direction2.setY(sinthetan*cosphin*costheta*sinphi +
601 sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
602 direction2.setZ(-sinthetan*cosphin*sintheta + costhetan*costheta);
604 direction2*(daughtermomentum[2]/direction2.mag()));
609 (direction0*daughtermomentum[0] +
610 direction2*(daughtermomentum[2]/direction2.mag()))*(-1.0));
614 G4cout <<
"G4NuclearDecayChannel::BetaDecayIt ";
615 G4cout <<
" create decay products in rest frame " <<
G4endl;
void SetBR(G4double value)
static G4LossTableManager * Instance()
G4bool IsFluoActive() const
std::ostringstream G4ExceptionDescription
CLHEP::Hep3Vector G4ThreeVector
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4double GetParentMass() const
G4ParticleDefinition ** G4MT_daughters
const G4ParticleDefinition * GetParticleDefinition() const
G4RandGeneral * RandomEnergy
G4double G4MT_parent_mass
virtual ~G4NuclearDecayChannel()
const G4RadioactiveDecayMode decayMode
const G4double Qtransition
static G4Proton * Definition()
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
G4IonTable * GetIonTable() const
G4GLOB_DLL std::ostream G4cout
G4double GetCreationTime() const
void SetNumberOfDaughters(G4int value)
const G4LorentzVector & GetMomentum() const
std::vector< G4Fragment * > G4FragmentVector
virtual G4FragmentVector * BreakUp(const G4Fragment &nucleus)
G4DecayProducts * TwoBodyDecayIt()
static const G4double A[nN]
G4LorentzVector Get4Momentum() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void Set4Momentum(const G4LorentzVector &momentum)
G4double halflifethreshold
static const double nanosecond
G4int GetVerboseLevel() const
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
G4NuclearDecayChannel(const G4RadioactiveDecayMode &theMode, G4int Verbose)
G4DecayProducts * OneBodyDecayIt()
void SetParent(const G4ParticleDefinition *particle_type)
G4DynamicParticle * PopProducts()
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
G4DecayProducts * BetaDecayIt()
static G4Neutron * Definition()
G4ParticleDefinition * daughterNucleus
static G4ThreadLocal G4DynamicParticle * dynamicDaughter
G4VAtomDeexcitation * AtomDeexcitation()
static const G4double levelTolerance
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
G4double daughterExcitation
G4ThreeVector G4ParticleMomentum
void SetProperTime(G4double)
void SetParentMass(const G4double aParentMass)
G4DecayProducts * DecayIt(G4double)
void SetVerboseLevel(G4int verbose)
G4int GetVacantShellNumber()
static const G4double pTolerance
CLHEP::HepLorentzVector G4LorentzVector
void FillDaughterNucleus(G4int index, G4int A, G4int Z, const G4double theDaughterExcitation)
static G4int GetNumberOfShells(G4int Z)