42 : atomicMass_(atomicMass), chargeNumber_(chargeNumber), momentum_(momentum)
45 >=
static_cast<std::uint32_t
>(chargeNumber),
46 "imposible particle: A = " << atomicMass_ <<
", Z = " << chargeNumber);
48 RecalculateExcitationEnergy();
68 return excitationEnergy_;
73 return excitationEnergy_ <= 0.;
76void G4FermiParticle::RecalculateExcitationEnergy()
80 if (excitationEnergy_ < 0.) {
81 if (excitationEnergy_ < -10.0 * CLHEP::eV) {
83 ed <<
"Excitation energy is too negative: " << excitationEnergy_ / CLHEP::MeV <<
" MeV";
86 excitationEnergy_ = 0.;
92 const auto oldFlags = out.flags();
93 const auto oldUserPrecision = out.precision();
95 out.setf(std::ios::floatfield);
99 out.setf(std::ios::scientific, std::ios::floatfield);
100 out << std::setprecision(3) <<
", U = " << particle.
GetExcitationEnergy() / CLHEP::MeV <<
" MeV"
101 <<
", IsGroundState = " << (particle.
IsStable() ?
"yes" :
"no") <<
", P = ("
104 <<
") MeV, E = " << particle.
GetMomentum().
t() / CLHEP::MeV <<
" MeV}"
107 out.setf(oldFlags, std::ios::floatfield);
108 out.precision(oldUserPrecision);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define FERMI_ASSERT_MSG(COND, MSG)
CLHEP::HepLorentzVector G4LorentzVector
static G4double GetNuclearMass(G4FermiAtomicMass atomicMass, G4FermiChargeNumber chargeNumber)
const G4LorentzVector & GetMomentum() const
G4double GetExcitationEnergy() const
G4FermiAtomicMass GetAtomicMass() const
G4FermiChargeNumber GetChargeNumber() const
std::ostream & operator<<(std::ostream &out, const G4FermiAtomicMass &mass)