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);
42 Bool_t Add(AliTRDCalibraVector *calvector);
45 TGraphErrors *ConvertVectorPHTGraphErrors(Int_t det, Int_t group, const Char_t *name);
46 TGraphErrors *ConvertVectorPRFTGraphErrors(Int_t det, Int_t group, const Char_t *name);
47 TH1F *ConvertVectorCHHisto(Int_t det, Int_t group, const Char_t *name);
50 // Set and Get methods
53 void SetNumberBinCharge(Short_t numberbincharge) { fNumberBinCharge = numberbincharge; }
54 void SetNumberBinPRF(Short_t numberbinprf) { fNumberBinPRF = numberbinprf; }
55 void SetTimeMax(Int_t timemax) { fTimeMax = timemax; }
56 void SetPRFRange(Float_t prfrange) { fPRFRange = prfrange; }
57 void SetDetCha0(Int_t i, Short_t total) { fDetCha0[i] = total; }
58 void SetDetCha2(Int_t i, Short_t total) { fDetCha2[i] = total; }
59 void SetNamePH(const char* name) { fVectorPHEntries.SetName(name); }
60 void SetNamePRF(const char* name) { fVectorPRFEntries.SetName(name); }
61 void SetNameCH(const char* name) { fVectorCHEntries.SetName(name); }
63 Short_t GetNumberBinCharge()const { return fNumberBinCharge; }
64 Short_t GetNumberBinPRF()const { return fNumberBinPRF; }
65 Int_t GetTimeMax()const { return fTimeMax; }
66 Float_t GetPRFRange()const { return fPRFRange; }
67 Short_t GetDetCha0(Int_t i) const { return fDetCha0[i]; }
68 Short_t GetDetCha2(Int_t i) const { return fDetCha2[i]; }
69 const char* GetNamePH() { return fVectorPHEntries.GetName(); }
70 const char* GetNamePRF() { return fVectorPRFEntries.GetName(); }
71 const char* GetNameCH() { return fVectorCHEntries.GetName(); }
73 AliTRDarrayI *GetPHEntries(Int_t det,Bool_t force = kFALSE);
74 AliTRDarrayF *GetPHMean(Int_t det,Bool_t force = kFALSE);
75 AliTRDarrayF *GetPHSquares(Int_t det,Bool_t force = kFALSE);
77 AliTRDarrayI *GetPRFEntries(Int_t det,Bool_t force = kFALSE);
78 AliTRDarrayF *GetPRFMean(Int_t det,Bool_t force = kFALSE);
79 AliTRDarrayF *GetPRFSquares(Int_t det,Bool_t force = kFALSE);
81 AliTRDarrayI *GetCHEntries(Int_t det,Bool_t force = kFALSE);
87 AliTRDarrayI *fPHEntries; // Current AliTRDArrayI PH entries
88 AliTRDarrayF *fPHMean; // Current AliTRDArrayF PH Mean
89 AliTRDarrayF *fPHSquares; // Current AliTRDArrayF PH Squares
91 AliTRDarrayI *fPRFEntries; // Current AliTRDArrayI PH entries
92 AliTRDarrayF *fPRFMean; // Current AliTRDArrayF PH Mean
93 AliTRDarrayF *fPRFSquares; // Current AliTRDArrayF PH Squares
95 AliTRDarrayI *fCHEntries; // Current AliTRDArrayI PH entries
97 Int_t fDetectorPH; // Current detector
98 Int_t fDetectorCH; // Current detector
99 Int_t fDetectorPRF; // Current detector
101 // Arrays of these objects
103 TObjArray fVectorPHMean; // array of AliTRDarrayF of mean
104 TObjArray fVectorPHSquares; // array of AliTRDarrayF of squares
105 TObjArray fVectorPHEntries; // array of AliTRDarrayI of entries
106 TObjArray fVectorCHEntries; // array of AliTRDarrayI of entries
107 TObjArray fVectorPRFMean; // array of AliTRDarrayF of mean
108 TObjArray fVectorPRFSquares; // array of AliTRDarrayF of squares
109 TObjArray fVectorPRFEntries; // array of AliTRDarrayI of entries
113 Short_t fNumberBinCharge; // Number of bins for the gain factor
114 Short_t fNumberBinPRF; // Number of bin for the PRF
115 Int_t fTimeMax; // Number of time bins
116 Float_t fPRFRange; // Range PRF
117 Short_t fDetCha0[3]; // Number of XBins for chamber != 2
118 Short_t fDetCha2[3]; // Number of Xbins for chamber 2
123 AliTRDarrayI *GetEntriesPH(Int_t det, TObjArray *array, Bool_t force);
124 AliTRDarrayF *GetMeanSquaresPH(Int_t det, TObjArray *array, Bool_t force);
126 AliTRDarrayI *GetEntriesPRF(Int_t det, TObjArray *array, Bool_t force);
127 AliTRDarrayF *GetMeanSquaresPRF(Int_t det, TObjArray *array, Bool_t force);
129 AliTRDarrayI *GetEntriesCH(Int_t det, TObjArray *array, Bool_t force);
131 // Some basic geometry function
132 virtual Int_t GetStack(Int_t d) const;
134 ClassDef(AliTRDCalibraVector,1) // TRD Calibration class