Geant4  10.03
G4ExcitationHandler.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: G4ExcitationHandler.cc 101865 2016-12-02 13:06:50Z gcosmo $
27 //
28 // Hadronic Process: Nuclear De-excitations
29 // by V. Lara (May 1998)
30 //
31 //
32 // Modified:
33 // 30 June 1998 by V. Lara:
34 // -Modified the Transform method for use G4ParticleTable and
35 // therefore G4IonTable. It makes possible to convert all kind
36 // of fragments (G4Fragment) produced in deexcitation to
37 // G4DynamicParticle
38 // -It uses default algorithms for:
39 // Evaporation: G4Evaporation
40 // MultiFragmentation: G4StatMF
41 // Fermi Breakup model: G4FermiBreakUp
42 // 24 Jul 2008 by M. A. Cortes Giraldo:
43 // -Max Z,A for Fermi Break-Up turns to 9,17 by default
44 // -BreakItUp() reorganised and bug in Evaporation loop fixed
45 // -Transform() optimised
46 // (September 2008) by J. M. Quesada. External choices have been added for :
47 // -inverse cross section option (default OPTxs=3)
48 // -superimposed Coulomb barrier (if useSICB is set true, by default it is false)
49 // September 2009 by J. M. Quesada:
50 // -according to Igor Pshenichnov, SMM will be applied (just in case) only once.
51 // 27 Nov 2009 by V.Ivanchenko:
52 // -cleanup the logic, reduce number internal vectors, fixed memory leak.
53 // 11 May 2010 by V.Ivanchenko:
54 // -FermiBreakUp activated, used integer Z and A, used BreakUpFragment method for
55 // final photon deexcitation; used check on adundance of a fragment, decay
56 // unstable fragments with A <5
57 // 22 March 2011 by V.Ivanchenko: general cleanup and addition of a condition:
58 // products of Fermi Break Up cannot be further deexcited by this model
59 // 30 March 2011 by V.Ivanchenko removed private inline methods, moved Set methods
60 // to the source
61 // 23 January 2012 by V.Ivanchenko general cleanup including destruction of
62 // objects, propagate G4PhotonEvaporation pointer to G4Evaporation class and
63 // not delete it here
64 
65 #include "G4ExcitationHandler.hh"
66 #include "G4SystemOfUnits.hh"
67 #include "G4LorentzVector.hh"
68 #include "G4NistManager.hh"
69 #include "G4ParticleTable.hh"
70 #include "G4ParticleTypes.hh"
71 #include "G4Ions.hh"
72 
73 #include "G4VMultiFragmentation.hh"
74 #include "G4VFermiBreakUp.hh"
75 
76 #include "G4VEvaporation.hh"
77 #include "G4VEvaporationChannel.hh"
78 #include "G4Evaporation.hh"
79 #include "G4StatMF.hh"
80 #include "G4FermiBreakUp.hh"
81 #include "G4FermiBreakUpVI.hh"
82 #include "G4NuclearLevelData.hh"
83 #include "G4Pow.hh"
84 
86  : maxZForFermiBreakUp(9),maxAForFermiBreakUp(17),
87  isInitialised(false),isEvapLocal(true)
88 {
91 
92  theMultiFragmentation = nullptr;
93  theFermiModel = nullptr;
98  theResults.reserve(60);
99  results.reserve(30);
100  theEvapList.reserve(30);
101  thePhotoEvapList.reserve(10);
102  SetParameters();
103  //G4cout << "### New handler " << this << G4endl;
104 }
105 
107 {
108  //G4cout << "### Delete handler " << this << G4endl;
109  delete theMultiFragmentation;
110  delete theFermiModel;
111  if(isEvapLocal) { delete theEvaporation; }
112 }
113 
115 {
116  G4DeexPrecoParameters* param =
119  minExcitation = param->GetMinExcitation();
122 }
123 
125 {
126  if(isInitialised) { return; }
127  //G4cout << "G4ExcitationHandler::Initialise() started " << this << G4endl;
128  isInitialised = true;
129  SetParameters();
133 }
134 
136 {
137  if(ptr && ptr != theEvaporation) {
138  delete theEvaporation;
139  theEvaporation = ptr;
142  isEvapLocal = flag;
143  }
144 }
145 
146 void
148 {
149  if(ptr && ptr != theMultiFragmentation) {
150  delete theMultiFragmentation;
151  theMultiFragmentation = ptr;
152  }
153 }
154 
156 {
157  if(ptr && ptr != theFermiModel) {
158  delete theFermiModel;
159  theFermiModel = ptr;
161  }
162 }
163 
164 void
166 {
167  if(ptr && ptr != thePhotonEvaporation) {
168  thePhotonEvaporation = ptr;
170  }
171 }
172 
174 {
175  G4Evaporation* evap = static_cast<G4Evaporation*>(theEvaporation);
176  if(!evap) { return; }
177  if(val == fEvaporation) {
178  evap->SetDefaultChannel();
179  } else if(val == fCombined) {
180  evap->SetCombinedChannel();
181  } else if(val == fGEM) {
182  evap->SetGEMChannel();
183  }
184  evap->InitialiseChannels();
185 }
186 
189 {
190  //G4cout << "@@@@@@@@@@ Start G4Excitation Handler @@@@@@@@@@@@@ " << hcount << G4endl;
191  // Variables existing until end of method
192  G4Fragment * theInitialStatePtr = new G4Fragment(theInitialState);
193  //G4cout << theInitialState << G4endl;
194 
195  if(!isInitialised) { Initialise(); }
196 
197  // pointer to fragment vector which receives temporal results
198  G4FragmentVector * theTempResult = nullptr;
199 
200  theResults.clear();
201  thePhotoEvapList.clear();
202  theEvapList.clear();
203 
204  // Variables to describe the excited configuration
205  G4double exEnergy = theInitialState.GetExcitationEnergy();
206  G4int A = theInitialState.GetA_asInt();
207  G4int Z = theInitialState.GetZ_asInt();
208 
209  // In case A <= 1 the fragment will not perform any nucleon emission
210  if (A <= 1) {
211  theResults.push_back( theInitialStatePtr );
212 
213  // check if a fragment is stable
214  } else if(exEnergy < minExcitation && nist->GetIsotopeAbundance(Z, A) > 0.0) {
215  theResults.push_back( theInitialStatePtr );
216 
217  // JMQ 150909: first step in de-excitation is treated separately
218  // Fragments after the first step are stored in theEvapList
219  } else {
221  || exEnergy <= minEForMultiFrag*A) {
222  theEvapList.push_back(theInitialStatePtr);
223 
224  // Statistical Multifragmentation will take place only once
225  } else {
226  theTempResult = theMultiFragmentation->BreakItUp(theInitialState);
227  if(!theTempResult) {
228  theEvapList.push_back(theInitialStatePtr);
229  } else {
230  size_t nsec = theTempResult->size();
231 
232  // no fragmentation
233  if(0 == nsec) {
234  theEvapList.push_back(theInitialStatePtr);
235 
236  // secondary are produced - sort out secondary fragments
237  } else {
238  G4bool deletePrimary = true;
239  G4FragmentVector::iterator j;
240  for (j = theTempResult->begin(); j != theTempResult->end(); ++j) {
241 
242  if((*j) == theInitialStatePtr) { deletePrimary = false; }
243  A = (*j)->GetA_asInt();
244 
245  // gamma, p, n
246  if(A <= 1) {
247  theResults.push_back(*j);
248 
249  // Analyse fragment A > 1
250  } else {
251  G4double exEnergy1 = (*j)->GetExcitationEnergy();
252 
253  // cold fragments
254  if(exEnergy1 < minExcitation) {
255  Z = (*j)->GetZ_asInt();
256  if(nist->GetIsotopeAbundance(Z, A) > 0.0) {
257  theResults.push_back(*j); // stable fragment
258  } else {
259  theEvapList.push_back(*j);
260  }
261  // hot fragments are unstable
262  } else {
263  theEvapList.push_back(*j);
264  }
265  }
266  }
267  if( deletePrimary ) { delete theInitialStatePtr; }
268  }
269  delete theTempResult; // end multifragmentation
270  }
271  }
272  }
273  /*
274  G4cout << "## After first step " << theEvapList.size() << " for evap; "
275  << thePhotoEvapList.size() << " for photo-evap; "
276  << theResults.size() << " results. " << G4endl;
277  */
278  // -----------------------------------
279  // FermiBreakUp and De-excitation loop
280  // -----------------------------------
281 
282  static const G4int countmax = 1000;
283  G4Fragment* frag;
284  size_t kk;
285  for (kk=0; kk<theEvapList.size(); ++kk) {
286  frag = theEvapList[kk];
287  //G4cout << "Next evaporate: " << G4endl;
288  //G4cout << *frag << G4endl;
289  if(kk >= countmax) {
291  ed << "Infinite loop in the de-excitation module: " << kk
292  << " iterations \n"
293  << " Initial fragment: \n" << theInitialState
294  << "\n Current fragment: \n" << *frag;
295  G4Exception("G4ExcitationHandler::BreakItUp","had0333",FatalException,
296  ed,"Stop execution");
297 
298  }
299  A = frag->GetA_asInt();
300  Z = frag->GetZ_asInt();
301  results.clear();
302 
303  // Fermi Break-Up
304  if(theFermiModel->IsApplicable(Z, A, frag->GetExcitationEnergy())) {
306  size_t nsec = results.size();
307  //G4cout << "FermiBreakUp Nsec= " << nsec << G4endl;
308 
309  // FBU takes care to delete input fragment or add it to the results
310  // The secondary may be excited - photo-evaporation should be applied
311  for(size_t j=0; j<nsec; ++j) {
312  exEnergy = results[j]->GetExcitationEnergy();
313  if(exEnergy < minExcitation) { theResults.push_back(results[j]); }
314  else { thePhotoEvapList.push_back(results[j]); }
315  }
316  continue;
317  }
318  // apply Evaporation, residual nucleus is always added to the results
320  size_t nsec = results.size();
321  //G4cout << "Evaporation Nsec= " << nsec << G4endl;
322 
323  // no evaporation
324  if(1 >= nsec) {
325  theResults.push_back(frag);
326  continue;
327  }
328 
329  // Sort out secondary fragments
330  for (size_t j = 0; j<nsec; ++j) {
331  //G4cout << "Evaporated product #" << j << G4endl;
332  //G4cout << results[j] << G4endl;
333  A = results[j]->GetA_asInt();
334  //G4cout << "A= " << A << G4endl;
335  if(A <= 1) {
336  theResults.push_back(results[j]); // gamma, p, n
337  continue;
338  }
339  exEnergy = results[j]->GetExcitationEnergy();
340 
341  // hot fragment
342  if(exEnergy >= minExcitation) {
343  theEvapList.push_back(results[j]);
344 
345  // cold fragment
346  } else {
347  Z = results[j]->GetZ_asInt();
348 
349  // natural isotope
350  if(nist->GetIsotopeAbundance(Z, A) > 0.0) {
351  theResults.push_back(results[j]); // stable fragment
352 
353  } else {
354  theEvapList.push_back(results[j]);
355  }
356  }
357  } // end of loop on secondary
358  } // end of the loop over theEvapList
359  /*
360  G4cout << "## After 2nd step " << theEvapList.size() << " was evap; "
361  << thePhotoEvapList.size() << " for photo-evap; "
362  << theResults.size() << " results. " << G4endl;
363  */
364  // -----------------------
365  // Photon-Evaporation loop
366  // -----------------------
367 
368  // at this point only photon evaporation is possible
369  size_t kkmax = thePhotoEvapList.size();
370  for (kk=0; kk<kkmax; ++kk) {
371  frag = thePhotoEvapList[kk];
372  //G4cout << "Next photon evaporate: " << thePhotonEvaporation << G4endl;
373  //G4cout << *frag << G4endl;
374  exEnergy = frag->GetExcitationEnergy();
375 
376  // photon de-excitation only for hot fragments
377  if(exEnergy > minExcitation) {
379  }
380 
381  // priamry fragment is kept
382  theResults.push_back(frag);
383 
384  } // end of photon-evaporation loop
385  /*
386  G4cout << "## After 3d step " << theEvapList.size() << " was evap; "
387  << thePhotoEvapList.size() << " was photo-evap; "
388  << theResults.size() << " results. " << G4endl;
389  */
390  G4ReactionProductVector * theReactionProductVector =
392 
393  // MAC (24/07/08)
394  // To optimise the storing speed, we reserve space in memory for the vector
395  theReactionProductVector->reserve( theResults.size() );
396 
397  G4int theFragmentA, theFragmentZ;
398 
399  //G4cout << "### ExcitationHandler provides " << theResults.size()
400  // << " evaporated products:" << G4endl;
401  kkmax = theResults.size();
402  for (kk=0; kk<kkmax; ++kk) {
403  frag = theResults[kk];
404  //G4cout << *frag << G4endl;
405 
406  theFragmentA = frag->GetA_asInt();
407  theFragmentZ = frag->GetZ_asInt();
408  G4double etot= frag->GetMomentum().e();
409  G4double eexc = 0.0;
410  const G4ParticleDefinition* theKindOfFragment = nullptr;
411  if (theFragmentA == 0) { // photon or e-
412  theKindOfFragment = frag->GetParticleDefinition();
413  } else if (theFragmentA == 1 && theFragmentZ == 0) { // neutron
414  theKindOfFragment = G4Neutron::NeutronDefinition();
415  } else if (theFragmentA == 1 && theFragmentZ == 1) { // proton
416  theKindOfFragment = G4Proton::ProtonDefinition();
417  } else if (theFragmentA == 2 && theFragmentZ == 1) { // deuteron
418  theKindOfFragment = G4Deuteron::DeuteronDefinition();
419  } else if (theFragmentA == 3 && theFragmentZ == 1) { // triton
420  theKindOfFragment = G4Triton::TritonDefinition();
421  } else if (theFragmentA == 3 && theFragmentZ == 2) { // helium3
422  theKindOfFragment = G4He3::He3Definition();
423  } else if (theFragmentA == 4 && theFragmentZ == 2) { // alpha
424  theKindOfFragment = G4Alpha::AlphaDefinition();;
425  } else {
426 
427  // fragment
428  eexc = frag->GetExcitationEnergy();
429  if(eexc < minExcitation) { eexc = 0.0; }
430  theKindOfFragment =
431  theTableOfIons->GetIon(theFragmentZ,theFragmentA,eexc,noFloat,0);
432  /*
433  G4cout << "### EXCH: Find ion Z= " << theFragmentZ << " A= " << theFragmentA
434  << " Eexc(MeV)= " << eexc/MeV << " " << theKindOfFragment
435  << G4endl;
436  */
437  }
438  // fragment identified
439  if(theKindOfFragment) {
440  G4ReactionProduct * theNew = new G4ReactionProduct(theKindOfFragment);
441  theNew->SetMomentum(frag->GetMomentum().vect());
442  theNew->SetTotalEnergy(etot);
443  theNew->SetFormationTime(frag->GetCreationTime());
444  theReactionProductVector->push_back(theNew);
445 
446  // fragment not found out ground state is created
447  } else {
448  theKindOfFragment = theTableOfIons->GetIon(theFragmentZ,theFragmentA,0.0,noFloat,0);
449  if(theKindOfFragment) {
450  G4ThreeVector mom(0.0,0.0,0.0);
451  G4double ionmass = theKindOfFragment->GetPDGMass();
452  if(etot <= ionmass) {
453  etot = ionmass;
454  } else {
455  G4double ptot = std::sqrt((etot - ionmass)*(etot + ionmass));
456  mom = (frag->GetMomentum().vect().unit())*ptot;
457  }
458  G4ReactionProduct * theNew = new G4ReactionProduct(theKindOfFragment);
459  theNew->SetMomentum(mom);
460  theNew->SetTotalEnergy(etot);
461  theNew->SetFormationTime(frag->GetCreationTime());
462  theReactionProductVector->push_back(theNew);
463  /*
464  G4cout << "### Find ion Z= " << theFragmentZ << " A= " << theFragmentA
465  << " ground state, energy corrected " << theKindOfFragment << G4endl;
466  } else {
467  G4cout << "### Find ion Z= " << theFragmentZ
468  << " A= " << theFragmentA << " failed " << G4endl;
469  */
470  }
471  }
472  delete frag;
473  }
474  //G4cout << "@@@@@@@@@@ End G4Excitation Handler "<< G4endl;
475  return theReactionProductVector;
476 }
477 
478 void G4ExcitationHandler::ModelDescription(std::ostream& outFile) const
479 {
480  outFile << "G4ExcitationHandler description\n"
481  << "This class samples de-excitation of excited nucleus using\n"
482  << "Fermi Break-up model for light fragments (Z < 9, A < 17), "
483  << "evaporation, fission, and photo-evaporation models. Evaporated\n"
484  << "particle may be proton, neutron, and other light fragment \n"
485  << "(Z < 13, A < 29). During photon evaporation produced gamma \n"
486  << "or electrons due to internal conversion \n";
487 }
488 
489 
490 
491 
492 
493 
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
static G4Triton * TritonDefinition()
Definition: G4Triton.cc:90
void SetDefaultChannel()
static G4He3 * He3Definition()
Definition: G4He3.cc:89
void ModelDescription(std::ostream &outFile) const
std::vector< G4Fragment * > theResults
virtual void BreakFragment(G4FragmentVector *results, G4Fragment *theNucleus)=0
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
CLHEP::Hep3Vector G4ThreeVector
virtual G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus)
G4VEvaporationChannel * GetPhotonEvaporation()
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
virtual void BreakFragment(G4FragmentVector *, G4Fragment *theNucleus)
const G4ParticleDefinition * GetParticleDefinition() const
Definition: G4Fragment.hh:410
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)=0
virtual G4bool IsApplicable(G4int Z, G4int A, G4double mass) const =0
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
std::vector< G4Fragment * > results
std::vector< G4ReactionProduct * > G4ReactionProductVector
void SetGEMChannel()
std::vector< G4Fragment * > thePhotoEvapList
G4IonTable * GetIonTable() const
virtual void InitialiseChannels() final
double A(double temperature)
G4int GetA_asInt() const
Definition: G4Fragment.hh:256
G4double GetCreationTime() const
Definition: G4Fragment.hh:420
std::vector< G4Fragment * > theEvapList
bool G4bool
Definition: G4Types.hh:79
virtual void InitialiseChannels()
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:289
void SetFermiModel(G4VFermiBreakUp *ptr)
void SetTotalEnergy(const G4double en)
std::vector< G4Fragment * > G4FragmentVector
Definition: G4Fragment.hh:63
G4DeexPrecoParameters * GetParameters()
void SetMultiFragmentation(G4VMultiFragmentation *ptr)
G4VEvaporationChannel * thePhotonEvaporation
G4double GetIsotopeAbundance(G4int Z, G4int N) const
G4VMultiFragmentation * theMultiFragmentation
void SetEvaporation(G4VEvaporation *ptr, G4bool isLocal=false)
G4VFermiBreakUp * theFermiModel
void SetFermiBreakUp(G4VFermiBreakUp *ptr)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
void SetCombinedChannel()
void SetDeexChannelsType(G4DeexChannelType val)
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
virtual void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
G4int GetZ_asInt() const
Definition: G4Fragment.hh:261
G4VEvaporation * theEvaporation
G4double GetMinExPerNucleounForMF() const
void SetFormationTime(G4double aTime)
virtual void Initialise()=0
double G4double
Definition: G4Types.hh:76
void SetPhotonEvaporation(G4VEvaporationChannel *ptr)
static G4Deuteron * DeuteronDefinition()
Definition: G4Deuteron.cc:89
static G4Alpha * AlphaDefinition()
Definition: G4Alpha.cc:84
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
static G4NuclearLevelData * GetInstance()
G4double GetMinExcitation() const
#define noFloat
Definition: G4Ions.hh:118
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:273