Diana Software
MCoincidence.hh
Go to the documentation of this file.
1 #ifndef _M_COINCIDENCE_HH_
2 #define _M_COINCIDENCE_HH_
3 
68 #include "QModule.hh"
69 #include <map>
70 #include "QRunData.hh"
71 
72 class MCoincidence : public Diana::QModule {
73 
74 public:
75 
77  void Init(Diana::QEvent& ev);
78 
80  void Do(Diana::QEvent& ev, const Diana::QEventList& neighbours);
81 
83  void Done();
84 
86  double GetTime(const Diana::QEvent& ev);
87 private:
88  enum TimeVariable {
91  };
92 
94  void GetEventEnergy(const Diana::QEvent &ev,double &energy,bool &valid) const;
96  double GetDistanceMm(const Diana::QEvent &ev, const Diana::QEvent* coincident);
97 
98  int fDataset;
100  bool fSyncTime;
101  std::string fSyncType;
103  std::string fSyncSource;
104  std::string fSyncTowerSource;
106  std::string fEnergyLabel;
107  std::vector<std::string> fPSALabels;
110  int fThisRun;
111  struct ChannelInfo {
113  double DeltaT;
114  };
115  std::map<int,ChannelInfo> fSyncTimeDifference;
117  std::set<int> fBlackList;
118  std::string fOFLabel; //label for the optimal filter (was COF in DIANA-0, different for DIANA)
120  std::map<int,double> fChannelPositionX;
121  std::map<int,double> fChannelPositionY;
122  std::map<int,double> fChannelPositionZ;
123 };
124 
125 #endif
126 
Version of MCoincidenceMultiplicity that uses neighbours.
Definition: MCoincidence.hh:72
double fCoincidenceRadius
std::string fSyncType
std::map< int, double > fChannelPositionZ
std::string fSyncSource
std::set< int > fBlackList
std::vector< std::string > fPSALabels
bool fUseRunningWindow
Definition: MCoincidence.hh:99
std::map< int, ChannelInfo > fSyncTimeDifference
std::map< int, double > fChannelPositionY
void Done()
Done method.
std::string fEnergyLabel
QRunData fRunData
std::string fOFLabel
void Do(Diana::QEvent &ev, const Diana::QEventList &neighbours)
Do method.
Definition: MCoincidence.cc:85
std::string fSyncTowerSource
double fCoincidenceWindow
void GetEventEnergy(const Diana::QEvent &ev, double &energy, bool &valid) const
Get the energy of the event. Throws if event is invalid and fOkInvalidTotalEnergy is false.
std::map< int, double > fChannelPositionX
double GetDistanceMm(const Diana::QEvent &ev, const Diana::QEvent *coincident)
Get the distance in mm between the centers of the main and the coincident crystals.
void Init(Diana::QEvent &ev)
Init method.
Definition: MCoincidence.cc:22
bool fOkInvalidTotalEnergy
TimeVariable fTimeVariable
double GetTime(const Diana::QEvent &ev)
Get time of the event.
Basic run based info.
Definition: QRunData.hh:20