2 #include <evt/ShowerFRecData.h>
4 #include <fevt/FEvent.h>
6 #include <fevt/EyeRecData.h>
8 #include <sevt/SEvent.h>
9 #include <sevt/SortCriteria.h>
11 #include <utl/ErrorLogger.h>
12 #include <utl/Branch.h>
13 #include <utl/Particle.h>
14 #include <utl/Vector.h>
15 #include <utl/Point.h>
16 #include <tst/Validatrix.h>
18 #include <fwk/CentralConfig.h>
19 #include <fwk/LocalCoordinateSystem.h>
21 #include <fdet/FDetector.h>
23 #include <det/Detector.h>
35 using namespace tst::Validatrix;
38 namespace HdRecValidationNS {
46 fOutputName = fRefFileName + string(
".new");
47 fOutput =
new ofstream(fOutputName.c_str());
57 ERROR(
"Event should have SEvent.");
62 ERROR(
"Event should have FEvent.");
66 ostringstream eventId;
67 eventId <<
event.GetHeader().GetId();
68 *fOutput <<
BeLabel(eventId.str());
71 const SEvent& sEvent =
event.GetSEvent();
73 for (
const auto&
s : sEvent.StationsRange()) {
77 label <<
"Station_" <<
s.GetId();
78 *fOutput <<
BeLabel(label.str());
87 const FEvent& fEvent =
event.GetFEvent();
89 eIt != fEvent.
EyesEnd(ComponentSelector::eHasData); ++eIt) {
92 const int eyeId = eIt->GetId();
93 label <<
"Eye_" << eyeId << endl;
94 *fOutput <<
BeLabel(label.str());
102 const Vector sdp = eRec.GetSDP();
103 const Point eyePos = det::Detector::GetInstance().GetFDetector().GetEye(eyeId).GetPosition();
121 *fOutput <<
BeLabel(
"total_energy");
127 *fOutput <<
BeLabel(
"EM_energy");
137 HdRecValidation::Finish()
142 ifstream oldFile(fRefFileName.c_str());
143 ifstream newFile(fOutputName.c_str());
145 const bool comp =
Compare(oldFile, newFile,
true);
Branch GetTopBranch() const
std::string BeCloseRel(const T &value, const double tolerance=kDefaultTolerance)
boost::filter_iterator< ComponentSelector, ConstAllEyeIterator > ConstEyeIterator
double GetTotalEnergy() const
retrieve total energy and its uncertainty
Interface class to access to the SD part of an event.
EyeIterator EyesEnd(const ComponentSelector::Status status)
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
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)
std::string BeLabel(const string &tag)
EyeIterator EyesBegin(const ComponentSelector::Status status)
double GetEmEnergy() const
retrieve electromagnetic energy and its uncertainty
void GetData(bool &b) const
Overloads of the GetData member template function.
Top of Fluorescence Detector event hierarchy.
Eye-specific shower reconstruction data.
bool HasGHParameters() const
ResultFlag
Flag returned by module methods to the RunController.
constexpr double kilometer
Interface class to access to Fluorescence reconstruction of a Shower.
#define ERROR(message)
Macro for logging error messages.