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