IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 3ab30bbd authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by Ralf Ulrich
Browse files

replaced hard-coded air mass by target mass

parent a1d53f40
No related branches found
No related tags found
No related merge requests found
...@@ -81,9 +81,14 @@ namespace corsika::process::interaction_counter { ...@@ -81,9 +81,14 @@ namespace corsika::process::interaction_counter {
template <typename TProjectile> template <typename TProjectile>
auto DoInteraction(TProjectile& projectile) { auto DoInteraction(TProjectile& projectile) {
using namespace units::si; using namespace units::si;
auto constexpr massAir = 15.994_GeV * (1.f - 0.7847) + 14.003_GeV * .7847; auto const massNumber = projectile.GetNode()
auto const sqrtS = sqrt(projectile.GetMass() * projectile.GetMass() + ->GetModelProperties()
massAir * massAir + 2 * projectile.GetEnergy() * massAir); .GetNuclearComposition()
.GetAverageMassNumber();
auto const massTarget = massNumber * ConvertSIToHEP(units::constants::u);
auto const massProjectile = projectile.GetMass();
auto const sqrtS = sqrt(massProjectile * massProjectile + massTarget * massTarget +
2 * massProjectile * massTarget);
if (projectile.GetPID() == corsika::particles::Code::Nucleus) { if (projectile.GetPID() == corsika::particles::Code::Nucleus) {
std::cerr << "NUCLEUS " << projectile.GetEnergy() << " " std::cerr << "NUCLEUS " << projectile.GetEnergy() << " "
...@@ -91,7 +96,7 @@ namespace corsika::process::interaction_counter { ...@@ -91,7 +96,7 @@ namespace corsika::process::interaction_counter {
<< std::endl; << std::endl;
int const A = projectile.GetNuclearA(); int const A = projectile.GetNuclearA();
int const Z = projectile.GetNuclearZ(); int const Z = projectile.GetNuclearZ();
int32_t pdg = 1'000'000'000l + Z * 10'000l + A * 10l; int32_t const pdg = 1'000'000'000l + Z * 10'000l + A * 10l;
if (nuclIntHistCMS.count(pdg) == 0) { if (nuclIntHistCMS.count(pdg) == 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