new class AliOADBCentrality
[u/mrichter/AliRoot.git] / OADB / AliOADBCentrality.h
1 #ifndef AliOADBCentrality_H
2 #define AliOADBCentrality_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 //-------------------------------------------------------------------------
9 //     OADB class for run dependent centrality scaling factors and 
10 //     data for centrality determination
11 //     Author: Andreas Morsch, CERN
12 //-------------------------------------------------------------------------
13
14 #include <TNamed.h>
15 #include <TList.h>
16 #include <TH1F.h>
17 #include <TH2F.h>
18
19
20 class AliOADBCentrality : public TNamed {
21
22  public :
23   AliOADBCentrality();
24   AliOADBCentrality(char* name);
25   virtual ~AliOADBCentrality();
26   Float_t V0MScaleFactor() const  {return fV0MScaleFactor;}
27   Float_t SPDScaleFactor() const  {return fSPDScaleFactor;}
28   Float_t TPCScaleFactor() const  {return fTPCScaleFactor;}
29   TH1F*   V0hist()         const  {return ((TH1F*) (Hists1D()->FindObject("hmultV0_percentile")));}
30   TH1F*   TPChist()        const  {return ((TH1F*) (Hists1D()->FindObject("hNtracks_percentile")));}
31   TH1F*   SPDhist()        const  {return ((TH1F*) (Hists1D()->FindObject("hNclusters1_percentile")));}
32   TH2F*   ZEMvsZDChist()   const  {return ((TH2F*) (Hists2D()->FindObject("hEzemvsEzdc_all_percentile")));}
33   TList*  Hists1D()        const  {return f1DHistos;}
34   TList*  Hists2D()        const  {return f2DHistos;}
35   void    SetScaleFactors(Float_t v0m, Float_t spd, Float_t tpc)
36       {fV0MScaleFactor = v0m; fSPDScaleFactor = spd; fTPCScaleFactor = tpc;}
37   void    SetHistReferences(TList* l1, TList* l2)
38       {f1DHistos = l1; f2DHistos = l2;}
39  private:
40   AliOADBCentrality(const AliOADBCentrality& cont); 
41   AliOADBCentrality& operator=(const AliOADBCentrality& cont);
42
43  private:
44   Float_t fV0MScaleFactor; // V0  scale factor
45   Float_t fSPDScaleFactor; // SPD scale factor
46   Float_t fTPCScaleFactor; // TPC scale factor
47   TList*    f1DHistos; // Reference to list of 1D Centrality histos 
48   TList*    f2DHistos; // Reference to list of 2D Centrality histos
49   ClassDef(AliOADBCentrality, 1);
50 };
51
52 #endif