CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
NuclearInteractionModel.hpp
1 /*
2  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
12 #include <corsika/framework/random/RNGManager.hpp>
14 
15 namespace corsika::sibyll {
16 
25  template <class TNucleonModel>
27 
28  public:
29  template <class TEnvironment>
30  NuclearInteractionModel(TNucleonModel&, TEnvironment const&);
31 
33 
34  bool constexpr isValid(Code const projectileId, Code const targetId,
35  HEPEnergyType const sqrtSnn) const;
36 
37  template <class TEnvironment>
38  void initializeNuclearCrossSections(TEnvironment const&);
39 
40  void printCrossSectionTable(Code) const;
41  CrossSectionType readCrossSectionTable(int const, Code const,
42  HEPEnergyType const) const;
43  HEPEnergyType getMinEnergyPerNucleonCoM() const { return gMinEnergyPerNucleonCoM_; }
44  HEPEnergyType getMaxEnergyPerNucleonCoM() const { return gMaxEnergyPerNucleonCoM_; }
45  unsigned int constexpr getMaxNucleusAProjectile() const {
46  return gMaxNucleusAProjectile_;
47  }
48  unsigned int constexpr getMaxNFragments() const { return gMaxNFragments_; }
49  unsigned int constexpr getNEnergyBins() const { return gNEnBins_; }
50 
51  CrossSectionType getCrossSection(Code const, Code const,
52  FourMomentum const& projectileP4,
53  FourMomentum const& targetP4) const;
54 
55  template <typename TSecondaryView>
56  void doInteraction(TSecondaryView&, Code const, Code const,
57  FourMomentum const& projectileP4, FourMomentum const& targetP4);
58 
59  private:
60  int count_ = 0;
61  int nucCount_ = 0;
62 
63  TNucleonModel& hadronicInteraction_;
64  std::map<Code, int> targetComponentsIndex_;
65  default_prng_type& RNG_ = RNGManager<>::getInstance().getRandomStream("sibyll");
66  static unsigned int constexpr gNSample_ =
67  500; // number of samples in MC estimation of cross section
68  static unsigned int constexpr gMaxNucleusAProjectile_ = 56;
69  static unsigned int constexpr gNEnBins_ = 6;
70  static unsigned int constexpr gMaxNFragments_ = 60;
71  // energy limits defined by table used for cross section in signuc.f
72  // 10**1 GeV to 10**6 GeV
73  static HEPEnergyType constexpr gMinEnergyPerNucleonCoM_ = 10. * 1e9 * electronvolt;
74  static HEPEnergyType constexpr gMaxEnergyPerNucleonCoM_ = 1.e6 * 1e9 * electronvolt;
75  };
76 
77 } // namespace corsika::sibyll
78 
79 #include <corsika/detail/modules/sibyll/NuclearInteractionModel.inl>
The sibyll::NuclearInteractionModel provides the SIBYLL semi superposition model. ...
Description of physical four-vectors.
Definition: FourVector.hpp:51
Interface to particle properties.
General FourVector object.
prng_type & getRandomStream(string_type const &streamName)