]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCCalibData.h
Updated class version
[u/mrichter/AliRoot.git] / ZDC / AliZDCCalibData.h
1 #ifndef ALIZDCCALIBDATA_H
2 #define ALIZDCCALIBDATA_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ////////////////////////////////////////////////
8 //  class for ZDC calibration                 //
9 ////////////////////////////////////////////////
10
11 #include "TNamed.h"
12 #include "TH1.h"
13 #include "AliCDBEntry.h"
14
15 class AliZDC;
16
17 class AliZDCCalibData: public TNamed {
18
19  public:
20   AliZDCCalibData();
21   AliZDCCalibData(const char* name);
22   AliZDCCalibData(const AliZDCCalibData &calibda);
23   AliZDCCalibData& operator= (const AliZDCCalibData &calibda);
24   virtual ~AliZDCCalibData();
25   void Reset();
26   virtual void  Print(Option_t *) const; 
27   //
28   Float_t  GetMeanPed(Int_t channel)       const {return fMeanPedestal[channel];}
29   Float_t* GetMeanPed()                    const {return (float*)fMeanPedestal;}
30   Float_t  GetMeanPedWidth(Int_t channel)  const {return fMeanPedWidth[channel];}
31   Float_t* GetMeanPedWidth()               const {return (float*)fMeanPedWidth;}
32   Float_t  GetOOTPed(Int_t channel)        const {return fOOTPedestal[channel];}
33   Float_t* GetOOTPed()                     const {return (float*)fOOTPedestal;}
34   Float_t  GetOOTPedWidth(Int_t channel)   const {return fOOTPedWidth[channel];}
35   Float_t* GetOOTPedWidth()                const {return (float*)fOOTPedWidth;}
36   Float_t  GetPedCorrCoeff0(Int_t channel) const {return fPedCorrCoeff[0][channel];}
37   Float_t  GetPedCorrCoeff1(Int_t channel) const {return fPedCorrCoeff[1][channel];}
38   Float_t* GetPedCorrCoeff()               const {return (float*)fPedCorrCoeff;}
39   //
40   Float_t  GetEnCalib(Int_t channel)    const {return fEnCalibration[channel];}
41   Float_t* GetEnCalib()                 const {return (float*)fEnCalibration;}
42   //
43   Float_t  GetPMTHVVal(Int_t channel)   const {return fPMTHVVal[channel];}
44   Float_t* GetPMTHVVal()                  const {return (float*)fPMTHVVal;}
45   //
46   Float_t  GetZN1EqualCoeff(Int_t channel) const {return fZN1EqualCoeff[channel];}
47   Float_t* GetZN1EqualCoeffs()             const {return (float*)fZN1EqualCoeff;}
48   Float_t  GetZP1EqualCoeff(Int_t channel) const {return fZP1EqualCoeff[channel];}
49   Float_t* GetZP1EqualCoeffs()             const {return (float*)fZP1EqualCoeff;}
50   Float_t  GetZN2EqualCoeff(Int_t channel) const {return fZN2EqualCoeff[channel];}
51   Float_t* GetZN2EqualCoeffs()             const {return (float*)fZN2EqualCoeff;}
52   Float_t  GetZP2EqualCoeff(Int_t channel) const {return fZP2EqualCoeff[channel];}
53   Float_t* GetZP2EqualCoeffs()             const {return (float*)fZP2EqualCoeff;}
54  
55   //
56   void  SetMeanPed(Int_t channel, Float_t val) {fMeanPedestal[channel]=val;}
57   void  SetMeanPed(Float_t* MeanPed);
58   void  SetMeanPedWidth(Int_t channel, Float_t val) {fMeanPedWidth[channel]=val;}
59   void  SetMeanPedWidth(Float_t* MeanPedWidth);
60   void  SetOOTPed(Int_t channel, Float_t val) {fOOTPedestal[channel]=val;}
61   void  SetOOTPed(Float_t* OOTPed);
62   void  SetOOTPedWidth(Int_t channel, Float_t val) {fOOTPedWidth[channel]=val;}
63   void  SetOOTPedWidth(Float_t* OOTPedWidth);
64   void  SetPedCorrCoeff(Int_t channel, Float_t valCoeff0, Float_t valCoeff1)
65         {fPedCorrCoeff[0][channel]=valCoeff0; fPedCorrCoeff[1][channel]=valCoeff1;}
66   void  SetPedCorrCoeff(Float_t* PedCorrCoeff);
67   void  SetPedCorrCoeff(Float_t* PedCorrCoeff0, Float_t* PedCorrCoeff1);
68   //
69   void  SetEnCalib(Int_t channel, Float_t val) {fEnCalibration[channel]=val;}
70   void  SetEnCalib(Float_t* EnCalib);
71   //
72   void  SetPMTHVVal(Int_t channel, Float_t val) {fPMTHVVal[channel]=val;}
73   void  SetPMTHVVal(Float_t* HVVal);
74   //
75   void  SetZN1EqualCoeff(Int_t channel, Float_t val) {fZN1EqualCoeff[channel]=val;}
76   void  SetZN1EqualCoeff(Float_t* EqualCoeff);
77   void  SetZP1EqualCoeff(Int_t channel, Float_t val) {fZP1EqualCoeff[channel]=val;}
78   void  SetZP1EqualCoeff(Float_t* EqualCoeff);
79   void  SetZN2EqualCoeff(Int_t channel, Float_t val) {fZN2EqualCoeff[channel]=val;}
80   void  SetZN2EqualCoeff(Float_t* EqualCoeff);
81   void  SetZP2EqualCoeff(Int_t channel, Float_t val) {fZP2EqualCoeff[channel]=val;}
82   void  SetZP2EqualCoeff(Float_t* EqualCoeff);
83   //  
84   void    SetEZEMEndValue(Float_t EZEMEndValue) {fEZEMEndValue = EZEMEndValue;}
85   void    SetEZEMCutFraction(Float_t EZEMCutFraction) {fEZEMCutFraction = EZEMCutFraction;}
86   virtual Float_t GetEZEMEndValue()     const {return fEZEMEndValue;}
87   virtual Float_t GetEZEMCutFraction()  const {return fEZEMCutFraction;}
88   
89   
90  protected:
91   // --- Pedestals
92   Float_t  fMeanPedestal[47];    // Mean pedestal values 
93   Float_t  fMeanPedWidth[47];    // Mean pedestal values 
94   Float_t  fOOTPedestal[44];     // "Out of Time" pedestal values
95   Float_t  fOOTPedWidth[44];     // "Out of Time" pedestal values
96   Float_t  fPedCorrCoeff[2][44]; // Fit of correlation in-time vs. out-of-time
97   // --- E calibration
98   Float_t  fEnCalibration[6];    // Coeff. for energy calibration
99   // --- PMTs HV values
100   Float_t  fPMTHVVal[22];        // PMTs HV values
101   // --- Coefficients for tower calibration
102   Float_t  fZN1EqualCoeff[5];    // Equalization coefficients for ZN1 PTMs
103   Float_t  fZP1EqualCoeff[5];    // Equalization coefficients for ZN1 PTMs
104   Float_t  fZN2EqualCoeff[5];    // Equalization coefficients for ZN1 PTMs
105   Float_t  fZP2EqualCoeff[5];    // Equalization coefficients for ZN1 PTMs
106   // --- Coefficients for centrality selection from ZEM signal
107   Float_t fEZEMEndValue;         //End point value of ZEM energy spectrum
108   Float_t fEZEMCutFraction;      //Fraction of ZEM energy spectrum used to cut
109   //
110   ClassDef(AliZDCCalibData,7)    // ZDC  Calibration data
111 };
112
113 #endif