71 finalBaryon(0), initialCharge(0), finalCharge(0), initialStrange(0),
78 absoluteLimit(absolute), initialBaryon(0), finalBaryon(0),
79 initialCharge(0), finalCharge(0), initialStrange(0),
89 G4cout <<
" >>> G4CascadeCheckBalance(" <<
theName <<
")::collide"
110 ((pbullet ? pbullet->baryon() : nbullet ? nbullet->
getA() : 0) +
111 (ptarget ? ptarget->
baryon() : ntarget ? ntarget->
getA() : 0) );
115 if (pbullet) initialStrange += pbullet->getStrangeness();
126 G4cout <<
" initial px " << initial.
px() <<
" py " << initial.
py()
127 <<
" pz " << initial.
pz() <<
" E " << initial.
e()
128 <<
" baryon " << initialBaryon <<
" charge " << initialCharge
129 <<
" strange " << initialStrange << G4endl
130 <<
" final px " <<
final.px() <<
" py " <<
final.py()
131 <<
" pz " <<
final.pz() <<
" E " <<
final.e()
132 <<
" baryon " << finalBaryon <<
" charge " << finalCharge
133 <<
" strange " << finalStrange <<
G4endl;
141 G4cout <<
" >>> G4CascadeCheckBalance(" <<
theName <<
")::collide(<FRAG>)"
158 G4cout <<
" initial px " << initial.
px() <<
" py " << initial.
py()
159 <<
" pz " << initial.
pz() <<
" E " << initial.
e()
160 <<
" baryon " << initialBaryon <<
" charge " << initialCharge
161 <<
" strange " << initialStrange << G4endl
162 <<
" final px " <<
final.px() <<
" py " <<
final.py()
163 <<
" pz " <<
final.pz() <<
" E " <<
final.e()
164 <<
" baryon " << finalBaryon <<
" charge " << finalCharge
165 <<
" strange " << finalStrange <<
G4endl;
174 const std::vector<G4InuclElementaryParticle>& particles) {
176 G4cout <<
" >>> G4CascadeCheckBalance(" <<
theName <<
")::collide(<vector>)"
181 collide(bullet, target, tempOutput);
185 const std::vector<G4InuclElementaryParticle>& particles) {
188 <<
")::collide(<FRAG>,<vector>)" <<
G4endl;
199 const std::vector<G4InuclNuclei>& fragments) {
201 G4cout <<
" >>> G4CascadeCheckBalance(" <<
theName <<
")::collide(<vector>)"
214 const std::vector<G4CascadParticle>& particles) {
217 <<
")::collide(<cparticles>)" <<
G4endl;
221 collide(bullet, target, tempOutput);
230 const std::vector<G4CascadParticle>& cparticles) {
233 <<
")::collide(<EP>,<CP>)" <<
G4endl;
236 tempOutput.
add(output);
238 collide(bullet, target, tempOutput);
250 << (relokay ?
" conserved" :
" VIOLATED")
251 <<
" absolute " <<
deltaE()
252 << (absokay ?
" conserved" :
" VIOLATED") <<
G4endl;
255 <<
" conserved absolute " <<
deltaE() <<
" conserved" <<
G4endl;
258 return (relokay && absokay);
267 <<
relativeKE() << (relokay ?
" conserved" :
" VIOLATED")
269 << (absokay ?
" conserved" :
" VIOLATED") <<
G4endl;
273 <<
" conserved" <<
G4endl;
276 return (relokay && absokay);
285 << (relokay ?
" conserved" :
" VIOLATED")
286 <<
" absolute " <<
deltaP()
287 << (absokay ?
" conserved" :
" VIOLATED") <<
G4endl;
290 <<
" conserved absolute " <<
deltaP() <<
" conserved" <<
G4endl;
293 return (relokay && absokay);
G4int getStrangeness() const
void addOutgoingNuclei(const std::vector< G4InuclNuclei > &nuclea)
G4LorentzVector getMomentum() const
G4bool baryonOkay() const
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4bool strangeOkay() const
static const G4double tolerance
G4LorentzVector getTotalOutputMomentum() const
void add(const G4CollisionOutput &right)
G4CascadeCheckBalance(const char *owner="G4CascadeCheckBalance")
G4GLOB_DLL std::ostream G4cout
G4int getTotalStrangeness() const
const G4LorentzVector & GetMomentum() const
G4bool energyOkay() const
G4double relativeE() const
G4double relativeKE() const
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
G4int getTotalBaryonNumber() const
G4bool chargeOkay() const
G4int getTotalCharge() const
G4double getCharge() const
G4bool momentumOkay() const
G4double relativeP() const
G4GLOB_DLL std::ostream G4cerr