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 */
8 //_________________________________________________________________________
9 // Table of Calibration coefficients
10 // Should be extended.
11 // Ratio high/low should be added too, pedestals and so on
13 //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA)
15 // --- ROOT system ---
17 #include <TObjArray.h>
20 class AliEMCALCalibCoef : public TObject {
21 friend class AliEMCALCalibCoefs;
22 friend class AliEMCALFolder;
23 friend class AliEMCALCell;
25 virtual const char* GetName() const {return Form("CC%5.5i",fAbsId);}
27 AliEMCALCalibCoef(const Int_t id, const Double_t c, const Double_t ec);
28 virtual ~AliEMCALCalibCoef() {};
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
38 class AliEMCALCalibData;
40 class AliEMCALCalibCoefs : public TNamed {
42 enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations
44 AliEMCALCalibCoefs(); // default constractor
45 AliEMCALCalibCoefs(const AliEMCALCalibCoefs& coefs); // copy constractor
46 AliEMCALCalibCoefs(const char* name, const Int_t nrow);
47 virtual ~AliEMCALCalibCoefs();
49 AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs & /*rvalue*/) {
50 // assignement operator requested by coding convention but not needed
51 Fatal("operator =", "not implemented");
54 void AddAt(AliEMCALCalibCoef* r);
55 AliEMCALCalibCoef* GetTable(Int_t i) const;
56 Int_t GetSize() const {return fTable->GetSize();}
57 Int_t GetNRows() const {return fCurrentInd;}
58 void Purge() {/* nothing */};
60 void SetCalibMethod(Int_t var) {fCalibMethod=var;}
61 Int_t GetCalibMethod() const {return fCalibMethod;}
62 AliEMCALCalibCoef* GetRow(const int absId);
63 // Get initial Calib Data from DB
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");
73 void PrintTable(); // *MENU*
74 void PrintTable(const Int_t i); // *MENU*
75 void PrintRec(AliEMCALCalibCoef *r);
79 TObjArray *fTable; // table of CC
80 Int_t fCurrentInd; // Current index
81 Int_t fCalibMethod; // method of calibration - EEmcalCalibType
83 ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients
86 #endif // ALIEMCALCalibCoefs_H