RdStationRiseTimeCalculator.h
Go to the documentation of this file.
1 #ifndef _RdStationRiseTimeCalculator_h_
2 #define _RdStationRiseTimeCalculator_h_
3 
4 #include <fwk/VModule.h>
5 #include <io/IoCodes.h> // needed for "Status"
6 #include <revt/Channel.h>
7 #include <revt/Station.h>
8 #include <vector>
9 
10 
11 namespace evt {
12  class Event;
13 }
14 
15 namespace revt {
16  class REvent;
17  class Station;
18 }
19 
21 
30 
31  public:
34 
35  fwk::VModule::ResultFlag Init() override;
36  fwk::VModule::ResultFlag Run(evt::Event& event) override;
37  fwk::VModule::ResultFlag Finish() override { return eSuccess; }
38 
39  private:
40  unsigned int fRiseTimeWindow = 0;
41 
42  // Construction of the cumulative function in the rise time window
43  void MakeCumulative(const revt::StationTimeSeries& Stationtrace,
44  const unsigned int startRiseTimeWindow, const unsigned int stopRiseTimeWindow,
45  std::vector<double>& cumulative, double& cumulativeSum, unsigned int chwithmaxSNR) const;
46  // Rise time calculation
47  void GetRiseTime(const unsigned int startCumulative, const unsigned int stopCumulative,
48  std::vector<double>& normalizedCumulative, unsigned int& minCumulative, unsigned int& maxCumulative) const;
49 
50  REGISTER_MODULE("RdStationRiseTimeCalculator", RdStationRiseTimeCalculator);
51 
52  };
53 
54 }
55 
56 
57 #endif
Calculation of the rise time of the main pulse in a given time window.
void MakeCumulative(const revt::StationTimeSeries &Stationtrace, const unsigned int startRiseTimeWindow, const unsigned int stopRiseTimeWindow, std::vector< double > &cumulative, double &cumulativeSum, unsigned int chwithmaxSNR) const
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Report success to RunController.
Definition: VModule.h:62
REGISTER_MODULE("RdStationRiseTimeCalculator", RdStationRiseTimeCalculator)
Module interface.
Definition: VModule.h:53
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h.
Definition: Trace-fwd.h:19
void GetRiseTime(const unsigned int startCumulative, const unsigned int stopCumulative, std::vector< double > &normalizedCumulative, unsigned int &minCumulative, unsigned int &maxCumulative) const
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
Definition: XbArray.h:7

, generated on Tue Sep 26 2023.