SdTopDownSignalSelector.h
Go to the documentation of this file.
1 #ifndef _SdTopDownSignalSelectorUGR_h_
2 #define _SdTopDownSignalSelectorUGR_h_
3 
4 #include <fwk/VModule.h>
5 
6 #include <sevt/SEvent.h>
7 #include <sevt/Station.h>
8 
9 #include <utl/Point.h>
10 #include <utl/TimeStamp.h>
11 
12 
13 namespace evt {
14  class Event;
15 }
16 
17 
18 // you should assign your module to a namespace
19 
20 namespace SdTopDownSignalSelectorUGR {
21 
22  class GeoSegment {
23  public:
24  GeoSegment(const int start, const int stop, const double binsTh,
25  const double charge, const double aop, const double signal,
26  utl::TimeStamp startTime,
27  sevt::Station* const stEvt, const sdet::Station* const stDet,
28  bool candidate) :
29  fStart(start),
30  fStop(stop),
31  fBinsOverThresh(binsTh),
32  fCharge(charge),
33  fAoP(aop),
34  fSignal(signal),
35  fStartTime(startTime),
36  fStEvt(stEvt),
37  fStDet(stDet),
38  fCandidate(candidate),
39  fTimeResidual(0)
40  { }
41 
42  int fStart;
43  int fStop;
45  double fCharge; // Integrated signal in VEM Charge
46  double fAoP;
47  double fSignal; // Integrated signal in VEM Peak
51  bool fCandidate;
52  double fTimeResidual;
53  };
54 
55 
56  typedef std::vector<GeoSegment> GeoSegmentCollection;
57 
58 
60  public:
61  bool operator()(const GeoSegment& i, const GeoSegment& j) const;
62  };
63 
64 
66  public:
67  bool operator()(const GeoSegment& i, const GeoSegment& j) const;
68  };
69 
70 
72  public:
73  bool operator()(const GeoSegment& i, const GeoSegment& j) const;
74  };
75 
76 
78  public:
79  bool operator()(const GeoSegment& i, const GeoSegment& j) const;
80  };
81 
82 
84  public:
85  bool operator()(const GeoSegment& i, const GeoSegment& j) const;
86  };
87 
88 
90 
91  public:
92  // If you define a constructor, you MUST provide an implementation
93  // for it, otherwise the REGISTER_MODULE macro will not register
94  // your module. (Here, implementation is in SdTopDownSignalSelectorUGR.cc)
97 
101 
102  private:
105  std::vector<double> fResiduals;
106 
108  int fVerbose;
109  // Costants for Signal identification
112  double fMinSignal;
113  double fMinStSignal;
115  double fLowFactor;
116  int fMingap;
117  unsigned int fRejectionProcedure;
118 
119  // Constants for TopDown Selection
124 
126  double kBaryPower;
127  double kTolRes;
128  double kTolResM;
129  double kIsoDist1;
130  double kIsoDist2;
131  double kCurv0;
132  double kAreaMin;
133  double kAreaMax;
134  double kAna3RatMin;
135  double kDistMax;
136  double kIsoTime1;
137  double kIsoTime2;
139 
141  eNone = 0,
143  eCurved = 2,
145  };
146 
147  // method to initialize.
148  void RemoveEA();
149  void RemoveDoublets();
150  void RemoveIsolatedStations();
151  void UpdateStations();
152  bool Select();
153  bool TryRemovingStations(int);
154  bool EstimateCore();
155  bool IsGoodTimeConfig(const TimeCorrectionType correctionType);
156  bool IsGoodSpaceConfig();
157  double CorrectTimeAltitude(const int);
158  double CorrectTimeAltitudeCurv(const int);
159  bool IsAligned();
160  double fU,fV,fT0;
162  std::vector<unsigned int> fIndexes;
165 
166  bool PatternRecovering();
167  void RemoveRandomStations();
168  bool Recover3Stations();
169 
170  double EstimatedZenith(const std::string& s);
171  double EstimatedAzimuth(const std::string& s);
172 
173  std::pair<double, double> fRiseTimeFractions;
174  std::pair<double, double> fFallTimeFractions;
175 
176  std::vector<GeoSegment> FoundSegments(sevt::Station& st);
177  std::vector<GeoSegment> FoundBasicSegments(sevt::Station& st);
178  bool SelectMainSegment(GeoSegmentCollection& segments);
179  void UpdateSegmentValues(const int seg);
180  bool UpdateStationValues(sevt::Station& st, const int start, const int stop);
182 
183  // From the Sd Calibrator copy-paste
185  const double binSize,
186  const unsigned int startBin,
187  const unsigned int startIntegration,
188  const unsigned int endIntegration,
189  const double traceIntegral) const;
190 
191  // The REGISTER_MODULE macro makes the framework aware of your module.
192  // You need to put this macro at the very end of your module class definition.
193  // Give your module a name (first argument) and specify its
194  // class name (second argument). In the ModuleSequenceExample.xml file,
195  // you can see this module being refered to by the name we give it here.
196 
197  REGISTER_MODULE("SdTopDownSignalSelectorUGR", SdTopDownSignalSelectorUGR);
198 
199  };
200 
201 }
202 
203 
204 #endif
205 
206 // Configure (x)emacs for this file ...
207 // Local Variables:
208 // mode: c++
209 // compile-command: "make -k"
210 // End:
Point object.
Definition: Point.h:32
std::vector< GeoSegment > GeoSegmentCollection
Detector description interface for Station-related data.
bool operator()(const GeoSegment &i, const GeoSegment &j) const
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
class to hold data at Station level
constexpr double s
Definition: AugerUnits.h:163
class to hold reconstructed data at PMT level
Definition: PMTRecData.h:38
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
bool operator()(const GeoSegment &i, const GeoSegment &j) const
bool IsGoodTimeConfig(const TimeCorrectionType correctionType)
utl::TraceD GetVEMChargeTrace(const sevt::Station &st) const
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Module interface.
Definition: VModule.h:53
bool operator()(const GeoSegment &i, const GeoSegment &j) const
std::vector< GeoSegment > FoundSegments(sevt::Station &st)
void ComputeShapeRiseFallPeak(sevt::PMTRecData &pmtRecData, const double binSize, const unsigned int startBin, const unsigned int startIntegration, const unsigned int endIntegration, const double traceIntegral) const
bool operator()(const GeoSegment &i, const GeoSegment &j) const
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
bool UpdateStationValues(sevt::Station &st, const int start, const int stop)
REGISTER_MODULE("SdTopDownSignalSelectorUGR", SdTopDownSignalSelectorUGR)
std::vector< GeoSegment > FoundBasicSegments(sevt::Station &st)
GeoSegment(const int start, const int stop, const double binsTh, const double charge, const double aop, const double signal, utl::TimeStamp startTime, sevt::Station *const stEvt, const sdet::Station *const stDet, bool candidate)
bool operator()(const GeoSegment &i, const GeoSegment &j) const

, generated on Tue Sep 26 2023.