]>
Commit | Line | Data |
---|---|---|
c88234ad | 1 | |
2 | #ifndef ALISPECTRAAODHISTOMANAGER_H | |
3 | #define ALISPECTRAAODHISTOMANAGER_H | |
4 | ||
5 | /* See cxx source for full Copyright notice */ | |
6 | ||
7 | //------------------------------------------------------------------------- | |
8 | // AliSpectraAODHistoManager | |
9 | // | |
10 | // | |
11 | // | |
12 | // | |
13 | // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU | |
14 | //------------------------------------------------------------------------- | |
15 | ||
16 | class AliAODEvent; | |
17 | class TH1F; | |
18 | class TH2F; | |
e8b0fe64 | 19 | class TH1; |
20 | class TH2; | |
21 | //class TList; | |
c88234ad | 22 | #include "TNamed.h" |
e8b0fe64 | 23 | #include "TList.h" |
4290905b | 24 | #include "Histograms.h" // Change this file if you want to add an histogram |
25 | #include "HistogramNames.h" | |
c88234ad | 26 | |
27 | namespace AliSpectraNameSpace | |
28 | { | |
c88234ad | 29 | |
823864bf | 30 | |
c88234ad | 31 | enum AODParticleSpecies_t |
32 | { | |
c79cb435 | 33 | kSpPion, |
34 | kSpKaon, | |
35 | kSpProton, | |
36 | kNSpecies, | |
e8b0fe64 | 37 | kSpUndefined, |
c88234ad | 38 | }; // Particle species used in plotting |
39 | ||
40 | const char * kParticleSpecies[] = | |
41 | { | |
c88234ad | 42 | "PionPlus", |
c79cb435 | 43 | "KaonPlus", |
44 | "ProtonPlus", | |
c88234ad | 45 | "PionMinus", |
c79cb435 | 46 | "KaonMinus", |
47 | "ProtonMinus", | |
c88234ad | 48 | }; |
c79cb435 | 49 | |
c88234ad | 50 | enum AODHistoType_t |
51 | { | |
c79cb435 | 52 | kHistPtGenTruePrimary, |
53 | kHistPtRecSigma, | |
54 | kHistPtRecTruePrimary, | |
55 | kHistPtRecSigmaPrimary, | |
56 | kHistPtRecSigmaSecondaryMaterial, | |
57 | kHistPtRecSigmaSecondaryWeakDecay, | |
e8b0fe64 | 58 | kHistNSigTPC, |
59 | kHistNSigTOF, | |
60 | kHistNSigTPCTOF, | |
c79cb435 | 61 | kNHistoTypes |
c88234ad | 62 | }; // Types of histos |
63 | ||
c79cb435 | 64 | enum AODCharge_t |
65 | { | |
66 | kChPos = 0, | |
67 | kChNeg, | |
68 | kNCharge | |
69 | }; | |
70 | ||
c88234ad | 71 | } |
72 | ||
73 | using namespace AliSpectraNameSpace; | |
74 | ||
75 | class AliSpectraAODHistoManager : public TNamed | |
76 | { | |
77 | public: | |
78 | AliSpectraAODHistoManager() : TNamed(), fOutputList(0) {} | |
79 | AliSpectraAODHistoManager(const char *name); | |
80 | virtual ~AliSpectraAODHistoManager() {} | |
81 | ||
82 | ||
823864bf | 83 | TH2F* BookPtGenHistogram(const char * name); |
84 | TH2F* BookPtRecHistogram(const char * name); | |
c88234ad | 85 | TH2F* BookPIDHistogram(const char * name); |
823864bf | 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); } | |
c79cb435 | 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); | |
823864bf | 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 | |
c88234ad | 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 | |
823864bf | 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 | |
106 | ||
107 | //TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); } | |
108 | //TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); } | |
c88234ad | 109 | |
110 | TList * GetOutputList() {return fOutputList;} | |
111 | ||
112 | Long64_t Merge(TCollection* list); | |
113 | ||
114 | ||
115 | private: | |
116 | TList *fOutputList; // List of Pt Histo's | |
117 | ||
118 | AliSpectraAODHistoManager(const AliSpectraAODHistoManager&); | |
119 | AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&); | |
120 | ||
121 | ClassDef(AliSpectraAODHistoManager, 1); | |
122 | ||
123 | }; | |
124 | #endif | |
125 |