]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDCalibraVector.h
Remove dependecies on obsolete classes: AliTRDmcmTracklet, AliTRDarrayI or AliTRDarrayF
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibraVector.h
1 #ifndef ALITRDCALIBRAVECTOR_H
2 #define ALITRDCALIBRAVECTOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 //  TRD calibration class                                                    //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #ifndef ROOT_TObject
15 #  include <TObject.h>
16 #endif
17
18 class TGraphErrors;
19 class TH1F;
20 class TObjArray;
21
22 class TArrayF;
23 class TArrayI;
24
25 class AliTRDCalibraVector : public TObject {
26
27  public: 
28
29   AliTRDCalibraVector();
30   AliTRDCalibraVector(const AliTRDCalibraVector &c);
31   virtual ~AliTRDCalibraVector();
32
33   AliTRDCalibraVector& operator = (const  AliTRDCalibraVector &source);
34
35   // Fill
36   Int_t          SearchBin(Float_t value, Int_t i) const;  
37   Bool_t         UpdateVectorCH(Int_t det, Int_t group, Float_t value);
38   Bool_t         UpdateVectorPRF(Int_t det, Int_t group, Float_t x, Float_t y);
39   Bool_t         UpdateVectorPH(Int_t det, Int_t group, Int_t time, Float_t value);
40  
41
42
43   // Add
44   Bool_t         Add(AliTRDCalibraVector *calvector);
45   
46   // Fit
47   TGraphErrors  *ConvertVectorPHTGraphErrors(Int_t det, Int_t group, const Char_t *name);
48   TGraphErrors  *ConvertVectorPRFTGraphErrors(Int_t det, Int_t group, const Char_t *name);
49   TH1F          *ConvertVectorCHHisto(Int_t det, Int_t group, const Char_t *name);
50
51   //
52   // Set and Get methods
53   //
54
55   void           SetNumberBinCharge(Short_t numberbincharge)   { fNumberBinCharge = numberbincharge;            } 
56   void           SetNumberBinPRF(Short_t numberbinprf)         { fNumberBinPRF    = numberbinprf;               } 
57   void           SetTimeMax(Int_t timemax)                     { fTimeMax         = timemax;                    } 
58   void           SetPRFRange(Float_t prfrange)                 { fPRFRange        = prfrange;                   }  
59   void           SetDetCha0(Int_t i, Short_t total)            { fDetCha0[i]      = total;                      } 
60   void           SetDetCha2(Int_t i, Short_t total)            { fDetCha2[i]      = total;                      } 
61   void           SetNamePH(const char* name)                   { fNamePH = name;  } 
62   void           SetNamePRF(const char* name)                  { fNamePRF = name; } 
63   void           SetNameCH(const char* name)                   { fNameCH = name;  } 
64
65   Short_t        GetNumberBinCharge()const                     { return fNumberBinCharge;                       }
66   Short_t        GetNumberBinPRF()const                        { return fNumberBinPRF;                          }
67   Int_t          GetTimeMax()const                             { return fTimeMax;                               } 
68   Float_t        GetPRFRange()const                            { return fPRFRange;                              } 
69   Short_t        GetDetCha0(Int_t i) const                     { return fDetCha0[i];                            }
70   Short_t        GetDetCha2(Int_t i) const                     { return fDetCha2[i];                            }
71   const char*    GetNamePH()                                   { return fNamePH;             }
72   const char*    GetNamePRF()                                  { return fNamePRF;            }
73   const char*    GetNameCH()                                   { return fNameCH;             }
74
75
76  
77   TArrayI  *GetPHEntries(Int_t det,Bool_t force = kFALSE);
78   TArrayF  *GetPHMean(Int_t det,Bool_t force = kFALSE);
79   TArrayF  *GetPHSquares(Int_t det,Bool_t force = kFALSE);
80
81   TArrayI  *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
82   TArrayF  *GetPRFMean(Int_t det,Bool_t force = kFALSE);
83   TArrayF  *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
84
85   TArrayI  *GetCHEntries(Int_t det,Bool_t force = kFALSE);
86
87  protected:
88
89   // Current data
90
91          TArrayI     *fPHEntries[540];                //  Current AliTRDArrayI PH entries
92          TArrayF     *fPHMean[540];                   //  Current AliTRDArrayF PH Mean
93          TArrayF     *fPHSquares[540];                //  Current AliTRDArrayF PH Squares
94
95          TArrayI     *fPRFEntries[540];               //  Current AliTRDArrayI PH entries
96          TArrayF     *fPRFMean[540];                  //  Current AliTRDArrayF PH Mean
97          TArrayF     *fPRFSquares[540];               //  Current AliTRDArrayF PH Squares
98
99          TArrayI     *fCHEntries[540];                //  Current AliTRDArrayI PH entries
100
101          const char *fNameCH;                         //  Name for calibration mode
102          const char *fNamePH;                         //  Name for calibration mode
103          const char *fNamePRF;                        //  Name for calibration mode
104
105          Int_t            fDetectorPH;                //  Current detector
106          Int_t            fDetectorCH;                //  Current detector
107          Int_t            fDetectorPRF;               //  Current detector
108          
109   // Size of the infos
110
111           Short_t          fNumberBinCharge;          // Number of bins for the gain factor
112           Short_t          fNumberBinPRF;             // Number of bin for the PRF
113           Int_t            fTimeMax;                  // Number of time bins
114           Float_t          fPRFRange;                 // Range PRF
115           Short_t          fDetCha0[3];               // Number of XBins for chamber != 2
116           Short_t          fDetCha2[3];               // Number of Xbins for chamber 2
117
118   // Some functions
119
120
121           TArrayI  *GetEntriesPH(Int_t det, TArrayI** array, Bool_t force);
122           TArrayF  *GetMeanSquaresPH(Int_t det, TArrayF** array, Bool_t force);
123
124           TArrayI  *GetEntriesPRF(Int_t det, TArrayI** array, Bool_t force);
125           TArrayF  *GetMeanSquaresPRF(Int_t det, TArrayF** array, Bool_t force);
126           
127           TArrayI  *GetEntriesCH(Int_t det, TArrayI** array, Bool_t force);
128
129   // Some basic geometry function
130           virtual Int_t    GetStack(Int_t d) const;
131   
132   ClassDef(AliTRDCalibraVector,1)                   // TRD Calibration class
133
134 };
135   
136 #endif
137
138