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 //-------------------------------------------------------------------------
24 #include "Histograms.h" // Change this file if you want to add an histogram
25 #include "HistogramNames.h"
27 namespace AliSpectraNameSpace
31 enum AODParticleSpecies_t
38 }; // Particle species used in plotting
40 const char * kParticleSpecies[] =
52 kHistPtGenTruePrimary,
54 kHistPtRecTruePrimary,
55 kHistPtRecSigmaPrimary,
56 kHistPtRecSigmaSecondaryMaterial,
57 kHistPtRecSigmaSecondaryWeakDecay,
73 using namespace AliSpectraNameSpace;
75 class AliSpectraAODHistoManager : public TNamed
78 AliSpectraAODHistoManager() : TNamed(), fOutputList(0) {}
79 AliSpectraAODHistoManager(const char *name);
80 virtual ~AliSpectraAODHistoManager() {}
83 TH2F* BookPtGenHistogram(const char * name);
84 TH2F* BookPtRecHistogram(const char * name);
85 TH2F* BookPIDHistogram(const char * name);
86 TH2F* BookNSigHistogram(const char * name);
87 TH2F* BookqVecHistogram(const char * name);
88 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
89 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
90 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
91 // TH1* GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
92 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
93 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
94 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
95 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
96 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
97 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
98 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
99 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
100 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
101 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
102 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
103 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
104 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
105 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
107 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
108 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
110 TList * GetOutputList() {return fOutputList;}
112 Long64_t Merge(TCollection* list);
116 TList *fOutputList; // List of Pt Histo's
118 AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
119 AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);
121 ClassDef(AliSpectraAODHistoManager, 1);