]>
Commit | Line | Data |
---|---|---|
3551db50 | 1 | #ifndef ALITRDCALIBDB_H |
2 | #define ALITRDCALIBDB_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /////////////////////////////////////////////////////////////////////////////// | |
7 | // // | |
8 | // Class providing the calibration parameters by accessing the CDB // | |
9 | // // | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | /* $Id$ */ | |
13 | ||
4ba1d6ae | 14 | #ifndef ROOT_TObject |
3551db50 | 15 | #include "TObject.h" |
4ba1d6ae | 16 | #endif |
17 | ||
0d83b3a5 | 18 | #ifndef ALITRDPIDUTIL_H |
19 | #include "AliTRDpidUtil.h" | |
4ba1d6ae | 20 | #endif |
3551db50 | 21 | |
9dcc64cc | 22 | #ifndef ALITRDPIDRESPONSE_H |
23 | #include "AliTRDPIDResponse.h" | |
24 | #endif | |
25 | ||
2745a409 | 26 | class AliCDBEntry; |
3551db50 | 27 | |
0d83b3a5 | 28 | class AliTRDrecoParam; |
9dcc64cc | 29 | class AliTRDCalTrkAttach; |
720a0a16 | 30 | class AliTRDCalPID; |
7754cd1f | 31 | class AliTRDCalMonitoring; |
56178ff4 | 32 | class AliTRDCalROC; |
33 | class AliTRDCalDet; | |
0e09df31 | 34 | class AliTRDCalSingleChamberStatus; |
e232d349 | 35 | class TString; |
2745a409 | 36 | class AliTRDcalibDB : public TObject { |
37 | ||
38 | public: | |
39 | ||
053767a4 | 40 | enum { kNlayer = 6 |
41 | , kNstack = 5 | |
42 | , kNsector = 18 | |
43 | , kNdet = 540 }; | |
6a739e92 | 44 | |
0e09df31 | 45 | static AliTRDcalibDB *Instance(); |
46 | static void Terminate(); | |
3551db50 | 47 | |
0e09df31 | 48 | void SetRun(Long64_t run); |
49 | Long64_t GetRun() const { return fRun; } | |
7754cd1f | 50 | |
df83a620 | 51 | Float_t GetNoise(Int_t det, Int_t col, Int_t row); |
52 | AliTRDCalROC *GetNoiseROC(Int_t det); | |
53 | const AliTRDCalDet *GetNoiseDet(); | |
54 | ||
0e09df31 | 55 | Float_t GetVdrift(Int_t det, Int_t col, Int_t row); |
56 | Float_t GetVdriftAverage(Int_t det); | |
57 | AliTRDCalROC *GetVdriftROC(Int_t det); | |
58 | const AliTRDCalDet *GetVdriftDet(); | |
7754cd1f | 59 | |
0e09df31 | 60 | Float_t GetT0(Int_t det, Int_t col, Int_t row); |
61 | Float_t GetT0Average(Int_t det); | |
62 | AliTRDCalROC *GetT0ROC(Int_t det); | |
63 | const AliTRDCalDet *GetT0Det(); | |
7754cd1f | 64 | |
0e09df31 | 65 | Float_t GetGainFactor(Int_t det, Int_t col, Int_t row); |
66 | Float_t GetGainFactorAverage(Int_t det); | |
4ba1d6ae | 67 | AliTRDCalROC *GetGainFactorROC(Int_t det); |
0e09df31 | 68 | const AliTRDCalDet *GetGainFactorDet(); |
3551db50 | 69 | |
4ba1d6ae | 70 | AliTRDCalROC *GetPRFROC(Int_t det); |
0e09df31 | 71 | Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row); |
7754cd1f | 72 | |
be28462a | 73 | Float_t* GetSampledPRF() const { return fPRFsmp; }; |
74 | Int_t GetPRFbin() const { return fPRFbin; }; | |
75 | Float_t GetPRFlo() const { return fPRFlo; }; | |
76 | Float_t GetPRFhi() const { return fPRFhi; }; | |
fa7427d0 | 77 | |
e232d349 | 78 | Int_t GetNumberOfTimeBinsDCS(); |
79 | void GetFilterType(TString &filterType); | |
af086c5e | 80 | void GetGlobalConfiguration(TString &config); |
81 | Bool_t HasOnlineFilterPedestal(); | |
82 | Bool_t HasOnlineFilterGain(); | |
83 | Bool_t HasOnlineTailCancellation(); | |
7754cd1f | 84 | |
0e09df31 | 85 | Char_t GetPadStatus(Int_t det, Int_t col, Int_t row); |
4ba1d6ae | 86 | AliTRDCalSingleChamberStatus *GetPadStatusROC(Int_t det); |
a7ac01d2 | 87 | AliTRDrecoParam* GetRecoParam(Int_t *eventtype); |
9dcc64cc | 88 | AliTRDPIDResponse *GetPIDResponse(AliTRDPIDResponse::ETRDPIDMethod m); |
7754cd1f | 89 | |
0e09df31 | 90 | Char_t GetChamberStatus(Int_t det); |
91 | ||
92 | Bool_t IsPadMasked(Int_t det, Int_t col, Int_t row); | |
93 | Bool_t IsPadBridgedLeft(Int_t det, Int_t col, Int_t row); | |
94 | Bool_t IsPadBridgedRight(Int_t det, Int_t col, Int_t row); | |
fa7427d0 | 95 | Bool_t IsPadNotConnected(Int_t det, Int_t col, Int_t row); |
3551db50 | 96 | |
0e09df31 | 97 | Bool_t IsChamberInstalled(Int_t det); |
98 | Bool_t IsChamberMasked(Int_t det); | |
7a6352a6 | 99 | Bool_t IsHalfChamberMasked(Int_t det, Int_t side); |
7754cd1f | 100 | |
0e09df31 | 101 | const AliTRDCalMonitoring *GetMonitoringObject(); |
0d83b3a5 | 102 | const AliTRDCalPID *GetPIDObject(AliTRDpidUtil::ETRDPIDMethod m); |
9dcc64cc | 103 | const AliTRDCalTrkAttach *GetAttachObject(); |
7754cd1f | 104 | |
2745a409 | 105 | // Related functions, these depend on calibration data |
0e09df31 | 106 | Int_t PadResponse(Double_t signal, Double_t dist |
053767a4 | 107 | , Int_t layer, Double_t *pad) const; |
543691ea | 108 | |
2745a409 | 109 | protected: |
110 | ||
111 | // For caching see also implentation of GetCachedCDBObject in the .cxx file | |
b43a3e17 | 112 | enum { kIDVdriftPad = 0 |
113 | , kIDVdriftChamber | |
114 | , kIDT0Pad | |
115 | , kIDT0Chamber | |
116 | , kIDGainFactorPad | |
117 | , kIDGainFactorChamber | |
df83a620 | 118 | , kIDNoiseChamber |
119 | , kIDNoisePad | |
b43a3e17 | 120 | , kIDPRFWidth |
aa617684 | 121 | , kIDFEE |
b43a3e17 | 122 | , kIDChamberPos |
123 | , kIDStackPos | |
124 | , kIDSuperModulePos | |
44dbae42 | 125 | , kIDPIDNN |
b43a3e17 | 126 | , kIDPIDLQ |
9dcc64cc | 127 | , kIDPIDLQ1D |
a7ac01d2 | 128 | , kIDRecoParam |
b43a3e17 | 129 | , kIDMonitoringData |
130 | , kIDChamberStatus | |
913950a4 | 131 | , kIDPadStatus |
d6a1ec13 | 132 | , kIDDCS |
9dcc64cc | 133 | , kIDAttach |
d6a1ec13 | 134 | , kCDBCacheSize }; // IDs of cached objects |
7754cd1f | 135 | |
56178ff4 | 136 | const TObject *GetCachedCDBObject(Int_t id); |
3551db50 | 137 | |
2745a409 | 138 | void Invalidate(); |
139 | void SamplePRF(); | |
6a739e92 | 140 | |
b43a3e17 | 141 | AliCDBEntry *GetCDBEntry(const Char_t *cdbPath); |
142 | const TObject *CacheCDBEntry(Int_t id, const Char_t *cdbPath); | |
7754cd1f | 143 | |
2745a409 | 144 | static AliTRDcalibDB *fgInstance; // Instance of this class (singleton implementation) |
145 | static Bool_t fgTerminated; // Defines if this class has already been terminated | |
6d50f529 | 146 | |
2745a409 | 147 | AliCDBEntry *fCDBEntries[kCDBCacheSize]; // Cache for CDB entries |
148 | TObject *fCDBCache[kCDBCacheSize]; // Cache for calibration objects. | |
6a739e92 | 149 | |
2745a409 | 150 | Long64_t fRun; // Run Number |
3551db50 | 151 | |
6d50f529 | 152 | Float_t *fPRFsmp; //! Sampled pad response |
153 | Int_t fPRFbin; // Number of bins for the PRF | |
154 | Float_t fPRFlo; // Lower boundary of the PRF | |
155 | Float_t fPRFhi; // Higher boundary of the PRF | |
156 | Float_t fPRFwid; // Bin width of the sampled PRF | |
157 | Int_t fPRFpad; // Distance to next pad in PRF | |
9dcc64cc | 158 | AliTRDPIDResponse *fPIDResponse; // TRD PID Response function |
6a739e92 | 159 | |
2745a409 | 160 | private: |
161 | ||
162 | AliTRDcalibDB(); // This is a singleton, constructor is private! | |
163 | AliTRDcalibDB(const AliTRDcalibDB &c); | |
164 | AliTRDcalibDB &operator=(const AliTRDcalibDB &c); | |
3551db50 | 165 | virtual ~AliTRDcalibDB(); |
166 | ||
9dcc64cc | 167 | ClassDef(AliTRDcalibDB, 5) // Provides central access to the CDB |
2745a409 | 168 | |
3551db50 | 169 | }; |
170 | ||
3551db50 | 171 | #endif |
7a6352a6 | 172 |