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* BookqVecHistogram(const char * name);
83 TH2F* BookGenMulvsRawMulHistogram(const char * name);
85 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
86 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
87 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
88 // TH1* GetHistogram(BothHistoType_t histoType, BothParticleSpecies_t particleType, UInt_t charge);
89 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
90 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
91 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
92 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
93 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
94 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
95 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
96 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
97 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
98 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
99 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
100 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
101 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
102 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
103 TH2* GetGenMulvsRawMulHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
104 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
105 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
106 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
108 TList * GetOutputList() {return fOutputList;}
109 void SetNRebin(Int_t nreb){fNRebin=nreb;}
110 Int_t GetNRebin() {return fNRebin;}
112 Long64_t Merge(TCollection* list);
116 TList *fOutputList; // List of Pt Histo's
117 Int_t fNRebin; //rebin of histos
118 AliSpectraBothHistoManager(const AliSpectraBothHistoManager&);
119 AliSpectraBothHistoManager& operator=(const AliSpectraBothHistoManager&);
121 ClassDef(AliSpectraBothHistoManager, 1);