Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4BigBanger Class Reference

#include <G4BigBanger.hh>

Inheritance diagram for G4BigBanger:
Collaboration 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)
 
- Public Member Functions inherited from G4VCascadeCollider
 G4VCascadeCollider (const G4String &name, G4int verbose=0)
 
virtual ~G4VCascadeCollider ()
 

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 48 of file G4BigBanger.hh.

Constructor & Destructor Documentation

G4BigBanger::G4BigBanger ( )

Definition at line 67 of file G4BigBanger.cc.

67 : G4CascadeDeexciteBase("G4BigBanger") {}
G4CascadeDeexciteBase(const char *name)
virtual G4BigBanger::~G4BigBanger ( )
inlinevirtual

Definition at line 51 of file G4BigBanger.hh.

51 {};

Member Function Documentation

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

Implements G4VCascadeDeexcitation.

Definition at line 69 of file G4BigBanger.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:


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