Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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$
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
49#include "G4Evaporation.hh"
50#include "G4SystemOfUnits.hh"
55#include "G4NistManager.hh"
58
60 : theChannels(0),nChannels(0)
61{
64 SetParameters();
65 InitialiseEvaporation();
66}
67
69 : theChannels(0),nChannels(0)
70{
71 if(photoEvaporation) { SetPhotonEvaporation(photoEvaporation); }
73
75 SetParameters();
76 InitialiseEvaporation();
77}
78
79/*
80G4Evaporation::G4Evaporation(std::vector<G4VEvaporationChannel*>* channels)
81 : theChannels(channels),theChannelFactory(0),nChannels(0)
82{
83 // are input relible?
84 G4bool accepted = true;
85 if(!theChannels) { accepted = false; }
86 else if(0 == theChannels->size()) { accepted = false; }
87
88 if(accepted) {
89 SetPhotonEvaporation((*channels)[0]);
90 } else {
91 SetPhotonEvaporation(new G4PhotonEvaporation());
92 theChannelFactory = new G4EvaporationDefaultGEMFactory(thePhotonEvaporation);
93 }
94 SetParameters();
95 InitialiseEvaporation();
96}
97*/
98
100{
101 CleanChannels();
103 delete theChannelFactory;
104}
105
106void G4Evaporation::CleanChannels()
107{
108 for (size_t i=1; i<nChannels; ++i) { delete (*theChannels)[i]; }
109 delete theChannels;
110}
111
112void G4Evaporation::SetParameters()
113{
115 minExcitation = CLHEP::keV;
116 maxZforFBU = G4FermiFragmentsPool::Instance()->GetMaxZ();
117 maxAforFBU = G4FermiFragmentsPool::Instance()->GetMaxA();
118 probabilities.reserve(68);
119}
120
121void G4Evaporation::InitialiseEvaporation()
122{
123 CleanChannels();
124 theChannels = theChannelFactory->GetChannel();
125 nChannels = theChannels->size();
126 probabilities.resize(nChannels, 0.0);
127 Initialise();
128}
129
131{
132 for(size_t i=0; i<nChannels; ++i) {
133 (*theChannels)[i]->SetOPTxs(OPTxs);
134 (*theChannels)[i]->UseSICB(useSICB);
135 }
136}
137
139{
140 delete theChannelFactory;
141 theChannelFactory = new G4EvaporationFactory(thePhotonEvaporation);
142 InitialiseEvaporation();
143}
144
146{
147 delete theChannelFactory;
148 theChannelFactory = new G4EvaporationGEMFactory(thePhotonEvaporation);
149 InitialiseEvaporation();
150}
151
153{
154 delete theChannelFactory;
156 InitialiseEvaporation();
157}
158
160{
162 if(0 < nChannels) { (*theChannels)[0] = ptr; }
163}
164
166{
167 G4FragmentVector * theResult = new G4FragmentVector;
168 G4FragmentVector * theTempResult;
169 const G4double Elimit = 3*MeV;
170
171 // The residual nucleus (after evaporation of each fragment)
172 G4Fragment* theResidualNucleus = new G4Fragment(theNucleus);
173
174 G4double totprob, prob, oldprob = 0.0;
175 size_t maxchannel, i;
176
177 G4int Amax = theResidualNucleus->GetA_asInt();
178
179 // Starts loop over evaporated particles, loop is limited by number
180 // of nucleons
181 for(G4int ia=0; ia<Amax; ++ia) {
182
183 // g,n,p and light fragments - evaporation is finished
184 G4int Z = theResidualNucleus->GetZ_asInt();
185 G4int A = theResidualNucleus->GetA_asInt();
186
187 // stop deecitation loop if can be deexcited by FBU
188 if(maxZforFBU > Z && maxAforFBU >= A) {
189 theResult->push_back(theResidualNucleus);
190 return theResult;
191 }
192
193 // check if it is stable, then finish evaporation
194 G4double abun = nist->GetIsotopeAbundance(Z, A);
195 /*
196 G4cout << "### G4Evaporation::BreakItUp step " << ia << " Z= " << Z
197 << " A= " << A << " Eex(MeV)= "
198 << theResidualNucleus->GetExcitationEnergy()
199 << " aban= " << abun << G4endl;
200 */
201 // stop deecitation loop in the case of the cold stable fragment
202 G4double Eex = theResidualNucleus->GetExcitationEnergy();
203 if(Eex <= minExcitation && abun > 0.0) {
204 theResult->push_back(theResidualNucleus);
205 return theResult;
206 }
207
208 totprob = 0.0;
209 maxchannel = nChannels;
210 /*
211 G4cout << "### Evaporation loop #" << ia
212 << " Fragment: " << theResidualNucleus << G4endl;
213 */
214 // loop over evaporation channels
215 for(i=0; i<nChannels; ++i) {
216 prob = (*theChannels)[i]->GetEmissionProbability(theResidualNucleus);
217 //G4cout << " Channel# " << i << " prob= " << prob << G4endl;
218
219 totprob += prob;
220 probabilities[i] = totprob;
221 // if two recent probabilities are near zero stop computations
222 if(i>=8) {
223 if(prob <= totprob*1.e-8 && oldprob <= totprob*1.e-8) {
224 maxchannel = i+1;
225 break;
226 }
227 }
228 oldprob = prob;
229 // protection for very excited fragment - avoid GEM
230 if(7 == i && Eex > Elimit*A) {
231 maxchannel = 8;
232 break;
233 }
234 }
235
236 // photon evaporation in the case of no other channels available
237 // do evaporation chain and reset total probability
238 if(0.0 < totprob && probabilities[0] == totprob) {
239 //G4cout << "Start gamma evaporation" << G4endl;
240 theTempResult = (*theChannels)[0]->BreakUpFragment(theResidualNucleus);
241 if(theTempResult) {
242 size_t nsec = theTempResult->size();
243 for(size_t j=0; j<nsec; ++j) {
244 theResult->push_back((*theTempResult)[j]);
245 }
246 delete theTempResult;
247 }
248 totprob = 0.0;
249 }
250
251 // stable fragnent - evaporation is finished
252 if(0.0 == totprob) {
253
254 // if fragment is exotic, then try to decay it
255 if(0.0 == abun && Z < 20) {
256 //G4cout << "$$$ Decay exotic fragment" << G4endl;
257 theTempResult = unstableBreakUp.BreakUpFragment(theResidualNucleus);
258 if(theTempResult) {
259 size_t nsec = theTempResult->size();
260 for(size_t j=0; j<nsec; ++j) {
261 theResult->push_back((*theTempResult)[j]);
262 }
263 delete theTempResult;
264 }
265 }
266
267 // save residual fragment
268 theResult->push_back(theResidualNucleus);
269 return theResult;
270 }
271
272
273 // select channel
274 totprob *= G4UniformRand();
275 // loop over evaporation channels
276 for(i=0; i<maxchannel; ++i) { if(probabilities[i] >= totprob) { break; } }
277
278 // this should not happen
279 if(i >= nChannels) { i = nChannels - 1; }
280
281
282 // single photon evaporation, primary pointer is kept
283 if(0 == i) {
284 //G4cout << "Single gamma" << G4endl;
285 G4Fragment* gamma = (*theChannels)[0]->EmittedFragment(theResidualNucleus);
286 if(gamma) { theResult->push_back(gamma); }
287
288 // fission, return results to the main loop if fission is succesful
289 } else if(1 == i) {
290 //G4cout << "Fission" << G4endl;
291 theTempResult = (*theChannels)[1]->BreakUp(*theResidualNucleus);
292 if(theTempResult) {
293 size_t nsec = theTempResult->size();
294 G4bool deletePrimary = true;
295 for(size_t j=0; j<nsec; ++j) {
296 if(theResidualNucleus == (*theTempResult)[j]) { deletePrimary = false; }
297 theResult->push_back((*theTempResult)[j]);
298 }
299 if(deletePrimary) { delete theResidualNucleus; }
300 delete theTempResult;
301 return theResult;
302 }
303
304 // other channels
305 } else {
306 //G4cout << "Channel # " << i << G4endl;
307 theTempResult = (*theChannels)[i]->BreakUp(*theResidualNucleus);
308 if(theTempResult) {
309 size_t nsec = theTempResult->size();
310 if(nsec > 0) {
311 --nsec;
312 for(size_t j=0; j<nsec; ++j) {
313 theResult->push_back((*theTempResult)[j]);
314 }
315 // if the residual change its pointer
316 // then delete previous residual fragment and update to the new
317 if(theResidualNucleus != (*theTempResult)[nsec] ) {
318 delete theResidualNucleus;
319 theResidualNucleus = (*theTempResult)[nsec];
320 }
321 }
322 delete theTempResult;
323 }
324 }
325 }
326
327 // loop is stopped, save residual
328 theResult->push_back(theResidualNucleus);
329
330 return theResult;
331}
332
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:65
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
#define G4UniformRand()
Definition: Randomize.hh:53
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
void SetGEMChannel()
void SetDefaultChannel()
void SetCombinedChannel()
virtual ~G4Evaporation()
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
virtual void Initialise()
static G4FermiFragmentsPool * Instance()
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:235
G4int GetZ_asInt() const
Definition: G4Fragment.hh:223
G4int GetA_asInt() const
Definition: G4Fragment.hh:218
static G4NistManager * Instance()
G4double GetIsotopeAbundance(G4int Z, G4int N) const
virtual G4FragmentVector * BreakUpFragment(G4Fragment *fragment)
virtual std::vector< G4VEvaporationChannel * > * GetChannel()=0
G4VEvaporationChannel * thePhotonEvaporation
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)