CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
HistoryObservationPlane.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/geometry/Plane.h>
12 #include <corsika/process/ContinuousProcess.h>
13 #include <corsika/units/PhysicalUnits.h>
14 
15 #include <boost/histogram.hpp>
16 
17 #include <functional>
18 
19 // the detail namespace: here the histrograms are defined
21 #include <corsika/detail/stack/history/HistoryObservationPlane.hpp>
22 
23 namespace corsika::history {
24 
25  template <typename TStack>
27  : public ContinuousProcess<HistoryObservationPlane<TStack>> {
28  public:
29  HistoryObservationPlane(TStack const&, Plane const&, bool = true);
30 
31  template <typename TParticle, typename TTrajectory>
32  LengthType getMaxStepLength(TParticle const&, TTrajectory const& vTrajectory);
33 
34  template <typename TParticle, typename TTrajectory>
35  ProcessReturn doContinuous(TParticle const& vParticle,
36  TTrajectory const& vTrajectory);
37 
38  auto const& histogram() const { return histogram_; }
39 
40  private:
41  template <typename TParticle>
42  void fillHistoryHistogram(TParticle const&);
43 
44  TStack const& stack_;
45  Plane const plane_;
46  bool const deleteOnHit_;
47 
48  decltype(detail::hist_factory()) histogram_ = detail::hist_factory();
49  };
50 } // namespace corsika::history
51 
52 #include <corsika/detail/stack/history/HistoryObservationPlane.inl>
Processes with continuous effects along a particle Trajectory.
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 "|="