2 #ifndef ALISPECTRAAODHISTOMANAGER_H
3 #define ALISPECTRAAODHISTOMANAGER_H
5 /* See cxx source for full Copyright notice */
7 //-------------------------------------------------------------------------
8 // AliSpectraAODHistoManager
13 // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
14 //-------------------------------------------------------------------------
21 #include "Histograms.h" // Change this file if you want to add an histogram
22 #include "HistogramNames.h"
24 namespace AliSpectraNameSpace
28 enum AODParticleSpecies_t
34 }; // Particle species used in plotting
36 const char * kParticleSpecies[] =
48 kHistPtGenTruePrimary,
50 kHistPtRecTruePrimary,
51 kHistPtRecSigmaPrimary,
52 kHistPtRecSigmaSecondaryMaterial,
53 kHistPtRecSigmaSecondaryWeakDecay,
66 using namespace AliSpectraNameSpace;
68 class AliSpectraAODHistoManager : public TNamed
71 AliSpectraAODHistoManager() : TNamed(), fOutputList(0) {}
72 AliSpectraAODHistoManager(const char *name);
73 virtual ~AliSpectraAODHistoManager() {}
76 TH2F* BookPtGenHistogram(const char * name);
77 TH2F* BookPtRecHistogram(const char * name);
78 TH2F* BookPIDHistogram(const char * name);
79 TH2F* BookNSigHistogram(const char * name);
80 TH2F* BookqVecHistogram(const char * name);
81 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
82 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
83 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
84 // TH1* GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
85 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
86 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
87 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
88 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
89 TH2* GetPtHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); } // Use this if you want to read a file saved with a different histo list
90 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
91 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
92 TH2* GetPIDHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); }// Use this if you want to read a file saved with a different histo list
93 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
94 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
95 TH2* GetNSigHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); }// Use this if you want to read a file saved with a different histo list
96 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
97 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
98 TH2* GetqVecHistogramByName(UInt_t id) { return (TH2*) fOutputList->FindObject(kHistName[id]); }// Use this if you want to read a file saved with a different histo list
100 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
101 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
103 TList * GetOutputList() {return fOutputList;}
105 Long64_t Merge(TCollection* list);
109 TList *fOutputList; // List of Pt Histo's
111 AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
112 AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);
114 ClassDef(AliSpectraAODHistoManager, 1);