3 #include <fwk/CentralConfig.h>
4 #include <fwk/VModule.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/Reader.h>
8 #include <utl/config.h>
9 #include <utl/TraceAlgorithm.h>
10 #include <utl/AugerUnits.h>
11 #include <utl/TabulatedFunctionComplexLgAmpPhase.h>
13 #include <evt/Event.h>
14 #include <revt/Header.h>
15 #include <revt/REvent.h>
16 #include <revt/Station.h>
17 #include <revt/Channel.h>
19 #include <rdet/RDetector.h>
20 #include <rdet/Station.h>
21 #include <rdet/Channel.h>
23 #define OUT(x) if ((x) <= fInfoLevel) cerr << " "
29 using namespace boost;
39 RdChannelAmplitudeCalibrator::~RdChannelAmplitudeCalibrator()
51 OUT(
eFinal)<<
"RdChannelAmplitudeCalibrator::Init()"<< endl;
55 CentralConfig::GetInstance()->
GetTopBranch(
"RdChannelAmplitudeCalibrator");
67 WARNING(
"No radio event found!");
73 REvent& rEvent =
event.GetREvent();
80 ostringstream message;
98 message <<
"Applying calibration to channel "<< channel.
GetId() <<
" of station " << station.
GetId();
110 RdChannelAmplitudeCalibrator::Finish()
115 OUT(
eFinal) <<
"RdChannelAmplitudeCalibrator::Finish()"<<endl;
127 if ( (freq>=response.
XFront()) && (freq<=response.
XBack()) ) {
128 channelspectrum[i] *= response.
Y(freq);
Branch GetTopBranch() const
int GetId() const
Return Id of the Channel.
Report success to RunController.
ArrayConstReference XBack() const
read-only reference to back of array of X
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...
Class to hold collection (x,y) points and provide interpolation between them.
StationIterator StationsEnd()
StationIterator StationsBegin()
void Init()
Initialise the registry.
Detector description interface for Channel-related data.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
ChannelIterator ChannelsBegin()
begin Channel iterator for read/write
boost::filter_iterator< StationFilter, AllStationIterator > StationIterator
Iterator over all (non-exculded) stations.
const utl::TabulatedFunction & GetCalibrationFunction() const
Get a TabulatedFunction with calibration factors for the frequency bins of the Channel, not yet implemented.
ChannelIterator ChannelsEnd()
end Channel iterator for read/write
Class representing a document branch.
class to hold data at the radio Station level.
ArrayConstReference XFront() const
read-only reference to front of array of X
std::vector< std::complex< double > >::size_type SizeType
Top of the hierarchy of the detector description interface.
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
int GetId() const
Get the station Id.
ResultFlag
Flag returned by module methods to the RunController.
void ApplyResponse(revt::Channel &channel, const utl::TabulatedFunction &response) const
ChannelFrequencySpectrum & GetChannelFrequencySpectrum()
retrieve Channel Frequency Spectrum (write access, only use this if you intend to change the data) ...
double GetFrequencyOfBin(const ChannelFrequencySpectrum::SizeType bin) const
Get the frequency corresponding to a bin of the frequency spectrum.
Class that holds the data associated to an individual radio channel.
const rdet::RDetector & GetRDetector() const
double Y(const double x) const
Get or interpolate the Y value that corresponds to parameter x.
const Station & GetStation(const int stationId) const
Get station by Station Id.