3 #include <fwk/CentralConfig.h>
5 #include <utl/config.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/Reader.h>
8 #include <utl/RectangleFilter.h>
10 #include <evt/Event.h>
11 #include <revt/REvent.h>
12 #include <revt/Station.h>
27 CentralConfig::GetInstance()->
GetTopBranch(
"RdStationBandpassFilter");
28 topBranch.
GetChild(
"LowerCutoffFrequency").
GetData(fLowerCutoffFrequency);
29 topBranch.
GetChild(
"UpperCutoffFrequency").
GetData(fUpperCutoffFrequency);
32 fFilterTypeString = topBranch.
GetChild(
"FilterType").
Get<
string>();
33 if (fFilterTypeString ==
"Rectangle") {
34 fFilterType = Rectangle;
35 fFilter =
new RectangleFilter(fLowerCutoffFrequency, fUpperCutoffFrequency, fDelay);
42 info <<
"\n Station Bandpass Filter is set up as " << fFilterTypeString
43 <<
" filter spanning " << fLowerCutoffFrequency/
megahertz
44 <<
" MHz to " << fUpperCutoffFrequency/
megahertz
45 <<
" MHz with delay of " << fDelay/
ns <<
" ns.";
58 WARNING(
"No radio event found!");
62 REvent& rEvent =
event.GetREvent();
65 for (
auto& station : rEvent.StationsRange()) {
70 complex<double> currentTransmissivity;
72 currentTransmissivity = fFilter->TransmissivityAtFrequency(station.GetFrequencyOfBin(i));
73 spectrum[i] *= currentTransmissivity;
81 RdStationBandpassFilter::Finish()
Branch GetTopBranch() const
Interface class to access to the Radio part of an event.
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Class representing a document branch.
std::vector< T >::size_type SizeType
An idealised rectangle filter.
constexpr double megahertz
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
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.