SdEventSelector.h
Go to the documentation of this file.
1 #ifndef _SdEventSelectorOG_SdEventSelector_h_
2 #define _SdEventSelectorOG_SdEventSelector_h_
3 
4 #include <fwk/VModule.h>
5 #include <utl/TimeRange.h>
6 #include <utility>
7 #include <list>
8 #include <set>
9 #include <vector>
10 
11 
12 namespace sevt {
13  class SEvent;
14  class Station;
15 }
16 
17 namespace sdet {
18  class SDetector;
19  class Station;
20 }
21 
22 
23 namespace SdEventSelectorOG {
24 
25  class BadPeriod : public utl::TimeRange {
26 
27  public:
28  BadPeriod(const int id, const utl::TimeRange& range)
29  : TimeRange(range), fId(id) { }
30 
31  int GetId() const { return fId; }
32 
33  private:
34  int fId = 0;
35 
36  };
37 
38 
52  class SdEventSelector : public fwk::VModule {
53 
54  public:
55  fwk::VModule::ResultFlag Init() override;
56  fwk::VModule::ResultFlag Run(evt::Event& event) override;
58 
59  private:
60  // local containers
61  typedef std::pair<sevt::Station*, const sdet::Station*> StationPair;
62  typedef std::list<StationPair> StationPairList;
63 
67  int StationSelection(sevt::SEvent& sEvent) const;
68  bool IsReusedIDStation(const sdet::Station& s) const;
69 
70  bool IsSEvent3TOT(const StationPairList& candidates) const;
71  bool IsSEvent4C1() const;
72  std::pair<int, std::vector<int>> CalculateT5Trigger(const sevt::SEvent& sEvent) const;
73  int GetBadPeriod(const utl::TimeStamp& time) const;
74 
75  bool BottomUpSelection(const bool is3TOT, evt::Event& event);
76  bool RejectLonelyStations();
77 
78  double CTimeDifferenceMargin(const sevt::Station& i, const sevt::Station& j) const;
79 
86  std::vector<int> fSeedStations;
87 
88  // xml config
91  bool fEnableT4Trigger = false;
92  bool fRejectNonT4Events = false;
93  bool fEnableT5Trigger = false;
94  bool fRejectNonT5Events = false;
97  bool fRejectUBStations = false;
98  bool fRejectUUBStations = false;
99 
100  // bad periods
101  bool fRejectBadPeriods = false;
102  std::vector<SdEventSelectorOG::BadPeriod> fBadPeriods;
103 
104  // selection parameters
105  int fGridType = 0;
107  std::vector<double> fFirstCrownDistanceRange;
116  bool fSilenceTOTdStations = false;
117  bool fSilenceMoPSStations = false;
119 
120  REGISTER_MODULE("SdEventSelectorOG", SdEventSelector);
121 
122  };
123 
124 }
125 
126 
127 #endif
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
std::vector< double > fSeedPlaneFrontTimeResidualRangeTh1
bool IsReusedIDStation(const sdet::Station &s) const
int GetBadPeriod(const utl::TimeStamp &time) const
Detector description interface for Station-related data.
bool BottomUpSelection(const bool is3TOT, evt::Event &event)
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Time interval defined by two TimeStamps.
Definition: TimeRange.h:23
std::vector< SdEventSelectorOG::BadPeriod > fBadPeriods
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
std::vector< double > fSeedPlaneFrontTimeResidualRangeToTd
std::vector< double > fSeedPlaneFrontTimeResidualRangeToT
int StationSelection(sevt::SEvent &sEvent) const
std::list< StationPair > StationPairList
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
std::vector< double > fSeedPlaneFrontTimeResidualRangeTh2
class to hold data at Station level
constexpr double s
Definition: AugerUnits.h:163
std::vector< double > fFirstCrownDistanceRange
Module interface.
Definition: VModule.h:53
BadPeriod(const int id, const utl::TimeRange &range)
double CTimeDifferenceMargin(const sevt::Station &i, const sevt::Station &j) const
bool IsSEvent3TOT(const StationPairList &candidates) const
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
std::pair< int, std::vector< int > > CalculateT5Trigger(const sevt::SEvent &sEvent) const
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
REGISTER_MODULE("SdEventSelectorOG", SdEventSelector)
std::pair< sevt::Station *, const sdet::Station * > StationPair
std::vector< double > fSeedPlaneFrontTimeResidualRangeMoPS
Definition: XbArray.h:7

, generated on Tue Sep 26 2023.