CORSIKA  @c8_version@
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/ParticleWriterParquet.hpp>
15 #include <corsika/modules/writers/WriterOff.hpp>
16 #include <corsika/framework/core/Step.hpp>
17 
18 namespace corsika {
19 
38  template <typename TTracking, typename TOutput = ParticleWriterParquet>
39  class ObservationPlane : public ContinuousProcess<ObservationPlane<TTracking, TOutput>>,
40  public TOutput {
41 
42  using TOutput::write;
43 
44  public:
54  template <typename... TArgs>
55  ObservationPlane(Plane const& plane, DirectionVector const& x_dir,
56  bool const absorbing = true, TArgs&&... outputArgs);
57 
58  ~ObservationPlane() {}
59 
60  template <typename TParticle>
61  ProcessReturn doContinuous(Step<TParticle>&, bool const stepLimit);
62 
63  template <typename TParticle, typename TTrajectory>
64  LengthType getMaxStepLength(TParticle const&, TTrajectory const& vTrajectory);
65 
66  YAML::Node getConfig() const;
67 
68  private:
69  Plane const plane_;
70  DirectionVector const xAxis_;
71  DirectionVector const yAxis_;
72  bool const deleteOnHit_;
73  };
75 } // namespace corsika
76 
77 #include <corsika/detail/modules/ObservationPlane.inl>
ObservationPlane(Plane const &plane, DirectionVector const &x_dir, bool const absorbing=true, TArgs &&... outputArgs)
Construct a new Observation Plane object.
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.
`, 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 "|="