CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
ObservationPlane.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/Plane.hpp>
13 #include <corsika/framework/process/ContinuousProcess.hpp>
14 #include <corsika/modules/writers/ObservationPlaneWriterParquet.hpp>
15 
16 namespace corsika {
17 
33  template <typename TTracking, typename TOutputWriter = ObservationPlaneWriterParquet>
35  : public ContinuousProcess<ObservationPlane<TTracking, TOutputWriter>>,
36  public TOutputWriter {
37 
38  public:
39  ObservationPlane(Plane const&, DirectionVector const&, bool = true);
40 
41  template <typename TParticle, typename TTrajectory>
42  ProcessReturn doContinuous(TParticle& vParticle, TTrajectory& vTrajectory,
43  bool const stepLimit);
44 
45  template <typename TParticle, typename TTrajectory>
46  LengthType getMaxStepLength(TParticle const&, TTrajectory const& vTrajectory);
47 
48  void showResults() const;
49  void reset();
50  HEPEnergyType getEnergyGround() const { return energy_ground_; }
51  YAML::Node getConfig() const;
52 
53  private:
54  Plane const plane_;
55  bool const deleteOnHit_;
56  HEPEnergyType energy_ground_;
57  unsigned int count_ground_;
58  DirectionVector const xAxis_;
59  DirectionVector const yAxis_;
60  };
62 } // namespace corsika
63 
64 #include <corsika/detail/modules/ObservationPlane.inl>
Import and extend the phys::units package.
The ObservationPlane writes PDG codes, energies, and distances of particles to the central point of t...
Processes with continuous effects along a particle Trajectory.
The cascade namespace assembles all objects needed to simulate full particles cascades.
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 "|="