1 #ifndef AliOADBPWG2Spectra_H
2 #define AliOADBPWG2Spectra_H
4 //-------------------------------------------------------------------------
5 // OADB interface for the PWG2 spectra
6 // Author: Michele Floris, CERN
8 // -------------------------------------------------------------------------
15 class AliOADBPWG2Spectra : public TNamed {
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 };
24 AliOADBPWG2Spectra(const char* name);
25 virtual ~AliOADBPWG2Spectra();
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) ;
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) ;
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];}
47 Bool_t CompareBinning(TH1 * h1, TH1 * h2) ;
49 virtual void Print (const Option_t * opt = "") const { fHistos->Print(opt); }
52 virtual Bool_t IsFolder() const { return kTRUE; }
53 void Browse(TBrowser *b);
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
62 AliOADBPWG2Spectra(const AliOADBPWG2Spectra& cont);
63 AliOADBPWG2Spectra& operator=(const AliOADBPWG2Spectra& cont);
67 TList * fHistos; // List containtig all the histograms
69 ClassDef(AliOADBPWG2Spectra, 2);