Geant4  10.01.p02
G4Evaporation.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 //
27 // $Id: G4Evaporation.cc 86366 2014-11-10 08:46:07Z gcosmo $
28 //
29 // Hadronic Process: Nuclear De-excitations
30 // by V. Lara (Oct 1998)
31 //
32 // Alex Howard - added protection for negative probabilities in the sum, 14/2/07
33 //
34 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse
35 // cross section option
36 // JMQ (06 September 2008) Also external choices have been added for
37 // superimposed Coulomb barrier (if useSICBis set true, by default is false)
38 //
39 // V.Ivanchenko (27 July 2009) added G4EvaporationDefaultGEMFactory option
40 // V.Ivanchenko (10 May 2010) rewrited BreakItUp method: do not make new/delete
41 // photon channel first, fission second,
42 // added G4UnstableFragmentBreakUp to decay
43 // unphysical fragments (like 2n or 2p),
44 // use Z and A integer
45 // V.Ivanchenko (22 April 2011) added check if a fragment can be deexcited
46 // by the FermiBreakUp model
47 // V.Ivanchenko (23 January 2012) added pointer of G4VPhotonEvaporation
48 // V.Ivanchenko (6 May 2013) added check of existence of residual ion
49 // in the ion table
50 
51 #include "G4Evaporation.hh"
52 #include "G4SystemOfUnits.hh"
53 #include "G4EvaporationFactory.hh"
56 #include "G4HadronicException.hh"
57 #include "G4NistManager.hh"
58 #include "G4FermiFragmentsPool.hh"
59 #include "G4PhotonEvaporation.hh"
60 
61 #include "G4ParticleTable.hh"
62 #include "G4IonTable.hh"
63 
65  : nChannels(0)
66 {
70  SetParameters();
73 }
74 
76  : nChannels(0)
77 {
78  if(photoEvaporation) { SetPhotonEvaporation(photoEvaporation); }
80 
83  SetParameters();
86 }
87 
89 {
90  CleanChannels();
91  delete thePhotonEvaporation;
92  delete theChannelFactory;
93 }
94 
96 {
97  for (size_t i=1; i<nChannels; ++i) { delete (*theChannels)[i]; }
98  delete theChannels;
99 }
100 
102 {
107  probabilities.reserve(68);
108 }
109 
111 {
112  CleanChannels();
114  nChannels = theChannels->size();
115  probabilities.resize(nChannels, 0.0);
116  Initialise();
117 }
118 
120 {
121  for(size_t i=0; i<nChannels; ++i) {
122  (*theChannels)[i]->SetOPTxs(OPTxs);
123  (*theChannels)[i]->UseSICB(useSICB);
124  (*theChannels)[i]->Initialise();
125  }
126 }
127 
129 {
130  delete theChannelFactory;
133 }
134 
136 {
137  delete theChannelFactory;
140 }
141 
143 {
144  delete theChannelFactory;
147 }
148 
150 {
151  if(ptr) { G4VEvaporation::SetPhotonEvaporation(ptr); }
152  if(0 < nChannels) { (*theChannels)[0] = ptr; }
153 }
154 
156 {
157  G4FragmentVector * theResult = new G4FragmentVector;
158  G4Fragment* theResidualNucleus = new G4Fragment(theNucleus);
159  BreakFragment(theResult, theResidualNucleus);
160  return theResult;
161 }
162 
164  G4Fragment* theResidualNucleus)
165 {
166  G4double totprob, prob, oldprob = 0.0;
167  size_t maxchannel, i;
168 
169  G4int Amax = theResidualNucleus->GetA_asInt();
170 
171  // Starts loop over evaporated particles, loop is limited by number
172  // of nucleons
173  for(G4int ia=0; ia<Amax; ++ia) {
174 
175  // g,n,p and light fragments - evaporation is finished
176  G4int Z = theResidualNucleus->GetZ_asInt();
177  G4int A = theResidualNucleus->GetA_asInt();
178  G4double Eex = theResidualNucleus->GetExcitationEnergy();
179  G4double mass = theResidualNucleus->GetGroundStateMass();
180 
181  // stop deecitation loop if residual can be deexcited by FBU
182  if(maxZforFBU > Z && maxAforFBU > A && Z > 0 && A > Z) {
183  if(thePool->IsApplicable(Z, A, mass+Eex)) {
184  theResult->push_back(theResidualNucleus);
185  return;
186  }
187  }
188  // check if it is stable, then finish evaporation
189  G4double abun = nist->GetIsotopeAbundance(Z, A);
190  /*
191  G4cout << "### G4Evaporation::BreakItUp step " << ia << " Z= " << Z
192  << " A= " << A << " Eex(MeV)= "
193  << theResidualNucleus->GetExcitationEnergy()
194  << " aban= " << abun << G4endl;
195  */
196  // stop deecitation loop in the case of a cold stable fragment
197  if(Eex <= minExcitation && abun > 0.0) {
198  theResult->push_back(theResidualNucleus);
199  return;
200  }
201 
202  totprob = 0.0;
203  maxchannel = nChannels;
204  /*
205  G4cout << "### Evaporation loop #" << ia
206  << " Fragment: " << theResidualNucleus << G4endl;
207  */
208  // loop over evaporation channels
209  for(i=0; i<nChannels; ++i) {
210  prob = (*theChannels)[i]->GetEmissionProbability(theResidualNucleus);
211  //G4cout << " Channel# " << i << " prob= " << prob << G4endl;
212 
213  totprob += prob;
214  probabilities[i] = totprob;
215 
216  // if two recent probabilities are near zero stop computations
217  if(i>=8) {
218  if(prob <= totprob*1.e-8 && oldprob <= totprob*1.e-8) {
219  maxchannel = i+1;
220  break;
221  }
222  }
223  oldprob = prob;
224  }
225 
226  // photon evaporation in the case of no other channels available
227  // do evaporation chain and reset total probability
228  if(0.0 < totprob && probabilities[0] == totprob) {
229  //G4cout << "Start chain of gamma evaporation" << G4endl;
230  (*theChannels)[0]->BreakUpChain(theResult, theResidualNucleus);
231  totprob = 0.0;
232  }
233 
234  // stable fragment - evaporation is finished
235  if(0.0 == totprob) {
236 
237  // if fragment is exotic, then force its decay
238  if(0.0 == abun && Z < 20) {
239  //G4cout << "$$$ Decay exotic fragment" << G4endl;
240  unstableBreakUp.BreakUpChain(theResult, theResidualNucleus);
241  } else {
242  theResult->push_back(theResidualNucleus);
243  }
244  return;
245  }
246 
247  // select channel
248  totprob *= G4UniformRand();
249  // loop over evaporation channels
250  for(i=0; i<maxchannel; ++i) { if(probabilities[i] >= totprob) { break; } }
251 
252  //G4cout << "Channel # " << i << G4endl;
253  G4Fragment* frag = (*theChannels)[i]->EmittedFragment(theResidualNucleus);
254  if(frag) { theResult->push_back(frag); }
255  // selected channel cannot sample secondary
256  else {
257  theResult->push_back(theResidualNucleus);
258  return;
259  }
260  }
261 
262  // loop is stopped, save residual, which is unclear state
263  theResult->push_back(theResidualNucleus);
264 }
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
void BreakFragment(G4FragmentVector *, G4Fragment *theNucleus)
void SetDefaultChannel()
virtual std::vector< G4VEvaporationChannel * > * GetChannel()=0
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
virtual void Initialise()
std::vector< G4double > probabilities
void CleanChannels()
G4VEvaporationChannel * thePhotonEvaporation
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
std::vector< G4VEvaporationChannel * > * theChannels
void SetGEMChannel()
G4bool IsApplicable(G4int Z, G4int A, G4double mass) const
G4IonTable * GetIonTable() const
#define G4UniformRand()
Definition: Randomize.hh:93
G4int GetA_asInt() const
Definition: G4Fragment.hh:243
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
G4IonTable * theTableOfIons
G4double GetIsotopeAbundance(G4int Z, G4int N) const
G4double GetGroundStateMass() const
Definition: G4Fragment.hh:265
G4NistManager * nist
static const G4double A[nN]
void SetCombinedChannel()
G4FermiFragmentsPool * thePool
static G4ParticleTable * GetParticleTable()
G4double minExcitation
void InitialiseEvaporation()
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
G4UnstableFragmentBreakUp unstableBreakUp
virtual ~G4Evaporation()
G4int GetZ_asInt() const
Definition: G4Fragment.hh:248
void SetParameters()
static const double keV
Definition: G4SIunits.hh:195
double G4double
Definition: G4Types.hh:76
virtual G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus)
static G4FermiFragmentsPool * Instance()
G4VEvaporationFactory * theChannelFactory
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:260