File indexing completed on 2025-01-18 09:15:44
0001 #ifndef CALIB_H
0002 #define CALIB_H
0003
0004 #include <cstddef>
0005 #include <map>
0006 #include "TTimeStamp.h"
0007 #include "Setup.h"
0008
0009 struct TileCalib{
0010 double PedestalMeanH = -1000.;
0011 double PedestalMeanL = -1000.;
0012 double PedestalSigH = -1000.;
0013 double PedestalSigL = -1000.;
0014 double ScaleH = -1000.;
0015 double ScaleWidthH = -1000.;
0016 double ScaleL = -1000.;
0017 double ScaleWidthL = -1000.;
0018 double LGHGCorr = -64;
0019 double HGLGCorr = -64;
0020 short BadChannel = -64;
0021 } ;
0022
0023 class Calib{
0024
0025 public:
0026 Calib() {}
0027 virtual ~Calib() {}
0028
0029 double GetPedestalMeanH (int ) const;
0030 double GetPedestalMeanL (int ) const;
0031 double GetPedestalMeanH (int , int , int , int ) const;
0032 double GetPedestalMeanL (int , int , int , int ) const;
0033 double GetPedestalSigH (int ) const;
0034 double GetPedestalSigL (int ) const;
0035 double GetPedestalSigH (int , int , int , int ) const;
0036 double GetPedestalSigL (int , int , int , int ) const;
0037 double GetScaleHigh(int ) const;
0038 double GetScaleHigh(int , int , int , int ) const;
0039 double GetScaleWidthHigh(int ) const;
0040 double GetScaleWidthHigh(int , int , int , int ) const;
0041 double GetCalcScaleLow (int ) const;
0042 double GetCalcScaleLow (int , int , int , int ) const;
0043 double GetScaleLow (int ) const;
0044 double GetScaleLow (int , int , int , int ) const;
0045 double GetScaleWidthLow (int ) const;
0046 double GetScaleWidthLow (int , int , int , int ) const;
0047 double GetScaleLGHGCorr (int ) const;
0048 double GetScaleLGHGCorr (int , int , int , int ) const;
0049 double GetScaleHGLGCorr (int ) const;
0050 double GetScaleHGLGCorr (int , int , int , int ) const;
0051 double GetAveragePedestalMeanHigh() const;
0052 double GetAverageScaleHigh() const;
0053 double GetAverageScaleHigh(int &) const;
0054 double GetAverageScaleWidthHigh() const;
0055 double GetAverageScaleLow() const;
0056 double GetAverageScaleWidthLow() const;
0057 double GetAverageHGLGCorr() const;
0058 double GetAverageLGHGCorr() const;
0059 int GetNumberOfChannelsWithBCflag (short ) const;
0060 short GetBadChannel(int ) const;
0061 short GetBadChannel(int , int , int , int ) const;
0062
0063 TileCalib* GetTileCalib(int );
0064 TileCalib* GetTileCalib(int , int , int , int );
0065 void SetPedestalMeanH (double, int);
0066 void SetPedestalMeanL (double, int);
0067 void SetPedestalMeanH (double, int, int, int, int);
0068 void SetPedestalMeanL (double, int, int, int, int);
0069 void SetPedestalSigH (double, int);
0070 void SetPedestalSigL (double, int);
0071 void SetPedestalSigH (double, int, int, int, int);
0072 void SetPedestalSigL (double, int, int, int, int);
0073 void SetScaleHigh(double, int);
0074 void SetScaleHigh(double, int, int, int, int);
0075 void SetScaleWidthHigh(double, int);
0076 void SetScaleWidthHigh(double, int, int, int, int);
0077 void SetScaleLow (double, int);
0078 void SetScaleLow (double, int, int, int, int);
0079 void SetScaleWidthLow (double, int);
0080 void SetScaleWidthLow (double, int, int, int, int);
0081 void SetScaleLGHGCorr (double, int);
0082 void SetScaleLGHGCorr (double, int, int, int, int);
0083 void SetScaleHGLGCorr (double, int);
0084 void SetScaleHGLGCorr (double, int, int, int, int);
0085 void SetBadChannel (short, int);
0086 void SetBadChannel (short, int, int, int, int);
0087
0088 int GetRunNumber(void);
0089 const TTimeStamp* GetBeginRunTime(void) const;
0090 double GetVov(void);
0091 double GetVop(void);
0092 bool GetBCCalib(void);
0093
0094 void SetRunNumber(int);
0095 void SetBeginRunTime(TTimeStamp);
0096 void SetVop(double);
0097 void SetVov(double);
0098 void SetBCCalib(bool);
0099
0100 void PrintGlobalInfo();
0101 void PrintCalibToFile( TString );
0102
0103 private:
0104
0105 std::map<int, TileCalib> CaloCalib;
0106 int RunNumber;
0107 TTimeStamp BeginRunTime;
0108 double Vop;
0109 double Vov;
0110 bool BCcalc;
0111 ClassDef(Calib,4)
0112 };
0113
0114
0115 #endif