]>
Commit | Line | Data |
---|---|---|
c5bbaa2c | 1 | #ifndef ALITPCCALIBDB_H |
2 | #define ALITPCCALIBDB_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 | ||
418bbcaf | 13 | class AliTPCTransform; |
14 | class AliTPCExB; | |
c5bbaa2c | 15 | #include "TObject.h" |
bf85fe4d | 16 | #include "TObjArray.h" |
17 | #include "TArrayI.h" | |
18 | #include "TVectorD.h" | |
19 | ||
c5bbaa2c | 20 | class AliTPCCalPad; |
54472e4f | 21 | class AliTPCSensorTempArray; |
e7e39fb5 | 22 | class AliDCSSensorArray; |
c5bbaa2c | 23 | class AliCDBEntry; |
8477f500 | 24 | class AliTPCParam; |
d6834f5f | 25 | class AliTPCAltroMapping; |
96305e49 | 26 | class AliTPCClusterParam; |
bf85fe4d | 27 | class AliDCSSensor; |
28 | class AliDCSSensorArray; | |
da6c0bc9 | 29 | class AliTPCCalibVdrift; |
8de77f00 | 30 | class AliGRPObject; |
68751c2c | 31 | //class AliCDBStorage; |
c5bbaa2c | 32 | |
33 | class AliTPCcalibDB : public TObject | |
34 | { | |
35 | public: | |
36 | static AliTPCcalibDB* Instance(); | |
37 | AliTPCcalibDB(); | |
38 | virtual ~AliTPCcalibDB(); | |
39 | static void Terminate(); | |
40 | void SetRun(Long64_t run); | |
41 | // | |
f5344549 | 42 | AliTPCTransform* GetTransform() {return fTransform;} |
3ac615eb | 43 | AliTPCExB* GetExB() {return fExB;} |
f4d5fd21 | 44 | void SetExBField(Float_t bz); |
3ac615eb | 45 | static AliTPCExB* GetExB(Float_t bz,Bool_t bdelete); |
54472e4f | 46 | AliTPCCalPad* GetPadGainFactor() {return fPadGainFactor;} |
9f6e9f81 | 47 | AliTPCCalPad* GetDedxGainFactor() {return fDedxGainFactor;} |
54472e4f | 48 | AliTPCCalPad* GetPadTime0() {return fPadTime0;} |
54472e4f | 49 | AliTPCCalPad* GetPadNoise() {return fPadNoise;} |
50 | AliTPCCalPad* GetPedestals() {return fPedestals;} | |
51 | AliTPCSensorTempArray* GetTemperature() {return fTemperature;} | |
52 | AliTPCParam* GetParameters(){return fParam;} | |
d6834f5f | 53 | AliTPCAltroMapping ** GetMapping(){ return fMapping;} |
96305e49 | 54 | AliTPCClusterParam *GetClusterParam(){ return fClusterParam;} |
d6834f5f | 55 | // |
da6c0bc9 | 56 | // |
8de77f00 | 57 | static AliGRPObject * GetGRP(Int_t run); |
da6c0bc9 | 58 | static Float_t GetPressure(Int_t timeStamp, Int_t run, Int_t type=0); |
7f7847fe | 59 | static Float_t GetValueGoofie(Int_t timeStamp, Int_t run, Int_t type); |
64b48395 | 60 | static Bool_t GetTemperatureFit(Int_t timeStamp, Int_t run, Int_t side,TVectorD& fit); |
61 | static Float_t GetTemperature(Int_t timeStamp, Int_t run, Int_t side); | |
da6c0bc9 | 62 | static Double_t GetPTRelative(UInt_t timeSec, Int_t run, Int_t side); |
63 | AliDCSSensor * GetPressureSensor(Int_t run, Int_t type=0); | |
bf85fe4d | 64 | AliTPCSensorTempArray * GetTemperatureSensor(Int_t run); |
65 | AliDCSSensorArray * GetGoofieSensors(Int_t run); | |
da6c0bc9 | 66 | AliTPCCalibVdrift * GetVdrift(Int_t run); |
bf85fe4d | 67 | static Float_t GetGain(Int_t sector, Int_t row, Int_t pad); |
68 | // | |
86df2b3a | 69 | static void CreateObjectList(const Char_t *filename, TObjArray *calibObjects); |
70 | static void MakeTree(const char * fileName, TObjArray * array, const char * mapFileName = 0, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9); | |
3ac615eb | 71 | static void RegisterExB(Int_t index, Float_t bz, Bool_t bdelete); |
c5bbaa2c | 72 | // |
bf85fe4d | 73 | // |
74 | static void ProcessGoofie( AliDCSSensorArray* goofieArray, TVectorD & vecEntries, TVectorD & vecMedian, TVectorD &vecMean, TVectorD &vecRMS); | |
75 | static void ProcessEnv(const char * runList); | |
76 | ||
77 | // | |
c5bbaa2c | 78 | protected: |
79 | void Update(); //update entries | |
80 | AliCDBEntry* GetCDBEntry(const char* cdbPath); | |
bf85fe4d | 81 | void GetRunInformations(Int_t run); // JUST FOR CALIBRATION STUDIES |
481f877b | 82 | Long64_t fRun; // current run number |
f5344549 | 83 | AliTPCTransform *fTransform; // object responsible for spacial corrections |
418bbcaf | 84 | AliTPCExB *fExB; // ExB correction factor |
68751c2c | 85 | // AliCDBStorage* fLocator; // Storage locator retrieved from AliCDBManager |
c5bbaa2c | 86 | // |
87 | // calibration parameters per pad | |
88 | // | |
418bbcaf | 89 | AliTPCCalPad* fPadGainFactor; // Gain calibration entry |
9f6e9f81 | 90 | AliTPCCalPad* fDedxGainFactor; // Gain calibration entry - for dEdx |
418bbcaf | 91 | AliTPCCalPad* fPadTime0; // Time0 calibration entry |
418bbcaf | 92 | AliTPCCalPad* fPadNoise; // Noise calibration entry |
93 | AliTPCCalPad* fPedestals; // Pedestal calibration entry | |
94 | AliTPCSensorTempArray* fTemperature; // Temperature calibration entry | |
d6834f5f | 95 | AliTPCAltroMapping **fMapping; // Altro mapping |
8477f500 | 96 | // |
97 | // | |
418bbcaf | 98 | AliTPCParam * fParam; // TPC parameters |
96305e49 | 99 | AliTPCClusterParam * fClusterParam; // TPC cluster error, shape and Q parameterization |
c5bbaa2c | 100 | // |
bf85fe4d | 101 | // Get the corssrun information |
102 | // | |
103 | TObjArray fGRPArray; //! array of GRPs - per run | |
104 | TObjArray fGoofieArray; //! array of GOOFIE values -per run | |
105 | TObjArray fTemperatureArray; //! array of temperature sensors - per run | |
da6c0bc9 | 106 | TObjArray fVdriftArray; //! array of v drift interfaces |
bf85fe4d | 107 | TArrayI fRunList; //! run list - indicates try to get the run param |
108 | // | |
418bbcaf | 109 | static AliTPCcalibDB* fgInstance; // singleton control |
110 | static Bool_t fgTerminated; // termination control | |
3ac615eb | 111 | static TObjArray fgExBArray; // array of ExB corrections |
c5bbaa2c | 112 | ClassDef(AliTPCcalibDB, 0) |
e4dce695 | 113 | private: |
f4a89669 | 114 | AliTPCcalibDB (const AliTPCcalibDB& ); |
115 | AliTPCcalibDB& operator= (const AliTPCcalibDB& ); | |
c5bbaa2c | 116 | }; |
117 | ||
118 | ||
119 | #endif |