Geant4  10.02.p02
G4ECDecay.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
27 // //
28 // File: G4ECDecay.cc //
29 // Author: D.H. Wright (SLAC) //
30 // Date: 25 November 2014 //
31 // //
33 
34 #include "G4ECDecay.hh"
35 #include "G4IonTable.hh"
36 #include "Randomize.hh"
37 #include "G4ThreeVector.hh"
38 #include "G4DynamicParticle.hh"
39 #include "G4DecayProducts.hh"
40 #include "G4VAtomDeexcitation.hh"
41 #include "G4AtomicShells.hh"
42 #include "G4Electron.hh"
43 #include "G4LossTableManager.hh"
44 #include "G4PhysicalConstants.hh"
45 #include "G4SystemOfUnits.hh"
46 
48  const G4double& branch, const G4double& Qvalue,
49  const G4double& excitationE,
50  const G4RadioactiveDecayMode& mode)
51  : G4NuclearDecay("electron capture", mode, excitationE), transitionQ(Qvalue),
52  applyARM(true)
53 {
54  SetParent(theParentNucleus); // Store name of parent nucleus, delete G4MT_parent
55  SetBR(branch);
56 
58  G4IonTable* theIonTable =
60  G4int daughterZ = theParentNucleus->GetAtomicNumber() - 1;
61  G4int daughterA = theParentNucleus->GetAtomicMass();
62  SetDaughter(0, theIonTable->GetIon(daughterZ, daughterA, excitationE) );
63  SetDaughter(1, "nu_e");
64 }
65 
66 
68 {}
69 
70 
72 {
73  // Fill G4MT_parent with theParentNucleus (stored by SetParent in ctor)
75 
76  // Fill G4MT_daughters with alpha and residual nucleus (stored by SetDaughter)
78 
79  // Get shell number of captured electron
80  G4int shellIndex = -1;
81  switch (theMode)
82  {
83  case KshellEC:
84  shellIndex = 0;
85  break;
86  case LshellEC:
87  shellIndex = G4int(G4UniformRand()*3) + 1;
88  break;
89  case MshellEC:
90  shellIndex = G4int(G4UniformRand()*3) + 4;
91  break;
92  default:
93  G4Exception("G4ECDecay::DecayIt()", "HAD_RDM_009",
94  FatalException, "Invalid electron shell selected");
95  }
96 
97  // Initialize decay products with parent nucleus at rest
98  G4DynamicParticle parentParticle(G4MT_parent, G4ThreeVector(0,0,0), 0.0);
99  G4DecayProducts* products = new G4DecayProducts(parentParticle);
100  G4double eBind = 0.0;
101 
102  // G4LossTableManager must already be initialized with G4UAtomicDeexcitation
103  // This is currently done in G4RadioactiveDecay::BuildPhysicsTable
104  G4VAtomDeexcitation* atomDeex =
106  std::vector<G4DynamicParticle*> armProducts;
107 
108  if (applyARM) {
109  if (atomDeex) {
112  if (shellIndex >= nShells) shellIndex = nShells;
114  const G4AtomicShell* shell = atomDeex->GetAtomicShell(aZ, as);
115  eBind = shell->BindingEnergy();
116  if (atomDeex->IsFluoActive() && aZ > 5 && aZ < 100) {
117  // Do atomic relaxation
118  // VI, SI
119  // Allows fixing of Bugzilla 1727
120  //const G4double deexLimit = 0.1*keV;
121  G4double deexLimit = 0.1*keV;
122  if (G4EmParameters::Instance()->DeexcitationIgnoreCut()) deexLimit =0.;
123  //
124  atomDeex->GenerateParticles(&armProducts, shell, aZ, deexLimit, deexLimit);
125  }
126 
127  G4double productEnergy = 0.;
128  for (G4int i = 0; i < G4int(armProducts.size()); i++)
129  productEnergy += armProducts[i]->GetKineticEnergy();
130 
131  G4double deficit = shell->BindingEnergy() - productEnergy;
132  if (deficit > 0.0) {
133  // Add a dummy electron to make up extra energy
134  G4double cosTh = 1.-2.*G4UniformRand();
135  G4double sinTh = std::sqrt(1.- cosTh*cosTh);
136  G4double phi = twopi*G4UniformRand();
137 
138  G4ThreeVector electronDirection(sinTh*std::sin(phi),
139  sinTh*std::cos(phi), cosTh);
140  G4DynamicParticle* extra =
141  new G4DynamicParticle(G4Electron::Electron(), electronDirection,
142  deficit);
143  armProducts.push_back(extra);
144  }
145  } // atomDeex
146  } // applyARM
147 
148  G4double daughterMass = G4MT_daughters[0]->GetPDGMass();
149 
150  // CM momentum using Q value corrected for binding energy of captured electron
151  G4double Q = transitionQ - eBind;
152  G4double cmMomentum = Q*(Q + 2.*daughterMass)/(Q + daughterMass)/2.;
153 
154  G4double costheta = 2.*G4UniformRand() - 1.0;
155  G4double sintheta = std::sqrt(1.0 - costheta*costheta);
157  G4ThreeVector direction(sintheta*std::cos(phi),sintheta*std::sin(phi),
158  costheta);
159  G4double KE = cmMomentum;
160  G4DynamicParticle* daughterParticle =
161  new G4DynamicParticle(G4MT_daughters[1], direction, KE, 0.0);
162  products->PushProducts(daughterParticle);
163 
164  KE = std::sqrt(cmMomentum*cmMomentum + daughterMass*daughterMass) - daughterMass;
165  daughterParticle =
166  new G4DynamicParticle(G4MT_daughters[0], -1.0*direction, KE, daughterMass);
167  products->PushProducts(daughterParticle);
168 
169  G4int nArm = armProducts.size();
170  if (nArm > 0) {
171  G4ThreeVector bst = daughterParticle->Get4Momentum().boostVector();
172  for (G4int i = 0; i < nArm; ++i) {
173  G4DynamicParticle* dp = armProducts[i];
174  G4LorentzVector lv = dp->Get4Momentum().boost(bst);
175  dp->Set4Momentum(lv);
176  products->PushProducts(dp);
177  }
178  }
179 
180  // Energy conservation check
181  /*
182  G4int newSize = products->entries();
183  G4DynamicParticle* temp = 0;
184  G4double KEsum = 0.0;
185  for (G4int i = 0; i < newSize; i++) {
186  temp = products->operator[](i);
187  KEsum += temp->GetKineticEnergy();
188  }
189 
190  G4double eCons = (transitionQ - KEsum)/keV;
191  G4cout << " EC check: Ediff (keV) = " << eCons << G4endl;
192  */
193  return products;
194 }
195 
196 
198 {
199  G4cout << " G4ECDecay of parent nucleus " << GetParentName() << " from ";
200  if (theMode == 3) {
201  G4cout << "K shell";
202  } else if (theMode == 4) {
203  G4cout << "L shell";
204  } else if (theMode == 5) {
205  G4cout << "M shell";
206  }
207  G4cout << G4endl;
208  G4cout << " to " << GetDaughterName(0) << " + " << GetDaughterName(1)
209  << " with branching ratio " << GetBR() << "% and Q value "
210  << transitionQ << G4endl;
211 }
212 
const G4RadioactiveDecayMode theMode
void CheckAndFillDaughters()
G4double GetBR() const
void SetBR(G4double value)
static G4LossTableManager * Instance()
G4bool IsFluoActive() const
CLHEP::Hep3Vector G4ThreeVector
const G4String & GetParentName() const
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:491
G4ParticleDefinition ** G4MT_daughters
static double Q[]
G4double BindingEnergy() const
int G4int
Definition: G4Types.hh:78
G4bool DeexcitationIgnoreCut() const
G4int GetAtomicNumber() const
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
G4ECDecay(const G4ParticleDefinition *theParentNucleus, const G4double &theBR, const G4double &Qvalue, const G4double &excitation, const G4RadioactiveDecayMode &mode)
Definition: G4ECDecay.cc:47
G4IonTable * GetIonTable() const
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
void SetNumberOfDaughters(G4int value)
G4RadioactiveDecayMode
static const double twopi
Definition: G4SIunits.hh:75
G4bool applyARM
Definition: G4ECDecay.hh:59
G4int GetAtomicMass() const
G4LorentzVector Get4Momentum() const
const G4String & GetDaughterName(G4int anIndex) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static const double rad
Definition: G4SIunits.hh:148
void Set4Momentum(const G4LorentzVector &momentum)
const G4double transitionQ
Definition: G4ECDecay.hh:58
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
void SetParent(const G4ParticleDefinition *particle_type)
static G4EmParameters * Instance()
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
virtual void DumpNuclearInfo()
Definition: G4ECDecay.cc:197
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
G4VAtomDeexcitation * AtomDeexcitation()
static const double keV
Definition: G4SIunits.hh:213
double G4double
Definition: G4Types.hh:76
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
virtual G4DecayProducts * DecayIt(G4double)
Definition: G4ECDecay.cc:71
virtual ~G4ECDecay()
Definition: G4ECDecay.cc:67
G4AtomicShellEnumerator
CLHEP::HepLorentzVector G4LorentzVector
static G4int GetNumberOfShells(G4int Z)