3 #include <fwk/CentralConfig.h>
4 #include <fwk/MagneticFieldModel.h>
6 #include <utl/config.h>
7 #include <utl/ErrorLogger.h>
8 #include <utl/Reader.h>
10 #include <utl/Vector.h>
11 #include <utl/Point.h>
12 #include <utl/BasicVector.h>
13 #include <utl/GeometryUtilities.h>
14 #include <utl/RadioGeometryUtilities.h>
15 #include <utl/CoordinateSystemPtr.h>
16 #include <utl/AxialVector.h>
18 #include <evt/Event.h>
19 #include <evt/ShowerRecData.h>
20 #include <evt/ShowerSRecData.h>
21 #include <evt/ShowerRRecData.h>
23 #include <revt/REvent.h>
24 #include <revt/Station.h>
25 #include <revt/Header.h>
26 #include <revt/StationRecData.h>
28 #include <det/Detector.h>
29 #include <rdet/RDetector.h>
30 #include <det/VManager.h>
45 fMeanAsymmetryError(0.),
46 fAsymmetryParametrization(
""),
47 fAsymmetryDefinition(
"Mean")
51 RdLDFChargeExcessCorrector::~RdLDFChargeExcessCorrector()
57 INFO(
"RdLDFChargeExcessCorrector::Init()");
76 WARNING(
"No radio event found!");
80 REvent& rEvent =
event.GetREvent();
85 WARNING(
"No core or axis. Charge-excess correction is not performed.");
92 const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
110 const double geomag_angle =
utl::Angle(localMagneticField,showerAxis);
131 double magx(0), magy(0), magz(0);
135 const double t_angle = atan2(magy,magx);
139 double eps_err = 0.0;
167 eps = asymm_parametrization->Eval(dist);
170 asymm_parametrization->Delete();
178 double A0 = Amp /
sqrt(
pow(eps,2) + 2*eps*cos(t_angle)*sin(geomag_angle) +
pow(sin(geomag_angle),2));
179 double A0_err =
sqrt(
pow(Amp_err /
sqrt(
pow(eps,2) + 2*eps*cos(t_angle)*sin(geomag_angle) +
pow(sin(geomag_angle),2)),2)
180 +
pow( (eps_err * Amp * (eps + eps*cos(t_angle)*sin(geomag_angle)) ) / (
pow(
pow(eps,2) + 2*eps*cos(t_angle)*sin(geomag_angle)
181 +
pow(sin(geomag_angle),2),1.5) ) ,2) );
192 INFO(
"RdLDFChargeExcessCorrector::Finish()");
Branch GetTopBranch() const
Class to access station level reconstructed data.
utl::Vector GetAxis() const
Returns vector of the shower axis.
void SetParameterError(Parameter i, double value, bool lock=true)
static double GetDistanceToAxis(const utl::Vector &ShowerAxis, const utl::Point &CorePosition, const utl::Point &AntennaPosition)
computes the distance from the antenna position to the shower "line" defined by the core position and...
boost::filter_iterator< CandidateStationFilter, AllStationIterator > CandidateStationIterator
Iterator over all CandidateStations (i.e., HasSignal, HasNoSignal)
Report success to RunController.
StationRecData & GetRecData()
Get station level reconstructed data.
CandidateStationIterator CandidateStationsEnd()
Interface class to access to the Radio part of an event.
ShowerRecData & GetRecShower()
Interface class to access to the RD Reconstruction of a Shower.
double GetParameterError(const Parameter i) const
bool HasCorePosition() const
Return true if all 3 core parameter are set.
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
bool GetPulseFound() const
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
double pow(const double x, const unsigned int i)
ShowerRRecData & GetRRecShower()
Detector description interface for RDetector-related data.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
utl::Point GetCoordinateOrigin() const
class to hold data at the radio Station level.
bool HasAxis() const
Return true if all 3 axis parameter are set.
double fMeanAsymmetryError
double GetX(const CoordinateSystemPtr &coordinateSystem) const
static MagneticFieldModel & instance()
static utl::Vector GetMagneticFieldVector(const utl::Point &position, const utl::TimeStamp &time)
returns the magnetic field at a specific place at a specific time
CandidateStationIterator CandidateStationsBegin()
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
std::string fAsymmetryParametrization
double GetParameter(const Parameter i) const
void GetVectorInShowerPlaneVxB(double &x, double &y, double &z, const utl::Point &point) const
in case of positions, the positions has to be relative to the core positions!!!
double GetY(const CoordinateSystemPtr &coordinateSystem) const
ResultFlag
Flag returned by module methods to the RunController.
void SetParameter(Parameter i, double value, bool lock=true)
double Angle(const Vector &left, const Vector &right)
utl::Point GetCorePosition() const
returns pointer of the position vector of the core in the reference coor system
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
std::string fAsymmetryDefinition
utl::Point GetPosition() const
Tank position in Site Cartesian Coordinates.
const Station & GetStation(const int stationId) const
Get station by Station Id.