]>
Commit | Line | Data |
---|---|---|
239a080a | 1 | #ifndef ALISPECTRABOTHHISTOMANAGER_H |
2 | #define ALISPECTRABOTHHISTOMANAGER_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
7 | // AliSpectraBothHistoManager | |
8 | // | |
9 | // | |
10 | // | |
11 | // | |
12 | // Authors: Michele Floris, CERN, Philip Versteeg, UU, Redmer Bertens, UU | |
13 | //------------------------------------------------------------------------- | |
14 | ||
15 | class AliAODEvent; | |
16 | class TH1F; | |
17 | class TH2F; | |
18 | class TH1; | |
19 | class TH2; | |
20 | ||
21 | //class TList; | |
22 | #include "TNamed.h" | |
23 | #include "TList.h" | |
24 | #include "HistogramsBoth.h" // Change this file if you want to add an histogram | |
25 | #include "HistogramNamesBoth.h" // generate this automatically running createNames.py | |
26 | ||
27 | namespace AliSpectraNameSpaceBoth | |
28 | { | |
29 | ||
30 | ||
31 | enum BothParticleSpecies_t | |
32 | { | |
33 | kSpPion, | |
34 | kSpKaon, | |
35 | kSpProton, | |
36 | kNSpecies, | |
37 | kSpUndefined, | |
38 | }; // Particle species used in plotting | |
39 | ||
40 | //extern const char * kParticleSpecies[]; | |
41 | ||
42 | enum BothHistoType_t | |
43 | { | |
44 | kHistPtGenTruePrimary, | |
45 | kHistPtRecSigma, | |
46 | kHistPtRecTrue, | |
47 | kHistPtRecTruePrimary, | |
94a8ed71 | 48 | kHistPtRecPrimary, |
239a080a | 49 | kHistPtRecSigmaPrimary, |
50 | kHistPtRecSigmaSecondaryMaterial, | |
51 | kHistPtRecSigmaSecondaryWeakDecay, | |
52 | kHistNSigTPC, | |
53 | kHistNSigTOF, | |
54 | kHistNSigTPCTOF, | |
55 | kNHistoTypes | |
56 | }; // Types of histos | |
57 | ||
58 | enum BothCharge_t | |
59 | { | |
60 | kChPos = 0, | |
61 | kChNeg, | |
62 | kNCharge | |
63 | }; | |
64 | ||
65 | } | |
66 | ||
67 | using namespace AliSpectraNameSpaceBoth; | |
68 | ||
69 | class AliSpectraBothHistoManager : public TNamed | |
70 | { | |
71 | public: | |
72 | AliSpectraBothHistoManager() : TNamed(), fOutputList(0), fNRebin(0) {} | |
73 | AliSpectraBothHistoManager(const char *name,Int_t nrebin); | |
74 | virtual ~AliSpectraBothHistoManager() {} | |
75 | ||
76 | ||
77 | TH2F* BookPtGenHistogram(const char * name); | |
78 | TH2F* BookPtGenAllChHistogram(const char * name); | |
79 | TH2F* BookPtRecHistogram(const char * name); | |
80 | TH2F* BookPtRecAllChHistogram(const char * name); | |
81 | TH2F* BookPIDHistogram(const char * name); | |
82 | TH2F* BookNSigHistogram(const char * name); | |
239a080a | 83 | TH2F* BookGenMulvsRawMulHistogram(const char * name); |
84 | ||
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); } | |
107 | ||
108 | TList * GetOutputList() {return fOutputList;} | |
109 | void SetNRebin(Int_t nreb){fNRebin=nreb;} | |
110 | Int_t GetNRebin() {return fNRebin;} | |
111 | ||
112 | Long64_t Merge(TCollection* list); | |
113 | ||
114 | ||
115 | private: | |
116 | TList *fOutputList; // List of Pt Histo's | |
117 | Int_t fNRebin; //rebin of histos | |
118 | AliSpectraBothHistoManager(const AliSpectraBothHistoManager&); | |
119 | AliSpectraBothHistoManager& operator=(const AliSpectraBothHistoManager&); | |
120 | ||
121 | ClassDef(AliSpectraBothHistoManager, 1); | |
122 | ||
123 | }; | |
124 | #endif | |
125 |