Geant4  10.03
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 101865 2016-12-02 13:06:50Z 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 "G4NistManager.hh"
57 #include "G4VFermiBreakUp.hh"
58 #include "G4PhotonEvaporation.hh"
59 #include "G4VEvaporationChannel.hh"
60 #include "G4ParticleTable.hh"
61 #include "G4IonTable.hh"
62 #include "G4NuclearLevelData.hh"
64 #include "Randomize.hh"
65 
67  : G4VEvaporation(),nChannels(0),minExcitation(0.1*keV),isInitialised(false)
68 {
69  if(photoEvaporation) { SetPhotonEvaporation(photoEvaporation); }
71 
75 
79 }
80 
82 {
83  delete unstableBreakUp;
84 }
85 
87 {
88  if(isInitialised) { return; }
89 
90  G4DeexPrecoParameters* param =
93 
94  G4DeexChannelType type = param->GetDeexChannelsType();
95  if(type == fCombined) { SetCombinedChannel(); }
96  else if(type == fGEM) { SetGEMChannel(); }
97 
98  isInitialised = true;
99 }
100 
102 {
103  //G4cout << "### G4Evaporation::InitialiseChannelFactory " << this << G4endl;
105  nChannels = theChannels->size();
106  probabilities.resize(nChannels, 0.0);
107 
108  for(size_t i=0; i<nChannels; ++i) {
109  (*theChannels)[i]->SetOPTxs(OPTxs);
110  (*theChannels)[i]->Initialise();
111  }
112 }
113 
115 {
116  if(fEvaporation != channelType) {
118  CleanChannels();
119  delete theChannelFactory;
122  }
123 }
124 
126 {
127  if(fGEM != channelType) {
129  CleanChannels();
130  delete theChannelFactory;
133  }
134 }
135 
137 {
138  if(fCombined != channelType) {
140  CleanChannels();
141  delete theChannelFactory;
144  }
145 }
146 
148  G4Fragment* theResidualNucleus)
149 {
151 
152  G4double totprob, prob, oldprob = 0.0;
153  size_t maxchannel, i;
154 
155  G4int Amax = theResidualNucleus->GetA_asInt();
156 
157  // Starts loop over evaporated particles, loop is limited by number
158  // of nucleons
159  for(G4int ia=0; ia<Amax; ++ia) {
160 
161  // g,n,p and light fragments - evaporation is finished
162  G4int Z = theResidualNucleus->GetZ_asInt();
163  G4int A = theResidualNucleus->GetA_asInt();
164  G4double Eex = theResidualNucleus->GetExcitationEnergy();
165 
166  // stop deecitation loop if residual can be deexcited by FBU
167  if(theFBU->IsApplicable(Z, A, Eex)) { break; }
168 
169  // check if it is stable, then finish evaporation
170  G4double abun = nist->GetIsotopeAbundance(Z, A);
171  /*
172  G4cout << "### G4Evaporation::BreakItUp step " << ia << " Z= " << Z
173  << " A= " << A << " Eex(MeV)= "
174  << theResidualNucleus->GetExcitationEnergy()
175  << " aban= " << abun << G4endl;
176  */
177  // stop deecitation loop in the case of a cold stable fragment
178  if(Eex <= minExcitation && abun > 0.0) { break; }
179 
180  totprob = 0.0;
181  maxchannel = nChannels;
182  /*
183  G4cout << "### Evaporation loop #" << ia
184  << " Fragment: " << theResidualNucleus << G4endl;
185  */
186  // loop over evaporation channels
187  for(i=0; i<nChannels; ++i) {
188  prob = (*theChannels)[i]->GetEmissionProbability(theResidualNucleus);
189  //G4cout << " Channel# " << i << " prob= " << prob << G4endl;
190 
191  totprob += prob;
192  probabilities[i] = totprob;
193 
194  // if two recent probabilities are near zero stop computations
195  if(i>=8 && prob > 0.0) {
196  if(prob <= totprob*1.e-8 && oldprob <= totprob*1.e-8) {
197  maxchannel = i+1;
198  break;
199  }
200  }
201  oldprob = prob;
202  }
203 
204  // photon evaporation in the case of no other channels available
205  // do evaporation chain and reset total probability
206  if(0.0 < totprob && probabilities[0] == totprob) {
207  //G4cout << "Start chain of gamma evaporation" << G4endl;
208  (*theChannels)[0]->BreakUpChain(theResult, theResidualNucleus);
209  totprob = 0.0;
210  }
211 
212  // stable fragment - evaporation is finished
213  if(0.0 == totprob) {
214 
215  // if fragment is exotic, then force its decay
216  if(0.0 == abun) {
217  //G4cout << "$$$ Decay exotic fragment" << G4endl;
218  if(!unstableBreakUp->BreakUpChain(theResult, theResidualNucleus))
219  { break; }
220  } else {
221  break;
222  }
223  }
224 
225  // select channel
226  totprob *= G4UniformRand();
227  // loop over evaporation channels
228  for(i=0; i<maxchannel; ++i) { if(probabilities[i] >= totprob) { break; } }
229 
230  //G4cout << "Channel # " << i << G4endl;
231  G4Fragment* frag = (*theChannels)[i]->EmittedFragment(theResidualNucleus);
232  //if(frag) G4cout << " " << *frag << G4endl;
233 
234  // normaly a fragment should be created
235  if(frag) { theResult->push_back(frag); }
236  else { break; }
237  }
238  // loop is stopped, residual fragment is added to the results
239  theResult->push_back(theResidualNucleus);
240 }
void SetDefaultChannel()
virtual std::vector< G4VEvaporationChannel * > * GetChannel()=0
G4DeexChannelType GetDeexChannelsType() const
G4VFermiBreakUp * theFBU
std::vector< G4double > probabilities
void InitialiseChannelFactory()
virtual G4bool IsApplicable(G4int Z, G4int A, G4double mass) const =0
virtual G4bool BreakUpChain(G4FragmentVector *, G4Fragment *) final
G4VEvaporationChannel * thePhotonEvaporation
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4Evaporation(G4VEvaporationChannel *photoEvaporation=nullptr)
std::vector< G4VEvaporationChannel * > * theChannels
void SetGEMChannel()
G4IonTable * GetIonTable() const
virtual void InitialiseChannels() final
#define G4UniformRand()
Definition: Randomize.hh:97
double A(double temperature)
G4int GetA_asInt() const
Definition: G4Fragment.hh:256
G4bool isInitialised
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:63
G4DeexPrecoParameters * GetParameters()
G4IonTable * theTableOfIons
G4double GetIsotopeAbundance(G4int Z, G4int N) const
G4NistManager * nist
virtual void BreakFragment(G4FragmentVector *, G4Fragment *theNucleus) final
void SetCombinedChannel()
static G4ParticleTable * GetParticleTable()
G4double minExcitation
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
virtual ~G4Evaporation()
G4int GetZ_asInt() const
Definition: G4Fragment.hh:261
double G4double
Definition: G4Types.hh:76
G4VEvaporationFactory * theChannelFactory
static constexpr double keV
Definition: G4SIunits.hh:216
G4UnstableFragmentBreakUp * unstableBreakUp
static G4NuclearLevelData * GetInstance()
G4double GetMinExcitation() const
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:273