IAP GITLAB

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

renamed sibyll::InteractionModel to sibyll::HadronInteractionModel

parent 6b6d8af2
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,9 @@
namespace corsika::sibyll {
inline void InteractionModel::setVerbose(bool const flag) { sibyll_listing_ = flag; }
inline void HadronInteractionModel::setVerbose(bool const flag) { sibyll_listing_ = flag; }
inline InteractionModel::InteractionModel()
inline HadronInteractionModel::HadronInteractionModel()
: sibyll_listing_(false) {
// initialize Sibyll
static bool initialized = false;
......@@ -32,11 +32,11 @@ namespace corsika::sibyll {
}
}
inline InteractionModel::~InteractionModel() {
inline HadronInteractionModel::~HadronInteractionModel() {
CORSIKA_LOG_DEBUG("Sibyll::Model n={}, Nnuc={}", count_, nucCount_);
}
inline bool constexpr InteractionModel::isValid(Code const projectileId,
inline bool constexpr HadronInteractionModel::isValid(Code const projectileId,
Code const targetId,
HEPEnergyType const sqrtSnn) const {
if ((minEnergyCoM_ > sqrtSnn) || (sqrtSnn > maxEnergyCoM_)) { return false; }
......@@ -57,7 +57,7 @@ namespace corsika::sibyll {
}
inline std::tuple<CrossSectionType, CrossSectionType>
InteractionModel::getCrossSectionInelEla(Code const projectileId, Code const targetId,
HadronInteractionModel::getCrossSectionInelEla(Code const projectileId, Code const targetId,
FourMomentum const& projectileP4,
FourMomentum const& targetP4) const {
......@@ -97,7 +97,7 @@ namespace corsika::sibyll {
*/
template <typename TSecondaryView>
inline void InteractionModel::doInteraction(TSecondaryView& secondaries,
inline void HadronInteractionModel::doInteraction(TSecondaryView& secondaries,
Code const projectileId,
Code const targetId,
FourMomentum const& projectileP4,
......
......@@ -9,7 +9,7 @@
#pragma once
#include <corsika/modules/sibyll/ParticleConversion.hpp>
#include <corsika/modules/sibyll/InteractionModel.hpp>
#include <corsika/modules/sibyll/HadronInteractionModel.hpp>
#include <corsika/modules/sibyll/Decay.hpp>
#include <corsika/modules/sibyll/NuclearInteractionModel.hpp>
......@@ -29,7 +29,7 @@ namespace corsika::sibyll {
* The sibyll::InteractionModel is wrapped as an InteractionProcess here in order
* to provide all the functions for ProcessSequence.
*/
class Interaction : public InteractionModel, public InteractionProcess<Interaction> {};
class Interaction : public HadronInteractionModel, public InteractionProcess<Interaction> {};
/**
* @brief sibyll::NuclearInteraction is the process for ProcessSequence.
......
......@@ -18,16 +18,16 @@
namespace corsika::sibyll {
/**
* @brief sibyll::InteractionModel provides the SIBYLL proton-nucleus interaction model.
* @brief Provides the SIBYLL hadron-nucleus interaction model.
*
* This is a TModel argument for InteractionProcess<TModel>.
*/
class InteractionModel {
class HadronInteractionModel {
public:
InteractionModel();
~InteractionModel();
HadronInteractionModel();
~HadronInteractionModel();
/**
* @brief Set the Verbose flag.
......@@ -58,9 +58,8 @@ namespace corsika::sibyll {
*
* @param projectile is the Code of the projectile
* @param target is the Code of the target
* @param sqrtSnn is the center-of-mass energy (per nucleon pair)
* @param Aprojectil is the mass number of the projectils, if it is a nucleus
* @param Atarget is the mass number of the target, if it is a nucleus
* @param projectileP4: four-momentum of projectile
* @param targetP4: four-momentum of target
*
* @return a tuple of: inelastic cross section, elastic cross section
*/
......@@ -76,9 +75,8 @@ namespace corsika::sibyll {
*
* @param projectile is the Code of the projectile
* @param target is the Code of the target
* @param sqrtSnn is the center-of-mass energy (per nucleon pair)
* @param Aprojectil is the mass number of the projectils, if it is a nucleus
* @param Atarget is the mass number of the target, if it is a nucleus
* @param projectileP4: four-momentum of projectile
* @param targetP4: four-momentum of target
*
* @return inelastic cross section
* elastic cross section
......@@ -119,4 +117,4 @@ namespace corsika::sibyll {
} // namespace corsika::sibyll
#include <corsika/detail/modules/sibyll/InteractionModel.inl>
#include <corsika/detail/modules/sibyll/HadronInteractionModel.inl>
......@@ -121,7 +121,7 @@ TEST_CASE("SibyllInterface", "modules") {
SECTION("InteractionInterface - valid targets") {
corsika::sibyll::InteractionModel model;
corsika::sibyll::HadronInteractionModel model;
// sibyll only accepts protons or nuclei with 4<=A<=18 as targets
CHECK_FALSE(model.isValid(Code::Proton, Code::Electron, 100_GeV));
CHECK(model.isValid(Code::Proton, Code::Hydrogen, 100_GeV));
......@@ -168,7 +168,7 @@ TEST_CASE("SibyllInterface", "modules") {
const HEPEnergyType P0 = 60_GeV;
MomentumVector const plab = MomentumVector(cs, {P0, 0_eV, 0_eV});
// also print particles after sibyll was called
corsika::sibyll::InteractionModel model;
corsika::sibyll::HadronInteractionModel model;
model.setVerbose(true);
HEPEnergyType const Elab = sqrt(static_pow<2>(P0) + static_pow<2>(Proton::mass));
FourMomentum const projectileP4(Elab, plab);
......@@ -202,9 +202,9 @@ TEST_CASE("SibyllInterface", "modules") {
total energy: E_tot = SQS/2 * (1+Nw) + (m_N**2-m_i**2)/(2*SQS) * (Nw-1) and P_tot
= -m_N * Plab_i / SQS * (Nw-1).
A Lorentztransformation of these quantities to the lab. frame recovers Plab_i for
A Lorentz transformation of these quantities to the lab. frame recovers Plab_i for
the total momentum, so momentum is exactly conserved, and Elab_i + Nw * m_N for the
total energy. Not surprisingly the total energy differs from the total energy before
total energy. Not surprisingly, the total energy differs from the total energy before
the collision by the mass of the additional nucleons (Nw-1)*m_N. In relative terms
the additional energy is entirely negligible and as it is not kinetic energy there
is zero influence on the shower development.
......@@ -252,7 +252,7 @@ TEST_CASE("SibyllInterface", "modules") {
HEPMomentumType const P0 = 50_TeV;
MomentumVector const plab = MomentumVector(cs, {P0, 0_eV, 0_eV});
corsika::sibyll::InteractionModel hmodel;
corsika::sibyll::HadronInteractionModel hmodel;
NuclearInteractionModel model(hmodel, *env);
CHECK(model.isValid(Code::Helium, Code::Oxygen, 100_GeV));
......
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