RadioSimulation.h
Go to the documentation of this file.
1 #ifndef _evt_RadioSimulation_h_
2 #define _evt_RadioSimulation_h_
3 
4 #include <evt/SimRadioPulse.h>
5 #include <utl/LameShadowPtr.h>
6 #include <utl/Point.h>
7 #include <utl/TimeStamp.h>
8 #include <utl/Validated.h>
9 #include <fwk/LocalCoordinateSystem.h>
10 #include <vector>
11 
12 
13 namespace evt {
14  // forward declaration for friendship
15  class ShowerSimData;
16 }
17 
18 namespace io {
19  class RadioSimulation_ROOT;
20 }
21 
22 namespace evt {
23 
37 
38  public:
39  typedef std::vector<SimRadioPulse>::const_iterator PulseIterator;
40 
41  // PulseIterator FirstPulse() { return fPulseIter.Get().begin(); }
42  // PulseIterator LastPulse() { return fPulseIter.Get().end(); }
44  // const SimRadioPulse& GetSimRadioPulse();
45 
46  const SimRadioPulse& GetSimPulseByIndex(const int index);
47 
48  bool HasSimPulseByIndex(const int index) { return -1 < index && index < int(fSimRadioPulseVector.size()); }
49 
51  long GetNumPulses() const { return fSimRadioPulseVector.size(); }
52 
53  bool HasCorePosition() const { return fCorePosition.IsValid(); }
54 
57 
58 //#warning this interface is implicitly assuming x,y,z is in detector cs
60  void SetCoreCoordinates(const double x, const double y, const double z);
61 
63  void SetCorePosition(const utl::Point& core);
64 
67 
69  int GetRunNumber() const { return fRunNumber; }
70 
72  void SetRunNumber(const int runnum) { fRunNumber = runnum; }
73 
75  int GetEventNumber() const { return fEventNumber; }
76 
78  void SetEventNumber(const int eventnum) { fEventNumber = eventnum; }
79 
81  const utl::TimeStamp& GetEventTime() const { return fEventTime; }
82 
84  void SetEventTime(const utl::TimeStamp& t) { fEventTime = t; }
85 
87  void AddSimRadioPulse(const SimRadioPulse& rp) { fSimRadioPulseVector.push_back(rp); }
88 
91 
94 
95  // Set refractive index at sea level specified in *.reas file
97 
98  // Get refractive index at sea level specified in *.reas file
100 
101  void SetRadiationEnergy(const double radiationEnergy) { fRadiationEnergy = radiationEnergy; }
102 
103  double GetRadiationEnergy() const { return fRadiationEnergy; }
104 
105  private:
108 
110  int fRunNumber = -1;
111  int fEventNumber = -1;
113 
115  double fRadiationEnergy = 0;
116 
118 
120  std::vector<SimRadioPulse> fSimRadioPulseVector;
122 
123  friend class evt::ShowerSimData;
126  };
127 
128 }
129 
130 
131 #endif
void SetCorePosition(const utl::Point &core)
Set the core position of the RadioSimulation using an utl::Point.
Point object.
Definition: Point.h:32
const SimRadioPulse & GetSimPulseByIndex(const int index)
int GetEventNumber() const
Get the event number of the RadioSimulation.
Data structure for simulated Radio pulses.
Definition: SimRadioPulse.h:29
Data structure for a radio simulation (including several SimRadioPulses)
void SetRefractiveIndexAtSeaLevel(const double n)
bool ok(bool okay)
Definition: testlib.cc:89
void SetRunNumber(const int runnum)
Set the run number of the RadioSimulation.
utl::Validated< utl::CoordinateSystemPtr > fLocalCoordinateSystem
double GetRefractiveIndexAtSeaLevel() const
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
void SetEventNumber(const int eventnum)
Set the event number of the RadioSimulation.
utl::Validated< PulseIterator > fPulseIter
Interface class to access Shower Simulated parameters.
Definition: ShowerSimData.h:49
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
utl::Validated< utl::Point > fCorePosition
ROOT wise implementation of streaming for class RadioSimulation.
utl::Point GetCorePosition() const
Get the core position of the RadioSimulation as a utl::Point.
void SetEventTime(const utl::TimeStamp &t)
Set the event time of the RadioSimulation.
void SetRadiationEnergy(const double radiationEnergy)
bool HasCorePosition() const
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
get local coordinate system anchored at the core position
void SetCoreCoordinates(const double x, const double y, const double z)
Set the core position coordinates of the RadioSimulation.
bool IsValid() const
Definition: Validated.h:64
utl::TimeStamp fEventTime
void AddSimRadioPulse(const SimRadioPulse &rp)
Add a radio pulse to the RadioSimulation.
std::vector< SimRadioPulse > fSimRadioPulseVector
stl-vector holding the radio pulses contained in the RadioSimulation
const SimRadioPulse & GetNextSimRadioPulse(bool &ok)
const utl::TimeStamp & GetEventTime() const
Get the event time of the RadioSimulation.
bool GoToFirstSimRadioPulse()
Jump to the first SimRadioPulse, returns false if the vector is empty.
bool HasSimPulseByIndex(const int index)
void ClearSimRadioPulses()
Erase all radio pulses from the RadioSimulation.
int GetRunNumber() const
Get the run number of the RadioSimulation.
long GetNumPulses() const
Get the number of radio pulses contained in the RadioSimulation.
double GetRadiationEnergy() const
std::vector< SimRadioPulse >::const_iterator PulseIterator

, generated on Tue Sep 26 2023.