]>
Commit | Line | Data |
---|---|---|
16d3c94d | 1 | #ifndef ALIEMCALCALIBCOEFS_H |
2 | #define ALIEMCALCALIBCOEFS_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
0fc11500 | 9 | // Table of Calibration coefficients |
10 | // Should be extended. | |
16d3c94d | 11 | // |
12 | //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA) | |
13 | ||
14 | // --- ROOT system --- | |
0fc11500 | 15 | #include <TNamed.h> |
16 | #include <TObjArray.h> | |
16d3c94d | 17 | |
18 | // unit is GeV | |
0fc11500 | 19 | class calibCoef : public TObject { |
20 | public: | |
21 | virtual const char* GetName() const {return Form("CC%5.5i",absId);} | |
22 | calibCoef(); | |
23 | calibCoef(const Int_t id, const Double_t c, const Double_t ec); | |
24 | virtual ~calibCoef() {}; | |
25 | ||
16d3c94d | 26 | Int_t absId; // absolute id of cell |
27 | Double_t cc; // Calib. coef | |
28 | Double_t eCc; // Calib. coef. error | |
0fc11500 | 29 | // |
30 | ClassDef(calibCoef,1) // Cell calibration information | |
16d3c94d | 31 | }; |
32 | ||
33 | class TH1F; | |
0fc11500 | 34 | class AliEMCALCalibData; |
16d3c94d | 35 | |
0fc11500 | 36 | class AliEMCALCalibCoefs : public TNamed { |
16d3c94d | 37 | public: |
38 | enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations | |
39 | ||
0fc11500 | 40 | AliEMCALCalibCoefs(); // default constractor |
41 | AliEMCALCalibCoefs(const char* name, const Int_t nrow); | |
42 | virtual ~AliEMCALCalibCoefs(); | |
43 | ||
44 | AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs & /*rvalue*/) { | |
45 | // assignement operator requested by coding convention but not needed | |
46 | Fatal("operator =", "not implemented"); | |
47 | return *this; | |
48 | }; | |
49 | void AddAt(calibCoef* r); | |
50 | calibCoef* GetTable(Int_t i) const; | |
51 | Int_t GetSize() const {return fTable->GetSize();} | |
52 | Int_t GetNRows() const {return fCurrentInd;} | |
53 | void Purge() {/* nothing */}; | |
54 | ||
16d3c94d | 55 | void SetCalibMethod(Int_t var) {fCalibMethod=var;} |
56 | Int_t GetCalibMethod() {return fCalibMethod;} | |
57 | calibCoef* GetRow(const int absId); | |
58 | // Get initial Calib Data from DB | |
0fc11500 | 59 | static AliEMCALCalibCoefs *GetCalibTableFromDb(const char *tn="CCIN", AliEMCALCalibData **calData=0); |
60 | // const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB"); | |
61 | static TH1F *GetHistOfCalibTableFromDb(const char *tn="CCIN"); | |
62 | //const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB"); | |
63 | // Create DB calib table | |
64 | static AliEMCALCalibData* GetCalibTableForDb(const AliEMCALCalibCoefs *tab, | |
65 | const char* dbLocation="local://.", // current directory | |
66 | const char* coment="pi0 calibration, MC, Jun 2007"); | |
16d3c94d | 67 | // Menu |
68 | void PrintTable(); // *MENU* | |
69 | void PrintTable(const Int_t i); // *MENU* | |
70 | void PrintRec(calibCoef *r); | |
71 | ||
0fc11500 | 72 | // |
16d3c94d | 73 | protected: |
0fc11500 | 74 | TObjArray *fTable; |
75 | Int_t fCurrentInd; | |
16d3c94d | 76 | Int_t fCalibMethod; // method of calibration - EEmcalCalibType |
77 | ||
0fc11500 | 78 | ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients |
16d3c94d | 79 | }; |
80 | ||
81 | #endif // ALIEMCALCalibCoefs_H |