50 :numberOfProducts(0),theParentParticle(nullptr)
56 :numberOfProducts(0),theParentParticle(nullptr)
136 numberOfProducts = 0;
181 if (totalEnergy > mass ) totalMomentum = std::sqrt( (totalEnergy - mass)*(totalEnergy + mass) );
182 G4double betax = momentumDirection.
x()*totalMomentum/totalEnergy;
183 G4double betay = momentumDirection.
y()*totalMomentum/totalEnergy;
184 G4double betaz = momentumDirection.
z()*totalMomentum/totalEnergy;
185 this->
Boost(betax, betay, betaz);
210 p4.
boost(betax, betay, betaz);
213 p4.
boost(newbetax, newbetay, newbetaz);
224 p4.
boost(newbetax, newbetay, newbetaz);
235 parent4.
boost(newbetax, newbetay, newbetaz);
243 G4bool returnValue =
true;
250 if ( (parent_momentum.
mag() >0.0) && (std::fabs(direction.
mag()-1.0) >1.0e-6 ) ) {
252 G4cout <<
"G4DecayProducts::IsChecked():: "
253 <<
" Momentum Direction Vector of Parent is not normalized "
254 <<
" (=" << direction.
mag() <<
")" <<
G4endl;
257 parent_momentum = parent_momentum * (1./direction.
mag());
263 G4double total_energy = parent_energy;
273 if ( (momentum.
mag()>0.0) && (std::fabs(direction.
mag()-1.0) > 1.0e-6)) {
275 G4cout <<
"G4DecayProducts::IsChecked():: "
276 <<
" Momentum Direction Vector of Daughter [" << index
277 <<
"] is not normalized (=" << direction.
mag() <<
")" <<
G4endl;
280 momentum = momentum * (1./direction.
mag());
283 if (energy - mass <
DBL_MIN ) {
285 G4cout <<
"G4DecayProducts::IsChecked():: "
286 <<
" Daughter [" << index <<
"] has no kinetic energy "<<
G4endl;
294 if ( (std::fabs(total_energy) >1.0
e-9*
MeV) || (total_momentum.
mag() >1.0e-9*
MeV ) ){
296 G4cout <<
"G4DecayProducts::IsChecked():: "
297 <<
" Energy/Momentum is not conserved "<<
G4endl;
298 G4cout <<
" difference between parent energy and sum of dughters' energy : "
299 << total_energy /
MeV <<
"[MeV] " <<
G4endl;
300 G4cout <<
" difference between parent momentum and sum of dughters' momentum : "
301 <<
" x:" << total_momentum.
getX()/
MeV
302 <<
" y:" << total_momentum.
getY()/
MeV
303 <<
" z:" << total_momentum.
getZ()/
MeV
313 G4cout <<
" ----- List of DecayProducts -----" <<
G4endl;
314 G4cout <<
" ------ Parent Particle ----------" <<
G4endl;
316 G4cout <<
" ------ Daughter Particles ------" <<
G4endl;
318 G4cout <<
" ----------" << index+1 <<
" -------------" <<
G4endl;
321 G4cout <<
" ----- End List of DecayProducts -----" <<
G4endl;