Geant4  10.01.p03
G4PhotonEvaporation.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: G4PhotonEvaporation.cc 88987 2015-03-17 10:39:50Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 // GEANT 4 class file
30 //
31 // CERN, Geneva, Switzerland
32 //
33 // File name: G4PhotonEvaporation
34 //
35 // Author: Maria Grazia Pia (pia@genova.infn.it)
36 //
37 // Creation date: 23 October 1998
38 //
39 // Modifications:
40 //
41 // 8 March 2002, Fan Lei (flei@space.qinetiq.com)
42 //
43 // Implementation of Internal Convertion process in discrete deexcitation
44 // The following public methods have been added.
45 //
46 // void SetICM (G4bool);
47 // void CallFromRDM(G4bool);
48 // void SetMaxHalfLife(G4double) ;
49 // void SetEOccupancy( G4ElectronOccupancy eOccupancy) ;
50 // G4ElectronOccupancy GetEOccupancy () ;
51 //
52 // 11 May 2010, V.Ivanchenko add implementation of EmittedFragment and
53 // BreakUpFragment methods; cleanup logic
54 //
55 // -------------------------------------------------------------------
56 //
57 
58 #include "G4PhotonEvaporation.hh"
59 
60 #include "globals.hh"
61 #include "G4SystemOfUnits.hh"
62 #include "Randomize.hh"
63 #include "G4Gamma.hh"
64 #include "G4LorentzVector.hh"
65 #include "G4VGammaTransition.hh"
66 #include "G4Fragment.hh"
67 #include "G4FragmentVector.hh"
70 #include "G4E1Probability.hh"
71 #include "G4NuclearLevelStore.hh"
72 
73 static const G4double tolerance = 2*CLHEP::keV;
74 
76  G4EvaporationChannelType timeType)
77  : G4VEvaporationChannel(aName, timeType),
78  verbose(0), myOwnProbAlgorithm(true),
79  eOccupancy(0), vShellNumber(-1), gammaE(0.)
80 {
85 
86  p->SetICM(false);
87 
88  // Time limits
89  G4double timeLimit = DBL_MAX;
90  char* env = getenv("G4AddTimeLimitToPhotonEvaporation");
91  if(env) { timeLimit = 1.e-16*second; }
92 
93  // Time for short-cut simulation of photon evaporation
94  p->SetTimeLimit(timeLimit);
95 
96  // Default time limit for isomere production
98  // SetMaxHalfLife(1.e-6*second);
99 
100  nucleus = 0;
101 }
102 
104 {
106  delete discrDeexcitation;
107  delete contDeexcitation;
108 }
109 
111 {
112  //G4cout << "G4PhotonEvaporation::EmittedFragment" << G4endl;
113  vShellNumber = -1;
114  G4Fragment* gamma = 0;
115  if(contDeexcitation->CanDoTransition(aNucleus)) {
116  gamma = contDeexcitation->GenerateGamma(aNucleus);
117  if(gamma && verbose > 1) {
118  G4cout << "G4PhotonEvaporation::EmittedFragment continium deex: "
119  << gamma << G4endl;
120  G4cout << " Residual: " << aNucleus << G4endl;
121  }
122  } else if(discrDeexcitation->CanDoTransition(aNucleus)) {
123 
124  // Do one photon emission by the discrete deexcitation
125  gamma = discrDeexcitation->GenerateGamma(aNucleus);
126  if(gamma) {
128  if (verbose > 1) {
129  G4cout << "G4PhotonEvaporation::EmittedFragment discrete deex: "
130  << gamma << G4endl;
131  G4cout << " Residual: " << aNucleus << G4endl;
132  }
133  }
134  }
135  return gamma;
136 }
137 
139  G4Fragment* aNucleus)
140 {
141  //G4cout << "G4PhotonEvaporation::BreakUpChain" << G4endl;
142  G4Fragment* gamma = 0;
143  // one continues emission is not excluded
144  if(contDeexcitation->CanDoTransition(aNucleus)) {
145  gamma = contDeexcitation->GenerateGamma(aNucleus);
146  if(gamma) {
147  if (verbose > 1) {
148  G4cout << "G4PhotonEvaporation::EmittedFragment continium deex: "
149  << gamma << G4endl;
150  G4cout << " Residual: " << aNucleus << G4endl;
151  }
152  products->push_back(gamma);
153  }
154  }
155  // main emissions are discrete
156  discrDeexcitation->DoChain(products, aNucleus);
157  return false;
158 }
159 
161 {
162  //G4cout << "G4PhotonEvaporation::BreakUpFragment" << G4endl;
163  G4FragmentVector* products = new G4FragmentVector();
164  BreakUpChain(products, aNucleus);
165  return products;
166 }
167 
169 {
170  //G4cout << "G4PhotonEvaporation::BreakUp" << G4endl;
171  G4Fragment* aNucleus = new G4Fragment(theNucleus);
172  G4FragmentVector* products = new G4FragmentVector();
173  //discrDeexcitation->DoChain(products, aNucleus);
174  BreakUpChain(products, aNucleus);
175  products->push_back(aNucleus);
176  return products;
177 }
178 
180 {
181  //G4cout << "G4PhotonEvaporation::BreakItUp" << G4endl;
182  G4Fragment* aNucleus = new G4Fragment(theNucleus);
183  G4FragmentVector* products = new G4FragmentVector();
184  BreakUpChain(products, aNucleus);
185  products->push_back(aNucleus);
186  return products;
187 }
188 
189 G4double
191 {
192  G4double prob = 0.0;
193  G4int Z = theNucleus->GetZ_asInt();
194  G4int A = theNucleus->GetA_asInt();
195  G4double eexc = theNucleus->GetExcitationEnergy();
196  if(0 < Z && Z < A && eexc > tolerance) {
197  prob = probAlgorithm->EmissionProbability(*theNucleus, eexc);
198  }
199  return prob;
200 }
201 
202 void
204 {
205  if(myOwnProbAlgorithm) { delete probAlgorithm; }
206  probAlgorithm = alg;
207  myOwnProbAlgorithm = false;
208 }
209 
211 {
212  verbose = verb;
215 }
216 
218 {
220 }
221 
223 {
224  static_cast<G4DiscreteGammaDeexcitation*>(discrDeexcitation)->SetHL(hl);
225 }
226 
228 {
230 }
231 
233 {
234  static_cast<G4DiscreteGammaDeexcitation*>(discrDeexcitation)->SetRDM(fromRDM);
235 }
236 
238 {
240 }
241 
242 
243 
244 
virtual G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus)
void SetMaxHalfLife(G4double)
G4EvaporationChannelType
void SetEO(G4ElectronOccupancy eo)
static const G4double tolerance
void SetTimeLimit(G4double value)
int G4int
Definition: G4Types.hh:78
G4VEmissionProbability * probAlgorithm
G4PhotonEvaporation(const G4String &aName="Anonymous", G4EvaporationChannelType timeType=fDelayedEmission)
virtual G4bool CanDoTransition(G4Fragment *aNucleus)=0
G4GLOB_DLL std::ostream G4cout
G4int GetA_asInt() const
Definition: G4Fragment.hh:243
G4VGammaDeexcitation * discrDeexcitation
bool G4bool
Definition: G4Types.hh:79
void SetVerboseLevel(G4int verbose)
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
static const double second
Definition: G4SIunits.hh:138
virtual G4FragmentVector * BreakUp(const G4Fragment &nucleus)
virtual G4double GetEmissionProbability(G4Fragment *theNucleus)
static const G4double A[nN]
G4Fragment * GenerateGamma(G4Fragment *nucleus)
void SetTimeLimit(G4double value)
G4VGammaDeexcitation * contDeexcitation
G4int GetZ_asInt() const
Definition: G4Fragment.hh:248
virtual G4FragmentVector * BreakItUp(const G4Fragment &nucleus)
#define G4endl
Definition: G4ios.hh:61
virtual G4Fragment * EmittedFragment(G4Fragment *theNucleus)
static const double keV
Definition: G4SIunits.hh:195
virtual G4FragmentVector * BreakUpFragment(G4Fragment *theNucleus)
double G4double
Definition: G4Types.hh:76
void SetEOccupancy(G4ElectronOccupancy eOccupancy)
virtual G4double EmissionProbability(const G4Fragment &fragment, const G4double anEnergy)=0
#define DBL_MAX
Definition: templates.hh:83
virtual void SetEmissionStrategy(G4VEmissionProbability *probAlgorithm)
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:260
void SetVerboseLevel(G4int verbose)
void DoChain(G4FragmentVector *, G4Fragment *nucleus)