2 #include <utl/ErrorLogger.h>
3 #include <utl/AugerException.h>
5 #include <utl/Vector.h>
6 #include <utl/CoordinateSystemPtr.h>
7 #include <utl/AugerUnits.h>
8 #include <utl/Branch.h>
10 #include <fwk/CentralConfig.h>
12 #include <evt/Event.h>
13 #include <evt/ShowerRecData.h>
14 #include <evt/ShowerSRecData.h>
15 #include <sevt/SEvent.h>
16 #include <sevt/Station.h>
17 #include <det/Detector.h>
18 #include <sdet/SDetector.h>
19 #include <sdet/Station.h>
29 #define DEBUG(x) std::cout << #x << " " << x << std::endl
34 static const int kNone = -1;
42 for (
int i = 0; i < 7; ++i)
49 topB.
GetChild(
"FirstCrownDistanceRange").
GetData(fFirstCrownDistanceRange);
59 !
event.HasRecShower() ||
60 !
event.GetRecShower().HasSRecShower())
66 msg <<
"Counter = " << fCounter;
78 if (!IsAccepted(sEvent, crown))
81 UpdateFirstCrown(sCenter, crown);
99 ostringstream augerId;
100 augerId <<
event.GetHeader().GetId() <<
"-" << fCounter;
101 event.GetHeader().SetId(augerId.str());
104 for (
int iStation = 1; iStation <= 7; ++iStation) {
105 const int stationId = fCrownId[iStation - 1];
106 if (stationId == kNone)
109 sevt::Station& station =
event.GetSEvent().GetStation(stationId);
111 if (iStation == fCounter) {
113 msg <<
"Disabling station " << stationId;
117 station.ClearRejectionStatus();
127 Sd5T5Tester::Finish()
141 double maxSignal = 0;
145 if (maxSignal < signal) {
147 maxStation = &(*sIt);
154 return det::Detector::GetInstance().GetSDetector().GetStation(*maxStation);
172 const sdet::SDetector& sDet = det::Detector::GetInstance().GetSDetector();
175 if (!(sIt->IsCandidate() || sIt->IsSilent()))
182 const double dist = r.
GetMag();
183 if (dist < fFirstCrownDistanceRange[0] ||
184 fFirstCrownDistanceRange[1] < dist)
187 result.push_back(&s);
198 size_t nCandidates = 0;
206 if (crown.size() != 6)
209 for (Crown::const_iterator it = crown.begin();
210 it != crown.end(); ++it) {
211 const Crown c = GetCrown(sev, **it);
228 for (
int i = 0; i < 7; ++i)
231 fCrownId[6] = sCenter.
GetId();
235 for (
size_t iS = 0; iS < 6; ++iS) {
241 const size_t index = ((phi - 30 + 720) % 360) / 60;
243 fCrownId[index] = sCrown.
GetId();
StationIterator StationsEnd()
End of all stations.
double GetPhi(const CoordinateSystemPtr &coordinateSystem) const
azimuth (phi) angle in spherical and cylindrical coordinates
Detector description interface for Station-related data.
Interface class to access to the SD part of an event.
sevt::StationRecData & GetRecData()
Get station level reconstructed data.
#define INFO(message)
Macro for logging informational messages.
int crown(double x1, double x2, double y1, double y2)
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
utl::Point GetPosition() const
Tank position.
CandidateStationIterator CandidateStationsBegin()
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
class to hold data at Station level
void SetRejected(const int reason)
Set rejected station flag.
double GetTotalSignal() const
Total integrated signal in VEM unit, averaged over pmts.
void GetData(bool &b) const
Overloads of the GetData member template function.
Base class for inconsistency/illogicality exceptions.
std::vector< const sdet::Station * > Crown
ResultFlag
Flag returned by module methods to the RunController.
StationIterator StationsBegin()
Beginning of all stations.
Detector description interface for SDetector-related data.
Main configuration utility.
CandidateStationIterator CandidateStationsEnd()
const Station & GetStation(const int stationId) const
Get station by Station Id.
int GetId() const
Station ID.
boost::indirect_iterator< InternalConstStationIterator, const Station & > ConstStationIterator
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)
boost::filter_iterator< CandidateStationFilter, ConstStationIterator > ConstCandidateStationIterator