1 #ifndef ALISPECTRAAODHISTOMANAGER_H
2 #define ALISPECTRAAODHISTOMANAGER_H
4 /* See cxx source for full Copyright notice */
6 //-------------------------------------------------------------------------
7 // AliSpectraAODHistoManager
12 // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU
13 //-------------------------------------------------------------------------
23 #include "Histograms.h" // Change this file if you want to add an histogram
24 #include "HistogramNames.h" // generate this automatically running createNames.py
26 namespace AliSpectraNameSpace
30 enum AODParticleSpecies_t
37 }; // Particle species used in plotting
39 extern const char * kParticleSpecies[];
43 kHistPtGenTruePrimary,
46 kHistPtRecTruePrimary,
47 kHistPtRecSigmaPrimary,
48 kHistPtRecSigmaSecondaryMaterial,
49 kHistPtRecSigmaSecondaryWeakDecay,
65 using namespace AliSpectraNameSpace;
67 class AliSpectraAODHistoManager : public TNamed
70 AliSpectraAODHistoManager() : TNamed(), fOutputList(0) {}
71 AliSpectraAODHistoManager(const char *name);
72 virtual ~AliSpectraAODHistoManager() {}
75 TH2F* BookPtGenHistogram(const char * name);
76 TH2F* BookPtRecHistogram(const char * name);
77 TH2F* BookPIDHistogram(const char * name);
78 TH2F* BookNSigHistogram(const char * name);
79 TH2F* BookqVecHistogram(const char * name);
80 TH1F* GetPtHistogram1D(const char * name,Double_t minDCA,Double_t maxDCA);
81 TH1F* GetDCAHistogram1D(const char * name,Double_t minPt,Double_t maxPt);
82 TH2* GetHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
83 // TH1* GetHistogram(AODHistoType_t histoType, AODParticleSpecies_t particleType, UInt_t charge);
84 TH1* GetHistogram1D(UInt_t histoType, UInt_t particleType, UInt_t charge);
85 TH2* GetHistogram2D(UInt_t histoType, UInt_t particleType, UInt_t charge);
86 TH2* GetPtHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
87 TH2* GetPtHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
88 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
89 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
90 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
91 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
92 TH2* GetNSigHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
93 TH2* GetNSigHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
94 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
95 TH2* GetqVecHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
96 TH2* GetqVecHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
97 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
99 //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
100 //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
102 TList * GetOutputList() {return fOutputList;}
104 Long64_t Merge(TCollection* list);
108 TList *fOutputList; // List of Pt Histo's
110 AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
111 AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);
113 ClassDef(AliSpectraAODHistoManager, 1);