Diana Software
MFastCoincidence.hh
Go to the documentation of this file.
1 #ifndef _M_FAST_COINCIDENCE_HH_
2 #define _M_FAST_COINCIDENCE_HH_
3 
4 #include "QModule.hh"
5 #include <map>
6 #include <vector>
7 #include "QRunData.hh"
8 
9 class TimeNeighbour {
10  public:
11  TimeNeighbour(ULong64_t, ULong64_t, int, double, double);
12  ULong64_t fEventNumber;
13  ULong64_t fTag;
14  int fChannel;
15  double fTime;
16  double fEnergy;
17 };
18 
19 class MFastCoincidence : public Diana::QModule {
20  public:
21  void Init(Diana::QEvent& ev);
22  void Do(Diana::QEvent& ev);
23  void Done();
24 
25  double GetTime(const Diana::QEvent& ev);
26 
27  private:
28  enum TimeVariable {
30  TV_OF
31  };
32 
33  // Channel, channel
34  double GetChannelDistance(int, int);
35  double GetDistanceMmChannel(const int ch1, const int ch2);
36 
37  int fDataset;
40  bool fSyncTime;
41  std::string fSyncType;
42  std::string fSyncSource;
43  std::string fSyncTowerSource;
45  std::string fEnergyLabel;
46  std::vector<std::string> fPSALabels;
49  int fThisRun;
50 
51  struct ChannelInfo {
52  bool BkaclSheep;
53  double DeltaT;
54  };
55 
56  std::map<int, ChannelInfo> fSyncTimeDifference;
58  std::set<int> fBlackList;
59  std::string fOFLabel;
61  std::map<int, double> fChannelPositionX;
62  std::map<int, double> fChannelPositionY;
63  std::map<int, double> fChannelPositionZ;
64 
65  std::vector<TimeNeighbour*> timeNeighbours;
66 
67  std::map<int, int> ChannelTowerMap;
68  std::map<int, int> ChannelFloorMap;
69  std::map<int, int> ChannelPositionMap;
70 
71  std::string fChannelPositionFile;
73 };
74 
75 #endif
TimeVariable fTimeVariable
std::string fChannelPositionFile
std::map< int, double > fChannelPositionZ
double GetChannelDistance(int, int)
void Init(Diana::QEvent &ev)
double GetTime(const Diana::QEvent &ev)
std::map< int, int > ChannelTowerMap
std::map< int, double > fChannelPositionY
double GetDistanceMmChannel(const int ch1, const int ch2)
void Do(Diana::QEvent &ev)
std::map< int, double > fChannelPositionX
std::string fSyncType
std::string fEnergyLabel
std::map< int, ChannelInfo > fSyncTimeDifference
std::string fOFLabel
std::vector< TimeNeighbour * > timeNeighbours
std::vector< std::string > fPSALabels
std::set< int > fBlackList
std::string fSyncSource
std::map< int, int > ChannelPositionMap
std::map< int, int > ChannelFloorMap
std::string fSyncTowerSource
Basic run based info.
Definition: QRunData.hh:20
ULong64_t fEventNumber
TimeNeighbour(ULong64_t, ULong64_t, int, double, double)