Geant4  10.02
G4DiscreteGammaTransition.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 //
26 // $Id: G4DiscreteGammaTransition.cc 91886 2015-08-10 07:08:25Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 // GEANT 4 class file
30 //
31 // CERN, Geneva, Switzerland
32 //
33 // File name: G4DiscreteGammaTransition
34 //
35 // Author: Maria Grazia Pia (pia@genova.infn.it)
36 //
37 // Creation date: 23 October 1998
38 //
39 // Modifications:
40 // 15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
41 // Added creation time evaluation for products of evaporation
42 //
43 // 21 Nov. 2001, Fan Lei (flei@space.qinetiq.com)
44 // i) added G4int _nucleusZ initialise it through the constructor
45 // ii) modified SelectGamma() to allow the generation of
46 // conversion e-
47 // iii) added #include G4AtomicShells.hh
48 //
49 // 09 Sep. 2002, Fan Lei (flei@space.qinetiq.com)
50 // Added renormalization to determine whether transition leads to
51 // electron or gamma in SelectGamma()
52 //
53 // 19 April 2010, J. M. Quesada.
54 // Corrections added for taking into account mismatch between
55 // tabulated gamma energies and level energy differences
56 // (fake photons eliminated)
57 //
58 // 9 May 2010, V.Ivanchenko
59 // Removed unphysical corretions of gamma energy; fixed default
60 // particle as gamma; do not subtract bounding energy in case of
61 // electron emmision
62 //
63 // 3 November 2011, L. Desorgher
64 // Extend the use of the code for Z>100 by not calling
65 // G4AtomicShells::GetBindingEnergy for Z>100
66 // For Z>100 the binding energy is set to 0 and atomic
67 // relaxation is not simulated in G4RadDecay
68 //
69 // -------------------------------------------------------------------
70 
72 #include "G4SystemOfUnits.hh"
73 #include "Randomize.hh"
74 #include "G4AtomicShells.hh"
75 #include "G4NuclearLevel.hh"
76 #include "G4NuclearLevelStore.hh"
77 #include "G4Pow.hh"
78 #include "G4Log.hh"
79 
80 static const G4double tolerance = 0.1*CLHEP::keV;
81 
83  const G4NuclearLevel* level, G4int Z, G4int verb)
84  : orbitE(-1), bondE(0.), gammaEnergy(0.), excitation(0.),
85  gammaCreationTime(0.), aGamma(true), icm(false)
86 {
87  verbose = verb;
88  Update(level, Z);
89 }
90 
92 {}
93 
95 {
96  // default gamma
97  aGamma = true;
98  gammaEnergy = 0.;
99 
100  G4int nGammas = aLevel->NumberOfGammas();
101  if (nGammas > 0) {
102  G4int iGamma = 0;
103  if(1 < nGammas) {
104  G4double random = G4UniformRand();
105 
106  //G4cout << "G4DiscreteGammaTransition::SelectGamma N= "
107  // << nGammas << " rand= " << random << G4endl;
108  for(iGamma=0; iGamma<nGammas; ++iGamma) {
109  //G4cout << iGamma << " prob= "
110  // << (aLevel->GammaCumulativeProbabilities())[iGamma] << G4endl;
111  if(random <= (aLevel->GammaCumulativeProbabilities())[iGamma])
112  { break; }
113  }
114  }
115  /*
116  G4cout << "Elevel(MeV)= " << aLevel->Energy()
117  << " Etran(MeV)= " << (aLevel->GammaEnergies())[iGamma]
118  << " Eexc(MeV)= " << excitation << G4endl;
119  */
120  // VI 2014: initial excitation energy may be not exactly energy of the level
121  // final excitation energy is always energy of some level or zero
122  // transition to the ground state should be always equal to
123  // the excitation energy
124  gammaEnergy = (aLevel->GammaEnergies())[iGamma]
125  + excitation - aLevel->Energy();
126 
127  // this check is needed to remove cases when nucleaus is left in
128  // slightly excited state which will require very low energy
129  // gamma emission
131  //JMQ:
132  //1)If chosen gamma energy is close enough to excitation energy,
133  // the later is used instead for gamma dacey to gs (it guarantees
134  // energy conservation)
135  //2)For energy conservation, level energy differences instead of
136  // tabulated gamma energies must be used (origin of final fake photons)
137 
138  // VI: remove fake photons - applied only for the last transition
139  // do not applied on each transition
140  //if(std::fabs(excitation - gammaEnergy) < tolerance) {
141  // gammaEnergy = excitation;
142  //}
143 
144  // JMQ: Warning: the following check is needed to avoid loops:
145  // Due essentially to missing nuclear levels in data files, it is
146  // possible that gammaEnergy is so low as the nucleus doesn't change
147  // its level after the transition.
148  // When such case is found, force the full deexcitation of the nucleus.
149  //
150  // NOTE: you should force the transition to the next lower level,
151  // but this change needs a more complex revision of actual
152  // design.
153  // I leave this for a later revision.
154 
155  // VI: the check is needed to remove very low-energy gamma
157  /*
158  G4cout << "G4DiscreteGammaTransition::SelectGamma: " << gammaEnergy
159  << " Eexc= " << excitation
160  << " icm: " << icm << G4endl;
161  */
162  // now decide whether Internal Coversion electron should be emitted instead
163  if (icm) {
164  G4double random = G4UniformRand();
165  if ( random <= (aLevel->TotalConvertionProbabilities())[iGamma]
166  *(aLevel->GammaWeights())[iGamma]
167  /((aLevel->TotalConvertionProbabilities())[iGamma]
168  *(aLevel->GammaWeights())[iGamma]
169  +(aLevel->GammaWeights())[iGamma]))
170  {
171  G4int iShell = 9;
172  random = G4UniformRand() ;
173  if ( random <= (aLevel->KConvertionProbabilities())[iGamma])
174  { iShell = 0;}
175  else if ( random <= (aLevel->L1ConvertionProbabilities())[iGamma])
176  { iShell = 1;}
177  else if ( random <= (aLevel->L2ConvertionProbabilities())[iGamma])
178  { iShell = 2;}
179  else if ( random <= (aLevel->L3ConvertionProbabilities())[iGamma])
180  { iShell = 3;}
181  else if ( random <= (aLevel->M1ConvertionProbabilities())[iGamma])
182  { iShell = 4;}
183  else if ( random <= (aLevel->M2ConvertionProbabilities())[iGamma])
184  { iShell = 5;}
185  else if ( random <= (aLevel->M3ConvertionProbabilities())[iGamma])
186  { iShell = 6;}
187  else if ( random <= (aLevel->M4ConvertionProbabilities())[iGamma])
188  { iShell = 7;}
189  else if ( random <= (aLevel->M5ConvertionProbabilities())[iGamma])
190  { iShell = 8;}
191  // the following is needed to match the ishell to that used in
192  // G4AtomicShells
193  if ( iShell == 9) {
194  if ( (nucleusZ < 28) && (nucleusZ > 20)) {
195  iShell--;
196  } else if ( nucleusZ == 20 || nucleusZ == 19 ) {
197  iShell = iShell -2;
198  }
199  }
200  //L.Desorgher 02/11/2011
201  //Atomic shell information is available in Geant4 only up top Z=100
202  //To extend the photo evaporation code to Z>100 the call
203  // to G4AtomicShells::GetBindingEnergy should be forbidden for Z>100
204  bondE = 0.;
205  if (nucleusZ <=100) {
207  }
208  if (verbose > 1) {
209  G4cout << "G4DiscreteGammaTransition: nucleusZ = " <<nucleusZ
210  << " , iShell = " << iShell
211  << " , Shell binding energy = " << bondE/keV
212  << " keV " << G4endl;
213  }
214 
215  // last check on energy
216  if(gammaEnergy > bondE + tolerance) {
217  orbitE = iShell;
218  aGamma = false ; // emitted is not a gamma now
219  gammaEnergy -= bondE;
220  }
221  //G4cout << "gammaEnergy = " << gammaEnergy << G4endl;
222  }
223  }
224 
226 
227  //09.05.2010 VI rewrite samling of decay time
228  // assuming ordinary exponential low
229  gammaCreationTime = 0.;
230  if(tau > 0.0) { gammaCreationTime = -tau*G4Log(G4UniformRand()); }
231  }
232  //G4cout << "G4DiscreteGammaTransition end nGamma= " << nGammas
233  // << " Egamma= " << gammaEnergy << G4endl;
234 }
235 
237 {
238  return gammaEnergy;
239 }
240 
242 {
243  return gammaCreationTime;
244 }
245 
247 {
248  excitation = energy;
249 }
250 
251 
252 
253 
254 
255 
const std::vector< G4double > & L2ConvertionProbabilities() const
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
const std::vector< G4double > & M1ConvertionProbabilities() const
G4DiscreteGammaTransition(const G4NuclearLevel *level, G4int Z, G4int ver)
G4double HalfLife() const
const std::vector< G4double > & M4ConvertionProbabilities() const
G4int NumberOfGammas() const
G4double Energy() const
const std::vector< G4double > & M2ConvertionProbabilities() const
static const G4double tolerance
const std::vector< G4double > & KConvertionProbabilities() const
const std::vector< G4double > & L1ConvertionProbabilities() const
int G4int
Definition: G4Types.hh:78
const std::vector< G4double > & M5ConvertionProbabilities() const
const std::vector< G4double > & GammaEnergies() const
G4double logZ(G4int Z) const
Definition: G4Pow.hh:166
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
static G4double GetBindingEnergy(G4int Z, G4int SubshellNb)
const std::vector< G4double > & L3ConvertionProbabilities() const
const std::vector< G4double > & M3ConvertionProbabilities() const
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double energy(const ThreeVector &p, const G4double m)
const std::vector< G4double > & GammaWeights() const
#define G4endl
Definition: G4ios.hh:61
const std::vector< G4double > & TotalConvertionProbabilities() const
static const double keV
Definition: G4SIunits.hh:213
double G4double
Definition: G4Types.hh:76
const std::vector< G4double > & GammaCumulativeProbabilities() const
void Update(const G4NuclearLevel *level, G4int Z)
virtual void SetEnergyFrom(G4double energy)