107 Qtransition(theQtransition), RandomEnergy(0)
111 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
120 FillDaughterNucleus(0, A, Z, theDaughterExcitation);
140 Qtransition(theQtransition), RandomEnergy(0)
144 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
154 FillDaughterNucleus(1, A, Z, theDaughterExcitation);
178 Qtransition(theQtransition)
182 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
193 FillDaughterNucleus(1, A, Z, theDaughterExcitation);
210 if (A < 1 || Z < 0 || theDaughterExcitation < 0.0) {
212 ed <<
"Inappropriate values of daughter A, Z or excitation: "
213 << A <<
" , " << Z <<
" , " << theDaughterExcitation*
MeV <<
" MeV "
215 G4Exception(
"G4NuclearDecayChannel::FillDaughterNucleus()",
"HAD_RDM_006",
223 if (Z == 1 && A == 1) {
225 }
else if (Z == 0 && A == 1) {
242 deltaM = CLHEP::electron_mass_c2;
244 deltaM = 2.*CLHEP::electron_mass_c2;
245 }
else if (decayMode < 6 && decayMode > 2) {
246 deltaM = -CLHEP::electron_mass_c2;
266 ed <<
" No daughters defined " <<
G4endl;
267 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_005",
278 products = BetaDecayIt();
285 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_007",
292 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_008",
300 G4int shellIndex = -1;
310 daughterMomentum.
setE(daughterMomentum.
e() + exe);
349 G4int nGammas = gammas->size() - 1;
351 gammas->operator[](nGammas)->GetExcitationEnergy();
357 for (
G4int ig = 0; ig < nGammas; ig++) {
360 gammas->operator[](ig)->GetMomentum());
361 theGammaRay -> SetProperTime(gammas->operator[](ig)->GetCreationTime());
363 Egamma = (gammas->operator[](ig)->GetMomentum()).e();
365 if (finalDaughterExcitation <= 1.0*
keV) finalDaughterExcitation = 0;
370 daughterMomentum.
setE(daughterMomentum.
e() - Egamma);
373 while (!gammas->empty() ) {
374 delete *(gammas->end()-1);
381 G4ThreeVector const daughterMomentum1(static_cast<const G4LorentzVector> (daughterMomentum));
415 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_009",
440 std::vector<G4DynamicParticle*> armProducts;
443 size_t narm = armProducts.size();
449 for (
size_t i = 0; i<narm; ++i) {
523 for (
G4int index = 0; index < 3; index++) {
540 daughtermomentum[0] = std::sqrt(daughterenergy[0]*(daughterenergy[0] + 2.*daughtermass[0]) );
546 G4double K = 0.5 - daughtermass[1]*daughtermass[1]/(2*Mme*Mme-4*pmass*daughterenergy[0]);
548 daughterenergy[2] = K * (Mme - daughterenergy[0] + rd*daughtermomentum[0]);
549 daughtermomentum[2] = daughterenergy[2];
552 daughterenergy[1] = Qtransition - daughterenergy[0] - daughterenergy[2];
554 daughterenergy[1]*(daughterenergy[1] + 2.0*daughtermass[1]);
555 if (recoilmomentumsquared < 0.0) recoilmomentumsquared = 0.0;
556 daughtermomentum[1] = std::sqrt(recoilmomentumsquared);
560 G4cout <<
" G4NuclearDecayChannel::BetaDecayIt() " <<
G4endl;
561 G4cout <<
" e- momentum: " <<daughtermomentum[0]/
GeV <<
" [GeV/c]" <<
G4endl;
562 G4cout <<
" daughter momentum: " <<daughtermomentum[1]/
GeV <<
" [GeV/c]" <<
G4endl;
563 G4cout <<
" nu momentum: " <<daughtermomentum[2]/
GeV <<
" [GeV/c]" <<
G4endl;
564 G4cout <<
" e- energy: " << daughtermass[0] + daughterenergy[0] <<
G4endl;
565 G4cout <<
" daughter energy: " << daughtermass[1] + daughterenergy[1] <<
G4endl;
566 G4cout <<
" nu energy: " << daughtermass[2] + daughterenergy[2] <<
G4endl;
567 G4cout <<
" total of daughter energies: " << daughtermass[0] + daughtermass[1] +
568 daughtermass[2] + daughterenergy[0] + daughterenergy[1] + daughterenergy[2]
572 G4double costheta, sintheta, phi, sinphi, cosphi;
573 G4double costhetan, sinthetan, phin, sinphin, cosphin;
575 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
577 sinphi = std::sin(phi);
578 cosphi = std::cos(phi);
584 costhetan = (daughtermomentum[1]*daughtermomentum[1]-
585 daughtermomentum[2]*daughtermomentum[2]-
586 daughtermomentum[0]*daughtermomentum[0])/
587 (2.0*daughtermomentum[2]*daughtermomentum[0]);
589 if (costhetan > 1.) costhetan = 1.;
590 if (costhetan < -1.) costhetan = -1.;
591 sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
593 sinphin = std::sin(phin);
594 cosphin = std::cos(phin);
596 direction2.
setX(sinthetan*cosphin*costheta*cosphi -
597 sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
598 direction2.
setY(sinthetan*cosphin*costheta*sinphi +
599 sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
600 direction2.
setZ(-sinthetan*cosphin*sintheta + costhetan*costheta);
602 direction2*(daughtermomentum[2]/direction2.
mag()));
607 (direction0*daughtermomentum[0] +
608 direction2*(daughtermomentum[2]/direction2.
mag()))*(-1.0));
612 G4cout <<
"G4NuclearDecayChannel::BetaDecayIt ";
613 G4cout <<
" create decay products in rest frame " <<
G4endl;
Hep3Vector boostVector() const
void SetBR(G4double value)
static G4LossTableManager * Instance()
G4bool IsFluoActive() const
std::ostringstream G4ExceptionDescription
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4double GetParentMass() const
G4ParticleDefinition ** G4MT_daughters
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
void SetNumberOfDaughters(G4int value)
HepLorentzVector & boost(double, double, double)
std::vector< G4Fragment * > G4FragmentVector
virtual G4FragmentVector * BreakUp(const G4Fragment &nucleus)
G4DecayProducts * TwoBodyDecayIt()
G4LorentzVector Get4Momentum() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void Set4Momentum(const G4LorentzVector &momentum)
G4double halflifethreshold
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)
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
void SetParentMass(const G4double aParentMass)
G4DecayProducts * DecayIt(G4double)
void SetVerboseLevel(G4int verbose)
G4int GetVacantShellNumber()
static const G4double pTolerance
static G4int GetNumberOfShells(G4int Z)