]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALCalibCoefs.h
Restoring possibility to load the libraries
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCalibCoefs.h
CommitLineData
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 20class 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
37class TH1F;
0fc11500 38class AliEMCALCalibData;
16d3c94d 39
0fc11500 40class AliEMCALCalibCoefs : public TNamed {
16d3c94d 41 public:
42 enum EEmcalCalibType {kMC, kEQUALIZATION, kMIP, kPI0}; // type of EMCAL calibrations
43
0fc11500 44 AliEMCALCalibCoefs(); // default constractor
45 AliEMCALCalibCoefs(const char* name, const Int_t nrow);
46 virtual ~AliEMCALCalibCoefs();
47
48 AliEMCALCalibCoefs & operator = (const AliEMCALCalibCoefs & /*rvalue*/) {
49 // assignement operator requested by coding convention but not needed
50 Fatal("operator =", "not implemented");
51 return *this;
52 };
b217491f 53 void AddAt(AliEMCALCalibCoef* r);
54 AliEMCALCalibCoef* GetTable(Int_t i) const;
0fc11500 55 Int_t GetSize() const {return fTable->GetSize();}
56 Int_t GetNRows() const {return fCurrentInd;}
57 void Purge() {/* nothing */};
58
16d3c94d 59 void SetCalibMethod(Int_t var) {fCalibMethod=var;}
b217491f 60 Int_t GetCalibMethod() const {return fCalibMethod;}
61 AliEMCALCalibCoef* GetRow(const int absId);
16d3c94d 62 // Get initial Calib Data from DB
0fc11500 63 static AliEMCALCalibCoefs *GetCalibTableFromDb(const char *tn="CCIN", AliEMCALCalibData **calData=0);
64 // const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
65 static TH1F *GetHistOfCalibTableFromDb(const char *tn="CCIN");
66 //const char* dbLocation="local:///data/r22b/ALICE/PROD/CALIBRATION_May_2007/PI0/PDSF/10GEV/DECALIB/DeCalibDB");
67 // Create DB calib table
68 static AliEMCALCalibData* GetCalibTableForDb(const AliEMCALCalibCoefs *tab,
69 const char* dbLocation="local://.", // current directory
70 const char* coment="pi0 calibration, MC, Jun 2007");
16d3c94d 71 // Menu
72 void PrintTable(); // *MENU*
73 void PrintTable(const Int_t i); // *MENU*
b217491f 74 void PrintRec(AliEMCALCalibCoef *r);
16d3c94d 75
0fc11500 76 //
16d3c94d 77 protected:
b217491f 78 TObjArray *fTable; // table of CC
79 Int_t fCurrentInd; // Current index
16d3c94d 80 Int_t fCalibMethod; // method of calibration - EEmcalCalibType
81
0fc11500 82 ClassDef(AliEMCALCalibCoefs,2) // Table of Calibration coefficients
16d3c94d 83};
84
85#endif // ALIEMCALCalibCoefs_H