ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ITDecay.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4ITDecay.cc
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: G4ITDecay.cc //
29 // Author: D.H. Wright (SLAC) //
30 // Date: 14 November 2014 //
31 // //
33 
34 #include "G4ITDecay.hh"
35 #include "G4IonTable.hh"
36 #include "G4ThreeVector.hh"
37 #include "G4LorentzVector.hh"
38 #include "G4DynamicParticle.hh"
39 #include "G4DecayProducts.hh"
40 #include "G4PhotonEvaporation.hh"
41 #include "G4RadioactiveDecay.hh"
42 #include "G4VAtomDeexcitation.hh"
43 #include "G4AtomicShells.hh"
44 #include "G4Electron.hh"
45 #include "G4LossTableManager.hh"
46 #include "G4Fragment.hh"
47 #include "G4SystemOfUnits.hh"
48 #include "G4PhysicalConstants.hh"
49 
50 
52  const G4double& branch, const G4double& Qvalue,
53  const G4double& excitationE, G4PhotonEvaporation* aPhotoEvap)
54  : G4NuclearDecay("IT decay", IT, excitationE, noFloat), transitionQ(Qvalue),
55  applyARM(true), photonEvaporation(aPhotoEvap)
56 {
57  SetParent(theParentNucleus); // Store name of parent nucleus, delete G4MT_parent
58  SetBR(branch);
59 
60  parentZ = theParentNucleus->GetAtomicNumber();
61  parentA = theParentNucleus->GetAtomicMass();
62 
64  G4IonTable* theIonTable =
66  SetDaughter(0, theIonTable->GetIon(parentZ, parentA, excitationE, noFloat) );
67 }
68 
69 
71 {}
72 
73 
75 {
76  // Fill G4MT_parent with theParentNucleus (stored by SetParent in ctor)
78 
79  // Set up final state
80  // parentParticle is set at rest here because boost with correct momentum
81  // is done later
83  G4ThreeVector(0.,0.,0.) );
84  G4DynamicParticle parentParticle(G4MT_parent, atRest);
85  G4DecayProducts* products = new G4DecayProducts(parentParticle);
86 
87  // Let G4PhotonEvaporation do the decay
88  G4Fragment parentNucleus(parentA, parentZ, atRest);
89 
90  G4Fragment* eOrGamma = photonEvaporation->EmittedFragment(&parentNucleus);
91 
92  // Modified nuclide is returned as dynDaughter
93  G4IonTable* theIonTable =
95  G4ParticleDefinition* daughterIon =
96  theIonTable->GetIon(parentZ, parentA, parentNucleus.GetExcitationEnergy(),
98  G4DynamicParticle* dynDaughter = new G4DynamicParticle(daughterIon,
99  parentNucleus.GetMomentum());
100 
101  if (eOrGamma) {
102  G4DynamicParticle* eOrGammaDyn =
104  eOrGamma->GetMomentum() );
105  eOrGammaDyn->SetProperTime(eOrGamma->GetCreationTime() );
106  products->PushProducts(eOrGammaDyn);
107  delete eOrGamma;
108 
109  // Now do atomic relaxation if e- is emitted
110  if (applyARM) {
112  if (shellIndex > -1) {
113  G4VAtomDeexcitation* atomDeex =
115  if (atomDeex->IsFluoActive() && parentZ > 5 && parentZ < 100) {
117  if (shellIndex >= nShells) shellIndex = nShells;
119  const G4AtomicShell* shell = atomDeex->GetAtomicShell(parentZ, as);
120  std::vector<G4DynamicParticle*> armProducts;
121 
122  // VI, SI
123  // Allows fixing of Bugzilla 1727
124  G4double deexLimit = 0.1*keV;
125  if (G4EmParameters::Instance()->DeexcitationIgnoreCut()) deexLimit =0.;
126  //
127 
128  atomDeex->GenerateParticles(&armProducts, shell, parentZ, deexLimit,
129  deexLimit);
130  G4double productEnergy = 0.;
131  for (G4int i = 0; i < G4int(armProducts.size()); i++)
132  productEnergy += armProducts[i]->GetKineticEnergy();
133 
134  G4double deficit = shell->BindingEnergy() - productEnergy;
135  if (deficit > 0.0) {
136  // Add a dummy electron to make up extra energy
137  G4double cosTh = 1.-2.*G4UniformRand();
138  G4double sinTh = std::sqrt(1.- cosTh*cosTh);
140 
141  G4ThreeVector electronDirection(sinTh*std::sin(phi),
142  sinTh*std::cos(phi), cosTh);
143  G4DynamicParticle* extra =
144  new G4DynamicParticle(G4Electron::Electron(), electronDirection,
145  deficit);
146  armProducts.push_back(extra);
147  }
148 
149  G4int nArm = armProducts.size();
150  if (nArm > 0) {
151  G4ThreeVector bst = dynDaughter->Get4Momentum().boostVector();
152  for (G4int i = 0; i < nArm; ++i) {
153  G4DynamicParticle* dp = armProducts[i];
154  G4LorentzVector lv = dp->Get4Momentum().boost(bst);
155  dp->Set4Momentum(lv);
156  products->PushProducts(dp);
157  }
158  }
159  }
160  }
161  } // if ARM on
162  } // eOrGamma
163 
164  products->PushProducts(dynDaughter);
165 
166  // Energy conservation check
167  /*
168  G4int newSize = products->entries();
169  G4DynamicParticle* temp = 0;
170  G4double KEsum = 0.0;
171  for (G4int i = 0; i < newSize; i++) {
172  temp = products->operator[](i);
173  KEsum += temp->GetKineticEnergy();
174  }
175  G4double eCons = G4MT_parent->GetPDGMass() - dynDaughter->GetMass() - KEsum;
176  G4cout << " IT check: Ediff (keV) = " << eCons/keV << G4endl;
177  */
178  return products;
179 }
180 
181 
183 {
184  G4cout << " G4ITDecay for parent nucleus " << GetParentName() << G4endl;
185  G4cout << " decays to " << GetDaughterName(0)
186  << " + gammas (or electrons), with branching ratio " << GetBR()
187  << "% and Q value " << transitionQ << G4endl;
188 }
189