IAP GITLAB

Skip to content
Snippets Groups Projects
Commit f27f63e1 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

fixed InteractionHistogram::operator+()

parent f3d7da9d
No related branches found
No related tags found
No related merge requests found
Pipeline #1383 passed
......@@ -19,7 +19,6 @@ void InteractionHistogram::fill(particles::Code projectile_id,
units::si::HEPEnergyType lab_energy,
units::si::HEPEnergyType mass_target, int A, int Z) {
using namespace units::si;
if (projectile_id == particles::Code::Nucleus) {
auto const sqrtS =
sqrt(A * A * (units::constants::nucleonMass * units::constants::nucleonMass) +
......@@ -52,7 +51,6 @@ void InteractionHistogram::fill(particles::Code projectile_id,
interaction_histogram_cms_(
static_cast<corsika::particles::CodeIntType>(projectile_id), sqrtS / 1_GeV);
interaction_histogram_lab_(
static_cast<corsika::particles::CodeIntType>(projectile_id), lab_energy / 1_GeV);
}
......@@ -82,6 +80,9 @@ InteractionHistogram InteractionHistogram::operator+(InteractionHistogram other)
other.nuclear_inthist_lab_ += nuclear_inthist_lab_;
other.nuclear_inthist_cms_ += nuclear_inthist_cms_;
other.interaction_histogram_lab_ += interaction_histogram_lab_;
other.interaction_histogram_cms_ += interaction_histogram_cms_;
return other;
}
......
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