IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 39fe1346 authored by ralfulrich's avatar ralfulrich
Browse files

idmass uses REAL not DOUBLE PRECISION

parent ef399c12
No related branches found
No related tags found
1 merge request!318Resolve "EPOS is missing"
...@@ -20,7 +20,7 @@ namespace corsika::epos { ...@@ -20,7 +20,7 @@ namespace corsika::epos {
if (sCode == 0) if (sCode == 0)
throw std::runtime_error("getEposMass: unknown particle!"); throw std::runtime_error("getEposMass: unknown particle!");
else { else {
double mass2; float mass2 = 0;
::epos::idmass_(sCode, mass2); ::epos::idmass_(sCode, mass2);
return sqrt(mass2) * 1_GeV; return sqrt(mass2) * 1_GeV;
} }
......
...@@ -100,7 +100,7 @@ namespace epos { ...@@ -100,7 +100,7 @@ namespace epos {
// get isospin, spin, strangeness for id // get isospin, spin, strangeness for id
void idspin_(int&, int&, int&, int&); void idspin_(int&, int&, int&, int&);
// get mass for id // get mass for id
void idmass_(int&, double&); void idmass_(int&, float&);
// convert id from one format to another // convert id from one format to another
int idtrafo_(char[3], char[3], int&); int idtrafo_(char[3], char[3], int&);
......
...@@ -70,7 +70,7 @@ TEST_CASE("Epos", "[processes]") { ...@@ -70,7 +70,7 @@ TEST_CASE("Epos", "[processes]") {
} }
SECTION("epos mass") { SECTION("epos mass") {
CHECK_FALSE(corsika::epos::getEposMass(Code::Electron) == 0_GeV); CHECK_FALSE(corsika::epos::getEposMass(Code::Electron) / 1_GeV == Approx(0));
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment