Diana Software
MJitterByDelay.hh
Go to the documentation of this file.
1 #ifndef _M_JITTERBYDELAY_HH_
2 #define _M_JITTERBYDELAY_HH_
3 
48 #include "QEventLabel.hh"
49 #include "QModule.hh"
50 #include "QDetChannelCollectionHandle.hh"
51 #include "QDetChannelCollection.hh"
52 #include "QVector.hh"
53 #include <map>
54 #include <set>
55 #include <string>
56 #include <vector>
57 
58 class MJitterByDelay : public Diana::QModule {
59 
60  public:
61 
63  void Init(Diana::QEvent& ev);
64 
66  void Do(Diana::QEvent& ev);
67 
69  void Done();
70 
71  private:
72 
74  std::string fOutput;
75 
77  int fDataset;
78  int fRun;
79  int fTower;
80 
82  int fRefCh;
83 
85  bool fLastFloor;
86 
87  std::string fOFLabel; //label for the optimal filter (was COF in DIANA-0, different for DIANA)
88 
90  std::map<int,Diana::QVector> fDelays;
91  std::map<int,double> fDelay;
92  std::map<int,double> fDelayRMS;
93 
95  std::map<int,std::map<int,double > > fJitter;
96 
98  std::map<int,std::map<int,double > > fJitterRMS;
99 
101  std::set<int> fGoodChannels;
102 
104  double fJitterSum;
105 
108 
110  void SaveJitter(int ch, double jitter, double jitter_error);
111 
113  double FindJitter(int ch, int o_ch);
114 
116  double FindJitterRMS(int ch, int o_ch);
117 
119  int FindChanWithPosInTowerFloor(int pos, int tower, int floor);
120 
122  int ProcessFloor(int pos, int tower, int floor);
123 
124 };
125 
126 #endif
127 
Calculates mean value of OFDelay for all channels using pulser events (later used as a proxy for jitt...
std::map< int, std::map< int, double > > fJitter
Map of Jitter between couples of channels, calculated from deltaT above.
std::map< int, double > fDelay
std::string fOutput
Jitter output (file or DB, for the moment only file works)
int ProcessFloor(int pos, int tower, int floor)
ProcessFloor function.
int fDataset
Dataset.
std::map< int, Diana::QVector > fDelays
vector of QVectors containing values of OF_Delay for each channel
void SaveJitter(int ch, double jitter, double jitter_error)
SaveJitter function.
std::map< int, std::map< int, double > > fJitterRMS
Map of JitterRMS/N between couples of channels, calculated from deltaT above.
double fJitterSum
Stores sum of jitters between floors as the floors are being processed.
void Init(Diana::QEvent &ev)
Init method.
int fRefCh
Reference Channel.
void Done()
Done method.
int FindChanWithPosInTowerFloor(int pos, int tower, int floor)
FindPos function.
void Do(Diana::QEvent &ev)
Do method
double FindJitterRMS(int ch, int o_ch)
FindJitterRMS function.
std::map< int, double > fDelayRMS
std::set< int > fGoodChannels
Stores the channels with thermistor ranking >=1 as the floors are being processed.
std::string fOFLabel
double FindJitter(int ch, int o_ch)
FindJitter function.
double fJitterErrorSum
Stores sum of jitters errors (in quadrature) between floors as the floors are being processed.