7 #include <det/Detector.h>
8 #include <sdet/SDetector.h>
9 #include <fwk/CentralConfig.h>
10 #include <utl/TimeStamp.h>
11 #include <utl/UTCDateTime.h>
12 #include <utl/TabulatedFunction.h>
13 #include <utl/Reader.h>
14 #include <utl/CoordinateSystem.h>
15 #include <utl/Point.h>
16 #include <utl/TimeStamp.h>
17 #include <utl/UTCDateTime.h>
18 #include <utl/AugerException.h>
19 #include <utl/ErrorLogger.h>
21 #include <fwk/CoordinateSystemRegistry.h>
22 #include <fwk/RunController.h>
24 #include <evt/Event.h>
25 #include <evt/ShowerSimData.h>
26 #include <evt/DefaultShowerGeometryProducer.h>
28 #include <sevt/SEvent.h>
29 #include <sevt/Station.h>
31 #include <cppunit/extensions/HelperMacros.h>
32 #include <tst/Verify.h>
48 CPPUNIT_TEST(testBasic1);
49 CPPUNIT_TEST_SUITE_END();
59 CentralConfig::GetInstance(BOOTSTRAPFILE);
63 Detector::GetInstance().Update(
UTCDateTime(2005,1,1).GetTimeStamp());
71 const Detector& theDetector = Detector::GetInstance();
84 Event& evt = RunController::GetInstance().GetCurrentEvent();
91 const double x = 123*
m;
92 const double y = 456*
m;
93 const double z = -13*
m;
96 const double tolerance = 1*
m;
101 CPPUNIT_ASSERT(Verify<CloseTo>(nonDense.
GetPosition().
GetX(malargueCS), 14563.7, 1*
mm));
102 CPPUNIT_ASSERT(Verify<Equal>(nonDense.
GetName(), string(
"Skeeter")));
103 CPPUNIT_ASSERT(Verify<Equal>(nonDense.
IsDense(),
false));
104 CPPUNIT_ASSERT(Verify<Equal>(nonDense.
IsInGrid(),
true));
108 CPPUNIT_ASSERT(Verify<Equal>(stat1.
GetId(), 99999));
109 CPPUNIT_ASSERT(Verify<Equal>(stat1.
GetName(), string(
"DenseStation99999")));
110 CPPUNIT_ASSERT(Verify<Equal>(stat1.
IsDense(),
true));
111 CPPUNIT_ASSERT(Verify<Equal>(stat1.
IsInGrid(),
false));
114 CPPUNIT_ASSERT(Verify<CloseTo>(pos1.
GetX(pampaCS), x, tolerance));
115 CPPUNIT_ASSERT(Verify<CloseTo>(pos1.
GetY(pampaCS), y, tolerance));
116 CPPUNIT_ASSERT(Verify<CloseTo>(pos1.
GetZ(pampaCS), z, tolerance));
120 CPPUNIT_ASSERT(Verify<CloseTo>(pos2.
GetX(pampaCS), x + 1000*
m, tolerance));
121 CPPUNIT_ASSERT(Verify<CloseTo>(pos2.
GetY(pampaCS), y, tolerance));
122 CPPUNIT_ASSERT(Verify<CloseTo>(pos2.
GetZ(pampaCS), z, tolerance));
126 CPPUNIT_ASSERT(Verify<CloseTo>(pos3.
GetX(pampaCS), x, tolerance));
127 CPPUNIT_ASSERT(Verify<CloseTo>(pos3.
GetY(pampaCS), y + 1000*
m, tolerance));
128 CPPUNIT_ASSERT(Verify<CloseTo>(pos3.
GetZ(pampaCS), z, tolerance));
132 CPPUNIT_ASSERT(Verify<CloseTo>(pos4.
GetX(pampaCS), x + 1000*
m, tolerance));
133 CPPUNIT_ASSERT(Verify<CloseTo>(pos4.
GetY(pampaCS), y, tolerance));
134 CPPUNIT_ASSERT(Verify<CloseTo>(pos4.
GetZ(pampaCS), z, tolerance));
140 Detector& theDetector = Detector::GetInstance();
149 Event& evt = RunController::GetInstance().GetCurrentEvent();
153 Detector& theDetector = Detector::GetInstance();
Detector description interface for Station-related data.
bool HasSimShower() const
void SetGroundParticleCoordinateSystemAzimuth(const double azimuth)
Set the azimuth angle of the shower. Angle in x-y plane wrt. to the x axis (0 is from east)...
bool IsInGrid(const SDetectorConstants::GridIndex index=SDetectorConstants::eStandard) const
Tells whether the station is in the regular triangular grid.
utl::CoordinateSystemPtr GetSiteCoordinateSystem() const
Get the coordinate system for the site.
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
const std::string & GetName() const
Station name.
utl::Point GetPosition() const
Tank position.
Interface class to access Shower Simulated parameters.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
void testNoCorePosition()
double GetX(const CoordinateSystemPtr &coordinateSystem) const
Top of the hierarchy of the detector description interface.
const sdet::SDetector & GetSDetector() const
ShowerSimData & GetSimShower()
double GetY(const CoordinateSystemPtr &coordinateSystem) const
Base class for exceptions arising because required info not present in the Event. ...
void SetGroundParticleCoordinateSystemZenith(const double zenith)
Set the zenith angle of the shower. Room angle between z-axis and direction from where the shower is ...
utl::CoordinateSystemPtr GetReferenceCoordinateSystem() const
Get the reference coordinate system used for analysis (usually PampaAmarilla for Auger) ...
void MakeGeometry(const utl::Point &pointOnShowerAxis)
initialize the shower geometry. Pos is a point on the shower axis, but not necessarily the core ...
bool IsDense() const
Tells whether the station belongs to set of hypothetical "dense" stations.
void MakeSimShower(const evt::VShowerGeometryProducer &p)
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
const Station & GetStation(const int stationId) const
Get station by Station Id.
int GetId() const
Station ID.