Geant4 11.4.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// Hadronic Process: Nuclear De-excitations
28// by V. Lara (Oct 1998)
29//
30// Alex Howard - added protection for negative probabilities in the sum, 14/2/07
31//
32// Modif (03 September 2008) by J. M. Quesada for external choice of inverse
33// cross section option
34// JMQ (06 September 2008) Also external choices have been added for
35// superimposed Coulomb barrier (if useSICBis set true, by default is false)
36//
37// V.Ivanchenko (27 July 2009) added G4EvaporationDefaultGEMFactory option
38// V.Ivanchenko (10 May 2010) rewrited BreakItUp method: do not make new/delete
39// photon channel first, fission second,
40// added G4UnstableFragmentBreakUp to decay
41// unphysical fragments (like 2n or 2p),
42// use Z and A integer
43// V.Ivanchenko (22 April 2011) added check if a fragment can be deexcited
44// by the FermiBreakUp model
45// V.Ivanchenko (23 January 2012) added pointer of G4VPhotonEvaporation
46// V.Ivanchenko (6 May 2013) added check of existence of residual ion
47// in the ion table
48
49#include "G4Evaporation.hh"
50#include "G4SystemOfUnits.hh"
55#include "G4NistManager.hh"
56#include "G4VFermiBreakUp.hh"
57#include "G4FermiBreakUpVI.hh"
60#include "G4ParticleTable.hh"
61#include "G4IonTable.hh"
62#include "G4NuclearLevelData.hh"
63#include "G4LevelManager.hh"
65#include "Randomize.hh"
66
68 : fVerbose(0), minExcitation(0.1*CLHEP::keV)
69{
70 if (nullptr != photoEvaporation) {
71 SetPhotonEvaporation(photoEvaporation);
72 } else {
74 }
75
76 channelType = fCombined;
77
81 unstableBreakUp = new G4UnstableFragmentBreakUp();
82}
83
85{
86 delete unstableBreakUp;
87}
88
90{
91 if (isInitialised) { return; }
92
93 G4DeexPrecoParameters* param = fLevelData->GetParameters();
94 minExcitation = param->GetMinExcitation();
95 fVerbose = param->GetVerbose();
96 unstableBreakUp->SetVerbose(fVerbose);
97
98 if (nullptr == theChannelFactory) {
100 if(type == fCombined) { SetCombinedChannel(); }
101 else if(type == fGEM) { SetGEMChannel(); }
102 else if(type == fEvaporation) { SetDefaultChannel(); }
103 else if(type == fGEMVI) { SetGEMVIChannel(); }
104 }
105 isInitialised = true;
106}
107
108void G4Evaporation::InitialiseChannelFactory()
109{
110 if (nullptr == theFBU) {
111 theFBU = new G4FermiBreakUpVI();
113 }
114 if (nullptr == theChannelFactory) {
115 channelType = fEvaporation;
116 theChannelFactory = new G4EvaporationFactory(thePhotonEvaporation);
117 }
118 theChannels = theChannelFactory->GetChannel();
119 nChannels = theChannels->size();
120 probabilities.resize(nChannels, 0.0);
121
122 if(fVerbose > 1) {
123 G4cout << "### G4Evaporation::InitialiseChannelFactory for "
124 << nChannels << " channels " << this << G4endl;
125 }
126 for (std::size_t i=0; i<nChannels; ++i) {
127 (*theChannels)[i]->SetOPTxs(OPTxs);
128 (*theChannels)[i]->Initialise();
129 }
130}
131
133{
134 if (fEvaporation != channelType || nullptr == theChannelFactory) {
135 channelType = fEvaporation;
137 delete theChannelFactory;
139 InitialiseChannelFactory();
140 }
141}
142
144{
145 if (fGEM != channelType || nullptr == theChannelFactory) {
146 channelType = fGEM;
148 delete theChannelFactory;
150 InitialiseChannelFactory();
151 }
152}
153
155{
156 if (fGEMVI != channelType || nullptr == theChannelFactory) {
157 channelType = fGEMVI;
159 delete theChannelFactory;
161 InitialiseChannelFactory();
162 }
163}
164
166{
167 if (fCombined != channelType || nullptr == theChannelFactory) {
168 channelType = fCombined;
170 delete theChannelFactory;
173 InitialiseChannelFactory();
174 }
175}
176
178 G4Fragment* theResidualNucleus)
179{
180 if (!isInitialised) { InitialiseChannels(); }
181
182 G4double totprob, prob, oldprob = 0.0;
183 const G4double limFact = 1.e-6;
184 std::size_t maxchannel, i;
185
186 G4int Amax = theResidualNucleus->GetA_asInt();
187 if(fVerbose > 1) {
188 G4cout << "### G4Evaporation::BreakItUp loop" << G4endl;
189 }
190 CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
191
192 // Starts loop over evaporated particles, loop is limited by number
193 // of nucleons
194 for(G4int ia=0; ia<Amax; ++ia) {
195
196 // g,n,p and light fragments - evaporation is finished
197 G4int Z = theResidualNucleus->GetZ_asInt();
198 G4int A = theResidualNucleus->GetA_asInt();
199 if(A <= 1) { break; }
200 G4double Eex = theResidualNucleus->GetExcitationEnergy();
201
202 // stop deexcitation loop if residual can be deexcited by FBU
203 if(theFBU->IsApplicable(Z, A, Eex)) { break; }
204
205 // check if it is stable, then finish evaporation
206 G4double abun = nist->GetIsotopeAbundance(Z, A);
207 // stop deecitation loop in the case of a cold stable fragment
208 if(Eex <= minExcitation &&
209 (abun > 0.0 || (A == 3 && (Z == 1 || Z == 2)))) { break; }
210
211 totprob = 0.0;
212 maxchannel = nChannels;
213 if(fVerbose > 1) {
214 G4cout << "Evaporation# " << ia << " Z= " << Z << " A= " << A
215 << " Eex(MeV)= " << theResidualNucleus->GetExcitationEnergy()
216 << " aban= " << abun << G4endl;
217 }
218 // loop over evaporation channels
219 for(i=0; i<nChannels; ++i) {
220 prob = (*theChannels)[i]->GetEmissionProbability(theResidualNucleus);
221 if (fVerbose > 1 && prob > 0.0) {
222 G4cout << " Channel# " << i << " prob= " << prob << G4endl;
223 }
224 totprob += prob;
225 probabilities[i] = totprob;
226
227 // if two recent probabilities are near zero stop computations
228 if (i > 8) {
229 if (prob <= totprob*limFact && oldprob <= totprob*limFact) {
230 maxchannel = i + 1;
231 break;
232 }
233 }
234 oldprob = prob;
235 }
236
237 // photon evaporation in the case of no other channels available
238 // do evaporation chain and return back ground state fragment
239 if(0.0 < totprob && probabilities[0] == totprob) {
240 if(fVerbose > 1) {
241 G4cout << "$$$ Start chain of gamma evaporation" << G4endl;
242 }
243 (*theChannels)[0]->BreakUpChain(theResult, theResidualNucleus);
244
245 // release residual stable fragment
246 if(abun > 0.0) {
247 theResidualNucleus->SetLongLived(true);
248 break;
249 }
250 // release residual fragment known to FBU
251 Eex = theResidualNucleus->GetExcitationEnergy();
252 if(theFBU->IsApplicable(Z, A, Eex)) { break; }
253
254 // release residual fragment with non-zero life time
255 if(theResidualNucleus->IsLongLived()) { break; }
256 totprob = 0.0;
257 }
258
259 if(0.0 == totprob && A < 30) {
260 // if residual fragment is exotic, then it forced to decay
261 // if success, then decay product is added to results
262 if(fVerbose > 1) {
263 G4cout << "$$$ Decay exotic fragment" << G4endl;
264 }
265 if(unstableBreakUp->BreakUpChain(theResult, theResidualNucleus)) {
266 continue;
267 }
268 // release if it is not possible to decay
269 break;
270 }
271
272 // select channel
273 totprob *= rndm->flat();
274
275 // loop over evaporation channels
276 for (i=0; i<maxchannel; ++i) {
277 if (probabilities[i] >= totprob) { break; }
278 }
279
280 if (fVerbose > 1) {
281 G4cout << "$$$ Selected Channel# " << i << " MaxChannel="
282 << maxchannel << G4endl;
283 }
284 G4Fragment* frag = (*theChannels)[i]->EmittedFragment(theResidualNucleus);
285 if(fVerbose > 2 && frag) { G4cout << " " << *frag << G4endl; }
286
287 // normaly a fragment should be created
288 if(nullptr != frag) { theResult->push_back(frag); }
289 else { break; }
290 }
291}
std::vector< G4Fragment * > G4FragmentVector
Definition G4Fragment.hh:65
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
const G4double A[17]
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
virtual double flat()=0
G4DeexChannelType GetDeexChannelsType() const
~G4Evaporation() override
G4Evaporation(G4VEvaporationChannel *photoEvaporation=nullptr)
void SetDefaultChannel()
void SetCombinedChannel()
void InitialiseChannels() override
void BreakFragment(G4FragmentVector *, G4Fragment *theNucleus) override
G4double GetExcitationEnergy() const
G4bool IsLongLived() const
G4int GetZ_asInt() const
void SetLongLived(G4bool value)
G4int GetA_asInt() const
static G4NistManager * Instance()
static G4NuclearLevelData * GetInstance()
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
G4VFermiBreakUp * theFBU
G4VEvaporationChannel * thePhotonEvaporation
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
G4VEvaporationFactory * theChannelFactory
std::vector< G4VEvaporationChannel * > * theChannels
virtual void Initialise()