]>
Commit | Line | Data |
---|---|---|
55a288e5 | 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; | |
55a288e5 | 20 | class TObjArray; |
21 | ||
e526983e | 22 | class AliTRDPhInfo; |
23 | class AliTRDEntriesInfo; | |
24 | class AliTRDPrfInfo; | |
3a0f6479 | 25 | |
55a288e5 | 26 | class AliTRDCalibraVector : public TObject { |
27 | ||
28 | public: | |
29 | ||
30 | AliTRDCalibraVector(); | |
31 | AliTRDCalibraVector(const AliTRDCalibraVector &c); | |
32 | virtual ~AliTRDCalibraVector(); | |
55a288e5 | 33 | |
3a0f6479 | 34 | AliTRDCalibraVector& operator = (const AliTRDCalibraVector &source); |
35 | ||
e526983e | 36 | // Init |
37 | void TestInit(Int_t i, Int_t detmax); | |
38 | ||
3a0f6479 | 39 | // Fill |
3a0f6479 | 40 | Bool_t UpdateVectorCH(Int_t det, Int_t group, Float_t value); |
41 | Bool_t UpdateVectorPRF(Int_t det, Int_t group, Float_t x, Float_t y); | |
42 | Bool_t UpdateVectorPH(Int_t det, Int_t group, Int_t time, Float_t value); | |
e526983e | 43 | |
44 | ||
45 | Bool_t FillVectorCH(Int_t det, Int_t group, Int_t bin, Int_t entries); | |
46 | Bool_t FillVectorPRF(Int_t det, Int_t group, Int_t bin, Int_t entries, Float_t mean, Float_t square); | |
47 | Bool_t FillVectorPH(Int_t det, Int_t group, Int_t bin, Int_t entries, Float_t mean, Float_t square); | |
00a3834d | 48 | |
3a0f6479 | 49 | |
50 | // Add | |
51 | Bool_t Add(AliTRDCalibraVector *calvector); | |
e526983e | 52 | |
53 | AliTRDCalibraVector *AddStatsPerDetectorCH(); | |
54 | AliTRDCalibraVector *AddStatsPerDetectorPH(); | |
55 | AliTRDCalibraVector *AddStatsPerDetectorPRF(); | |
56 | ||
3a0f6479 | 57 | |
58 | // Fit | |
59 | TGraphErrors *ConvertVectorPHTGraphErrors(Int_t det, Int_t group, const Char_t *name); | |
60 | TGraphErrors *ConvertVectorPRFTGraphErrors(Int_t det, Int_t group, const Char_t *name); | |
e526983e | 61 | TH1F *CorrectTheError(const TGraphErrors *hist, Int_t &nbEntries); |
3a0f6479 | 62 | TH1F *ConvertVectorCHHisto(Int_t det, Int_t group, const Char_t *name); |
55a288e5 | 63 | |
e526983e | 64 | // Find |
65 | Int_t SearchBin(Float_t value, Int_t i) const; | |
66 | Bool_t FindTheMaxEntries(Int_t i, Int_t &detectormax, Int_t &groupmax); | |
67 | ||
55a288e5 | 68 | // |
69 | // Set and Get methods | |
70 | // | |
71 | ||
72 | void SetNumberBinCharge(Short_t numberbincharge) { fNumberBinCharge = numberbincharge; } | |
73 | void SetNumberBinPRF(Short_t numberbinprf) { fNumberBinPRF = numberbinprf; } | |
170c35f1 | 74 | void SetTimeMax(Int_t timemax) { fTimeMax = timemax; } |
75 | void SetPRFRange(Float_t prfrange) { fPRFRange = prfrange; } | |
3a0f6479 | 76 | void SetDetCha0(Int_t i, Short_t total) { fDetCha0[i] = total; } |
77 | void SetDetCha2(Int_t i, Short_t total) { fDetCha2[i] = total; } | |
e526983e | 78 | void SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi); |
79 | void SetNbGroupPRF(Int_t nbGroup) { fNbGroupPRF = (UChar_t) nbGroup; } | |
55a288e5 | 80 | |
81 | Short_t GetNumberBinCharge()const { return fNumberBinCharge; } | |
82 | Short_t GetNumberBinPRF()const { return fNumberBinPRF; } | |
83 | Int_t GetTimeMax()const { return fTimeMax; } | |
170c35f1 | 84 | Float_t GetPRFRange()const { return fPRFRange; } |
0bc7827a | 85 | Short_t GetDetCha0(Int_t i) const { return fDetCha0[i]; } |
86 | Short_t GetDetCha2(Int_t i) const { return fDetCha2[i]; } | |
e526983e | 87 | TString GetNamePH() const; |
88 | TString GetNamePRF() const; | |
89 | TString GetNameCH() const; | |
90 | Int_t GetNz(Int_t i) const; | |
91 | Int_t GetNrphi(Int_t i) const; | |
92 | Int_t GetNbGroupPRF() const { return (Int_t)fNbGroupPRF; } | |
93 | ||
94 | Int_t GetTotalNumberOfBinsInDetector(Int_t det, Int_t i, Int_t nbBin) const; | |
95 | ||
96 | TObject *GetPHEntries(Int_t det,Bool_t force = kFALSE); | |
97 | TObject *GetPHMean(Int_t det,Bool_t force = kFALSE); | |
98 | TObject *GetPHSquares(Int_t det,Bool_t force = kFALSE); | |
99 | ||
100 | TObject *GetPRFEntries(Int_t det,Bool_t force = kFALSE); | |
101 | TObject *GetPRFMean(Int_t det,Bool_t force = kFALSE); | |
102 | TObject *GetPRFSquares(Int_t det,Bool_t force = kFALSE); | |
103 | ||
104 | TObject *GetCHEntries(Int_t det,Bool_t force = kFALSE); | |
3a0f6479 | 105 | |
e526983e | 106 | |
107 | ||
55a288e5 | 108 | protected: |
e526983e | 109 | |
3a0f6479 | 110 | // Current data |
e526983e | 111 | |
112 | AliTRDEntriesInfo *fPHEntries[540]; // PH entries | |
113 | AliTRDPhInfo *fPHMean[540]; // PH Mean | |
114 | AliTRDPhInfo *fPHSquares[540]; // PH Squares | |
115 | ||
116 | AliTRDEntriesInfo *fPRFEntries[540]; // PRF entries | |
117 | AliTRDPrfInfo *fPRFMean[540]; // PRF Mean | |
118 | AliTRDPrfInfo *fPRFSquares[540]; // PRF Squares | |
119 | ||
120 | AliTRDEntriesInfo *fCHEntries[540]; // CH entries | |
121 | ||
122 | UChar_t fModeCH; // Calibration mode | |
123 | UChar_t fModePH; // Calibration mode | |
124 | UChar_t fModePRF; // Calibration mode | |
125 | UChar_t fNbGroupPRF; // Nb of group PRD | |
126 | ||
127 | ||
128 | Int_t fDetectorPH; //! Current detector | |
129 | Int_t fDetectorCH; //! Current detector | |
130 | Int_t fDetectorPRF; //! Current detector | |
131 | Bool_t fStopFillCH; //! To know if we stop to fill | |
132 | TH1F *fHisto; //! Histo to be fitted | |
133 | TGraphErrors *fGraph; //! TGraphError | |
134 | AliTRDCalibraVector *fCalVector; //! AliTRDCalibraVector | |
135 | ||
55a288e5 | 136 | // Size of the infos |
e526983e | 137 | |
138 | Short_t fNumberBinCharge; // Number of bins for the gain factor | |
139 | Short_t fNumberBinPRF; // Number of bin for the PRF | |
140 | Int_t fTimeMax; // Number of time bins | |
141 | Float_t fPRFRange; // Range PRF | |
142 | Short_t fDetCha0[3]; // Number of XBins for chamber != 2 | |
143 | Short_t fDetCha2[3]; // Number of Xbins for chamber 2 | |
144 | ||
55a288e5 | 145 | // Some functions |
3a0f6479 | 146 | |
e526983e | 147 | AliTRDEntriesInfo *GetEntriesPH(Int_t det, AliTRDEntriesInfo** array, Bool_t force); |
148 | AliTRDPhInfo *GetMeanSquaresPH(Int_t det, AliTRDPhInfo** array, Bool_t force); | |
149 | ||
150 | AliTRDEntriesInfo *GetEntriesPRF(Int_t det, AliTRDEntriesInfo** array, Bool_t force); | |
151 | AliTRDPrfInfo *GetMeanSquaresPRF(Int_t det, AliTRDPrfInfo** array, Bool_t force); | |
55a288e5 | 152 | |
e526983e | 153 | AliTRDEntriesInfo *GetEntriesCH(Int_t det, AliTRDEntriesInfo** array, Bool_t force); |
154 | ||
155 | ClassDef(AliTRDCalibraVector,1) // TRD Calibration class | |
156 | ||
157 | }; | |
158 | ||
55a288e5 | 159 | #endif |
160 |