CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
RadioProcess.hpp
1 /*
2  * (c) Copyright 2022 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 #pragma once
9 
10 #include <corsika/output/BaseOutput.hpp>
11 #include <corsika/output/ParquetStreamer.hpp>
12 #include <corsika/framework/process/ContinuousProcess.hpp>
13 #include <corsika/framework/core/Step.hpp>
14 #include <corsika/setup/SetupStack.hpp>
16 
17 namespace corsika {
18 
26  template <typename TAntennaCollection, typename TRadioImpl, typename TPropagator>
28  RadioProcess<TAntennaCollection, TRadioImpl, TPropagator>>,
29  public BaseOutput {
30 
31  /*
32  * A collection of filter objects for deciding on valid particles and tracks.
33  */
34  // std::vector<std::function<bool(ParticleType&, TrackType const&)>> filters_;
35 
39  TRadioImpl& implementation();
40 
44  TRadioImpl const& implementation() const;
45 
46  protected:
47  TAntennaCollection& antennas_;
48  TPropagator propagator_;
49  unsigned int showerId_{0};
51 
52  public:
53  using axistype = std::vector<long double>;
57  RadioProcess(TAntennaCollection& antennas, TPropagator& propagator);
58 
68  template <typename Particle>
69  ProcessReturn doContinuous(Step<Particle> const& step, bool const);
70 
81  template <typename Particle, typename Track>
82  LengthType getMaxStepLength(Particle const& vParticle, Track const& vTrack) const;
83 
87  void startOfLibrary(boost::filesystem::path const& directory) final override;
88 
92  virtual void endOfShower(unsigned int const) final override;
93 
98  void endOfLibrary() final override {}
99 
103  YAML::Node getConfig() const final;
104 
105  }; // END: class RadioProcess
106 
107 } // namespace corsika
108 
109 #include <corsika/detail/modules/radio/RadioProcess.inl>
RadioProcess(TAntennaCollection &antennas, TPropagator &propagator)
Construct a new RadioProcess.
void endOfLibrary() final override
Called at the end of each library.
LengthType getMaxStepLength(Particle const &vParticle, Track const &vTrack) const
Return the maximum step length for this particle and track.
TAntennaCollection & antennas_
The radio antennas we store into.
unsigned int showerId_
The current event ID.
This class automates the construction of simple tabular Parquet files using the parquet::StreamWriter...
YAML::Node getConfig() const final
Get the configuration of this output.
Processes with continuous effects along a particle Trajectory.
ParquetStreamer output_
The parquet streamer for this process.
`, since they are used everywhere as integral part of the framework.
TPropagator propagator_
The propagator implementation.
ProcessReturn doContinuous(Step< Particle > const &step, bool const)
Perform the continuous process (radio emission).
This is the base class for all outputs so that they can be stored in homogeneous containers.
Definition: BaseOutput.hpp:21
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 "|="
Note/Warning: Tracking and Trajectory must fit together !
The base interface for radio emission processes.
void startOfLibrary(boost::filesystem::path const &directory) final override
Called at the start of each library.
virtual void endOfShower(unsigned int const) final override
Called at the end of each shower.