2 #include <evt/ShowerRecData.h>
3 #include <evt/ShowerSRecData.h>
5 #include <sevt/SEvent.h>
6 #include <sevt/SortCriteria.h>
8 #include <utl/ErrorLogger.h>
9 #include <utl/Branch.h>
10 #include <utl/AugerUnits.h>
12 #include <tst/Validatrix.h>
14 #include <fwk/CentralConfig.h>
15 #include <fwk/LocalCoordinateSystem.h>
25 using namespace tst::Validatrix;
28 namespace ValidationNS {
36 fResults =
new ofstream(fRefFileName +
".new");
47 ERROR(
"Event should contain an SEvent.");
52 const SEvent& sEvent =
event.GetSEvent();
58 for (
const auto&
s : sEvent.StationsRange()) {
61 label <<
"E" << eventId <<
"_S" <<
s.GetId();
62 *fResults <<
BeLabel(label.str());
63 *fResults <<
BeCloseRel(
s.GetRecData().GetTotalSignal(), 0.05);
67 *fResults <<
BeLabel(
"Shower_rec");
71 ERROR(
"Event does not contain a RecShower");
78 ERROR(
"RecShower does not have SRecShower");
80 *fResults <<
BeLabel(
"Shower_S_rec");
91 const double tolerance = 1e-3;
95 label << eventId <<
"_ShowerSize";
96 *fResults <<
BeLabel(label.str());
100 label << eventId <<
"_ShowerSizeError";
101 *fResults <<
BeLabel(label.str());
105 label << eventId <<
"_LDFChi2";
106 *fResults <<
BeLabel(label.str());
110 label << eventId <<
"_LDFNdof";
111 *fResults <<
BeLabel(label.str());
115 label << eventId <<
"_Theta";
116 *fResults <<
BeLabel(label.str());
120 label << eventId <<
"_Phi";
121 *fResults <<
BeLabel(label.str());
125 label << eventId <<
"_ThetaError";
126 *fResults <<
BeLabel(label.str());
130 label << eventId <<
"_PhiError";
131 *fResults <<
BeLabel(label.str());
135 label << eventId <<
"_CoreX";
136 *fResults <<
BeLabel(label.str());
140 label << eventId <<
"_CoreY";
141 *fResults <<
BeLabel(label.str());
145 label << eventId <<
"_CoreZ";
146 *fResults <<
BeLabel(label.str());
150 label << eventId <<
"_CorrelationXY";
151 *fResults <<
BeLabel(label.str());
155 label << eventId <<
"_CoreXVariance";
156 *fResults <<
BeLabel(label.str());
160 label << eventId <<
"_CoreYVariance";
161 *fResults <<
BeLabel(label.str());
165 label << eventId <<
"_CoreXYCovariance";
166 *fResults <<
BeLabel(label.str());
170 label << eventId <<
"_CoreTSecond";
171 *fResults <<
BeLabel(label.str());
175 label << eventId <<
"_CoreTNanoSecond";
176 *fResults <<
BeLabel(label.str());
180 label << eventId <<
"_CoreXError";
181 *fResults <<
BeLabel(label.str());
185 label << eventId <<
"_CoreYError";
186 *fResults <<
BeLabel(label.str());
190 label << eventId <<
"_CoreTError";
191 *fResults <<
BeLabel(label.str());
205 const bool comp =
Compare(fRefFileName, fRefFileName +
".new",
false);
Branch GetTopBranch() const
double GetCorrelationXY() const
std::string BeCloseRel(const T &value, const double tolerance=kDefaultTolerance)
double GetPhi(const CoordinateSystemPtr &coordinateSystem) const
azimuth (phi) angle in spherical and cylindrical coordinates
Interface class to access to the SD Reconstruction of a Shower.
Interface class to access Shower Reconstructed parameters.
bool HasRecShower() const
Interface class to access to the SD part of an event.
double GetTheta(const CoordinateSystemPtr &coordinateSystem) const
zenith (theta) angle in spherical coordinates
double GetParameterCovariance(const Parameter q1, const Parameter q2) const
const utl::Vector & GetCoreError() const
double GetShowerSize() const
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
ShowerSRecData & GetSRecShower()
std::string BeCloseAbs(const T &value, const double tolerance=kDefaultTolerance)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
bool Compare(const string &oldFilename, const string &newFilename, const bool failOnFirst)
double GetX(const CoordinateSystemPtr &coordinateSystem) const
const utl::TimeStamp & GetCoreTime() const
time when shower front passes through the core point
std::string BeLabel(const string &tag)
const utl::Point & GetBarycenter() const
double GetThetaError() const
const utl::Vector & GetAxis() const
double GetPhiError() const
void GetData(bool &b) const
Overloads of the GetData member template function.
double GetLDFChi2() const
double GetInterval() const
Get the time interval as a double (in Auger base units)
std::string BeEqual(const T &value)
double GetY(const CoordinateSystemPtr &coordinateSystem) const
const utl::TimeInterval & GetCoreTimeError() const
ResultFlag
Flag returned by module methods to the RunController.
unsigned long GetGPSSecond() const
GPS second.
double GetGPSNanoSecond() const
GPS nanosecond.
double GetShowerSizeError() const
const utl::Point & GetCorePosition() const
sevt::Header & GetHeader()
double GetLDFNdof() const
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
#define ERROR(message)
Macro for logging error messages.
bool HasSRecShower() const