updated source compilation files collection
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibraVector.h
CommitLineData
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
18class TGraphErrors;
19class TH1F;
55a288e5 20class TObjArray;
21
00a3834d 22class TArrayF;
23class TArrayI;
3a0f6479 24
55a288e5 25class AliTRDCalibraVector : public TObject {
26
27 public:
28
29 AliTRDCalibraVector();
30 AliTRDCalibraVector(const AliTRDCalibraVector &c);
31 virtual ~AliTRDCalibraVector();
55a288e5 32
3a0f6479 33 AliTRDCalibraVector& operator = (const AliTRDCalibraVector &source);
34
35 // Fill
55a288e5 36 Int_t SearchBin(Float_t value, Int_t i) const;
3a0f6479 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);
00a3834d 40
41
3a0f6479 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);
55a288e5 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; }
170c35f1 57 void SetTimeMax(Int_t timemax) { fTimeMax = timemax; }
58 void SetPRFRange(Float_t prfrange) { fPRFRange = prfrange; }
3a0f6479 59 void SetDetCha0(Int_t i, Short_t total) { fDetCha0[i] = total; }
60 void SetDetCha2(Int_t i, Short_t total) { fDetCha2[i] = total; }
00a3834d 61 void SetNamePH(const char* name) { fNamePH = name; }
62 void SetNamePRF(const char* name) { fNamePRF = name; }
63 void SetNameCH(const char* name) { fNameCH = name; }
55a288e5 64
65 Short_t GetNumberBinCharge()const { return fNumberBinCharge; }
66 Short_t GetNumberBinPRF()const { return fNumberBinPRF; }
67 Int_t GetTimeMax()const { return fTimeMax; }
170c35f1 68 Float_t GetPRFRange()const { return fPRFRange; }
0bc7827a 69 Short_t GetDetCha0(Int_t i) const { return fDetCha0[i]; }
70 Short_t GetDetCha2(Int_t i) const { return fDetCha2[i]; }
00a3834d 71 const char* GetNamePH() { return fNamePH; }
72 const char* GetNamePRF() { return fNamePRF; }
73 const char* GetNameCH() { return fNameCH; }
74
3a0f6479 75
00a3834d 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);
3a0f6479 80
00a3834d 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);
3a0f6479 84
00a3834d 85 TArrayI *GetCHEntries(Int_t det,Bool_t force = kFALSE);
3a0f6479 86
55a288e5 87 protected:
88
3a0f6479 89 // Current data
90
00a3834d 91 TArrayI *fPHEntries[540]; // Current AliTRDArrayI PH entries
92 TArrayF *fPHMean[540]; // Current AliTRDArrayF PH Mean
93 TArrayF *fPHSquares[540]; // Current AliTRDArrayF PH Squares
3a0f6479 94
00a3834d 95 TArrayI *fPRFEntries[540]; // Current AliTRDArrayI PH entries
96 TArrayF *fPRFMean[540]; // Current AliTRDArrayF PH Mean
97 TArrayF *fPRFSquares[540]; // Current AliTRDArrayF PH Squares
55a288e5 98
00a3834d 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
3a0f6479 104
105 Int_t fDetectorPH; // Current detector
106 Int_t fDetectorCH; // Current detector
107 Int_t fDetectorPRF; // Current detector
108
55a288e5 109 // Size of the infos
110
3a0f6479 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
55a288e5 117
118 // Some functions
119
55a288e5 120
00a3834d 121 TArrayI *GetEntriesPH(Int_t det, TArrayI** array, Bool_t force);
122 TArrayF *GetMeanSquaresPH(Int_t det, TArrayF** array, Bool_t force);
3a0f6479 123
00a3834d 124 TArrayI *GetEntriesPRF(Int_t det, TArrayI** array, Bool_t force);
125 TArrayF *GetMeanSquaresPRF(Int_t det, TArrayF** array, Bool_t force);
3a0f6479 126
00a3834d 127 TArrayI *GetEntriesCH(Int_t det, TArrayI** array, Bool_t force);
3a0f6479 128
129 // Some basic geometry function
053767a4 130 virtual Int_t GetStack(Int_t d) const;
3a0f6479 131
55a288e5 132 ClassDef(AliTRDCalibraVector,1) // TRD Calibration class
133
134};
135
136#endif
137
138