Geant4  10.02
G4CascadeDeexcitation.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: G4CascadeDeexcitation.cc 71954 2013-06-29 04:40:40Z mkelsey $
27 //
28 // Takes an arbitrary excited or unphysical nuclear state and produces
29 // a final state with evaporated particles and (possibly) a stable nucleus.
30 //
31 // 20100926 M. Kelsey -- Move to new G4VCascadeDeexcitation base class.
32 // 20110302 M. Kelsey -- Don't do "final" conservation check (not needed)
33 // 20130621 Replace collide() interface with deExcite() using G4Fragment
34 // 20130622 Inherit from G4CascadeDeexciteBase
35 
36 #include "G4CascadeDeexcitation.hh"
37 #include "globals.hh"
38 #include "G4BigBanger.hh"
41 #include "G4InuclNuclei.hh"
42 #include "G4InuclParticle.hh"
43 
44 
45 // Constructor and destructor
46 
48  : G4CascadeDeexciteBase("G4CascadeDeexcitation"),
49  theBigBanger(new G4BigBanger),
50  theNonEquilibriumEvaporator(new G4NonEquilibriumEvaporator),
51  theEquilibriumEvaporator(new G4EquilibriumEvaporator) {}
52 
54  delete theBigBanger;
57 }
58 
61  theBigBanger->setVerboseLevel(verbose);
64 }
65 
66 
67 // Convert generic G4Fragment into Bertini particle
68 
70  G4CollisionOutput& globalOutput) {
71  if (verboseLevel) {
72  G4cout << " >>> G4CascadeDeexcitation::deExcite" << G4endl;
73  }
74 
75  if (verboseLevel > 1) G4cout << fragment << G4endl;
76 
77  // Check if fragment should be broken up
78  if (explosion(fragment)) {
79  if (verboseLevel > 1) G4cout << " big bang after cascade " << G4endl;
80 
81  // Add result of explosion directly to output and exit
82  theBigBanger->deExcite(fragment, globalOutput);
83  return;
84  }
85 
86  // Fragment is unstable nucleus
87  tempOutput.reset();
89 
90  if (verboseLevel > 1) {
91  G4cout << " After NonEquilibriumEvaporator " << G4endl;
93  }
94 
95  // Copy evaporated particles (not nuclear fragment) to output
97 
98  // Use nuclear fragment left from non-equilibrium for next step
99  // NOTE: Must make a copy before reset occurs below
101 
102  tempOutput.reset();
104 
105  if (verboseLevel > 1) {
106  G4cout << " After EquilibriumEvaporator " << G4endl;
108  }
109 
110  globalOutput.add(tempOutput); // Evaporated particles and nucleus
111 }
112 
G4EquilibriumEvaporator * theEquilibriumEvaporator
virtual void setVerboseLevel(G4int verbose=0)
virtual void deExcite(const G4Fragment &target, G4CollisionOutput &output)
void printCollisionOutput(std::ostream &os=G4cout) const
int G4int
Definition: G4Types.hh:78
G4CollisionOutput tempOutput
void add(const G4CollisionOutput &right)
G4GLOB_DLL std::ostream G4cout
G4NonEquilibriumEvaporator * theNonEquilibriumEvaporator
virtual void setVerboseLevel(G4int verbose)
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
virtual G4bool explosion(const G4Fragment &target) const
virtual void setVerboseLevel(G4int verbose)
const std::vector< G4InuclElementaryParticle > & getOutgoingParticles() const
#define G4endl
Definition: G4ios.hh:61
virtual void deExcite(const G4Fragment &fragment, G4CollisionOutput &globalOutput)
const G4Fragment & getRecoilFragment(G4int index=0) const
virtual void deExcite(const G4Fragment &target, G4CollisionOutput &output)
virtual void deExcite(const G4Fragment &target, G4CollisionOutput &output)
Definition: G4BigBanger.cc:69