CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
HadronicElasticModel.hpp
1 /*
2  * (c) Copyright 2020 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>
13 
16 
17 namespace corsika {
18 
30  : public InteractionProcess<HadronicElasticInteraction> {
31  private:
32  using SquaredHEPEnergyType = decltype(HEPEnergyType() * HEPEnergyType());
33 
34  using eV2 = decltype(square(electronvolt));
35  using inveV2 = decltype(1 / square(electronvolt));
36 
37  inveV2 B(eV2 s) const;
38  CrossSectionType getCrossSection(SquaredHEPEnergyType s) const;
39 
40  public:
41  HadronicElasticInteraction( // x & y values taken from DL for pp collisions
42  CrossSectionType x = 0.0217 * barn, CrossSectionType y = 0.05608 * barn);
43 
44  template <typename TParticle>
45  GrammageType getInteractionLength(TParticle const& p);
46 
47  template <typename TParticle>
48  ProcessReturn doInteraction(TParticle&);
49 
50  private:
51  CrossSectionType parX_, parY_;
52 
53  static double constexpr gfEpsilon = 0.0808;
54  static double constexpr gfEta = 0.4525;
55  // Froissart-Martin is not violated up for sqrt s < 10^32 eV with these values [DL].
56 
57  default_prng_type& RNG_ =
58  RNGManager<>::getInstance().getRandomStream("HadronicElasticModel");
59  };
60 
61 } // namespace corsika
62 
63 #include <corsika/detail/modules/HadronicElasticModel.inl>
Import and extend the phys::units package.
A simple model for elastic hadronic interactions based on the formulas in Gaisser, Engel, Resconi, Cosmic Rays and Particle Physics (Cambridge Univ.
constexpr detail::Power< D, 2, X > square(quantity< D, X > const &x)
square.
Definition: quantity.hpp:650
`, since they are used everywhere as integral part of the framework.
ProcessReturn
since in a process sequence many status updates can accumulate for a single particle, this enum should define only bit-flags that can be accumulated easily with "|="
Constants are defined with static units, based on the package (namespace) phys::units, imported in PhysicsUnits.hpp.
Interface to particle properties.
Process describing the interaction of particles.
prng_type & getRandomStream(string_type const &streamName)