IAP GITLAB

Skip to content
Snippets Groups Projects

Neutrino interactions with pythia 8310

Merged Felix Riehn requested to merge neutrino-interactions-with-pythia-8245 into master
1 file
+ 32
0
Compare changes
  • Side-by-side
  • Inline
@@ -302,4 +302,36 @@ TEST_CASE("Pythia8Interface", "modules") {
{Proton::mass, {rootCS, {0_eV, 0_eV, 0_eV}}}) ==
std::make_tuple(CrossSectionType::zero(), CrossSectionType::zero()));
}
SECTION("pythia neutrino interaction") {
// this will be a nu-p collision at sqrts=3.5TeV -> no problem for pythia
auto [stackPtr, secViewPtr] = setup::testing::setup_stack(
Code::NuE, 7_TeV, (DummyEnvironment::BaseNodeType* const)nodePtr, *csPtr);
auto& view = *secViewPtr;
corsika::pythia8::NeutrinoInteraction collision(100_TeV, true);
REQUIRE(collision.isValid(
Code::NuE, Code::Proton,
{calculate_total_energy(100_TeV, NuE::mass), {rootCS, {0_eV, 0_eV, 100_TeV}}},
{Nitrogen::mass, {rootCS, {0_eV, 0_eV, 0_eV}}}));
REQUIRE(collision.getCrossSection(Code::NuE, Code::Proton,
{100_GeV, {rootCS, {0_eV, 0_eV, 100_GeV}}},
{Proton::mass, {rootCS, {0_eV, 0_eV, 0_eV}}}) !=
CrossSectionType::zero());
collision.doInteraction(
view, Code::NuE, Code::Nitrogen,
{calculate_total_energy(100_TeV, NuE::mass), {rootCS, {0_eV, 0_eV, 100_TeV}}},
{Nitrogen::mass, {rootCS, {0_eV, 0_eV, 0_eV}}});
REQUIRE(view.getSize() >= 2);
// no interaction for protons
REQUIRE(collision.getCrossSection(Code::Proton, Code::Proton,
{100_GeV, {rootCS, {0_eV, 0_eV, 100_GeV}}},
{Proton::mass, {rootCS, {0_eV, 0_eV, 0_eV}}}) ==
CrossSectionType::zero());
}
}
Loading