]>
Commit | Line | Data |
---|---|---|
5e319bd5 | 1 | #ifndef ALIADCALIBDATA_H |
2 | #define ALIADCALIBDATA_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | #include "TNamed.h" | |
aa8120bb | 8 | #include "AliADConst.h" |
4188a021 | 9 | |
10 | class AliADDataDCS; | |
11 | ||
12 | ||
5e319bd5 | 13 | class AliADCalibData: public TNamed { |
14 | ||
15 | public: | |
16 | AliADCalibData(); | |
17 | AliADCalibData(const char* name); | |
18 | ||
19 | AliADCalibData(const AliADCalibData &calibda); | |
20 | AliADCalibData& operator= (const AliADCalibData &calibda); | |
21 | virtual ~AliADCalibData(); | |
22 | void Reset(); | |
4188a021 | 23 | void FillDCSData(AliADDataDCS * data); |
5e319bd5 | 24 | |
aa8120bb | 25 | Float_t GetPedestal(Int_t channel) const {return fPedestal[channel];} |
26 | Float_t* GetPedestal() const {return (float*)fPedestal;} | |
27 | Float_t GetSigma(Int_t channel) const {return fSigma[channel];} | |
28 | Float_t* GetSigma() const {return (float*)fSigma;} | |
29 | Float_t GetADCmean(Int_t channel) const {return fADCmean[channel];} | |
30 | Float_t* GetADCmean() const {return (float*)fADCmean;} | |
31 | Float_t GetADCsigma(Int_t channel) const {return fADCsigma[channel];} | |
32 | Float_t* GetADCsigma() const {return (float*)fADCsigma;} | |
33 | Float_t GetMeanHV(Int_t channel) const {return fMeanHV[channel];} | |
34 | Float_t* GetMeanHV() const {return (float*)fMeanHV;} | |
35 | Float_t GetWidthHV(Int_t channel) const {return fWidthHV[channel];} | |
36 | Float_t* GetWidthHV() const {return (float*)fWidthHV;} | |
37 | Bool_t IsChannelDead(Int_t channel) const {return fDeadChannel[channel];} | |
38 | Bool_t* GetDeadMap() const {return (bool*)fDeadChannel;} | |
39 | ||
40 | Float_t GetGain(Int_t channel); | |
41 | Float_t GetTimeOffset(Int_t channel) const {return fTimeOffset[channel];} | |
42 | Float_t* GetTimeOffset() const {return (float*)fTimeOffset;} | |
43 | Float_t GetTimeGain(Int_t channel) const {return fTimeGain[channel];} | |
44 | Float_t* GetTimeGain() const {return (float*)fTimeGain;} | |
45 | ||
46 | Float_t* GetTimeResolution() const {return (Float_t*) fTimeResolution;}; | |
47 | Float_t GetTimeResolution(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fTimeResolution[board]:0);}; | |
48 | ||
49 | Float_t* GetWidthResolution() const {return (Float_t*) fWidthResolution;}; | |
50 | Float_t GetWidthResolution(Int_t board ) const {return ((board>=0 && board<kNCIUBoards)?fWidthResolution[board]:0);}; | |
51 | ||
52 | const UInt_t* GetMatchWindow() const { return fMatchWindow; } | |
53 | UInt_t GetMatchWindow(Int_t board) const { return ((board>=0 && board<kNCIUBoards)?fMatchWindow[board]:0); } | |
54 | const UInt_t* GetSearchWindow() const { return fSearchWindow; } | |
55 | UInt_t GetSearchWindow(Int_t board) const { return ((board>=0 && board<kNCIUBoards)?fSearchWindow[board]:0); } | |
56 | const UInt_t* GetTriggerCountOffset() const { return fTriggerCountOffset; } | |
57 | UInt_t GetTriggerCountOffset(Int_t board) const { return ((board>=0 && board<kNCIUBoards)?fTriggerCountOffset[board]:0); } | |
58 | const UInt_t* GetRollOver() const { return fRollOver; } | |
59 | UInt_t GetRollOver(Int_t board) const { return ((board>=0 && board<kNCIUBoards)?fRollOver[board]:0); } | |
60 | ||
61 | Float_t GetDiscriThr(Int_t channel) const {return fDiscriThr[channel];} | |
62 | Float_t* GetDiscriThr() const {return (Float_t*)fDiscriThr;} | |
69e96215 | 63 | Float_t GetCalibDiscriThr(Int_t channel, Bool_t scaled); |
aa8120bb | 64 | |
65 | static Int_t GetBoardNumber(Int_t channel); | |
69e96215 | 66 | static Int_t GetFEEChannelNumber(Int_t channel); |
67 | static Int_t GetOfflineChannelNumber(Int_t board, Int_t channel); | |
aa8120bb | 68 | |
69 | Float_t GetLightYields(Int_t channel); | |
70 | ||
71 | Float_t *GetPMGainsA() const { return fPMGainsA; } | |
72 | Float_t *GetPMGainsB() const { return fPMGainsB; } | |
73 | ||
69e96215 | 74 | void SetPedestal(Float_t val, Int_t channel) {fPedestal[channel]=val;} |
75 | void SetPedestal(const Float_t* Pedestal); | |
76 | void SetSigma(Float_t val, Int_t channel) {fSigma[channel]=val;} | |
77 | void SetSigma(const Float_t* Sigma); | |
78 | void SetADCmean(Float_t val, Int_t channel) {fADCmean[channel]=val;} | |
79 | void SetADCmean(const Float_t* ADCmean); | |
80 | void SetADCsigma(Float_t val, Int_t channel) {fADCsigma[channel]=val;} | |
81 | void SetADCsigma(const Float_t* ADCsigma); | |
82 | void SetMeanHV(Float_t val, Int_t channel) {fMeanHV[channel]=val;} | |
83 | void SetMeanHV(const Float_t* MeanHV); | |
84 | void SetWidthHV(Float_t val, Int_t channel) {fWidthHV[channel]=val;} | |
85 | void SetWidthHV(const Float_t* WidthHV); | |
86 | void SetDeadChannel(Bool_t val, Int_t channel) {fDeadChannel[channel]=val;} | |
87 | void SetDeadMap(const Bool_t* deadMap); | |
88 | ||
89 | void SetTimeOffset(Float_t val, Int_t board, Int_t channel); | |
90 | void SetTimeOffset(const Float_t* TimeOffset); | |
91 | void SetTimeGain(Float_t val, Int_t channel) {fTimeGain[channel]=val;} | |
92 | void SetTimeGain(const Float_t* TimeGain); | |
93 | ||
94 | void SetParameter(TString name, Int_t val); | |
95 | void SetTimeResolution(UShort_t *resols); | |
96 | void SetTimeResolution(UShort_t resol, Int_t board); | |
97 | void SetWidthResolution(UShort_t *resols); | |
98 | void SetWidthResolution(UShort_t resol, Int_t board); | |
99 | ||
100 | void SetMatchWindow(UInt_t *windows); | |
101 | void SetMatchWindow(UInt_t window, Int_t board); | |
102 | void SetSearchWindow(UInt_t *windows); | |
103 | void SetSearchWindow(UInt_t window, Int_t board); | |
104 | void SetTriggerCountOffset(UInt_t *offsets); | |
105 | void SetTriggerCountOffset(UInt_t offset, Int_t board); | |
106 | void SetRollOver(UInt_t *offsets); | |
107 | void SetRollOver(UInt_t offset, Int_t board); | |
108 | ||
109 | void SetDiscriThr(Float_t thr, Int_t board, Int_t channel); | |
110 | void SetDiscriThr(const Float_t* thresholds); | |
5e319bd5 | 111 | |
112 | ||
113 | protected: | |
aa8120bb | 114 | void InitLightYields(); |
115 | void InitPMGains(); | |
116 | ||
117 | Float_t fPedestal[32]; // Mean pedestal values | |
118 | Float_t fSigma[32]; // Sigmas of pedestal peaks | |
119 | Float_t fADCmean[32]; // ADC mean values | |
120 | Float_t fADCsigma[32]; // ADC sigma values | |
121 | Float_t fMeanHV[16]; // Mean PMT HV needed to compute MIP value | |
122 | Float_t fWidthHV[16]; // Width of the PMT HV | |
123 | ||
124 | Float_t fTimeOffset[16]; // Time offsets of the TDC | |
125 | Float_t fTimeGain[16]; // Gain factors of the TDC | |
126 | Bool_t fDeadChannel[16]; // List of dead channels | |
127 | Float_t fTimeResolution[kNCIUBoards]; // Time Resolution of the TDC (ns / channel) | |
128 | Float_t fWidthResolution[kNCIUBoards]; // Time Width Resolution of the TDC (ns / channel) | |
129 | ||
130 | UInt_t fMatchWindow[kNCIUBoards]; // HPTDC matching window (25ns units) | |
131 | UInt_t fSearchWindow[kNCIUBoards];// HPTDC search window (25ns units) | |
132 | UInt_t fTriggerCountOffset[kNCIUBoards]; // HPTDC trigger count offset (25ns units) | |
133 | UInt_t fRollOver[kNCIUBoards]; // HPTDC roll-over (25ns units) | |
134 | ||
135 | Float_t fDiscriThr[16]; // Discriminator thresholds | |
136 | ||
137 | Float_t *fLightYields; //! Light Yields channel by channel (read from separate OCDB entry) | |
138 | Float_t *fPMGainsA; //! PM gain factors channel by channel (read from separate OCDB entry) | |
139 | Float_t *fPMGainsB; //! PM gain factors channel by channel (read from separate OCDB entry) | |
5e319bd5 | 140 | |
141 | ClassDef(AliADCalibData,1) // AD Calibration data | |
142 | }; | |
143 | ||
144 | #endif | |
145 |