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