22 std::stringstream error_msg;
24 error_msg <<
"Deviation in Four-Momentum:\n" << std::scientific;
36 mu < 4; ++here_iter, ++rhs_iter, ++mu) {
38 error_msg <<
" P_" << mu <<
": " << *here_iter <<
" vs. " << *rhs_iter
39 <<
"; Δ_abs = " << (*here_iter - *rhs_iter) <<
"; Δ_rel = "
40 << (*here_iter - *rhs_iter) /
41 std::max(std::abs(*here_iter), std::abs(*rhs_iter))
46 error_msg <<
"Deviation in Charge:\n " <<
charge_ <<
" vs. " << rhs.
charge_
50 error_msg <<
"Deviation in Isospin 3:\n " <<
isospin3_ <<
" vs. "
54 error_msg <<
"Deviation in Strangeness:\n " <<
strangeness_ <<
" vs. "
58 error_msg <<
"Deviation in Charmness:\n " <<
charmness_ <<
" vs. "
62 error_msg <<
"Deviation in Bottomness:\n " <<
bottomness_ <<
" vs. "
66 error_msg <<
"Deviation in Baryon Number:\n " <<
baryon_number_ <<
" vs. "
69 return error_msg.str();
const_iterator cbegin() const
A container for storing conserved values.
int bottomness_
Total bottom.
int isospin3_
Total isospin-3.
FourVector momentum_
Total momentum four-vector [GeV].
int baryon_number_
Total baryon number.
int charmness_
Total charm.
int strangeness_
Total strangeness.
std::string report_deviations(const std::vector< Particles > &ensembles) const
Checks if the current particle list has still the same values and reports about differences.
bool almost_equal_physics(const N x, const N y)
Like smash::almost_equal, but using a less strict tolerance, smash::small_number.
Generic numerical functions.