CORSIKA  @c8_version@
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>
14 
15 namespace corsika {
16 
32  template <class TCountedProcess>
34  : public InteractionProcess<InteractionCounter<TCountedProcess>> {
35 
36  public:
37  InteractionCounter(TCountedProcess& process);
38 
42  template <typename TSecondaryView>
43  void doInteraction(TSecondaryView& view, Code const, Code const, FourMomentum const&,
44  FourMomentum const&);
45 
49  CrossSectionType getCrossSection(Code const, Code const, FourMomentum const&,
50  FourMomentum const&) const;
51 
57  InteractionHistogram const& getHistogram() const;
58 
59  private:
60  TCountedProcess& process_;
61  InteractionHistogram histogram_;
62  };
63 
65 
66 } // namespace corsika
67 
68 #include <corsika/detail/framework/process/InteractionCounter.inl>
CrossSectionType getCrossSection(Code const, Code const, FourMomentum const &, FourMomentum const &) const
Wrapper around internal process getCrossSection.
void doInteraction(TSecondaryView &view, Code const, Code const, FourMomentum const &, FourMomentum const &)
Wrapper around internal process doInteraction.
InteractionHistogram const & getHistogram() const
returns the filles histograms.
Description of physical four-vectors.
Definition: FourVector.hpp:51
`, since they are used everywhere as integral part of the framework.
Wrapper around an InteractionProcess that fills histograms of the number of calls to doInteraction() ...
Process describing the interaction of particles.
General FourVector object.
Class that creates and stores histograms of collisions , which is used by class InteractionCounter.