Geant4  10.00.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 70091 2013-05-23 08:55:18Z 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 
73  G4EvaporationChannelType timeType)
74  : G4VEvaporationChannel(aName, timeType),
75  verbose(0), myOwnProbAlgorithm(true),
76  eOccupancy(0), vShellNumber(-1), gammaE(0.)
77 {
82 
83  p->SetICM(false);
84 
85  // Time limits
86  G4double timeLimit = DBL_MAX;
87  char* env = getenv("G4AddTimeLimitToPhotonEvaporation");
88  if(env) { timeLimit = 1.e-16*second; }
89 
90  // Time for short-cut simulation of photon evaporation
91  p->SetTimeLimit(timeLimit);
92 
93  // Time limit for isomere production
94  SetMaxHalfLife(1.e-6*second);
95 
96  nucleus = 0;
97 }
98 
100 {
102  delete discrDeexcitation;
103  delete contDeexcitation;
104 }
105 
107 {
108  //G4cout << "G4PhotonEvaporation::EmittedFragment" << G4endl;
109  nucleus = aNucleus;
110 
111  // Do one photon emission by the continues deexcitation
114 
117  if(gamma) {
118  if (verbose > 0) {
119  G4cout << "G4PhotonEvaporation::EmittedFragment continium deex: "
120  << gamma << G4endl;
121  G4cout << " Residual: " << nucleus << G4endl;
122  }
123  return gamma;
124  }
125  }
126 
127  // Do one photon emission by the discrete deexcitation
130 
133  if(gamma) {
134  if (verbose > 0) {
135  G4cout << "G4PhotonEvaporation::EmittedFragment discrete deex: "
136  << gamma << G4endl;
137  G4cout << " Residual: " << nucleus << G4endl;
138  }
139  return gamma;
140  }
141  }
142 
143  if (verbose > 0) {
144  G4cout << "G4PhotonEvaporation unable emit gamma: "
145  << nucleus << G4endl;
146  }
147  return 0;
148 }
149 
151 {
152  //G4cout << "G4PhotonEvaporation::BreakUpFragment" << G4endl;
153  // The same pointer of primary nucleus
154  nucleus = aNucleus;
157 
158  // Do the whole gamma chain
159  G4FragmentVector* products = contDeexcitation->DoChain();
160  if( !products ) { products = new G4FragmentVector(); }
161 
162  if (verbose > 0) {
163  G4cout << "G4PhotonEvaporation::BreakUpFragment " << products->size()
164  << " gammas from ContinuumDeexcitation " << G4endl;
165  G4cout << " Residual: " << nucleus << G4endl;
166  }
167  // Products from discrete gamma transitions
168  G4FragmentVector* discrProducts = discrDeexcitation->DoChain();
169  if(discrProducts) {
172 
173  // not sure if the following line is needed!
175 
176  if (verbose > 0) {
177  G4cout << "G4PhotonEvaporation::BreakUpFragment " << discrProducts->size()
178  << " gammas from DiscreteDeexcitation " << G4endl;
179  G4cout << " Residual: " << nucleus << G4endl;
180  }
181  G4FragmentVector::iterator i;
182  for (i = discrProducts->begin(); i != discrProducts->end(); ++i)
183  {
184  products->push_back(*i);
185  }
186  delete discrProducts;
187  }
188 
189  if (verbose > 0) {
190  G4cout << "*-*-* Photon evaporation: " << products->size() << G4endl;
191  }
192  return products;
193 }
194 
196 {
197  //G4cout << "G4PhotonEvaporation::BreakUp" << G4endl;
198  nucleus = new G4Fragment(aNucleus);
199 
202 
203  // Do one photon emission
204 
205  // Products from continuum gamma transitions
206 
208  if( !products ) { products = new G4FragmentVector(); }
209  else if(verbose > 0) {
210  G4cout << "G4PhotonEvaporation::BreakUp " << products->size()
211  << " gammas from ContinuesDeexcitation " << G4endl;
212  G4cout << " Residual: " << nucleus << G4endl;
213  }
214 
215  if (0 == products->size())
216  {
217  // Products from discrete gamma transitions
218  G4FragmentVector* discrProducts = discrDeexcitation->DoTransition();
219 
220  if (discrProducts) {
223 
224  // not sure if the following line is needed!
226  //
227  if (verbose > 0) {
228  G4cout << " = BreakUp = " << discrProducts->size()
229  << " gammas from DiscreteDeexcitation "
230  << G4endl;
231  G4cout << " Residual: " << nucleus << G4endl;
232  }
233  G4FragmentVector::iterator i;
234  for (i = discrProducts->begin(); i != discrProducts->end(); ++i)
235  {
236  products->push_back(*i);
237  }
238  delete discrProducts;
239  }
240  }
241 
242  // Add deexcited nucleus to products
243  products->push_back(nucleus);
244 
245  if (verbose > 0) {
246  G4cout << "*-*-*-* Photon evaporation: " << products->size() << G4endl;
247  }
248 
249  return products;
250 }
251 
253 {
254  // The same pointer of primary nucleus
255  nucleus = new G4Fragment(aNucleus);
258 
259  //G4cout << "G4PhotonEvaporation::BreakItUp: " << nucleus << G4endl;
260 
261  // Do the whole gamma chain
262  G4FragmentVector* products = contDeexcitation->DoChain();
263  if( !products ) { products = new G4FragmentVector; }
264 
265  // Products from continuum gamma transitions
266  if (verbose > 0) {
267  G4cout << " = BreakItUp = " << products->size()
268  << " gammas from ContinuumDeexcitation " << G4endl;
269  }
270 
271  // Products from discrete gamma transitions
272  G4FragmentVector* discrProducts = discrDeexcitation->DoChain();
273  if(discrProducts) {
276 
277  // not sure if the following line is needed!
279 
280  if (verbose > 0) {
281  G4cout << " = BreakItUp = " << discrProducts->size()
282  << " gammas from DiscreteDeexcitation " << G4endl;
283  }
284  G4FragmentVector::iterator i;
285  for (i = discrProducts->begin(); i != discrProducts->end(); ++i)
286  {
287  products->push_back(*i);
288  }
289  delete discrProducts;
290  }
291  // Add deexcited nucleus to products
292  products->push_back(nucleus);
293 
294  if (verbose > 0) {
295  G4cout << "*-*-* Photon evaporation: " << products->size() << G4endl;
296  }
297  return products;
298 }
299 
300 G4double
302 {
303  nucleus = theNucleus;
304  G4double prob =
306  return prob;
307 }
308 
309 void
311 {
312  // CD - not sure about always wanting to delete this pointer....
313  if(myOwnProbAlgorithm) { delete probAlgorithm; }
314  probAlgorithm = alg;
315  myOwnProbAlgorithm = false;
316 }
317 
318 
320 {
321  verbose = verb;
324 }
325 
327 {
329 }
330 
332 {
333  static_cast<G4DiscreteGammaDeexcitation*>(discrDeexcitation)->SetHL(hl);
334 }
335 
337 {
339 }
340 
342 {
343  static_cast<G4DiscreteGammaDeexcitation*>(discrDeexcitation)->SetRDM(fromRDM);
344 }
345 
347 {
349 }
350 
351 
352 
353 
void SetMaxHalfLife(G4double)
virtual G4bool CanDoTransition()=0
G4EvaporationChannelType
void SetNucleus(G4Fragment *nucleus)
void SetEO(G4ElectronOccupancy eo)
void SetTimeLimit(G4double value)
int G4int
Definition: G4Types.hh:78
G4VEmissionProbability * probAlgorithm
G4PhotonEvaporation(const G4String &aName="Anonymous", G4EvaporationChannelType timeType=fDelayedEmission)
G4GLOB_DLL std::ostream G4cout
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)
G4FragmentVector * DoChain()
void SetTimeLimit(G4double value)
G4FragmentVector * DoTransition()
G4VGammaDeexcitation * contDeexcitation
G4ElectronOccupancy eOccupancy
virtual G4FragmentVector * BreakItUp(const G4Fragment &nucleus)
#define G4endl
Definition: G4ios.hh:61
G4ElectronOccupancy GetEO()
virtual G4Fragment * EmittedFragment(G4Fragment *theNucleus)
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:255
void SetVerboseLevel(G4int verbose)