]> git.uio.no Git - u/mrichter/AliRoot.git/blob - OADB/AliOADBPWG2Spectra.h
Update for LHC11h
[u/mrichter/AliRoot.git] / OADB / AliOADBPWG2Spectra.h
1 #ifndef AliOADBPWG2Spectra_H
2 #define AliOADBPWG2Spectra_H
3
4 //-------------------------------------------------------------------------
5 //     OADB interface for the PWG2 spectra
6 //     Author: Michele Floris, CERN
7 //    
8 // -------------------------------------------------------------------------
9 #include "TNamed.h"
10 #include "TList.h"
11
12 class TList;
13 class TH1D;
14 class TH1;
15 class AliOADBPWG2Spectra : public TNamed {
16
17  public :
18
19   enum EPWG2SpectraDetector { kITSsa=0, kITSTPC, kTPC, kTOF, kTOFTPC, kNDetectors, kDetDummy };
20   enum EPWG2SpectraPIDType  { kGaussFit=0, kNSigma, kBayes, kKinks, kNPIDTypes };
21   enum EPWG2SpectraCharge   { kPos=0, kNeg, kNCharge };
22   enum EPWG2SpectraParticle { kPion = 0, kKaon, kProton, kNParticle };
23   AliOADBPWG2Spectra();
24   AliOADBPWG2Spectra(const char* name);
25   virtual ~AliOADBPWG2Spectra();
26
27   void Init();
28
29   static const char * GetOADBPWG2SpectraFileName();
30   const char * GetHistoName(Int_t det, Int_t pidType, Int_t part, 
31                                    Int_t charge, const char * centrTag = 0, Int_t centrBin = -1) ;
32   void AddHisto(TH1D * h, Int_t det, Int_t pidType, Int_t part, 
33                   Int_t charge, const char * centrTag = 0, Int_t centrBin = -1) ;
34   TH1D * GetHisto(Int_t det, Int_t pidType, Int_t part, 
35                   Int_t charge, const char * centrTag = 0, Int_t centrBin = -1);
36   TH1D * BookHisto(Int_t det, Int_t pidType, Int_t part, 
37                    Int_t charge, const char * centrTag = 0, Int_t centrBin = -1) ;
38     
39   TH1D * GetHistoStandardBinning(const TH1D* h, Int_t det, Int_t pidType, Int_t part, 
40                                  Int_t charge, const char * centrTag, Int_t centrBin) ;
41
42   static const char * GetDetectorName(Int_t i) {return fgkDetectorNames[i];}
43   static const char * GetPIDName(Int_t i)      {return fgkPidTypeNames[i];}
44   static const char * GetChargeName(Int_t i)   {return fgkChargeTags[i];}
45   static const char * GetParticleName(Int_t i) {return fgkParticleNames[i];}
46
47   Bool_t CompareBinning(TH1 * h1, TH1 * h2) ;
48
49   virtual void Print (const Option_t * opt = "") const  { fHistos->Print(opt); }
50
51 // Browsable
52   virtual Bool_t        IsFolder() const { return kTRUE; }
53   void Browse(TBrowser *b);
54
55   static const char * fgkDetectorNames[] ; // Detector tags
56   static const char * fgkPidTypeNames[]  ; // Name of the PID technique
57   static const char * fgkChargeTags[]    ; // tags for charges
58   static const char * fgkParticleNames[] ; // Particle tags
59   
60
61  private:
62   AliOADBPWG2Spectra(const AliOADBPWG2Spectra& cont); 
63   AliOADBPWG2Spectra& operator=(const AliOADBPWG2Spectra& cont);
64
65  private :
66   
67   TList * fHistos; // List containtig all the histograms
68
69   ClassDef(AliOADBPWG2Spectra, 2);
70 };
71
72 #endif