SIOValidationObj.cc
Go to the documentation of this file.
1 #include "SIOValidationObj.h"
2 #include "TSIOValidationObj.h"
3 
4 #include <utl/ErrorLogger.h>
5 
6 #include <det/Detector.h>
7 
8 #include <utl/TimeStamp.h>
9 
10 #include <evt/Event.h>
11 #include <evt/ShowerRecData.h>
12 #include <evt/ShowerSRecData.h>
13 
14 #include <sevt/SEvent.h>
15 #include <sevt/Header.h>
16 #include <sevt/Station.h>
17 #include <sevt/PMT.h>
18 #include <sevt/PMTRecData.h>
19 #include <sevt/StationRecData.h>
20 #include <sevt/SortCriteria.h>
21 #include <fwk/LocalCoordinateSystem.h>
22 
23 #include <utl/Trace.h>
24 #include <utl/AugerUnits.h>
25 #include <utl/MathConstants.h>
26 #include <utl/PhysicalConstants.h>
27 #include <utl/TabulatedFunctionErrors.h>
28 #include <utl/UTMPoint.h>
29 #include <fwk/CentralConfig.h>
30 
31 using namespace det;
32 using namespace evt;
33 using namespace sevt;
34 using namespace std;
35 using namespace fwk;
36 
37 
39  ValidationObj("SIOValidationObj")
40 {
42  _myTObjectName = _myTObject->GetName();
43 }
44 
45 
46 bool
48 {
49  TSIOValidationObj* eSIO =
50  dynamic_cast<TSIOValidationObj*>(_myTObject);
51  if (!eSIO) {
52  cout << "Fault in casting TSIOValidationObj!!!!" << endl;
53  return false;
54  }
55  if (event.HasSEvent() && event.HasRecShower()) {
56 
57  const sevt::SEvent& sevent = event.GetSEvent();
58  const ShowerSRecData& showersrec = event.GetRecShower().GetSRecShower();
59  const utl::Vector& axis = showersrec.GetAxis();
60  const utl::CoordinateSystemPtr localCS =
61  LocalCoordinateSystem::Create(showersrec.GetCorePosition());
62 
63  eSIO->SetEventId(sevent.GetHeader().GetId());
64  eSIO->SetTheta(axis.GetTheta(localCS)/utl::degree);
65  eSIO->SetPhi(axis.GetPhi(localCS)/utl::degree);
66  eSIO->SetShowerSize(showersrec.GetShowerSize());
67 
68  cout << "SIOValidationObj filled!" << endl;
69  return true;
70 
71  }
72  return false;
73 }
void SetPhi(const Double_t ph)
double GetPhi(const CoordinateSystemPtr &coordinateSystem) const
azimuth (phi) angle in spherical and cylindrical coordinates
Definition: BasicVector.h:254
void SetShowerSize(const Double_t s)
Interface class to access to the SD Reconstruction of a Shower.
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
double GetTheta(const CoordinateSystemPtr &coordinateSystem) const
zenith (theta) angle in spherical coordinates
Definition: BasicVector.h:248
TValidationObj * _myTObject
Definition: ValidationObj.h:22
int GetId() const
Definition: SEvent/Header.h:20
double GetShowerSize() const
std::string _myTObjectName
Definition: ValidationObj.h:21
virtual bool Fill(const evt::Event &event)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
constexpr double degree
const utl::Vector & GetAxis() const
void SetEventId(const Int_t id)
void SetTheta(const Double_t th)
Vector object.
Definition: Vector.h:30
const utl::Point & GetCorePosition() const
sevt::Header & GetHeader()
Definition: SEvent.h:155
bool HasSEvent() const

, generated on Tue Sep 26 2023.