#include <G4BigBanger.hh>
Inheritance diagram for G4BigBanger:
Public Member Functions | |
G4BigBanger () | |
virtual | ~G4BigBanger () |
void | collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output) |
Definition at line 47 of file G4BigBanger.hh.
G4BigBanger::G4BigBanger | ( | ) |
virtual G4BigBanger::~G4BigBanger | ( | ) | [inline, virtual] |
void G4BigBanger::collide | ( | G4InuclParticle * | bullet, | |
G4InuclParticle * | target, | |||
G4CollisionOutput & | output | |||
) | [virtual] |
Implements G4VCascadeCollider.
Definition at line 65 of file G4BigBanger.cc.
References G4CollisionOutput::addOutgoingParticles(), G4InuclSpecialFunctions::bindingEnergy(), G4cerr, G4cout, G4endl, G4InuclNuclei::getA(), G4InuclParticle::getDefinition(), G4InuclNuclei::getExitationEnergy(), G4InuclParticle::getMomentum(), G4ParticleDefinition::GetParticleName(), G4InuclNuclei::getZ(), G4CascadeColliderBase::validateOutput(), and G4VCascadeCollider::verboseLevel.
Referenced by G4EquilibriumEvaporator::collide(), and G4CascadeDeexcitation::collide().
00066 { 00067 00068 if (verboseLevel) G4cout << " >>> G4BigBanger::collide" << G4endl; 00069 00070 // primitive explosion model A -> nucleons to prevent too exotic evaporation 00071 00072 G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target); 00073 if (!nuclei_target) { 00074 G4cerr << " BigBanger -> try to bang not nuclei " << G4endl; 00075 return; 00076 } 00077 00078 G4int A = nuclei_target->getA(); 00079 G4int Z = nuclei_target->getZ(); 00080 00081 G4LorentzVector PEX = nuclei_target->getMomentum(); 00082 G4double EEXS = nuclei_target->getExitationEnergy(); 00083 00084 G4ThreeVector toTheLabFrame = PEX.boostVector(); // From rest to lab 00085 00086 // This "should" be difference between E-target and sum of m(nucleons) 00087 G4double etot = (EEXS - bindingEnergy(A,Z)) * MeV/GeV; // To Bertini units 00088 if (etot < 0.0) etot = 0.0; 00089 00090 if (verboseLevel > 2) { 00091 G4cout << " BigBanger: target\n" << *nuclei_target 00092 << "\n etot " << etot << G4endl; 00093 } 00094 00095 if (verboseLevel > 3) { 00096 G4LorentzVector PEXrest = PEX; 00097 PEXrest.boost(-toTheLabFrame); 00098 G4cout << " target rest frame: px " << PEXrest.px() << " py " 00099 << PEXrest.py() << " pz " << PEXrest.pz() << " E " << PEXrest.e() 00100 << G4endl; 00101 } 00102 00103 generateBangInSCM(etot, A, Z); 00104 00105 if (verboseLevel > 2) { 00106 G4cout << " particles " << particles.size() << G4endl; 00107 for(G4int i = 0; i < G4int(particles.size()); i++) 00108 G4cout << particles[i] << G4endl; 00109 } 00110 00111 if (particles.empty()) { // No bang! Don't know why... 00112 G4cerr << " >>> G4BigBanger unable to process fragment " 00113 << nuclei_target->getDefinition()->GetParticleName() << G4endl; 00114 00115 // FIXME: This will violate baryon number, momentum, energy, etc. 00116 return; 00117 } 00118 00119 // convert back to Lab 00120 G4LorentzVector totscm; 00121 G4LorentzVector totlab; 00122 00123 if (verboseLevel > 2) G4cout << " BigBanger: boosting to lab" << G4endl; 00124 00125 particleIterator ipart; 00126 for(ipart = particles.begin(); ipart != particles.end(); ipart++) { 00127 G4LorentzVector mom = ipart->getMomentum(); 00128 if (verboseLevel > 2) totscm += mom; 00129 00130 mom.boost(toTheLabFrame); 00131 if (verboseLevel > 2) totlab += mom; 00132 00133 ipart->setMomentum(mom); 00134 if (verboseLevel > 2) G4cout << *ipart << G4endl; 00135 } 00136 00137 std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin()); 00138 00139 validateOutput(0, target, particles); // Checks <vector> directly 00140 00141 if (verboseLevel > 2) { 00142 G4cout << " In SCM: total outgoing momentum " << G4endl 00143 << " E " << totscm.e() << " px " << totscm.x() 00144 << " py " << totscm.y() << " pz " << totscm.z() << G4endl; 00145 G4cout << " In Lab: mom cons " << G4endl 00146 << " E " << PEX.e() - totlab.e() // PEX now includes EEXS 00147 << " px " << PEX.x() - totlab.x() 00148 << " py " << PEX.y() - totlab.y() 00149 << " pz " << PEX.z() - totlab.z() << G4endl; 00150 } 00151 00152 output.addOutgoingParticles(particles); 00153 }