Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4BigBanger Class Reference

#include <G4BigBanger.hh>

Inheritance diagram for G4BigBanger:
G4CascadeDeexciteBase G4VCascadeDeexcitation G4VCascadeCollider

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 char *name)
 
virtual ~G4VCascadeDeexcitation ()
 
virtual void collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &globalOutput)
 
- Public Member Functions inherited from G4VCascadeCollider
 G4VCascadeCollider (const char *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 char *name)
 
- Protected Attributes inherited from G4CascadeDeexciteBase
G4CascadeCheckBalancebalance
 
G4int A
 
G4int Z
 
G4LorentzVector PEX
 
G4double EEXS
 
G4Fragment aFragment
 
- Protected Attributes inherited from G4VCascadeCollider
const char * theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 48 of file G4BigBanger.hh.

Constructor & Destructor Documentation

G4BigBanger::G4BigBanger ( )

Definition at line 66 of file G4BigBanger.cc.

66 : 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 68 of file G4BigBanger.cc.

References G4CascadeDeexciteBase::A, G4CollisionOutput::addOutgoingParticles(), G4InuclSpecialFunctions::bindingEnergy(), CLHEP::HepLorentzVector::boost(), CLHEP::HepLorentzVector::boostVector(), CLHEP::HepLorentzVector::e(), G4CascadeDeexciteBase::EEXS, G4cerr, G4cout, G4endl, G4CascadeDeexciteBase::getTargetData(), python.hepunit::GeV, python.hepunit::MeV, G4CascadeDeexciteBase::PEX, CLHEP::HepLorentzVector::px(), CLHEP::HepLorentzVector::py(), CLHEP::HepLorentzVector::pz(), sort(), G4CascadeDeexciteBase::validateOutput(), G4VCascadeCollider::verboseLevel, CLHEP::HepLorentzVector::x(), CLHEP::HepLorentzVector::y(), G4CascadeDeexciteBase::Z, and CLHEP::HepLorentzVector::z().

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

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 }
Hep3Vector boostVector() const
subroutine sort(A, N)
Definition: dpm25nuc7.f:4670
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
double pz() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:64
#define G4endl
Definition: G4ios.hh:61
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

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