Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4BigBanger Class Reference

#include <G4BigBanger.hh>

+ Inheritance diagram for G4BigBanger:

Public Member Functions

 G4BigBanger ()
 
virtual ~G4BigBanger ()
 
virtual void deExcite (const G4Fragment &target, G4CollisionOutput &output)
 
- Public Member Functions inherited from G4CascadeDeexciteBase
 G4CascadeDeexciteBase (const char *name)
 
virtual ~G4CascadeDeexciteBase ()
 
virtual void setVerboseLevel (G4int verbose=0)
 
- Public Member Functions inherited from G4VCascadeDeexcitation
 G4VCascadeDeexcitation (const G4String &name)
 
virtual ~G4VCascadeDeexcitation ()
 
virtual void collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &globalOutput)
 
virtual void deExcite (const G4Fragment &fragment, G4CollisionOutput &output)=0
 
- Public Member Functions inherited from G4VCascadeCollider
 G4VCascadeCollider (const G4String &name, G4int verbose=0)
 
virtual ~G4VCascadeCollider ()
 
virtual void collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)=0
 
virtual void setVerboseLevel (G4int verbose=0)
 

Additional Inherited Members

- Protected Member Functions inherited from G4CascadeDeexciteBase
virtual G4bool explosion (const G4Fragment &target) const
 
virtual G4bool explosion (G4int A, G4int Z, G4double excitation) const
 
virtual G4bool validateOutput (const G4Fragment &target, G4CollisionOutput &output)
 
virtual G4bool validateOutput (const G4Fragment &target, const std::vector< G4InuclElementaryParticle > &particles)
 
virtual G4bool validateOutput (const G4Fragment &target, const std::vector< G4InuclNuclei > &fragments)
 
void getTargetData (const G4Fragment &target)
 
const G4FragmentmakeFragment (G4LorentzVector mom, G4int A, G4int Z, G4double EX=0.)
 
const G4FragmentmakeFragment (G4int A, G4int Z, G4double EX=0.)
 
- Protected Member Functions inherited from G4VCascadeCollider
virtual void setName (const G4String &name)
 
- Protected Attributes inherited from G4CascadeDeexciteBase
G4CascadeCheckBalancebalance
 
G4int A
 
G4int Z
 
G4LorentzVector PEX
 
G4double EEXS
 
G4Fragment aFragment
 
- Protected Attributes inherited from G4VCascadeCollider
G4String theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 47 of file G4BigBanger.hh.

Constructor & Destructor Documentation

◆ G4BigBanger()

G4BigBanger::G4BigBanger ( )

Definition at line 66 of file G4BigBanger.cc.

◆ ~G4BigBanger()

virtual G4BigBanger::~G4BigBanger ( )
inlinevirtual

Definition at line 50 of file G4BigBanger.hh.

50{};

Member Function Documentation

◆ deExcite()

void G4BigBanger::deExcite ( const G4Fragment target,
G4CollisionOutput output 
)
virtual

Implements G4VCascadeDeexcitation.

Definition at line 68 of file G4BigBanger.cc.

69 {
70 if (verboseLevel) G4cout << " >>> G4BigBanger::deExcite" << G4endl;
71
72 getTargetData(target);
73 G4ThreeVector toTheLabFrame = PEX.boostVector(); // From rest to lab
74
75 // This "should" be difference between E-target and sum of m(nucleons)
76 G4double etot = (EEXS - bindingEnergy(A,Z)) * MeV/GeV; // To Bertini units
77 if (etot < 0.0) etot = 0.0;
78
79 if (verboseLevel > 2) {
80 G4cout << " BigBanger: target\n" << target
81 << "\n etot " << etot << G4endl;
82 }
83
84 if (verboseLevel > 3) {
85 G4LorentzVector PEXrest = PEX;
86 PEXrest.boost(-toTheLabFrame);
87 G4cout << " target rest frame: px " << PEXrest.px() << " py "
88 << PEXrest.py() << " pz " << PEXrest.pz() << " E " << PEXrest.e()
89 << G4endl;
90 }
91
92 generateBangInSCM(etot, A, Z);
93
94 if (verboseLevel > 2) {
95 G4cout << " particles " << particles.size() << G4endl;
96 for(G4int i = 0; i < G4int(particles.size()); i++)
97 G4cout << particles[i] << G4endl;
98 }
99
100 if (particles.empty()) { // No bang! Don't know why...
101 G4cerr << " >>> G4BigBanger unable to process fragment "
102 << target << G4endl;
103
104 // FIXME: This will violate baryon number, momentum, energy, etc.
105 return;
106 }
107
108 // convert back to Lab
109 G4LorentzVector totscm;
110 G4LorentzVector totlab;
111
112 if (verboseLevel > 2) G4cout << " BigBanger: boosting to lab" << G4endl;
113
114 particleIterator ipart;
115 for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
116 G4LorentzVector mom = ipart->getMomentum();
117 if (verboseLevel > 2) totscm += mom;
118
119 mom.boost(toTheLabFrame);
120 if (verboseLevel > 2) totlab += mom;
121
122 ipart->setMomentum(mom);
123 if (verboseLevel > 2) G4cout << *ipart << G4endl;
124 }
125
126 std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
127
128 validateOutput(target, particles); // Checks <vector> directly
129
130 if (verboseLevel > 2) {
131 G4cout << " In SCM: total outgoing momentum " << G4endl
132 << " E " << totscm.e() << " px " << totscm.x()
133 << " py " << totscm.y() << " pz " << totscm.z() << G4endl;
134 G4cout << " In Lab: mom cons " << G4endl
135 << " E " << PEX.e() - totlab.e() // PEX now includes EEXS
136 << " px " << PEX.x() - totlab.x()
137 << " py " << PEX.y() - totlab.y()
138 << " pz " << PEX.z() - totlab.z() << G4endl;
139 }
140
141 globalOutput.addOutgoingParticles(particles);
142}
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:64
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void getTargetData(const G4Fragment &target)
virtual G4bool validateOutput(const G4Fragment &target, G4CollisionOutput &output)
G4double bindingEnergy(G4int A, G4int Z)

Referenced by G4CascadeDeexcitation::deExcite(), and G4EquilibriumEvaporator::deExcite().


The documentation for this class was generated from the following files: