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 */
8 ///////////////////////////////////////////////////////////////////////////////
10 // TRD calibration class //
12 ///////////////////////////////////////////////////////////////////////////////
25 class AliTRDCalibraVector : public TObject {
29 AliTRDCalibraVector();
30 AliTRDCalibraVector(const AliTRDCalibraVector &c);
31 virtual ~AliTRDCalibraVector();
33 AliTRDCalibraVector& operator = (const AliTRDCalibraVector &source);
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);
44 Bool_t Add(AliTRDCalibraVector *calvector);
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);
52 // Set and Get methods
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; }
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; }
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);
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);
85 TArrayI *GetCHEntries(Int_t det,Bool_t force = kFALSE);
91 TArrayI *fPHEntries[540]; // Current AliTRDArrayI PH entries
92 TArrayF *fPHMean[540]; // Current AliTRDArrayF PH Mean
93 TArrayF *fPHSquares[540]; // Current AliTRDArrayF PH Squares
95 TArrayI *fPRFEntries[540]; // Current AliTRDArrayI PH entries
96 TArrayF *fPRFMean[540]; // Current AliTRDArrayF PH Mean
97 TArrayF *fPRFSquares[540]; // Current AliTRDArrayF PH Squares
99 TArrayI *fCHEntries[540]; // Current AliTRDArrayI PH entries
101 const char *fNameCH; // Name for calibration mode
102 const char *fNamePH; // Name for calibration mode
103 const char *fNamePRF; // Name for calibration mode
105 Int_t fDetectorPH; // Current detector
106 Int_t fDetectorCH; // Current detector
107 Int_t fDetectorPRF; // Current detector
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
121 TArrayI *GetEntriesPH(Int_t det, TArrayI** array, Bool_t force);
122 TArrayF *GetMeanSquaresPH(Int_t det, TArrayF** array, Bool_t force);
124 TArrayI *GetEntriesPRF(Int_t det, TArrayI** array, Bool_t force);
125 TArrayF *GetMeanSquaresPRF(Int_t det, TArrayF** array, Bool_t force);
127 TArrayI *GetEntriesCH(Int_t det, TArrayI** array, Bool_t force);
129 // Some basic geometry function
130 virtual Int_t GetStack(Int_t d) const;
132 ClassDef(AliTRDCalibraVector,1) // TRD Calibration class