51 :numberOfProducts(0),theParentParticle(0)
57 :numberOfProducts(0),theParentParticle(0)
137 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;
291 total_momentum -= momentum;
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;
319 G4cout <<
" ----------" << index+1 <<
" -------------" <<
G4endl;
322 G4cout <<
" ----- End List of DecayProducts -----" <<
G4endl;
G4int PushProducts(G4DynamicParticle *aParticle)
static constexpr double MeV
const G4ThreeVector & GetMomentumDirection() const
G4DynamicParticle * theParentParticle
G4DecayProducts & operator=(const G4DecayProducts &right)
G4DynamicParticle * PopProducts()
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
void SetPreAssignedDecayProperTime(G4double)
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetPreAssignedDecayProperTime() const
const G4DecayProducts * GetPreAssignedDecayProducts() const
void SetPreAssignedDecayProducts(G4DecayProducts *aDecayProducts)
std::vector< G4DynamicParticle * > G4DecayProductVector
G4GLOB_DLL std::ostream G4cout
void SetParentParticle(const G4DynamicParticle &aParticle)
G4double GetTotalMomentum() const
G4double GetTotalEnergy() const
G4DecayProductVector * theProductVector
void DumpInfo(G4int mode=0) const
G4DynamicParticle * operator[](G4int anIndex) const
HepLorentzVector & boost(double, double, double)