CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
ObservationVolume.hpp
1 /*
2  * (c) Copyright 2023 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/modules/writers/ObservationVolumeWriterParquet.hpp>
12 #include <corsika/framework/process/ContinuousProcess.hpp>
13 #include <corsika/framework/core/Step.hpp>
14 
15 namespace corsika {
16 
25  template <typename TTracking, typename TVolume,
26  typename TOutputWriter = ObservationVolumeWriterParquet>
28  : public ContinuousProcess<ObservationVolume<TTracking, TVolume, TOutputWriter>>,
29  public TOutputWriter {
30 
31  public:
32  ObservationVolume(TVolume vol);
33 
34  template <typename TParticle>
35  ProcessReturn doContinuous(Step<TParticle>&, bool const stepLimit);
36 
37  template <typename TParticle, typename TTrajectory>
38  LengthType getMaxStepLength(TParticle const&, TTrajectory const& vTrajectory);
39 
40  void showResults() const;
41  void reset();
42  HEPEnergyType getEnergy() const { return energy_; }
43  YAML::Node getConfig() const;
44 
45  private:
46  TVolume vol_;
47  HEPEnergyType energy_;
48  unsigned int count_;
49  };
51 } // namespace corsika
52 
53 #include <corsika/detail/modules/ObservationVolume.inl>
The ObservationVolume writes PDG codes, kinetic energy, position, and direction of particles in the o...
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 "|="