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 //-------------------------------------------------------------------------
22 namespace AliSpectraNameSpace
26 // 6 Pt Reconstructed Sigma
27 kHistPtRecSigmaProtonPlus = 0, // Pt histo for protons +, reconstructed tracks, sigma ID
28 kHistPtRecSigmaKaonPlus, // Pt histo for kaons +, reconsructed tracks, sigma ID
29 kHistPtRecSigmaPionPlus, // Pt histo for pions +, reconstructed tracks, sigma ID
30 kHistPtRecSigmaProtonMinus, // Pt histo for protons -, reconstructed tracks, sigma ID
31 kHistPtRecSigmaKaonMinus, // Pt histo for kaons -, reconstructed tracks, sigma ID
32 kHistPtRecSigmaPionMinus, // Pt histo for pions -, reconstructed tracks, sigma ID
34 // 6 Pt Reconstructed True
35 kHistPtRecTrueProtonPlus, // Pt histo for protons +, reconstructed tracks, true ID
36 kHistPtRecTrueKaonPlus, // Pt histo for kaons +, reconsructed tracks, true ID
37 kHistPtRecTruePionPlus, // Pt histo for pions +, reconstructed tracks, true ID
38 kHistPtRecTrueProtonMinus, // Pt histo for protons -, reconstructed tracks, true ID
39 kHistPtRecTrueKaonMinus, // Pt histo for kaons -, reconstructed tracks, true ID
40 kHistPtRecTruePionMinus, // Pt histo for pions -, reconstructed tracks, true ID
42 // 6 Pt Reconstructed Sigma Primary
43 kHistPtRecSigmaPrimaryProtonPlus, // Pt histo for protons +, reconstructed tracks, sigma ID, primary Event
44 kHistPtRecSigmaPrimaryKaonPlus, // Pt histo for kaons +, reconsructed tracks, sigma ID, primary Event
45 kHistPtRecSigmaPrimaryPionPlus, // Pt histo for pions +, reconstructed tracks, sigma ID, primary Event
46 kHistPtRecSigmaPrimaryProtonMinus, // Pt histo for protons -, reconstructed tracks, sigma ID, primary Event
47 kHistPtRecSigmaPrimaryKaonMinus, // Pt histo for kaons -, reconstructed tracks, sigma ID, primary Event
48 kHistPtRecSigmaPrimaryPionMinus, // Pt histo for pions -, reconstructed tracks, sigma ID, primary Event
50 // 6 Pt Reconstructed Sigma Secondary
51 kHistPtRecSigmaSecondaryProtonPlus, // Pt histo for protons +, reconstructed tracks, sigma ID, secondary Event
52 kHistPtRecSigmaSecondaryKaonPlus, // Pt histo for kaons +, reconsructed tracks, sigma ID, secondary Event
53 kHistPtRecSigmaSecondaryPionPlus, // Pt histo for pions +, reconstructed tracks, sigma ID, secondary Event
54 kHistPtRecSigmaSecondaryProtonMinus, // Pt histo for protons -, reconstructed tracks, sigma ID, secondary Event
55 kHistPtRecSigmaSecondaryKaonMinus, // Pt histo for kaons -, reconstructed tracks, sigma ID, secondary Event
56 kHistPtRecSigmaSecondaryPionMinus, // Pt histo for pions -, reconstructed tracks, sigma ID, secondary Event
58 // 6 Pt Generated True Primary
59 kHistPtGenTruePrimaryProtonPlus, // Pt histo for protons +, generated tracks, true ID, primary Event
60 kHistPtGenTruePrimaryKaonPlus, // Pt histo for kaons +, generated tracks, true ID, primary Event
61 kHistPtGenTruePrimaryPionPlus, // Pt histo for pions +, generated tracks, true ID, primary Event
62 kHistPtGenTruePrimaryProtonMinus, // Pt histo for protons -, generated tracks, true ID, primary Event
63 kHistPtGenTruePrimaryKaonMinus, // Pt histo for kaons -, generated tracks, true ID, primary Event
64 kHistPtGenTruePrimaryPionMinus, // Pt histo for pions -, generated tracks, true ID, primary Event
65 kNPtSpecies = kHistPtGenTruePrimaryPionMinus,
67 // 6 Pt Reconstructed True Primary
68 kHistPtRecTruePrimaryProtonPlus, // Pt histo for protons +, reconstructed tracks, true ID, primary event
69 kHistPtRecTruePrimaryKaonPlus, // Pt histo for kaons +, reconsructed tracks, true ID, primary event
70 kHistPtRecTruePrimaryPionPlus, // Pt histo for pions +, reconstructed tracks, true ID, primary event
71 kHistPtRecTruePrimaryProtonMinus, // Pt histo for protons -, reconstructed tracks, true ID, primary event
72 kHistPtRecTruePrimaryKaonMinus, // Pt histo for kaons -, reconstructed tracks, true ID, primary event
73 kHistPtRecTruePrimaryPionMinus, // Pt histo for pions -, reconstructed tracks, true ID, primary event
76 kHistPtRec, // Pt histo for all particles, reconstructed tracks
77 kHistPtGen, // Pt histo for all particles, generated tracks
78 kNPtHist = kHistPtGen, // Number of pt-likehistos histos
79 kHistPIDTPC, // Particle Identification histo
81 kNHist, // Total number of histos
82 }; // Type of events plotted in Pt Histogram
84 const char * kHistName[] =
86 // 6 Pt Reconstructed Sigma
87 "histPtRecSigmaProtonPlus", // Pt histo for protons +, reconstructed tracks, sigma ID
88 "histPtRecSigmaKaonPlus", // Pt histo for kaons +, reconsructed tracks, sigma ID
89 "histPtRecSigmaPionPlus", // Pt histo for pions +, reconstructed tracks, sigma ID
90 "histPtRecSigmaProtonMinus", // Pt histo for protons -, reconstructed tracks, sigma ID
91 "histPtRecSigmaKaonMinus", // Pt histo for kaons -, reconstructed tracks, sigma ID
92 "histPtRecSigmaPionMinus", // Pt histo for pions -, reconstructed tracks, sigma ID
94 // 6 Pt Reconstructed True
95 "histPtRecTrueProtonPlus", // Pt histo for protons +, reconstructed tracks, true ID
96 "histPtRecTrueKaonPlus", // Pt histo for kaons +, reconsructed tracks, true ID
97 "histPtRecTruePionPlus", // Pt histo for pions +, reconstructed tracks, true ID
98 "histPtRecTrueProtonMinus", // Pt histo for protons -, reconstructed tracks, true ID
99 "histPtRecTrueKaonMinus", // Pt histo for kaons -, reconstructed tracks, true ID
100 "histPtRecTruePionMinus", // Pt histo for pions -, reconstructed tracks, true ID
102 // 6 Pt Reconstructed Sigma Primary
103 "histPtRecSigmaPrimaryProtonPlus", // Pt histo for protons +, reconstructed tracks, sigma ID, primary Event
104 "histPtRecSigmaPrimaryKaonPlus", // Pt histo for kaons +, reconsructed tracks, sigma ID, primary Event
105 "histPtRecSigmaPrimaryPionPlus", // Pt histo for pions +, reconstructed tracks, sigma ID, primary Event
106 "histPtRecSigmaPrimaryProtonMinus", // Pt histo for protons -, reconstructed tracks, sigma ID, primary Event
107 "histPtRecSigmaPrimaryKaonMinus", // Pt histo for kaons -, reconstructed tracks, sigma ID, primary Event
108 "histPtRecSigmaPrimaryPionMinus", // Pt histo for pions -, reconstructed tracks, sigma ID, primary Event
110 // 6 Pt Reconstructed Sigma Seconday
111 "histPtRecSigmaSecondaryProtonPlus", // Pt histo for protons +, reconstructed tracks, sigma ID, secondary Event
112 "histPtRecSigmaSecondaryKaonPlus", // Pt histo for kaons +, reconsructed tracks, sigma ID, secondary Event
113 "histPtRecSigmaSecondaryPionPlus", // Pt histo for pions +, reconstructed tracks, sigma ID, secondary Event
114 "histPtRecSigmaSecondaryProtonMinus", // Pt histo for protons -, reconstructed tracks, sigma ID, secondary Event
115 "histPtRecSigmaSecondaryKaonMinus", // Pt histo for kaons -, reconstructed tracks, sigma ID, secondary Event
116 "histPtRecSigmaSecondaryPionMinus", // Pt histo for pions -, reconstructed tracks, sigma ID, secondary Event
118 // 6 Pt Reconstructed Sigma Primary
119 "histPtGenTruePrimaryProtonPlus", // Pt histo for protons +, generated tracks, sigma ID, primary Event
120 "histPtGenTruePrimaryKaonPlus", // Pt histo for kaons +, generated tracks, sigma ID, primary Event
121 "histPtGenTruePrimaryPionPlus", // Pt histo for pions +, generated tracks, sigma ID, primary Event
122 "histPtGenTruePrimaryProtonMinus", // Pt histo for protons -, generated tracks, sigma ID, primary Event
123 "histPtGenTruePrimaryKaonMinus", // Pt histo for kaons -, generated tracks, sigma ID, primary Event
124 "histPtGenTruePrimaryPionMinus", // Pt histo for pions -, generated tracks, sigma ID, primary Event
126 // 6 Pt Reconstructed True
127 "histPtRecTruePrimaryProtonPlus", // Pt histo for protons +, reconstructed tracks, true ID, primary event
128 "histPtRecTruePrimaryKaonPlus", // Pt histo for kaons +, reconsructed tracks, true ID, primary event
129 "histPtRecTruePrimaryPionPlus", // Pt histo for pions +, reconstructed tracks, true ID, primary event
130 "histPtRecTruePrimaryProtonMinus", // Pt histo for protons -, reconstructed tracks, true ID, primary event
131 "histPtRecTruePrimaryKaonMinus", // Pt histo for kaons -, reconstructed tracks, true ID, primary event
132 "histPtRecTruePrimaryPionMinus", // Pt histo for pions -, reconstructed tracks, true ID, primary event
135 "histPtRec", // Pt histo for all particles, reconstructed tracks
136 "histPtGen", // Pt histo for all particles, generated tracks
137 "histPIDTPC", // Particle Identification histo
141 enum AODParticleSpecies_t
147 }; // Particle species used in plotting
149 const char * kParticleSpecies[] =
162 kHNHistoTypes = kHistSpectraGen,
163 }; // Types of histos
167 using namespace AliSpectraNameSpace;
169 class AliSpectraAODHistoManager : public TNamed
172 AliSpectraAODHistoManager() : TNamed(), fOutputList(0) {}
173 AliSpectraAODHistoManager(const char *name);
174 virtual ~AliSpectraAODHistoManager() {}
177 TH1F* BookPtHistogram(const char * name);
178 TH2F* BookPIDHistogram(const char * name);
179 TH1* GetHistogram(UInt_t id) { return (TH1*) fOutputList->At(id); }
180 TH1* GetPtHistogram(UInt_t id) { return (TH1*) fOutputList->At(id); }
181 TH1* GetPtHistogram(const char * name) { return (TH1*) fOutputList->FindObject(name); }
182 TH1* GetPtHistogramByName(UInt_t id) { return (TH1*) fOutputList->FindObject(kHistName[id]); } // Use this if you want to read a file saved with a different histo list
183 TH2* GetPIDHistogram(UInt_t id) { return (TH2*) fOutputList->At(id); }
184 TH2* GetPIDHistogram(const char * name) { return (TH2*) fOutputList->FindObject(name); }
185 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
186 TH1F* GetTH1F(UInt_t id) { return (TH1F*) GetPtHistogram(id); }
187 TH2F* GetTH2F(UInt_t id) { return (TH2F*) GetPIDHistogram(id); }
189 TList * GetOutputList() {return fOutputList;}
191 Long64_t Merge(TCollection* list);
195 TList *fOutputList; // List of Pt Histo's
197 AliSpectraAODHistoManager(const AliSpectraAODHistoManager&);
198 AliSpectraAODHistoManager& operator=(const AliSpectraAODHistoManager&);
200 ClassDef(AliSpectraAODHistoManager, 1);