IAP GITLAB

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

adapted testInteractionCounter

parent 0a3c8299
No related branches found
No related tags found
No related merge requests found
...@@ -126,12 +126,13 @@ TEST_CASE("InteractionCounter") { ...@@ -126,12 +126,13 @@ TEST_CASE("InteractionCounter") {
auto const ret = countedProcess.DoInteraction(*secViewPtr); auto const ret = countedProcess.DoInteraction(*secViewPtr);
REQUIRE(ret == nullptr); REQUIRE(ret == nullptr);
auto const& h = countedProcess.GetHistogram().labHists().second.at(1'000'070'140); auto const& h = countedProcess.GetHistogram().labHist();
REQUIRE(h.at(50) == 1); REQUIRE(h.at(h.axis(0).index(1'000'070'140), h.axis(1).index(1.05e14)) == 1);
REQUIRE(std::accumulate(h.cbegin(), h.cend(), 0) == 1); REQUIRE(std::accumulate(h.cbegin(), h.cend(), 0) == 1);
auto const& h2 = countedProcess.GetHistogram().CMSHists().second.at(1'000'070'140); auto const& h2 = countedProcess.GetHistogram().CMSHist();
REQUIRE(h2.at(32) == 1); // bin 1.584 .. 1.995 TeV √s REQUIRE(h2.at(h2.axis(0).index(1'000'070'140), h2.axis(1).index(1.6e12)) == 1);
// REQUIRE(h2.at(1'000'070'140, 92) == 1); // bin 1.584 .. 1.995 TeV √s
REQUIRE(std::accumulate(h2.cbegin(), h2.cend(), 0) == 1); REQUIRE(std::accumulate(h2.cbegin(), h2.cend(), 0) == 1);
} }
...@@ -145,12 +146,12 @@ TEST_CASE("InteractionCounter") { ...@@ -145,12 +146,12 @@ TEST_CASE("InteractionCounter") {
auto const ret = countedProcess.DoInteraction(*secViewPtr); auto const ret = countedProcess.DoInteraction(*secViewPtr);
REQUIRE(ret == nullptr); REQUIRE(ret == nullptr);
auto const& h = countedProcess.GetHistogram().labHists().first; auto const& h = countedProcess.GetHistogram().labHist();
REQUIRE(h.at(codeInt, 50) == 1); REQUIRE(h.at(h.axis(0).index(3122), h.axis(1).index(1.05e14)) == 1);
REQUIRE(std::accumulate(h.cbegin(), h.cend(), 0) == 1); REQUIRE(std::accumulate(h.cbegin(), h.cend(), 0) == 1);
auto const& h2 = countedProcess.GetHistogram().CMSHists().first; auto const& h2 = countedProcess.GetHistogram().CMSHist();
REQUIRE(h2.at(codeInt, 32) == 1); // bin 1.584 .. 1.995 TeV √s REQUIRE(h2.at(h2.axis(0).index(3122), h2.axis(1).index(1.6e12)) == 1);
REQUIRE(std::accumulate(h2.cbegin(), h2.cend(), 0) == 1); REQUIRE(std::accumulate(h2.cbegin(), h2.cend(), 0) == 1);
} }
} }
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