1 #ifndef ALISPECTRABOTHHISTOMANAGER_H
2 #define ALISPECTRABOTHHISTOMANAGER_H
4 /* See cxx source for full Copyright notice */
6 //-------------------------------------------------------------------------
7 // AliSpectraBothHistoManager
12 // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
13 //-------------------------------------------------------------------------
24 #include "HistogramsBoth.h" // Change this file if you want to add an histogram
25 #include "HistogramNamesBoth.h" // generate this automatically running createNames.py
27 namespace AliSpectraNameSpaceBoth
31 enum BothParticleSpecies_t
38 }; // Particle species used in plotting
40 //extern const char * kParticleSpecies[];
44 kHistPtGenTruePrimary,
47 kHistPtRecTruePrimary,
48 kHistPtRecSigmaPrimary,
49 kHistPtRecSigmaSecondaryMaterial,
50 kHistPtRecSigmaSecondaryWeakDecay,
66 using namespace AliSpectraNameSpaceBoth;
68 class AliSpectraBothHistoManager : public TNamed
71 AliSpectraBothHistoManager() : TNamed(), fOutputList(0), fNRebin(0) {}
72 AliSpectraBothHistoManager(const char *name,Int_t nrebin);
73 virtual ~AliSpectraBothHistoManager() {}
76 TH2F* BookPtGenHistogram(const char * name);
77 TH2F* BookPtGenAllChHistogram(const char * name);
78 TH2F* BookPtRecHistogram(const char * name);
79 TH2F* BookPtRecAllChHistogram(const char * name);
80 TH2F* BookPIDHistogram(const char * name);
81 TH2F* BookNSigHistogram(const char * name);
82 TH2F* BookGenMulvsRawMulHistogram(const char * name);
84 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
85 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
86 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
87 // TH1* GetHistogram(BothHistoType_t histoType, BothParticleSpecies_t particleType, UInt_t charge);
88 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
89 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
90 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
91 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
92 TH2* GetPtHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); } // Use this if you want to read a file saved with a different histo list
93 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
94 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
95 TH2* GetPIDHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
96 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
97 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
98 TH2* GetNSigHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
99 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
100 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
101 TH2* GetqVecHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
102 TH2* GetGenMulvsRawMulHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
103 TH2* GetGenMulvsRawMulHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistNameBoth[id]); }// Use this if you want to read a file saved with a different histo list
104 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
105 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
107 TList * GetOutputList() {return fOutputList;}
108 void SetNRebin(Int_t nreb){fNRebin=nreb;}
109 Int_t GetNRebin() {return fNRebin;}
111 Long64_t Merge(TCollection* list);
115 TList *fOutputList; // List of Pt Histo's
116 Int_t fNRebin; //rebin of histos
117 AliSpectraBothHistoManager(const AliSpectraBothHistoManager&);
118 AliSpectraBothHistoManager& operator=(const AliSpectraBothHistoManager&);
120 ClassDef(AliSpectraBothHistoManager, 1);