CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
BetheBlochPDG.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/geometry/Point.hpp>
13 #include <corsika/framework/geometry/Vector.hpp>
14 #include <corsika/framework/process/ContinuousProcess.hpp>
15 #include <corsika/framework/core/Step.hpp>
16 
17 #include <corsika/modules/writers/WriterOff.hpp>
18 
19 #include <map>
20 
21 namespace corsika {
22 
38  template <typename TOutput = WriterOff>
39  class BetheBlochPDG : public ContinuousProcess<BetheBlochPDG<TOutput>>, public TOutput {
40 
41  using MeVgcm2 = decltype(1e6 * electronvolt / gram * square(1e-2 * meter));
42 
43  public:
44  template <typename... TOutputArgs>
45  BetheBlochPDG(TOutputArgs&&... args);
46 
56  template <typename TParticle>
57  ProcessReturn doContinuous(Step<TParticle>& step, bool const limitFlag);
58 
59  template <typename TParticle, typename TTrajectory>
60  LengthType getMaxStepLength(TParticle const&, TTrajectory const&) const;
61 
62  template <typename TParticle>
63  static HEPEnergyType getBetheBloch(TParticle const&, const GrammageType);
64 
65  template <typename TParticle>
66  static HEPEnergyType getRadiationLosses(TParticle const&, const GrammageType);
67 
68  template <typename TParticle>
69  static HEPEnergyType getTotalEnergyLoss(TParticle const&, const GrammageType);
70 
71  YAML::Node getConfig() const override;
72  };
73 
74 } // namespace corsika
75 
76 #include <corsika/detail/modules/energy_loss/BetheBlochPDG.inl>
PDG2018, passage of particles through matter.
Import and extend the phys::units package.
Processes with continuous effects along a particle Trajectory.
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 "|="
ProcessReturn doContinuous(Step< TParticle > &step, bool const limitFlag)
Interface function of ContinuousProcess.