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