11 #include <fwk/CentralConfig.h>
12 #include <fwk/VModule.h>
13 #include <fwk/CoordinateSystemRegistry.h>
15 #include <utl/ErrorLogger.h>
16 #include <utl/Reader.h>
20 #include <utl/PhysicalConstants.h>
21 #include <utl/TimeStamp.h>
22 #include <utl/TimeInterval.h>
24 #include <det/Detector.h>
25 #include <rdet/RDetector.h>
27 #include <evt/Event.h>
28 #include <evt/ShowerRecData.h>
29 #include <evt/ShowerRRecData.h>
31 #include <revt/REvent.h>
33 #include <revt/Station.h>
53 RdStationBeamFormer::~RdStationBeamFormer()
67 INFO(
"RdStationBeamFormer::Init()");
72 CentralConfig::GetInstance()->
GetTopBranch(
"RdStationBeamFormer");
87 INFO(
"RdStationBeamFormer::Run()");
92 WARNING(
"No radio event found!");
97 REvent& rEvent =
event.GetREvent();
102 WARNING(
"At least 2 stations are needed for beam forming!");
106 const det::Detector& detector = det::Detector::GetInstance();
111 ERROR(
"No shower reconstruction found, but needed as input.");
119 ERROR(
"No radio reconstruction (e.g. from RDPlaneFit) found, but needed as input.");
128 stringstream fMessage;
129 fMessage <<
"Output of core and axis: (work in progress) ";
131 INFO(fMessage.str());
143 TimeStamp stationTimeStamp = station.GetTraceStartTime();
144 TimeInterval timeStampDelay = stationTimeStamp-firstTimeStamp;
150 const double distance = vStationPosition * axis;
155 fMessage <<
"Distance of Station: "
157 <<
" m; \t geom. Delay: "
159 <<
" ns; \t TimeStampDelay: "
163 INFO(fMessage.str());
165 const TimeInterval totalDelay = timeStampDelay + geomDelay;
173 RdStationBeamFormer::Finish()
179 INFO(
"RdStationBeamFormer::Finish()");
Branch GetTopBranch() const
utl::Vector GetAxis() const
Returns vector of the shower axis.
StationFrequencySpectrum & GetStationFrequencySpectrum()
retrieve Station Frequency Spectrum (write access, only use this if you intend to change the data) ...
Report success to RunController.
Detector description interface for Station-related data.
double GetFrequencyOfBin(const StationFrequencySpectrum::SizeType bin) const
Get the frequency corresponding to a bin of the frequency spectrum.
Interface class to access Shower Reconstructed parameters.
bool HasRecShower() const
Interface class to access to the Radio part of an event.
Skip remaining modules in the current loop and continue with next iteration of the loop...
Interface class to access to the RD Reconstruction of a Shower.
#define INFO(message)
Macro for logging informational messages.
StationIterator StationsEnd()
StationIterator StationsBegin()
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
boost::filter_iterator< StationFilter, AllStationIterator > StationIterator
Iterator over all (non-exculded) stations.
ShowerRRecData & GetRRecShower()
A TimeStamp holds GPS second and nanosecond for some event.
Detector description interface for RDetector-related data.
Class representing a document branch.
class to hold data at the radio Station level.
std::vector< T >::size_type SizeType
constexpr double nanosecond
bool HasRRecShower() const
Top of the hierarchy of the detector description interface.
int GetNumberOfStations() const
Get total number of stations in the event.
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
double GetInterval() const
Get the time interval as a double (in Auger base units)
constexpr double kSpeedOfLight
A TimeInterval is used to represent time elapsed between two events.
ResultFlag
Flag returned by module methods to the RunController.
Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h.
utl::Point GetCorePosition() const
returns pointer of the position vector of the core in the reference coor system
const rdet::RDetector & GetRDetector() const
utl::Point GetPosition() const
Tank position in Site Cartesian Coordinates.
#define ERROR(message)
Macro for logging error messages.
const Station & GetStation(const int stationId) const
Get station by Station Id.