Diana Software
MCoincidenceTiming.hh
Go to the documentation of this file.
1 #ifndef _M_COINCIDENCE_TIMING_HH_
2 #define _M_COINCIDENCE_TIMING_HH_
3 
72 #include "QModule.hh"
73 #include <map>
74 #include <string>
75 #include <vector>
76 
77 class MCoincidenceTiming : public QModule {
78 
79  public:
82 
84  virtual ~MCoincidenceTiming();
85 
87  void Init();
88 
90  QEvent* Do(QEvent* ev);
91 
93  void Done();
94 
95  private:
96 
97  class EventInfo {
98  public:
99  EventInfo(const QEvent *ev);
100  void ApplyOffset(double samplingPeriod);
101  // Define < operator in order to sort events by time
102  bool operator<(const EventInfo& ev) const {
103  return (this->fTimeFromStartRunNs < ev.fTimeFromStartRunNs);
104  }
105  int fChannel;
108  bool fPassed;
112  };
113 
114  class ChannelInfo {
115  public:
118  };
119 
121  std::string fDetectorSetupFile;
122 
124  std::vector<EventInfo> fEventList;
125 
127  std::map<int, unsigned int> fEventListIndex;
128 
130  std::string fFilteredEventsType;
131 
134 
137  std::map<int, ChannelInfo> fRelatedMap;
138 
141 
143  double fTimeWindow;
144 
148 
149 };
150 
151 #endif
bool operator<(const EventInfo &ev) const
void ApplyOffset(double samplingPeriod)
Module to identify coincident events.
MCoincidenceTiming(QSequence *s)
constructor
std::string fDetectorSetupFile
detector setup file for DB alternative
void Init()
Init method.
std::string fFilteredEventsType
Description of filtered events.
std::vector< EventInfo > fEventList
List of events passing the filter(s)
double fSamplingPeriod
Sampling period from QRunData.
double fTimeWindow
Time interval in which to search for coincident events.
void Done()
Done method.
std::map< int, unsigned int > fEventListIndex
Index for fEventList based on event number.
virtual ~MCoincidenceTiming()
destructor
std::map< int, ChannelInfo > fRelatedMap
map of channels with their heater channel and relative channel on the same crystal
bool fIsRunDataLoaded
Whether or not QRunData has been loaded.
QEvent * Do(QEvent *ev)
Do method.
bool fUsePulseStartTimeOffset
Whether or not to adjust time of event based on pulse slewing.
diana event
Definition: QEvent.hh:46
Base class for diana modules.
Definition: QModule.hh:54
Diana Reconstruction program.
Definition: QSequence.hh:40