CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
Antenna.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 <boost/filesystem.hpp>
11 #include <corsika/framework/geometry/Point.hpp>
12 #include <corsika/framework/core/PhysicalGeometry.hpp>
13 #include <corsika/output/ParquetStreamer.hpp>
14 
15 namespace corsika {
16 
24  template <typename TAntennaImpl>
25  class Antenna {
26 
27  protected:
28  std::string const name_;
29  Point const location_;
31 
32  public:
33  using axistype = std::vector<long double>;
34 
42  Antenna(std::string const& name, Point const& location,
43  CoordinateSystemPtr const& coordinateSystem);
44 
52  template <typename... TVArgs>
53  void receive(TVArgs&&... args);
54 
58  Point const& getLocation() const;
59 
65  std::string const& getName() const;
66 
70  void reset();
71 
78  axistype getAxis() const;
79 
86  std::vector<double> const& getWaveformX() const;
87 
94  std::vector<double> const& getWaveformY() const;
95 
102  std::vector<double> const& getWaveformZ() const;
103 
107  TAntennaImpl& implementation();
108 
109  }; // END: class Antenna final
110 
111 } // namespace corsika
112 
113 #include <corsika/detail/modules/radio/antennas/Antenna.inl>
std::string const & getName() const
Get the name of this name antenna.
void reset()
Reset the antenna before starting a new simulation.
Point const & getLocation() const
Get the location of this antenna.
axistype getAxis() const
Return a reference to the x-axis labels (i.e.
std::vector< double > const & getWaveformY() const
Return a reference to the underlying waveform data for Y polarization.
std::vector< double > const & getWaveformZ() const
Return a reference to the underlying waveform data for Z polarization.
void receive(TVArgs &&... args)
Receive a signal at this antenna.
std::string const name_
The name/identifier of this antenna.
Definition: Antenna.hpp:28
CoordinateSystemPtr const coordinateSystem_
The coordinate system of the antenna.
Definition: Antenna.hpp:30
Point const location_
The location of this antenna.
Definition: Antenna.hpp:29
std::vector< double > const & getWaveformX() const
Return a reference to the underlying waveform data for X polarization.
`, since they are used everywhere as integral part of the framework.
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
TAntennaImpl & implementation()
Get a reference to the underlying radio implementation.
Antenna(std::string const &name, Point const &location, CoordinateSystemPtr const &coordinateSystem)
Construct a base antenna instance.
A common abstract interface for radio antennas.
Definition: Antenna.hpp:25