]>
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. | |
b217491f | 11 | // Ratio high/low should be added too, pedestals and so on |
16d3c94d | 12 | // |
13 | //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA) | |
14 | ||
15 | // --- ROOT system --- | |
0fc11500 | 16 | #include <TNamed.h> |
17 | #include <TObjArray.h> | |
16d3c94d | 18 | |
19 | // unit is GeV | |
b217491f | 20 | class AliEMCALCalibCoef : public TObject { |
21 | friend class AliEMCALCalibCoefs; | |
22 | friend class AliEMCALFolder; | |
23 | friend class AliEMCALCell; | |
0fc11500 | 24 | public: |
b217491f | 25 | virtual const char* GetName() const {return Form("CC%5.5i",fAbsId);} |
26 | AliEMCALCalibCoef(); | |
27 | AliEMCALCalibCoef(const Int_t id, const Double_t c, const Double_t ec); | |
28 | virtual ~AliEMCALCalibCoef() {}; | |
0fc11500 | 29 | |
b217491f | 30 | protected: |
31 | Int_t fAbsId; // absolute id of cell | |
32 | Double_t fCc; // Calib. coef | |
33 | Double_t fECc; // Calib. coef. error | |
34 | ClassDef(AliEMCALCalibCoef,1) // Cell calibration information | |
16d3c94d | 35 | }; |
36 | ||
37 | class TH1F; | |
0fc11500 | 38 | class AliEMCALCalibData; |
16d3c94d | 39 | |
0fc11500 | 40 | class AliEMCALCalibCoefs : public TNamed { |
16d3c94d | 41 | public: |
42 | enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations | |
43 | ||
0fc11500 | 44 | AliEMCALCalibCoefs(); // default constractor |
6f377f0c | 45 | AliEMCALCalibCoefs(const AliEMCALCalibCoefs& coefs); // copy constractor |
0fc11500 | 46 | AliEMCALCalibCoefs(const char* name, const Int_t nrow); |
47 | virtual ~AliEMCALCalibCoefs(); | |
48 | ||
49 | AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs & /*rvalue*/) { | |
50 | // assignement operator requested by coding convention but not needed | |
51 | Fatal("operator =", "not implemented"); | |
52 | return *this; | |
53 | }; | |
b217491f | 54 | void AddAt(AliEMCALCalibCoef* r); |
55 | AliEMCALCalibCoef* GetTable(Int_t i) const; | |
0fc11500 | 56 | Int_t GetSize() const {return fTable->GetSize();} |
57 | Int_t GetNRows() const {return fCurrentInd;} | |
58 | void Purge() {/* nothing */}; | |
59 | ||
16d3c94d | 60 | void SetCalibMethod(Int_t var) {fCalibMethod=var;} |
b217491f | 61 | Int_t GetCalibMethod() const {return fCalibMethod;} |
62 | AliEMCALCalibCoef* GetRow(const int absId); | |
16d3c94d | 63 | // Get initial Calib Data from DB |
0fc11500 | 64 | static AliEMCALCalibCoefs *GetCalibTableFromDb(const char *tn="CCIN", AliEMCALCalibData **calData=0); |
65 | // const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB"); | |
66 | static TH1F *GetHistOfCalibTableFromDb(const char *tn="CCIN"); | |
67 | //const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB"); | |
68 | // Create DB calib table | |
69 | static AliEMCALCalibData* GetCalibTableForDb(const AliEMCALCalibCoefs *tab, | |
70 | const char* dbLocation="local://.", // current directory | |
71 | const char* coment="pi0 calibration, MC, Jun 2007"); | |
16d3c94d | 72 | // Menu |
73 | void PrintTable(); // *MENU* | |
74 | void PrintTable(const Int_t i); // *MENU* | |
b217491f | 75 | void PrintRec(AliEMCALCalibCoef *r); |
16d3c94d | 76 | |
0fc11500 | 77 | // |
16d3c94d | 78 | protected: |
b217491f | 79 | TObjArray *fTable; // table of CC |
80 | Int_t fCurrentInd; // Current index | |
16d3c94d | 81 | Int_t fCalibMethod; // method of calibration - EEmcalCalibType |
82 | ||
0fc11500 | 83 | ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients |
16d3c94d | 84 | }; |
85 | ||
86 | #endif // ALIEMCALCalibCoefs_H |