68 #include "G4NuclearDecayChannel.hh" 73 #include "G4ParticleChangeForRadDecay.hh" 82 const G4double G4NuclearDecayChannel:: pTolerance = 0.001;
83 const G4double G4NuclearDecayChannel:: levelTolerance = 2.0*
keV;
90 G4NuclearDecayChannel::
97 const G4double theDaughterExcitation)
99 Qtransition(theQtransition), RandomEnergy(0)
103 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
112 FillDaughterNucleus(0, A, Z, theDaughterExcitation);
121 G4NuclearDecayChannel::
128 const G4double theDaughterExcitation,
131 Qtransition(theQtransition), RandomEnergy(0)
135 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
145 FillDaughterNucleus(1, A, Z, theDaughterExcitation);
154 G4NuclearDecayChannel::
164 const G4double theDaughterExcitation,
168 Qtransition(theQtransition)
172 G4cout <<
"G4NuclearDecayChannel constructor for " <<
G4int(theMode)
183 FillDaughterNucleus(1, A, Z, theDaughterExcitation);
184 RandomEnergy = randBeta;
192 G4NuclearDecayChannel::~G4NuclearDecayChannel()
196 const G4double theDaughterExcitation)
200 if (A < 1 || Z < 0 || theDaughterExcitation < 0.0) {
202 ed <<
"Inappropriate values of daughter A, Z or excitation: " 203 << A <<
" , " << Z <<
" , " << theDaughterExcitation*
MeV <<
" MeV " 205 G4Exception(
"G4NuclearDecayChannel::FillDaughterNucleus()",
"HAD_RDM_006",
213 if (Z == 1 && A == 1) {
215 }
else if (Z == 0 && A == 1) {
221 daughterNucleus = theIonTable->
GetIon(daughterZ, daughterA);
224 daughterExcitation = theDaughterExcitation;
231 if (decayMode == 1) {
233 }
else if (decayMode == 2) {
235 }
else if (decayMode < 6 && decayMode > 2) {
245 SetParentMass(massOfParent - deltaM - daughterExcitation);
256 ed <<
" No daughters defined " <<
G4endl;
257 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_005",
262 products = OneBodyDecayIt();
265 products = TwoBodyDecayIt();
268 products = BetaDecayIt();
275 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_007",
283 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_008",
291 G4int shellIndex = -1;
292 if (daughterExcitation > 0.0) {
296 if (dynamicDaughter)
delete dynamicDaughter;
299 if (decayMode == 0) {
301 daughterMomentum.
setE(daughterMomentum.
e() + exe);
303 G4Fragment nucleus(daughterA, daughterZ, daughterMomentum);
309 deexcitation->
SetICM(applyICM);
312 if (decayMode == 0) {
334 if (decayMode != 0) {
335 daughterIon = theIonTable->
GetIon(daughterZ, daughterA, daughterExcitation);
348 ed << nFrags <<
" No fragments produced by photon evaporation. " <<
G4endl;
349 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_012",
351 }
else if (nFrags > 1) {
356 for (
G4int i = 0; i < nFrags - 1; i++) {
357 eOrGamma = gammas->operator[](i);
367 gammas->operator[](nFrags-1)->GetExcitationEnergy();
368 if (finalDaughterExcitation <= 1.0*
keV) finalDaughterExcitation = 0;
372 theIonTable->
GetIon(daughterZ, daughterA, finalDaughterExcitation);
373 daughterMomentum.
setE(daughterMomentum.
e() - eOrGammaEnergy);
376 while (!gammas->empty() ) {
377 delete *(gammas->end()-1);
383 G4ThreeVector const daughterMomentum1(static_cast<const G4LorentzVector> (daughterMomentum));
395 if (decayMode == 3 || decayMode == 4 || decayMode == 5) {
417 G4Exception(
"G4NuclearDecayChannel::DecayIt()",
"HAD_RDM_009",
427 if (applyARM && eShell != -1) {
428 G4int aZ = daughterZ;
442 std::vector<G4DynamicParticle*> armProducts;
452 size_t narm = armProducts.size();
457 G4ThreeVector bst = dynamicDaughter->Get4Momentum().boostVector();
458 for (
size_t i = 0; i<narm; ++i) {
531 for (
G4int index = 0; index < 3; index++) {
536 daughtermass[1] += daughterExcitation;
548 daughterenergy[0] = Qtransition*RandomEnergy->shoot(G4Random::getTheEngine());
549 daughtermomentum[0] = std::sqrt(daughterenergy[0]*(daughterenergy[0] + 2.*daughtermass[0]) );
554 G4double Mme = daughtermass[1] + Qtransition;
555 G4double K = 0.5 - daughtermass[1]*daughtermass[1]/(2*Mme*Mme-4*pmass*daughterenergy[0]);
557 daughterenergy[2] = K * (Mme - daughterenergy[0] + rd*daughtermomentum[0]);
558 daughtermomentum[2] = daughterenergy[2];
561 daughterenergy[1] = Qtransition - daughterenergy[0] - daughterenergy[2];
563 daughterenergy[1]*(daughterenergy[1] + 2.0*daughtermass[1]);
564 if (recoilmomentumsquared < 0.0) recoilmomentumsquared = 0.0;
565 daughtermomentum[1] = std::sqrt(recoilmomentumsquared);
569 G4cout <<
" G4NuclearDecayChannel::BetaDecayIt() " <<
G4endl;
570 G4cout <<
" e- momentum: " <<daughtermomentum[0]/
GeV <<
" [GeV/c]" <<
G4endl;
571 G4cout <<
" daughter momentum: " <<daughtermomentum[1]/
GeV <<
" [GeV/c]" <<
G4endl;
572 G4cout <<
" nu momentum: " <<daughtermomentum[2]/
GeV <<
" [GeV/c]" <<
G4endl;
573 G4cout <<
" e- energy: " << daughtermass[0] + daughterenergy[0] <<
G4endl;
574 G4cout <<
" daughter energy: " << daughtermass[1] + daughterenergy[1] <<
G4endl;
575 G4cout <<
" nu energy: " << daughtermass[2] + daughterenergy[2] <<
G4endl;
576 G4cout <<
" total of daughter energies: " << daughtermass[0] + daughtermass[1] +
577 daughtermass[2] + daughterenergy[0] + daughterenergy[1] + daughterenergy[2]
581 G4double costheta, sintheta, phi, sinphi, cosphi;
582 G4double costhetan, sinthetan, phin, sinphin, cosphin;
584 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
586 sinphi = std::sin(phi);
587 cosphi = std::cos(phi);
594 costhetan = (daughtermomentum[1]*daughtermomentum[1]-
595 daughtermomentum[2]*daughtermomentum[2]-
596 daughtermomentum[0]*daughtermomentum[0])/
597 (2.0*daughtermomentum[2]*daughtermomentum[0]);
599 if (costhetan > 1.) costhetan = 1.;
600 if (costhetan < -1.) costhetan = -1.;
601 sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
603 sinphin = std::sin(phin);
604 cosphin = std::cos(phin);
606 direction2.
setX(sinthetan*cosphin*costheta*cosphi -
607 sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
608 direction2.
setY(sinthetan*cosphin*costheta*sinphi +
609 sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
610 direction2.
setZ(-sinthetan*cosphin*sintheta + costhetan*costheta);
612 direction2*(daughtermomentum[2]/direction2.
mag()));
617 (direction0*daughtermomentum[0] +
618 direction2*(daughtermomentum[2]/direction2.
mag()))*(-1.0));
622 G4cout <<
"G4NuclearDecayChannel::BetaDecayIt ";
623 G4cout <<
" create decay products in rest frame " <<
G4endl;
virtual void SetICM(G4bool)
void CheckAndFillDaughters()
void SetBR(G4double value)
static G4LossTableManager * Instance()
std::ostringstream G4ExceptionDescription
virtual void RDMForced(G4bool)
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4bool IsFluoActive() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4double GetParentMass() const
const G4ParticleDefinition * GetParticleDefinition() const
virtual G4FragmentVector * BreakUp(const G4Fragment &theNucleus)
static G4Proton * Definition()
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4IonTable * GetIonTable() const
void SetNumberOfDaughters(G4int value)
HepLorentzVector & boost(double, double, double)
G4int GetVacantShellNumber() const
static const double twopi
std::vector< G4Fragment * > G4FragmentVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void Set4Momentum(const G4LorentzVector &momentum)
static const double nanosecond
static G4ParticleTable * GetParticleTable()
const G4LorentzVector & GetMomentum() const
void GenerateParticles(std::vector< G4DynamicParticle *> *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
G4double GetPDGMass() const
void SetParent(const G4ParticleDefinition *particle_type)
static G4EmParameters * Instance()
G4DynamicParticle * PopProducts()
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
static G4Neutron * Definition()
G4LorentzVector Get4Momentum() const
G4int GetVerboseLevel() const
G4VAtomDeexcitation * AtomDeexcitation()
static const double electron_mass_c2
void SetProperTime(G4double)
G4double GetCreationTime() const
void SetVerboseLevel(G4int verbose)
void CheckAndFillParent()
static G4int GetNumberOfShells(G4int Z)