CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
InteractionCounter.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 
11 #include <corsika/framework/process/InteractionHistogram.hpp>
12 #include <corsika/framework/process/InteractionProcess.hpp>
13 
14 namespace corsika {
15 
31  template <class TCountedProcess>
33  : public InteractionProcess<InteractionCounter<TCountedProcess>> {
34 
35  public:
36  InteractionCounter(TCountedProcess& process);
37 
39  template <typename TSecondaryView>
40  void doInteraction(TSecondaryView& view);
41 
43  template <typename TParticle>
44  GrammageType getInteractionLength(TParticle const& particle) const;
45 
49  InteractionHistogram const& getHistogram() const;
50 
51  private:
52  TCountedProcess& process_;
53  InteractionHistogram histogram_;
54  };
55 
57 
58 } // namespace corsika
59 
60 #include <corsika/detail/framework/process/InteractionCounter.inl>
InteractionHistogram const & getHistogram() const
returns the filles histograms
class "quantity" is the heart of the library.
Definition: quantity.hpp:54
GrammageType getInteractionLength(TParticle const &particle) const
! returns internal process getInteractionLength
The cascade namespace assembles all objects needed to simulate full particles cascades.
void doInteraction(TSecondaryView &view)
wrapper around internall process doInteraction
Process describing the interaction of particles.
Class that creates and stores histograms of collisions , which is used by class InteractionCounter.