]>
Commit | Line | Data |
---|---|---|
477d6cee | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
477d6cee | 15 | |
16 | //_________________________________________________________________________ | |
17 | // | |
18 | // Class for track selection and identification (not done now) | |
19 | // Tracks from the CTS are kept in the AOD. | |
20 | // Few histograms produced. | |
21 | // | |
22 | //-- Author: Gustavo Conesa (INFN-LNF) | |
23 | //_________________________________________________________________________ | |
24 | ||
25 | ||
26 | // --- ROOT system --- | |
477d6cee | 27 | #include "TParticle.h" |
28 | #include "TH2F.h" | |
05d0d05d | 29 | |
477d6cee | 30 | //---- AliRoot system ---- |
31 | #include "AliAnaChargedParticles.h" | |
32 | #include "AliCaloTrackReader.h" | |
33 | #include "AliAODPWG4Particle.h" | |
34 | #include "AliStack.h" | |
ff45398a | 35 | #include "AliFiducialCut.h" |
88f9563f | 36 | #include "AliVTrack.h" |
591cc579 | 37 | #include "AliAODMCParticle.h" |
fedea415 | 38 | #include "AliAODTrack.h" |
39 | #include "AliAODEvent.h" | |
40 | #include "AliESDEvent.h" | |
477d6cee | 41 | |
42 | ClassImp(AliAnaChargedParticles) | |
43 | ||
05d0d05d | 44 | //__________________________________________________ |
fe9615b9 | 45 | AliAnaChargedParticles::AliAnaChargedParticles() : |
745913ae | 46 | AliAnaCaloTrackCorrBaseClass(), |
9b4a1ee2 | 47 | fFillPileUpHistograms(0), fFillTrackBCHistograms(0), |
52bd777f | 48 | fFillVertexBC0Histograms(0), |
52bd777f | 49 | //Histograms |
50 | fhNtracks(0), fhPt(0), fhPtNoCut(0), | |
51 | fhPtCutDCA(0), fhPtCutDCABCOK(0), | |
8f467228 | 52 | fhPhiNeg(0), fhEtaNeg(0), |
fedea415 | 53 | fhPhiPos(0), fhEtaPos(0), |
54 | fhEtaPhiPos(0), fhEtaPhiNeg(0), | |
52bd777f | 55 | fhPtVtxOutBC0(0), fhEtaPhiVtxOutBC0(0), |
56 | fhPtVtxInBC0(0), fhEtaPhiVtxInBC0(0), | |
8f467228 | 57 | fhPtSPDRefit(0), fhPtNoSPDRefit(0), fhPtNoSPDNoRefit(0), |
58 | fhEtaPhiSPDRefitPt02(0), fhEtaPhiNoSPDRefitPt02(0), fhEtaPhiNoSPDNoRefitPt02(0), | |
59 | fhEtaPhiSPDRefitPt3(0), fhEtaPhiNoSPDRefitPt3(0), fhEtaPhiNoSPDNoRefitPt3(0), | |
05d0d05d | 60 | //MC |
fedea415 | 61 | fhPtPion(0), fhPhiPion(0), fhEtaPion(0), |
62 | fhPtProton(0), fhPhiProton(0), fhEtaProton(0), | |
63 | fhPtElectron(0), fhPhiElectron(0), fhEtaElectron(0), | |
64 | fhPtKaon(0), fhPhiKaon(0), fhEtaKaon(0), | |
65 | fhPtUnknown(0), fhPhiUnknown(0), fhEtaUnknown(0), | |
727a309a | 66 | fhMCPt(0), fhMCPhi(0), fhMCEta(0), |
67 | fhMCRecPt(0), | |
52bd777f | 68 | //TOF |
fedea415 | 69 | fhTOFSignal(0), fhTOFSignalPtCut(0), fhTOFSignalBCOK(0), |
cc944149 | 70 | fhPtTOFSignal(0), fhPtTOFSignalDCACut(0), |
71 | fhPtTOFSignalVtxOutBC0(0), fhPtTOFSignalVtxInBC0(0), | |
52bd777f | 72 | fhPtTOFStatus0(0), fhEtaPhiTOFStatus0(0), |
fedea415 | 73 | fhEtaPhiTOFBC0(0), fhEtaPhiTOFBCPlus(0), fhEtaPhiTOFBCMinus(0), |
74 | fhEtaPhiTOFBC0PileUpSPD(0), | |
75 | fhEtaPhiTOFBCPlusPileUpSPD(0), | |
52bd777f | 76 | fhEtaPhiTOFBCMinusPileUpSPD(0), |
85c4406e | 77 | fhProductionVertexBC(0), |
78 | fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0), | |
79 | fhPtNPileUpSPDVtxBC0(0), fhPtNPileUpTrkVtxBC0(0) | |
80 | ||
477d6cee | 81 | { |
82 | //Default Ctor | |
83 | ||
fedea415 | 84 | for(Int_t i = 0; i < 7; i++) |
85 | { | |
86 | fhPtPileUp [i] = 0; | |
87 | fhPtTOFSignalPileUp[i] = 0; | |
52bd777f | 88 | fhPtTOFSignalVtxOutBC0PileUp[i] = 0; |
89 | fhPtTOFSignalVtxInBC0PileUp [i] = 0; | |
90 | fhProductionVertexBCPileUp [i] = 0; | |
fedea415 | 91 | } |
92 | ||
93 | for(Int_t i = 0; i < 3; i++) | |
94 | { | |
95 | fhPtDCA [i] = 0 ; | |
8f467228 | 96 | |
97 | fhPtDCASPDRefit [i] = 0 ; | |
98 | fhPtDCANoSPDRefit [i] = 0 ; | |
99 | fhPtDCANoSPDNoRefit [i] = 0 ; | |
100 | ||
fedea415 | 101 | fhPtDCAPileUp [i] = 0 ; |
fedea415 | 102 | fhPtDCATOFBC0 [i] = 0 ; |
52bd777f | 103 | fhPtDCATOFBCOut [i] = 0 ; |
fedea415 | 104 | fhPtDCAPileUpTOFBC0 [i] = 0 ; |
52bd777f | 105 | fhPtDCANoTOFHit [i] = 0 ; |
106 | fhPtDCAPileUpNoTOFHit [i] = 0 ; | |
fedea415 | 107 | |
52bd777f | 108 | fhPtDCAVtxOutBC0 [i] = 0 ; |
109 | fhPtDCAVtxInBC0 [i] = 0 ; | |
110 | fhPtDCAVtxOutBC0PileUp[i] = 0 ; | |
111 | fhPtDCAVtxInBC0PileUp [i] = 0 ; | |
cbd6236f | 112 | fhPtDCAVtxOutBC0NoTOFHit[i] = 0 ; |
113 | fhPtDCAVtxInBC0NoTOFHit [i] = 0 ; | |
52bd777f | 114 | fhPtDCAVtxOutBC0PileUpNoTOFHit[i] = 0 ; |
cbd6236f | 115 | fhPtDCAVtxInBC0PileUpNoTOFHit [i] = 0 ; |
fedea415 | 116 | } |
fe9615b9 | 117 | |
477d6cee | 118 | //Initialize parameters |
119 | InitParameters(); | |
477d6cee | 120 | |
477d6cee | 121 | } |
122 | ||
05d0d05d | 123 | //_______________________________________________________ |
477d6cee | 124 | TList * AliAnaChargedParticles::GetCreateOutputObjects() |
125 | { | |
126 | // Create histograms to be saved in output file and | |
127 | // store them in fOutputContainer | |
128 | ||
129 | ||
130 | TList * outputContainer = new TList() ; | |
131 | outputContainer->SetName("ExampleHistos") ; | |
132 | ||
745913ae | 133 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); |
134 | Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); | |
135 | Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); | |
5025c139 | 136 | |
137 | fhNtracks = new TH1F ("hNtracks","# of tracks", 1000,0,1000); | |
138 | fhNtracks->SetXTitle("# of tracks"); | |
139 | outputContainer->Add(fhNtracks); | |
05d0d05d | 140 | |
141 | fhPt = new TH1F ("hPt","p_T distribution", nptbins,ptmin,ptmax); | |
477d6cee | 142 | fhPt->SetXTitle("p_{T} (GeV/c)"); |
143 | outputContainer->Add(fhPt); | |
144 | ||
52bd777f | 145 | fhPtNoCut = new TH1F ("hPtNoCut","p_T distribution, raw tracks", nptbins,ptmin,ptmax); |
146 | fhPtNoCut->SetXTitle("p_{T} (GeV/c)"); | |
147 | outputContainer->Add(fhPtNoCut); | |
148 | ||
149 | fhPtCutDCA = new TH1F ("hPtCutDCA","p_T distribution, cut DCA", nptbins,ptmin,ptmax); | |
150 | fhPtCutDCA->SetXTitle("p_{T} (GeV/c)"); | |
151 | outputContainer->Add(fhPtCutDCA); | |
152 | ||
9b4a1ee2 | 153 | if(fFillVertexBC0Histograms) |
154 | { | |
155 | fhPtCutDCABCOK = new TH1F ("hPtCutDCABCOK","p_T distribution, DCA cut, track BC=0 or -100", nptbins,ptmin,ptmax); | |
156 | fhPtCutDCABCOK->SetXTitle("p_{T} (GeV/c)"); | |
157 | outputContainer->Add(fhPtCutDCABCOK); | |
158 | } | |
159 | ||
05d0d05d | 160 | fhPhiNeg = new TH2F ("hPhiNegative","#phi of negative charges distribution", |
161 | nptbins,ptmin,ptmax, nphibins,phimin,phimax); | |
162 | fhPhiNeg->SetYTitle("#phi (rad)"); | |
163 | fhPhiNeg->SetXTitle("p_{T} (GeV/c)"); | |
164 | outputContainer->Add(fhPhiNeg); | |
165 | ||
166 | fhEtaNeg = new TH2F ("hEtaNegative","#eta of negative charges distribution", | |
167 | nptbins,ptmin,ptmax, netabins,etamin,etamax); | |
168 | fhEtaNeg->SetYTitle("#eta "); | |
169 | fhEtaNeg->SetXTitle("p_{T} (GeV/c)"); | |
170 | outputContainer->Add(fhEtaNeg); | |
477d6cee | 171 | |
192689a4 | 172 | fhPhiPos = new TH2F ("hPhiPositive","#phi of positive charges distribution", |
05d0d05d | 173 | nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
174 | fhPhiPos->SetYTitle("#phi (rad)"); | |
175 | fhPhiPos->SetXTitle("p_{T} (GeV/c)"); | |
176 | outputContainer->Add(fhPhiPos); | |
477d6cee | 177 | |
192689a4 | 178 | fhEtaPos = new TH2F ("hEtaPositive","#eta of positive charges distribution", |
05d0d05d | 179 | nptbins,ptmin,ptmax, netabins,etamin,etamax); |
180 | fhEtaPos->SetYTitle("#eta "); | |
181 | fhEtaPos->SetXTitle("p_{T} (GeV/c)"); | |
182 | outputContainer->Add(fhEtaPos); | |
5025c139 | 183 | |
fe9615b9 | 184 | fhEtaPhiPos = new TH2F ("hEtaPhiPositive","pt/eta/phi of positive charge",netabins,etamin,etamax, nphibins,phimin,phimax); |
4bfeae64 | 185 | fhEtaPhiPos->SetXTitle("#eta "); |
186 | fhEtaPhiPos->SetYTitle("#phi (rad)"); | |
05d0d05d | 187 | outputContainer->Add(fhEtaPhiPos); |
188 | ||
189 | fhEtaPhiNeg = new TH2F ("hEtaPhiNegative","eta vs phi of negative charge",netabins,etamin,etamax, nphibins,phimin,phimax); | |
4bfeae64 | 190 | fhEtaPhiNeg->SetXTitle("#eta "); |
191 | fhEtaPhiNeg->SetYTitle("#phi (rad)"); | |
05d0d05d | 192 | outputContainer->Add(fhEtaPhiNeg); |
477d6cee | 193 | |
52bd777f | 194 | if(fFillVertexBC0Histograms) |
195 | { | |
196 | fhPtVtxOutBC0 = new TH1F ("hPtVtxOutBC0","p_T distribution, vertex in BC=0", nptbins,ptmin,ptmax); | |
197 | fhPtVtxOutBC0->SetXTitle("p_{T} (GeV/c)"); | |
198 | outputContainer->Add(fhPtVtxOutBC0); | |
199 | ||
200 | fhEtaPhiVtxOutBC0 = new TH2F ("hEtaPhiVtxOutBC0","eta vs phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
201 | fhEtaPhiVtxOutBC0->SetXTitle("#eta "); | |
202 | fhEtaPhiVtxOutBC0->SetYTitle("#phi (rad)"); | |
203 | outputContainer->Add(fhEtaPhiVtxOutBC0); | |
204 | ||
205 | fhPtVtxInBC0 = new TH1F ("hPtVtxInBC0","p_T distribution, vertex in BC=0", nptbins,ptmin,ptmax); | |
206 | fhPtVtxInBC0->SetXTitle("p_{T} (GeV/c)"); | |
207 | outputContainer->Add(fhPtVtxInBC0); | |
208 | ||
209 | fhEtaPhiVtxInBC0 = new TH2F ("hEtaPhiVtxInBC0","eta vs phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
210 | fhEtaPhiVtxInBC0->SetXTitle("#eta "); | |
211 | fhEtaPhiVtxInBC0->SetYTitle("#phi (rad)"); | |
212 | outputContainer->Add(fhEtaPhiVtxInBC0); | |
213 | } | |
214 | ||
8f467228 | 215 | fhPtSPDRefit = new TH1F ("hPtSPDRefit","p_T distribution of tracks with SPD and ITS refit", nptbins,ptmin,ptmax); |
216 | fhPtSPDRefit->SetXTitle("p_{T} (GeV/c)"); | |
217 | outputContainer->Add(fhPtSPDRefit); | |
218 | ||
219 | fhEtaPhiSPDRefitPt02 = new TH2F ("hEtaPhiSPDRefitPt02","eta vs phi of tracks with SPD and ITS refit, p_{T} < 2 GeV/c",netabins,etamin,etamax, nphibins,phimin,phimax); | |
220 | fhEtaPhiSPDRefitPt02->SetXTitle("#eta "); | |
221 | fhEtaPhiSPDRefitPt02->SetYTitle("#phi (rad)"); | |
222 | outputContainer->Add(fhEtaPhiSPDRefitPt02); | |
223 | ||
224 | fhEtaPhiSPDRefitPt3 = new TH2F ("hEtaPhiSPDRefitPt3","eta vs phi of tracks with SPD and ITS refit, p_{T} > 3 GeV/c",netabins,etamin,etamax, nphibins,phimin,phimax); | |
225 | fhEtaPhiSPDRefitPt3->SetXTitle("#eta "); | |
226 | fhEtaPhiSPDRefitPt3->SetYTitle("#phi (rad)"); | |
227 | outputContainer->Add(fhEtaPhiSPDRefitPt3); | |
228 | ||
229 | fhPtNoSPDRefit = new TH1F ("hPtNoSPDRefit","p_T distribution of constrained tracks no SPD and with ITSRefit", nptbins,ptmin,ptmax); | |
230 | fhPtNoSPDRefit->SetXTitle("p_{T} (GeV/c)"); | |
231 | outputContainer->Add(fhPtNoSPDRefit); | |
232 | ||
233 | fhEtaPhiNoSPDRefitPt02 = new TH2F ("hEtaPhiNoSPDRefitPt02","eta vs phi of constrained tracks no SPD and with ITSRefit, p_{T} < 2 GeV/c",netabins,etamin,etamax, nphibins,phimin,phimax); | |
234 | fhEtaPhiNoSPDRefitPt02->SetXTitle("#eta "); | |
235 | fhEtaPhiNoSPDRefitPt02->SetYTitle("#phi (rad)"); | |
236 | outputContainer->Add(fhEtaPhiNoSPDRefitPt02); | |
237 | ||
238 | fhEtaPhiNoSPDRefitPt3 = new TH2F ("hEtaPhiNoSPDRefitPt3","eta vs phi of of constrained tracks no SPD and with ITSRefit, p_{T} > 3 GeV/c",netabins,etamin,etamax, nphibins,phimin,phimax); | |
239 | fhEtaPhiNoSPDRefitPt3->SetXTitle("#eta "); | |
240 | fhEtaPhiNoSPDRefitPt3->SetYTitle("#phi (rad)"); | |
241 | outputContainer->Add(fhEtaPhiNoSPDRefitPt3); | |
242 | ||
243 | fhPtNoSPDNoRefit = new TH1F ("hPtNoSPDNoRefit","p_T distribution of constrained tracks with no SPD requierement and without ITSRefit", nptbins,ptmin,ptmax); | |
244 | fhPtNoSPDNoRefit->SetXTitle("p_{T} (GeV/c)"); | |
245 | outputContainer->Add(fhPtNoSPDNoRefit); | |
246 | ||
247 | fhEtaPhiNoSPDNoRefitPt02 = new TH2F ("hEtaPhiNoSPDNoRefitPt02","eta vs phi of constrained tracks with no SPD requierement and without ITSRefit, p_{T} < 2 GeV/c",netabins,etamin,etamax, nphibins,phimin,phimax); | |
248 | fhEtaPhiNoSPDNoRefitPt02->SetXTitle("#eta "); | |
249 | fhEtaPhiNoSPDNoRefitPt02->SetYTitle("#phi (rad)"); | |
250 | outputContainer->Add(fhEtaPhiNoSPDNoRefitPt02); | |
251 | ||
252 | fhEtaPhiNoSPDNoRefitPt3 = new TH2F ("hEtaPhiNoSPDNoRefitPt3","eta vs phi of constrained tracks with no SPD requierement and without ITSRefit, p_{T} > 3 GeV/c",netabins,etamin,etamax, nphibins,phimin,phimax); | |
253 | fhEtaPhiNoSPDNoRefitPt3->SetXTitle("#eta "); | |
254 | fhEtaPhiNoSPDNoRefitPt3->SetYTitle("#phi (rad)"); | |
255 | outputContainer->Add(fhEtaPhiNoSPDNoRefitPt3); | |
256 | ||
52bd777f | 257 | if(fFillVertexBC0Histograms) |
258 | { | |
259 | fhProductionVertexBC = new TH1F("hProductionVertexBC", "tracks production vertex bunch crossing ", 41 , -20 , 20 ) ; | |
260 | fhProductionVertexBC->SetYTitle("# tracks"); | |
261 | fhProductionVertexBC->SetXTitle("Bunch crossing"); | |
262 | outputContainer->Add(fhProductionVertexBC); | |
263 | } | |
8f467228 | 264 | |
fe9615b9 | 265 | Int_t ntofbins = 1000; |
266 | Int_t mintof = -500; | |
267 | Int_t maxtof = 500; | |
fedea415 | 268 | |
fe9615b9 | 269 | fhTOFSignal = new TH1F ("hTOFSignal","TOF signal", ntofbins,mintof,maxtof); |
fedea415 | 270 | fhTOFSignal->SetXTitle("TOF signal (ns)"); |
fe9615b9 | 271 | outputContainer->Add(fhTOFSignal); |
272 | ||
9b4a1ee2 | 273 | if(fFillTrackBCHistograms) |
274 | { | |
275 | fhTOFSignalBCOK = new TH1F ("hTOFSignalBCOK","TOF signal", ntofbins,mintof,maxtof); | |
276 | fhTOFSignalBCOK->SetXTitle("TOF signal (ns)"); | |
277 | outputContainer->Add(fhTOFSignalBCOK); | |
278 | } | |
fedea415 | 279 | |
fe9615b9 | 280 | fhTOFSignalPtCut = new TH1F ("hTOFSignalPtCut","TOF signal", ntofbins,mintof,maxtof); |
fedea415 | 281 | fhTOFSignalPtCut->SetXTitle("TOF signal (ns)"); |
fe9615b9 | 282 | outputContainer->Add(fhTOFSignalPtCut); |
283 | ||
284 | fhPtTOFSignal = new TH2F ("hPtTOFSignal","TOF signal", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); | |
fedea415 | 285 | fhPtTOFSignal->SetYTitle("TOF signal (ns)"); |
fe9615b9 | 286 | fhPtTOFSignal->SetXTitle("p_{T} (GeV/c)"); |
287 | outputContainer->Add(fhPtTOFSignal); | |
cc944149 | 288 | |
289 | fhPtTOFSignalDCACut = new TH2F ("hPtTOFSignalDCACut","TOF signal after DCA cut", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); | |
290 | fhPtTOFSignalDCACut->SetYTitle("TOF signal (ns)"); | |
291 | fhPtTOFSignalDCACut->SetXTitle("p_{T} (GeV/c)"); | |
292 | outputContainer->Add(fhPtTOFSignalDCACut); | |
fedea415 | 293 | |
52bd777f | 294 | if(fFillVertexBC0Histograms) |
295 | { | |
296 | fhPtTOFSignalVtxOutBC0 = new TH2F ("hPtTOFSignalVtxOutBC0","TOF signal, vtx BC!=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); | |
297 | fhPtTOFSignalVtxOutBC0->SetYTitle("TOF signal (ns)"); | |
298 | fhPtTOFSignalVtxOutBC0->SetXTitle("p_{T} (GeV/c)"); | |
299 | outputContainer->Add(fhPtTOFSignalVtxOutBC0); | |
300 | ||
b6c46114 | 301 | fhPtTOFSignalVtxInBC0 = new TH2F ("hPtTOFSignalVtxInBC0","TOF signal, vtx BC=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); |
52bd777f | 302 | fhPtTOFSignalVtxInBC0->SetYTitle("TOF signal (ns)"); |
303 | fhPtTOFSignalVtxInBC0->SetXTitle("p_{T} (GeV/c)"); | |
304 | outputContainer->Add(fhPtTOFSignalVtxInBC0); | |
305 | } | |
306 | ||
fedea415 | 307 | if(fFillPileUpHistograms) |
308 | { | |
309 | TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ; | |
310 | ||
311 | for(Int_t i = 0 ; i < 7 ; i++) | |
312 | { | |
313 | fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()), | |
314 | Form("Track p_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), | |
315 | nptbins,ptmin,ptmax); | |
316 | fhPtPileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
317 | outputContainer->Add(fhPtPileUp[i]); | |
318 | ||
319 | fhPtTOFSignalPileUp[i] = new TH2F(Form("hPtTOFSignalPileUp%s",pileUpName[i].Data()), | |
320 | Form("Track TOF vs p_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), | |
321 | nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); | |
322 | fhPtTOFSignalPileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
323 | fhPtTOFSignalPileUp[i]->SetXTitle("TOF signal (ns)"); | |
324 | outputContainer->Add(fhPtTOFSignalPileUp[i]); | |
52bd777f | 325 | |
326 | if(fFillVertexBC0Histograms) | |
327 | { | |
328 | fhPtTOFSignalVtxOutBC0PileUp[i] = new TH2F(Form("hPtTOFSignalVtxOutBC0PileUp%s",pileUpName[i].Data()), | |
329 | Form("Track TOF vs p_{T} distribution, %s Pile-Up event, vtx BC!=0",pileUpName[i].Data()), | |
330 | nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); | |
331 | fhPtTOFSignalVtxOutBC0PileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
332 | fhPtTOFSignalVtxOutBC0PileUp[i]->SetXTitle("TOF signal (ns)"); | |
333 | outputContainer->Add(fhPtTOFSignalVtxOutBC0PileUp[i]); | |
334 | ||
335 | fhPtTOFSignalVtxInBC0PileUp[i] = new TH2F(Form("hPtTOFSignalVtxInBC0PileUp%s",pileUpName[i].Data()), | |
336 | Form("Track TOF vs p_{T} distribution, %s Pile-Up event, vtx BC=0",pileUpName[i].Data()), | |
337 | nptbins,ptmin,ptmax,ntofbins,mintof,maxtof); | |
338 | fhPtTOFSignalVtxInBC0PileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
339 | fhPtTOFSignalVtxInBC0PileUp[i]->SetXTitle("TOF signal (ns)"); | |
340 | outputContainer->Add(fhPtTOFSignalVtxInBC0PileUp[i]); | |
341 | } | |
342 | ||
343 | if(fFillVertexBC0Histograms) | |
344 | { | |
345 | fhProductionVertexBCPileUp[i] = new TH1F(Form("hProductionVertexBCPileUp%s",pileUpName[i].Data()), | |
346 | Form("tracks production vertex bunch crossing, %s Pile-Up event",pileUpName[i].Data()), | |
347 | 41 , -20 , 20 ) ; | |
348 | fhProductionVertexBCPileUp[i]->SetYTitle("# tracks"); | |
349 | fhProductionVertexBCPileUp[i]->SetXTitle("Bunch crossing"); | |
350 | outputContainer->Add(fhProductionVertexBCPileUp[i]); | |
351 | } | |
fedea415 | 352 | } |
353 | ||
9b4a1ee2 | 354 | |
355 | if(fFillTrackBCHistograms) | |
356 | { | |
357 | fhEtaPhiTOFBC0 = new TH2F ("hEtaPhiTOFBC0","eta-phi for tracks with hit on TOF, and tof corresponding to BC=0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
358 | fhEtaPhiTOFBC0->SetXTitle("#eta "); | |
359 | fhEtaPhiTOFBC0->SetYTitle("#phi (rad)"); | |
360 | outputContainer->Add(fhEtaPhiTOFBC0); | |
361 | ||
362 | fhEtaPhiTOFBCPlus = new TH2F ("hEtaPhiTOFBCPlus","eta-phi for tracks with hit on TOF, and tof corresponding to BC>0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
363 | fhEtaPhiTOFBCPlus->SetXTitle("#eta "); | |
364 | fhEtaPhiTOFBCPlus->SetYTitle("#phi (rad)"); | |
365 | outputContainer->Add(fhEtaPhiTOFBCPlus); | |
366 | ||
367 | fhEtaPhiTOFBCMinus = new TH2F ("hEtaPhiTOFBCMinus","eta-phi for tracks with hit on TOF, and tof corresponding to BC<0",netabins,etamin,etamax, nphibins,phimin,phimax); | |
368 | fhEtaPhiTOFBCMinus->SetXTitle("#eta "); | |
369 | fhEtaPhiTOFBCMinus->SetYTitle("#phi (rad)"); | |
370 | outputContainer->Add(fhEtaPhiTOFBCMinus); | |
371 | ||
372 | if(fFillPileUpHistograms) | |
373 | { | |
374 | fhEtaPhiTOFBC0PileUpSPD = new TH2F ("hEtaPhiTOFBC0PileUpSPD","eta-phi for tracks with hit on TOF, and tof corresponding to BC=0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
375 | fhEtaPhiTOFBC0PileUpSPD->SetXTitle("#eta "); | |
376 | fhEtaPhiTOFBC0PileUpSPD->SetYTitle("#phi (rad)"); | |
377 | outputContainer->Add(fhEtaPhiTOFBC0PileUpSPD); | |
378 | ||
379 | fhEtaPhiTOFBCPlusPileUpSPD = new TH2F ("hEtaPhiTOFBCPlusPileUpSPD","eta-phi for tracks with hit on TOF, and tof corresponding to BC>0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
380 | fhEtaPhiTOFBCPlusPileUpSPD->SetXTitle("#eta "); | |
381 | fhEtaPhiTOFBCPlusPileUpSPD->SetYTitle("#phi (rad)"); | |
382 | outputContainer->Add(fhEtaPhiTOFBCPlusPileUpSPD); | |
383 | ||
384 | fhEtaPhiTOFBCMinusPileUpSPD = new TH2F ("hEtaPhiTOFBCMinusPileUpSPD","eta-phi for tracks with hit on TOF, and tof corresponding to BC<0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax); | |
385 | fhEtaPhiTOFBCMinusPileUpSPD->SetXTitle("#eta "); | |
386 | fhEtaPhiTOFBCMinusPileUpSPD->SetYTitle("#phi (rad)"); | |
387 | outputContainer->Add(fhEtaPhiTOFBCMinusPileUpSPD); | |
388 | } | |
389 | } | |
fedea415 | 390 | |
fe9615b9 | 391 | } |
392 | ||
393 | fhPtTOFStatus0 = new TH1F ("hPtTOFStatus0","p_T distribution of tracks not hitting TOF", nptbins,ptmin,ptmax); | |
394 | fhPtTOFStatus0->SetXTitle("p_{T} (GeV/c)"); | |
395 | outputContainer->Add(fhPtTOFStatus0); | |
396 | ||
397 | ||
fedea415 | 398 | fhEtaPhiTOFStatus0 = new TH2F ("hEtaPhiTOFStatus0","eta-phi for tracks without hit on TOF",netabins,etamin,etamax, nphibins,phimin,phimax); |
fe9615b9 | 399 | fhEtaPhiTOFStatus0->SetXTitle("#eta "); |
400 | fhEtaPhiTOFStatus0->SetYTitle("#phi (rad)"); | |
401 | outputContainer->Add(fhEtaPhiTOFStatus0); | |
402 | ||
fedea415 | 403 | TString dcaName[] = {"xy","z","Cons"} ; |
404 | Int_t ndcabins = 800; | |
405 | Int_t mindca = -4; | |
406 | Int_t maxdca = 4; | |
407 | ||
408 | for(Int_t i = 0 ; i < 3 ; i++) | |
409 | { | |
410 | ||
411 | fhPtDCA[i] = new TH2F(Form("hPtDCA%s",dcaName[i].Data()), | |
412 | Form("Track DCA%s vs p_{T} distribution",dcaName[i].Data()), | |
413 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
414 | fhPtDCA[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 415 | fhPtDCA[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
fedea415 | 416 | outputContainer->Add(fhPtDCA[i]); |
417 | ||
8f467228 | 418 | fhPtDCASPDRefit[i] = new TH2F(Form("hPtDCA%sSPDRefit",dcaName[i].Data()), |
419 | Form("Track DCA%s vs p_{T} distribution of tracks with SPD and ITS refit",dcaName[i].Data()), | |
420 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
421 | fhPtDCASPDRefit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 422 | fhPtDCASPDRefit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
8f467228 | 423 | outputContainer->Add(fhPtDCASPDRefit[i]); |
424 | ||
425 | fhPtDCANoSPDRefit[i] = new TH2F(Form("hPtDCA%sNoSPDRefit",dcaName[i].Data()), | |
426 | Form("Track DCA%s vs p_{T} distributionof constrained tracks no SPD and with ITSRefit",dcaName[i].Data()), | |
427 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
428 | fhPtDCANoSPDRefit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 429 | fhPtDCANoSPDRefit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
8f467228 | 430 | outputContainer->Add(fhPtDCANoSPDRefit[i]); |
431 | ||
432 | fhPtDCANoSPDNoRefit[i] = new TH2F(Form("hPtDCA%sNoSPDNoRefit",dcaName[i].Data()), | |
433 | Form("Track DCA%s vs p_{T} distribution, constrained tracks with no SPD requierement and without ITSRefit",dcaName[i].Data()), | |
434 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
435 | fhPtDCANoSPDNoRefit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 436 | fhPtDCANoSPDNoRefit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
8f467228 | 437 | outputContainer->Add(fhPtDCANoSPDNoRefit[i]); |
438 | ||
9b4a1ee2 | 439 | if(fFillTrackBCHistograms) |
440 | { | |
441 | fhPtDCATOFBC0[i] = new TH2F(Form("hPtDCA%sTOFBC0",dcaName[i].Data()), | |
442 | Form("Track DCA%s vs p_{T} distribution, BC=0",dcaName[i].Data()), | |
443 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
444 | fhPtDCATOFBC0[i]->SetXTitle("p_{T} (GeV/c)"); | |
445 | fhPtDCATOFBC0[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); | |
446 | outputContainer->Add(fhPtDCATOFBC0[i]); | |
447 | ||
448 | fhPtDCATOFBCOut[i] = new TH2F(Form("hPtDCA%sTOFBCOut",dcaName[i].Data()), | |
449 | Form("Track DCA%s vs p_{T} distribution, BC!=0",dcaName[i].Data()), | |
450 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
451 | fhPtDCATOFBCOut[i]->SetXTitle("p_{T} (GeV/c)"); | |
452 | fhPtDCATOFBCOut[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); | |
453 | outputContainer->Add(fhPtDCATOFBCOut[i]); | |
454 | } | |
52bd777f | 455 | |
fedea415 | 456 | fhPtDCANoTOFHit[i] = new TH2F(Form("hPtDCA%sNoTOFHit",dcaName[i].Data()), |
457 | Form("Track (no TOF hit) DCA%s vs p_{T} distribution",dcaName[i].Data()), | |
458 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
459 | fhPtDCANoTOFHit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 460 | fhPtDCANoTOFHit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
fedea415 | 461 | outputContainer->Add(fhPtDCANoTOFHit[i]); |
462 | ||
52bd777f | 463 | if(fFillVertexBC0Histograms) |
464 | { | |
465 | fhPtDCAVtxOutBC0[i] = new TH2F(Form("hPtDCA%sVtxOutBC0",dcaName[i].Data()), | |
466 | Form("Track DCA%s vs p_{T} distribution, vertex with BC!=0",dcaName[i].Data()), | |
467 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
468 | fhPtDCAVtxOutBC0[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 469 | fhPtDCAVtxOutBC0[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 470 | outputContainer->Add(fhPtDCAVtxOutBC0[i]); |
471 | ||
472 | fhPtDCAVtxOutBC0NoTOFHit[i] = new TH2F(Form("hPtDCA%sVtxOutBC0NoTOFHit",dcaName[i].Data()), | |
473 | Form("Track (no TOF hit) DCA%s vs p_{T} distribution, vertex with BC!=0",dcaName[i].Data()), | |
474 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
475 | fhPtDCAVtxOutBC0NoTOFHit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 476 | fhPtDCAVtxOutBC0NoTOFHit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 477 | outputContainer->Add(fhPtDCAVtxOutBC0NoTOFHit[i]); |
478 | ||
479 | fhPtDCAVtxInBC0[i] = new TH2F(Form("hPtDCA%sVtxInBC0",dcaName[i].Data()), | |
480 | Form("Track DCA%s vs p_{T} distribution, vertex with BC==0",dcaName[i].Data()), | |
481 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
482 | fhPtDCAVtxInBC0[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 483 | fhPtDCAVtxInBC0[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 484 | outputContainer->Add(fhPtDCAVtxInBC0[i]); |
485 | ||
486 | fhPtDCAVtxInBC0NoTOFHit[i] = new TH2F(Form("hPtDCA%sVtxInBC0NoTOFHit",dcaName[i].Data()), | |
487 | Form("Track (no TOF hit) DCA%s vs p_{T} distribution, vertex with BC==0",dcaName[i].Data()), | |
488 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
489 | fhPtDCAVtxInBC0NoTOFHit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 490 | fhPtDCAVtxInBC0NoTOFHit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 491 | outputContainer->Add(fhPtDCAVtxInBC0NoTOFHit[i]); |
492 | } | |
fedea415 | 493 | |
494 | if(fFillPileUpHistograms) | |
495 | { | |
496 | fhPtDCAPileUp[i] = new TH2F(Form("hPtDCA%sPileUp",dcaName[i].Data()), | |
497 | Form("Track DCA%s vs p_{T} distribution, SPD Pile-Up",dcaName[i].Data()), | |
498 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
499 | fhPtDCAPileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 500 | fhPtDCAPileUp[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
fedea415 | 501 | outputContainer->Add(fhPtDCAPileUp[i]); |
502 | ||
9b4a1ee2 | 503 | if(fFillTrackBCHistograms) |
504 | { | |
505 | fhPtDCAPileUpTOFBC0[i] = new TH2F(Form("hPtDCA%sPileUpTOFBC0",dcaName[i].Data()), | |
506 | Form("Track DCA%s vs p_{T} distribution",dcaName[i].Data()), | |
507 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
508 | fhPtDCAPileUpTOFBC0[i]->SetXTitle("p_{T} (GeV/c)"); | |
509 | fhPtDCAPileUpTOFBC0[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); | |
510 | outputContainer->Add(fhPtDCAPileUpTOFBC0[i]); | |
511 | } | |
fedea415 | 512 | |
513 | fhPtDCAPileUpNoTOFHit[i] = new TH2F(Form("hPtDCA%sPileUpNoTOFHit",dcaName[i].Data()), | |
514 | Form("Track (no TOF hit) DCA%s vs p_{T} distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].Data()), | |
515 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
516 | fhPtDCAPileUpNoTOFHit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 517 | fhPtDCAPileUpNoTOFHit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
fedea415 | 518 | outputContainer->Add(fhPtDCAPileUpNoTOFHit[i]); |
519 | ||
52bd777f | 520 | if(fFillVertexBC0Histograms) |
521 | { | |
522 | fhPtDCAVtxOutBC0PileUp[i] = new TH2F(Form("hPtDCA%sPileUpVtxOutBC0",dcaName[i].Data()), | |
523 | Form("Track DCA%s vs p_{T} distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].Data()), | |
524 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
525 | fhPtDCAVtxOutBC0PileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 526 | fhPtDCAVtxOutBC0PileUp[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 527 | outputContainer->Add(fhPtDCAVtxOutBC0PileUp[i]); |
528 | ||
529 | fhPtDCAVtxOutBC0PileUpNoTOFHit[i] = new TH2F(Form("hPtDCA%sVtxOutBC0PileUpNoTOFHit",dcaName[i].Data()), | |
530 | Form("Track (no TOF hit) DCA%s vs p_{T} distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].Data()), | |
531 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
532 | fhPtDCAVtxOutBC0PileUpNoTOFHit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 533 | fhPtDCAVtxOutBC0PileUpNoTOFHit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 534 | outputContainer->Add(fhPtDCAVtxOutBC0PileUpNoTOFHit[i]); |
535 | ||
536 | fhPtDCAVtxInBC0PileUp[i] = new TH2F(Form("hPtDCA%sPileUpVtxInBC0",dcaName[i].Data()), | |
537 | Form("Track DCA%s vs p_{T} distribution, SPD Pile-Up,vertex with BC==0",dcaName[i].Data()), | |
538 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
539 | fhPtDCAVtxInBC0PileUp[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 540 | fhPtDCAVtxInBC0PileUp[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 541 | outputContainer->Add(fhPtDCAVtxInBC0PileUp[i]); |
542 | ||
543 | fhPtDCAVtxInBC0PileUpNoTOFHit[i] = new TH2F(Form("hPtDCA%sVtxInBC0PileUpNoTOFHit",dcaName[i].Data()), | |
544 | Form("Track (no TOF hit) DCA%s vs p_{T} distribution, SPD Pile-Up, vertex with BC==0",dcaName[i].Data()), | |
545 | nptbins,ptmin,ptmax,ndcabins,mindca,maxdca); | |
546 | fhPtDCAVtxInBC0PileUpNoTOFHit[i]->SetXTitle("p_{T} (GeV/c)"); | |
f9a67d4f | 547 | fhPtDCAVtxInBC0PileUpNoTOFHit[i]->SetYTitle(Form("DCA_{%s}",dcaName[i].Data())); |
52bd777f | 548 | outputContainer->Add(fhPtDCAVtxInBC0PileUpNoTOFHit[i]); |
549 | ||
550 | } | |
fedea415 | 551 | } |
552 | } | |
553 | ||
52bd777f | 554 | if(IsDataMC()) |
555 | { | |
a3aebfff | 556 | fhPtPion = new TH1F ("hPtMCPion","p_T distribution from #pi", nptbins,ptmin,ptmax); |
477d6cee | 557 | fhPtPion->SetXTitle("p_{T} (GeV/c)"); |
558 | outputContainer->Add(fhPtPion); | |
559 | ||
a3aebfff | 560 | fhPhiPion = new TH2F ("hPhiMCPion","#phi distribution from #pi",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
477d6cee | 561 | fhPhiPion->SetXTitle("#phi (rad)"); |
562 | outputContainer->Add(fhPhiPion); | |
563 | ||
a3aebfff | 564 | fhEtaPion = new TH2F ("hEtaMCPion","#eta distribution from #pi",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
477d6cee | 565 | fhEtaPion->SetXTitle("#eta "); |
566 | outputContainer->Add(fhEtaPion); | |
567 | ||
a3aebfff | 568 | fhPtProton = new TH1F ("hPtMCProton","p_T distribution from proton", nptbins,ptmin,ptmax); |
477d6cee | 569 | fhPtProton->SetXTitle("p_{T} (GeV/c)"); |
570 | outputContainer->Add(fhPtProton); | |
571 | ||
a3aebfff | 572 | fhPhiProton = new TH2F ("hPhiMCProton","#phi distribution from proton",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
477d6cee | 573 | fhPhiProton->SetXTitle("#phi (rad)"); |
574 | outputContainer->Add(fhPhiProton); | |
575 | ||
a3aebfff | 576 | fhEtaProton = new TH2F ("hEtaMCProton","#eta distribution from proton",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
477d6cee | 577 | fhEtaProton->SetXTitle("#eta "); |
578 | outputContainer->Add(fhEtaProton); | |
579 | ||
a3aebfff | 580 | fhPtKaon = new TH1F ("hPtMCKaon","p_T distribution from kaon", nptbins,ptmin,ptmax); |
477d6cee | 581 | fhPtKaon->SetXTitle("p_{T} (GeV/c)"); |
582 | outputContainer->Add(fhPtKaon); | |
583 | ||
a3aebfff | 584 | fhPhiKaon = new TH2F ("hPhiMCKaon","#phi distribution from kaon",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
477d6cee | 585 | fhPhiKaon->SetXTitle("#phi (rad)"); |
586 | outputContainer->Add(fhPhiKaon); | |
587 | ||
a3aebfff | 588 | fhEtaKaon = new TH2F ("hEtaMCKaon","#eta distribution from kaon",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
477d6cee | 589 | fhEtaKaon->SetXTitle("#eta "); |
590 | outputContainer->Add(fhEtaKaon); | |
591 | ||
a3aebfff | 592 | fhPtElectron = new TH1F ("hPtMCElectron","p_T distribution from electron", nptbins,ptmin,ptmax); |
477d6cee | 593 | fhPtElectron->SetXTitle("p_{T} (GeV/c)"); |
594 | outputContainer->Add(fhPtElectron); | |
595 | ||
a3aebfff | 596 | fhPhiElectron = new TH2F ("hPhiMCElectron","#phi distribution from electron",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
477d6cee | 597 | fhPhiElectron->SetXTitle("#phi (rad)"); |
598 | outputContainer->Add(fhPhiElectron); | |
599 | ||
a3aebfff | 600 | fhEtaElectron = new TH2F ("hEtaMCElectron","#eta distribution from electron",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
477d6cee | 601 | fhEtaElectron->SetXTitle("#eta "); |
602 | outputContainer->Add(fhEtaElectron); | |
603 | ||
a3aebfff | 604 | fhPtUnknown = new TH1F ("hPtMCUnknown","p_T distribution from unknown", nptbins,ptmin,ptmax); |
477d6cee | 605 | fhPtUnknown->SetXTitle("p_{T} (GeV/c)"); |
606 | outputContainer->Add(fhPtUnknown); | |
607 | ||
a3aebfff | 608 | fhPhiUnknown = new TH2F ("hPhiMCUnknown","#phi distribution from unknown",nptbins,ptmin,ptmax, nphibins,phimin,phimax); |
477d6cee | 609 | fhPhiUnknown->SetXTitle("#phi (rad)"); |
610 | outputContainer->Add(fhPhiUnknown); | |
611 | ||
a3aebfff | 612 | fhEtaUnknown = new TH2F ("hEtaMCUnknown","#eta distribution from unknown",nptbins,ptmin,ptmax, netabins,etamin,etamax); |
477d6cee | 613 | fhEtaUnknown->SetXTitle("#eta "); |
614 | outputContainer->Add(fhEtaUnknown); | |
727a309a | 615 | |
616 | fhMCPt = new TH1F ("hMCPt","p_T distribution from MC", nptbins,ptmin,ptmax); | |
617 | fhMCPt->SetXTitle("p_{T} (GeV/c)"); | |
618 | outputContainer->Add(fhMCPt); | |
619 | ||
620 | fhMCPhi = new TH2F ("hMCPhi","#phi distribution from MC",nptbins,ptmin,ptmax, nphibins,phimin,phimax); | |
621 | fhMCPhi->SetXTitle("#phi (rad)"); | |
622 | outputContainer->Add(fhMCPhi); | |
623 | ||
624 | fhMCEta = new TH2F ("hMCEta","#eta distribution from MC",nptbins,ptmin,ptmax,netabins,etamin,etamax); | |
625 | fhMCEta->SetXTitle("#eta (rad)"); | |
626 | outputContainer->Add(fhMCEta); | |
627 | ||
628 | fhMCRecPt = new TH1F ("hMCRecPt","p_T distribution from Rec MC", nptbins,ptmin,ptmax); | |
629 | fhMCRecPt->SetXTitle("p_{T} (GeV/c)"); | |
630 | outputContainer->Add(fhMCRecPt); | |
477d6cee | 631 | } |
a3aebfff | 632 | |
85c4406e | 633 | fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","pT of cluster vs N pile-up SPD vertex", |
634 | nptbins,ptmin,ptmax,20,0,20); | |
635 | fhPtNPileUpSPDVtx->SetYTitle("# vertex "); | |
636 | fhPtNPileUpSPDVtx->SetXTitle("p_{T} (GeV/c)"); | |
637 | outputContainer->Add(fhPtNPileUpSPDVtx); | |
638 | ||
639 | fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","pT of cluster vs N pile-up Tracks vertex", | |
640 | nptbins,ptmin,ptmax, 20,0,20 ); | |
641 | fhPtNPileUpTrkVtx->SetYTitle("# vertex "); | |
642 | fhPtNPileUpTrkVtx->SetXTitle("p_{T} (GeV/c)"); | |
643 | outputContainer->Add(fhPtNPileUpTrkVtx); | |
644 | ||
645 | if(fFillVertexBC0Histograms) | |
646 | { | |
647 | fhPtNPileUpSPDVtxBC0 = new TH2F ("hPt_NPileUpVertSPD_BC0","pT of cluster vs N pile-up SPD vertex", | |
648 | nptbins,ptmin,ptmax,20,0,20); | |
649 | fhPtNPileUpSPDVtxBC0->SetYTitle("# vertex "); | |
650 | fhPtNPileUpSPDVtxBC0->SetXTitle("p_{T} (GeV/c)"); | |
651 | outputContainer->Add(fhPtNPileUpSPDVtxBC0); | |
652 | ||
653 | fhPtNPileUpTrkVtxBC0 = new TH2F ("hPt_NPileUpVertTracks_BC0","pT of cluster vs N pile-up Tracks vertex", | |
654 | nptbins,ptmin,ptmax, 20,0,20 ); | |
655 | fhPtNPileUpTrkVtxBC0->SetYTitle("# vertex "); | |
656 | fhPtNPileUpTrkVtxBC0->SetXTitle("p_{T} (GeV/c)"); | |
657 | outputContainer->Add(fhPtNPileUpTrkVtxBC0); | |
658 | } | |
659 | ||
477d6cee | 660 | return outputContainer; |
a3aebfff | 661 | |
477d6cee | 662 | } |
663 | ||
52bd777f | 664 | |
05d0d05d | 665 | //___________________________________________ |
477d6cee | 666 | void AliAnaChargedParticles::InitParameters() |
667 | { | |
668 | //Initialize the parameters of the analysis. | |
669 | SetOutputAODClassName("AliAODPWG4Particle"); | |
a3aebfff | 670 | SetOutputAODName("PWG4Particle"); |
671 | ||
672 | AddToHistogramsName("AnaCharged_"); | |
477d6cee | 673 | |
cbd6236f | 674 | |
477d6cee | 675 | } |
676 | ||
05d0d05d | 677 | //____________________________________________________________ |
477d6cee | 678 | void AliAnaChargedParticles::Print(const Option_t * opt) const |
679 | { | |
680 | //Print some relevant parameters set for the analysis | |
681 | if(! opt) | |
682 | return; | |
683 | ||
a3aebfff | 684 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; |
745913ae | 685 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
a3aebfff | 686 | |
477d6cee | 687 | printf("Min Pt = %3.2f\n", GetMinPt()); |
688 | printf("Max Pt = %3.2f\n", GetMaxPt()); | |
477d6cee | 689 | |
690 | } | |
691 | ||
05d0d05d | 692 | //_________________________________ |
477d6cee | 693 | void AliAnaChargedParticles::Init() |
694 | { | |
695 | //Init | |
696 | //Do some checks | |
697 | if(!GetReader()->IsCTSSwitchedOn()){ | |
7cd4e982 | 698 | printf("AliAnaChargedParticles::Init() - STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!\n"); |
477d6cee | 699 | abort(); |
700 | } | |
701 | ||
702 | } | |
703 | ||
05d0d05d | 704 | //_________________________________________________ |
477d6cee | 705 | void AliAnaChargedParticles::MakeAnalysisFillAOD() |
706 | { | |
707 | //Do analysis and fill aods | |
be518ab0 | 708 | if(!GetCTSTracks() || GetCTSTracks()->GetEntriesFast() == 0) return ; |
192689a4 | 709 | |
be518ab0 | 710 | Int_t ntracks = GetCTSTracks()->GetEntriesFast(); |
2244659d | 711 | Double_t vert[3] = {0,0,0}; //vertex ; |
192689a4 | 712 | |
477d6cee | 713 | //Some prints |
714 | if(GetDebug() > 0) | |
a3aebfff | 715 | printf("AliAnaChargedParticles::MakeAnalysisFillAOD() - In CTS aod entries %d\n", ntracks); |
477d6cee | 716 | |
85c4406e | 717 | AliVEvent * event = GetReader()->GetInputEvent(); |
718 | AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event); | |
719 | AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event); | |
720 | ||
cc944149 | 721 | Int_t vtxBC = GetReader()->GetVertexBC(); |
722 | if(!GetReader()->IsDCACutOn()) vtxBC = GetReader()->GetVertexBC(event->GetPrimaryVertex()); | |
52bd777f | 723 | |
52bd777f | 724 | if(fFillVertexBC0Histograms) |
725 | { | |
726 | fhProductionVertexBC->Fill(vtxBC); | |
727 | if(fFillPileUpHistograms) | |
728 | { | |
729 | if(GetReader()->IsPileUpFromSPD()) fhProductionVertexBCPileUp[0]->Fill(vtxBC); | |
730 | if(GetReader()->IsPileUpFromEMCal()) fhProductionVertexBCPileUp[1]->Fill(vtxBC); | |
731 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhProductionVertexBCPileUp[2]->Fill(vtxBC); | |
732 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhProductionVertexBCPileUp[3]->Fill(vtxBC); | |
733 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhProductionVertexBCPileUp[4]->Fill(vtxBC); | |
734 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhProductionVertexBCPileUp[5]->Fill(vtxBC); | |
735 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhProductionVertexBCPileUp[6]->Fill(vtxBC); | |
736 | } | |
737 | } | |
738 | ||
85c4406e | 739 | // N pile up vertices |
740 | Int_t nVtxSPD = -1; | |
741 | Int_t nVtxTrk = -1; | |
742 | ||
743 | if (esdEv) | |
744 | { | |
745 | nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD(); | |
746 | nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks(); | |
747 | ||
748 | }//ESD | |
749 | else if (aodEv) | |
750 | { | |
751 | nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD(); | |
752 | nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks(); | |
753 | }//AOD | |
754 | ||
755 | ||
52bd777f | 756 | //printf("AliAnaChargedParticles::MakeAnalysisFillAOD() - primary vertex BC %d\n",vtxBC); |
757 | ||
758 | Double_t bz = event->GetMagneticField(); | |
fedea415 | 759 | |
477d6cee | 760 | //Fill AODParticle with CTS aods |
52bd777f | 761 | Float_t pt = 0; |
762 | Float_t phi = 0; | |
763 | Float_t eta = 0; | |
5025c139 | 764 | Int_t evtIndex = 0; |
52bd777f | 765 | for(Int_t i = 0; i < ntracks; i++) |
766 | { | |
88f9563f | 767 | AliVTrack * track = (AliVTrack*) (GetCTSTracks()->At(i)); |
52bd777f | 768 | |
769 | pt = track->Pt(); | |
770 | eta = track->Eta(); | |
771 | phi = track->Phi(); | |
772 | ||
773 | fhPtNoCut->Fill(pt); | |
477d6cee | 774 | |
85c4406e | 775 | fhPtNPileUpSPDVtx->Fill(pt,nVtxSPD); |
776 | fhPtNPileUpTrkVtx->Fill(pt,nVtxTrk); | |
777 | ||
52bd777f | 778 | AliAODTrack * aodTrack = dynamic_cast<AliAODTrack*>(track); |
779 | AliESDtrack * esdTrack = dynamic_cast<AliESDtrack*>(track); | |
477d6cee | 780 | |
fe9615b9 | 781 | //TOF |
782 | ULong_t status = track->GetStatus(); | |
fedea415 | 783 | Bool_t okTOF = (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ; |
52bd777f | 784 | Double32_t tof = track->GetTOFsignal()*1e-3; |
fe9615b9 | 785 | |
52bd777f | 786 | //DCA |
fedea415 | 787 | Double_t dcaCons = -999; |
fedea415 | 788 | if(aodTrack) |
789 | { | |
790 | dcaCons = aodTrack->DCA(); | |
309684b9 | 791 | //vtxBC = aodTrack->GetProdVertex()->GetBC(); |
fedea415 | 792 | } |
fedea415 | 793 | |
794 | Double_t dca[2] = {1e6,1e6}; | |
795 | Double_t covar[3] = {1e6,1e6,1e6}; | |
796 | track->PropagateToDCA(GetReader()->GetInputEvent()->GetPrimaryVertex(),bz,100.,dca,covar); | |
797 | ||
52bd777f | 798 | Float_t trackDCA = dca[0]; |
799 | ||
fedea415 | 800 | if(dcaCons == -999) |
801 | { | |
52bd777f | 802 | fhPtDCA[0]->Fill(pt, dca[0]); |
803 | fhPtDCA[1]->Fill(pt, dca[1]); | |
804 | } | |
805 | else | |
806 | { | |
807 | trackDCA = dcaCons; | |
808 | fhPtDCA[2]->Fill(pt, dcaCons); | |
809 | } | |
810 | ||
cc944149 | 811 | if(GetReader()->AcceptDCA(pt,trackDCA)) fhPtCutDCA->Fill(pt); |
52bd777f | 812 | |
813 | if(fFillVertexBC0Histograms) | |
814 | { | |
815 | if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA) | |
816 | { | |
817 | fhPtVtxOutBC0->Fill(pt); | |
818 | fhEtaPhiVtxOutBC0->Fill(eta,phi); | |
819 | ||
820 | if(dcaCons == -999) | |
821 | { | |
822 | fhPtDCAVtxOutBC0[0]->Fill(pt, dca[0]); | |
823 | fhPtDCAVtxOutBC0[1]->Fill(pt, dca[1]); | |
824 | } | |
825 | else | |
826 | fhPtDCAVtxOutBC0[2]->Fill(pt, dcaCons); | |
827 | } | |
828 | else | |
829 | { | |
830 | fhPtVtxInBC0->Fill(pt); | |
831 | fhEtaPhiVtxInBC0->Fill(eta,phi); | |
85c4406e | 832 | |
833 | fhPtNPileUpSPDVtxBC0->Fill(pt,nVtxSPD); | |
834 | fhPtNPileUpTrkVtxBC0->Fill(pt,nVtxTrk); | |
835 | ||
cc944149 | 836 | if(GetReader()->AcceptDCA(pt,trackDCA)) fhPtCutDCABCOK->Fill(pt); |
52bd777f | 837 | |
838 | if(dcaCons == -999) | |
839 | { | |
840 | fhPtDCAVtxInBC0[0]->Fill(pt, dca[0]); | |
841 | fhPtDCAVtxInBC0[1]->Fill(pt, dca[1]); | |
842 | } | |
843 | else | |
844 | fhPtDCAVtxInBC0[2]->Fill(pt, dcaCons); | |
845 | ||
846 | } | |
fedea415 | 847 | } |
fedea415 | 848 | |
849 | if(fFillPileUpHistograms && GetReader()->IsPileUpFromSPD()) | |
850 | { | |
851 | if(dcaCons == -999) | |
852 | { | |
52bd777f | 853 | fhPtDCAPileUp[0]->Fill(pt, dca[0]); |
854 | fhPtDCAPileUp[1]->Fill(pt, dca[1]); | |
fedea415 | 855 | } |
856 | else | |
52bd777f | 857 | fhPtDCAPileUp[2]->Fill(pt, dcaCons); |
858 | ||
859 | if(fFillVertexBC0Histograms) | |
860 | { | |
861 | if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA) | |
862 | { | |
863 | if(dcaCons == -999) | |
864 | { | |
865 | fhPtDCAVtxOutBC0PileUp[0]->Fill(pt, dca[0]); | |
866 | fhPtDCAVtxOutBC0PileUp[1]->Fill(pt, dca[1]); | |
867 | } | |
868 | else fhPtDCAVtxOutBC0PileUp[2]->Fill(pt, dcaCons); | |
869 | } | |
870 | else | |
871 | { | |
872 | if(dcaCons == -999) | |
873 | { | |
874 | fhPtDCAVtxInBC0PileUp[0]->Fill(pt, dca[0]); | |
875 | fhPtDCAVtxInBC0PileUp[1]->Fill(pt, dca[1]); | |
876 | } | |
877 | else fhPtDCAVtxInBC0PileUp[2]->Fill(pt, dcaCons); | |
878 | } | |
879 | } | |
fedea415 | 880 | } |
881 | ||
882 | if(!okTOF) | |
883 | { | |
884 | if(dcaCons == -999) | |
885 | { | |
52bd777f | 886 | fhPtDCANoTOFHit[0]->Fill(pt, dca[0]); |
887 | fhPtDCANoTOFHit[1]->Fill(pt, dca[1]); | |
fedea415 | 888 | } |
889 | else | |
52bd777f | 890 | fhPtDCANoTOFHit[2]->Fill(pt, dcaCons); |
fedea415 | 891 | |
52bd777f | 892 | if(fFillVertexBC0Histograms) |
893 | { | |
894 | if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA) | |
895 | { | |
896 | if(dcaCons == -999) | |
897 | { | |
898 | fhPtDCAVtxOutBC0NoTOFHit[0]->Fill(pt, dca[0]); | |
899 | fhPtDCAVtxOutBC0NoTOFHit[1]->Fill(pt, dca[1]); | |
900 | } | |
901 | else | |
902 | fhPtDCAVtxOutBC0NoTOFHit[2]->Fill(pt, dcaCons); | |
903 | } | |
904 | else | |
905 | { | |
906 | if(dcaCons == -999) | |
907 | { | |
908 | fhPtDCAVtxInBC0NoTOFHit[0]->Fill(pt, dca[0]); | |
909 | fhPtDCAVtxInBC0NoTOFHit[1]->Fill(pt, dca[1]); | |
910 | } | |
911 | else | |
912 | fhPtDCAVtxInBC0NoTOFHit[2]->Fill(pt, dcaCons); | |
913 | ||
914 | } | |
915 | } | |
fedea415 | 916 | |
917 | if(fFillPileUpHistograms && GetReader()->IsPileUpFromSPD()) | |
918 | { | |
919 | if(dcaCons == -999) | |
920 | { | |
52bd777f | 921 | fhPtDCAPileUpNoTOFHit[0]->Fill(pt, dca[0]); |
922 | fhPtDCAPileUpNoTOFHit[1]->Fill(pt, dca[1]); | |
fedea415 | 923 | } |
924 | else | |
52bd777f | 925 | fhPtDCAPileUpNoTOFHit[2]->Fill(pt, dcaCons); |
fedea415 | 926 | |
52bd777f | 927 | if(fFillVertexBC0Histograms) |
928 | { | |
929 | if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA) | |
930 | { | |
931 | if(dcaCons == -999) | |
932 | { | |
933 | fhPtDCAVtxOutBC0PileUpNoTOFHit[0]->Fill(pt, dca[0]); | |
934 | fhPtDCAVtxOutBC0PileUpNoTOFHit[1]->Fill(pt, dca[1]); | |
935 | } | |
936 | else | |
937 | fhPtDCAVtxOutBC0PileUpNoTOFHit[2]->Fill(pt, dcaCons); | |
938 | } | |
939 | else | |
940 | { | |
941 | if(dcaCons == -999) | |
942 | { | |
943 | fhPtDCAVtxInBC0PileUpNoTOFHit[0]->Fill(pt, dca[0]); | |
944 | fhPtDCAVtxInBC0PileUpNoTOFHit[1]->Fill(pt, dca[1]); | |
945 | } | |
946 | else | |
947 | fhPtDCAVtxInBC0PileUpNoTOFHit[2]->Fill(pt, dcaCons); | |
948 | ||
949 | } | |
950 | } | |
fedea415 | 951 | } |
952 | } | |
953 | ||
954 | //printf("track pT %2.2f, DCA Cons %f, DCA1 %f, DCA2 %f, TOFBC %d, oktof %d, tof %f\n", | |
52bd777f | 955 | // pt,dcaCons,dca[0],dca[1],track->GetTOFBunchCrossing(bz),okTOF, tof); |
fedea415 | 956 | |
fedea415 | 957 | |
52bd777f | 958 | // if( vtxBC == 0 && trackBC !=0 && trackBC!=AliVTrack::kTOFBCNA) |
959 | // printf("TOF Signal %e, BC %d, pt %f, dca_xy %f, dca_z %f, dca_tpc %f \n", tof,trackBC, pt,dca[0],dca[1],dcaCons); | |
960 | ||
961 | ||
962 | if(okTOF) | |
fedea415 | 963 | { |
52bd777f | 964 | fhTOFSignal ->Fill(tof); |
965 | fhPtTOFSignal->Fill(pt, tof); | |
cc944149 | 966 | if(GetReader()->AcceptDCA(pt,trackDCA)) fhPtTOFSignalDCACut->Fill(pt, tof); |
967 | ||
75af435c | 968 | if(fFillVertexBC0Histograms) |
969 | { | |
970 | if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA) | |
971 | fhPtTOFSignalVtxOutBC0->Fill(pt, tof); | |
972 | else | |
973 | fhPtTOFSignalVtxInBC0->Fill(pt, tof); | |
974 | } | |
fedea415 | 975 | |
9b4a1ee2 | 976 | Int_t trackBC = 1000; |
977 | ||
978 | if(fFillTrackBCHistograms) | |
fedea415 | 979 | { |
9b4a1ee2 | 980 | trackBC = track->GetTOFBunchCrossing(bz); |
981 | ||
982 | if(trackBC==0) | |
fedea415 | 983 | { |
9b4a1ee2 | 984 | fhTOFSignalBCOK->Fill(tof); |
985 | ||
986 | if(dcaCons == -999) | |
987 | { | |
988 | fhPtDCATOFBC0[0]->Fill(pt, dca[0]); | |
989 | fhPtDCATOFBC0[1]->Fill(pt, dca[1]); | |
990 | } | |
991 | else | |
992 | fhPtDCATOFBC0[2]->Fill(pt, dcaCons); | |
993 | ||
994 | if(fFillPileUpHistograms && GetReader()->IsPileUpFromSPD()) | |
995 | { | |
996 | if(dcaCons == -999) | |
997 | { | |
998 | fhPtDCAPileUpTOFBC0[0]->Fill(pt, dca[0]); | |
999 | fhPtDCAPileUpTOFBC0[1]->Fill(pt, dca[1]); | |
1000 | } | |
1001 | else | |
1002 | fhPtDCAPileUpTOFBC0[2]->Fill(pt, dcaCons); | |
1003 | } | |
fedea415 | 1004 | } |
9b4a1ee2 | 1005 | else if(trackBC!=AliVTrack::kTOFBCNA) |
52bd777f | 1006 | { |
1007 | if(dcaCons == -999) | |
1008 | { | |
9b4a1ee2 | 1009 | fhPtDCATOFBCOut[0]->Fill(pt, dca[0]); |
1010 | fhPtDCATOFBCOut[1]->Fill(pt, dca[1]); | |
52bd777f | 1011 | } |
1012 | else | |
9b4a1ee2 | 1013 | fhPtDCATOFBCOut[2]->Fill(pt, dcaCons); |
1014 | ||
52bd777f | 1015 | } |
fedea415 | 1016 | } |
fedea415 | 1017 | |
52bd777f | 1018 | if(fFillPileUpHistograms) |
1019 | { | |
1020 | if(GetReader()->IsPileUpFromSPD()) fhPtTOFSignalPileUp[0]->Fill(pt, tof); | |
1021 | if(GetReader()->IsPileUpFromEMCal()) fhPtTOFSignalPileUp[1]->Fill(pt, tof); | |
1022 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTOFSignalPileUp[2]->Fill(pt, tof); | |
1023 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTOFSignalPileUp[3]->Fill(pt, tof); | |
1024 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTOFSignalPileUp[4]->Fill(pt, tof); | |
1025 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTOFSignalPileUp[5]->Fill(pt, tof); | |
1026 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTOFSignalPileUp[6]->Fill(pt, tof); | |
1027 | ||
9b4a1ee2 | 1028 | if(fFillTrackBCHistograms) |
1029 | { | |
1030 | if (trackBC ==0) { fhEtaPhiTOFBC0 ->Fill(eta,phi); if(fFillPileUpHistograms && GetReader()->IsPileUpFromSPD()) fhEtaPhiTOFBC0PileUpSPD ->Fill(eta,phi); } | |
1031 | else if (trackBC < 0) { fhEtaPhiTOFBCPlus ->Fill(eta,phi); if(fFillPileUpHistograms && GetReader()->IsPileUpFromSPD()) fhEtaPhiTOFBCPlusPileUpSPD ->Fill(eta,phi); } | |
1032 | else if (trackBC > 0) { fhEtaPhiTOFBCMinus->Fill(eta,phi); if(fFillPileUpHistograms && GetReader()->IsPileUpFromSPD()) fhEtaPhiTOFBCMinusPileUpSPD->Fill(eta,phi); } | |
1033 | } | |
fedea415 | 1034 | |
52bd777f | 1035 | if(fFillVertexBC0Histograms) |
1036 | { | |
1037 | if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA) | |
1038 | { | |
1039 | if(GetReader()->IsPileUpFromSPD()) fhPtTOFSignalVtxOutBC0PileUp[0]->Fill(pt, tof); | |
1040 | if(GetReader()->IsPileUpFromEMCal()) fhPtTOFSignalVtxOutBC0PileUp[1]->Fill(pt, tof); | |
1041 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTOFSignalVtxOutBC0PileUp[2]->Fill(pt, tof); | |
1042 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTOFSignalVtxOutBC0PileUp[3]->Fill(pt, tof); | |
1043 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTOFSignalVtxOutBC0PileUp[4]->Fill(pt, tof); | |
1044 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTOFSignalVtxOutBC0PileUp[5]->Fill(pt, tof); | |
1045 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTOFSignalVtxOutBC0PileUp[6]->Fill(pt, tof); | |
1046 | } | |
1047 | else | |
1048 | { | |
1049 | if(GetReader()->IsPileUpFromSPD()) fhPtTOFSignalVtxInBC0PileUp[0]->Fill(pt, tof); | |
1050 | if(GetReader()->IsPileUpFromEMCal()) fhPtTOFSignalVtxInBC0PileUp[1]->Fill(pt, tof); | |
1051 | if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtTOFSignalVtxInBC0PileUp[2]->Fill(pt, tof); | |
1052 | if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtTOFSignalVtxInBC0PileUp[3]->Fill(pt, tof); | |
1053 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtTOFSignalVtxInBC0PileUp[4]->Fill(pt, tof); | |
1054 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtTOFSignalVtxInBC0PileUp[5]->Fill(pt, tof); | |
1055 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtTOFSignalVtxInBC0PileUp[6]->Fill(pt, tof); | |
1056 | } | |
1057 | } | |
1058 | } | |
1059 | } | |
1060 | ||
1061 | //Fill AODParticle after some selection | |
1062 | Double_t mom[3] = {track->Px(),track->Py(),track->Pz()}; | |
1063 | ||
192689a4 | 1064 | Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,"CTS") ; |
1065 | ||
05d0d05d | 1066 | if(GetDebug() > 1) |
52bd777f | 1067 | printf("AliAnaChargedParticles::MakeAnalysisFillAOD() - Track pt %2.2f, eta %2.2f, phi %2.2f in fiducial cut %d\n",pt,eta,phi,in); |
192689a4 | 1068 | |
1069 | //Acceptance selection | |
1070 | if(IsFiducialCutOn() && ! in ) continue ; | |
1071 | ||
1072 | // Momentum selection | |
52bd777f | 1073 | if(pt < GetMinPt() || pt > GetMaxPt()) continue; |
fe9615b9 | 1074 | |
1075 | if(okTOF) fhTOFSignalPtCut->Fill(tof); | |
1076 | else | |
1077 | { | |
52bd777f | 1078 | fhPtTOFStatus0 ->Fill(pt); |
1079 | fhEtaPhiTOFStatus0->Fill(eta,phi); | |
fe9615b9 | 1080 | } |
192689a4 | 1081 | |
8f467228 | 1082 | Bool_t bITSRefit = (status & AliVTrack::kITSrefit) == AliVTrack::kITSrefit; |
1083 | Bool_t bConstrained = kFALSE; | |
41ebe136 | 1084 | if (aodTrack) bConstrained = aodTrack->IsGlobalConstrained(); |
1085 | else if(esdTrack) bConstrained = (!esdTrack->HasPointOnITSLayer(0) && !esdTrack->HasPointOnITSLayer(1)); | |
8f467228 | 1086 | //printf("Track %d, pt %2.2f, eta %2.2f, phi %2.2f, SPDRefit %d, refit %d, dcaCons %2.2f\n", |
52bd777f | 1087 | // i, pt, eta, phi, bConstrained, bITSRefit, dcaCons); |
8f467228 | 1088 | |
1089 | if(bConstrained) | |
1090 | { | |
1091 | if(bITSRefit) | |
1092 | { | |
52bd777f | 1093 | fhPtNoSPDRefit->Fill(pt); |
1094 | if(pt < 2)fhEtaPhiNoSPDRefitPt02->Fill(eta,phi); | |
1095 | if(pt > 3)fhEtaPhiNoSPDRefitPt3 ->Fill(eta,phi); | |
8f467228 | 1096 | |
1097 | if(dcaCons == -999) | |
1098 | { | |
52bd777f | 1099 | fhPtDCANoSPDRefit[0]->Fill(pt, dca[0]); |
1100 | fhPtDCANoSPDRefit[1]->Fill(pt, dca[1]); | |
8f467228 | 1101 | } |
1102 | else | |
52bd777f | 1103 | fhPtDCANoSPDRefit[2]->Fill(pt, dcaCons); |
8f467228 | 1104 | |
1105 | } | |
1106 | else | |
1107 | { | |
52bd777f | 1108 | fhPtNoSPDNoRefit->Fill(pt); |
1109 | if(pt < 2)fhEtaPhiNoSPDNoRefitPt02->Fill(eta,phi); | |
1110 | if(pt > 3)fhEtaPhiNoSPDNoRefitPt3 ->Fill(eta,phi); | |
8f467228 | 1111 | if(dcaCons == -999) |
1112 | { | |
52bd777f | 1113 | fhPtDCANoSPDNoRefit[0]->Fill(pt, dca[0]); |
1114 | fhPtDCANoSPDNoRefit[1]->Fill(pt, dca[1]); | |
8f467228 | 1115 | } |
1116 | else | |
52bd777f | 1117 | fhPtDCANoSPDNoRefit[2]->Fill(pt, dcaCons); |
8f467228 | 1118 | |
1119 | } | |
1120 | } | |
1121 | else | |
1122 | { | |
52bd777f | 1123 | fhPtSPDRefit->Fill(pt); |
1124 | if(pt < 2)fhEtaPhiSPDRefitPt02->Fill(eta,phi); | |
1125 | if(pt > 3)fhEtaPhiSPDRefitPt3 ->Fill(eta,phi); | |
8f467228 | 1126 | if(dcaCons == -999) |
1127 | { | |
52bd777f | 1128 | fhPtDCASPDRefit[0]->Fill(pt, dca[0]); |
1129 | fhPtDCASPDRefit[1]->Fill(pt, dca[1]); | |
8f467228 | 1130 | } |
1131 | else | |
52bd777f | 1132 | fhPtDCASPDRefit[2]->Fill(pt, dcaCons); |
8f467228 | 1133 | } |
52bd777f | 1134 | |
192689a4 | 1135 | // Mixed event |
fe9615b9 | 1136 | if (GetMixedEvent()) |
1137 | { | |
192689a4 | 1138 | evtIndex = GetMixedEvent()->EventIndex(track->GetID()) ; |
fe9615b9 | 1139 | } |
1140 | ||
192689a4 | 1141 | GetVertex(vert,evtIndex); |
1142 | if(TMath::Abs(vert[2])> GetZvertexCut()) return; | |
1143 | ||
1144 | AliAODPWG4Particle tr = AliAODPWG4Particle(mom[0],mom[1],mom[2],0); | |
1145 | tr.SetDetector("CTS"); | |
1146 | tr.SetLabel(track->GetLabel()); | |
1147 | tr.SetTrackLabel(track->GetID(),-1); | |
1148 | tr.SetChargedBit(track->Charge()>0); | |
7cd4e982 | 1149 | |
192689a4 | 1150 | AddAODParticle(tr); |
1151 | ||
477d6cee | 1152 | }//loop |
1153 | ||
1154 | if(GetDebug() > 0) | |
a3aebfff | 1155 | printf("AliAnaChargedParticles::MakeAnalysisFillAOD() - Final aod branch entries %d\n", GetOutputAODBranch()->GetEntriesFast()); |
477d6cee | 1156 | } |
1157 | ||
1158 | //__________________________________________________________________ | |
1159 | void AliAnaChargedParticles::MakeAnalysisFillHistograms() | |
1160 | { | |
1161 | //Do analysis and fill histograms | |
1162 | ||
1163 | //Loop on stored AODParticles | |
1164 | Int_t naod = GetOutputAODBranch()->GetEntriesFast(); | |
05d0d05d | 1165 | |
2244659d | 1166 | fhNtracks->Fill(GetReader()->GetTrackMultiplicity()) ; |
05d0d05d | 1167 | |
1168 | if(GetDebug() > 0) | |
1169 | printf("AliAnaChargedParticles::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod); | |
1170 | ||
52bd777f | 1171 | Float_t pt = 0; |
1172 | Float_t phi = 0; | |
1173 | Float_t eta = 0; | |
fedea415 | 1174 | |
52bd777f | 1175 | for(Int_t iaod = 0; iaod < naod ; iaod++) |
1176 | { | |
1177 | AliAODPWG4Particle* track = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod)); | |
1178 | ||
1179 | pt = track->Pt(); | |
1180 | eta = track->Eta(); | |
1181 | phi = track->Phi(); | |
1182 | ||
1183 | fhPt->Fill(pt); | |
05d0d05d | 1184 | |
52bd777f | 1185 | if(track->GetChargedBit()) |
1186 | { | |
1187 | fhPhiPos ->Fill(pt, phi); | |
1188 | fhEtaPos ->Fill(pt, eta); | |
1189 | fhEtaPhiPos->Fill(eta,phi); | |
05d0d05d | 1190 | } |
52bd777f | 1191 | else |
1192 | { | |
1193 | fhPhiNeg ->Fill(pt, phi); | |
1194 | fhEtaNeg ->Fill(pt, eta); | |
1195 | fhEtaPhiNeg->Fill(eta,phi); | |
05d0d05d | 1196 | } |
477d6cee | 1197 | |
fedea415 | 1198 | if(fFillPileUpHistograms) |
1199 | { | |
52bd777f | 1200 | if(GetReader()->IsPileUpFromSPD()) {fhPtPileUp[0]->Fill(pt);} |
1201 | if(GetReader()->IsPileUpFromEMCal()) {fhPtPileUp[1]->Fill(pt);} | |
1202 | if(GetReader()->IsPileUpFromSPDOrEMCal()) {fhPtPileUp[2]->Fill(pt);} | |
1203 | if(GetReader()->IsPileUpFromSPDAndEMCal()) {fhPtPileUp[3]->Fill(pt);} | |
1204 | if(GetReader()->IsPileUpFromSPDAndNotEMCal()) {fhPtPileUp[4]->Fill(pt);} | |
1205 | if(GetReader()->IsPileUpFromEMCalAndNotSPD()) {fhPtPileUp[5]->Fill(pt);} | |
1206 | if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) {fhPtPileUp[6]->Fill(pt);} | |
fedea415 | 1207 | } |
1208 | ||
1209 | ||
42b156e0 | 1210 | if(IsDataMC()) |
1211 | { | |
727a309a | 1212 | //Play with the MC stack if available |
5025c139 | 1213 | Int_t mompdg = -1; |
52bd777f | 1214 | Int_t label = track->GetLabel(); |
727a309a | 1215 | |
8c805178 | 1216 | if(label >= 0) |
727a309a | 1217 | { |
1218 | if( GetReader()->ReadStack() && label < GetMCStack()->GetNtrack()) | |
1219 | { | |
1220 | TParticle * mom = GetMCStack()->Particle(label); | |
1221 | mompdg =TMath::Abs(mom->GetPdgCode()); | |
1222 | } | |
1223 | else if(GetReader()->ReadAODMCParticles()) | |
1224 | { | |
1225 | AliAODMCParticle * aodmom = 0; | |
1226 | //Get the list of MC particles | |
1227 | aodmom = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(label); | |
1228 | mompdg =TMath::Abs(aodmom->GetPdgCode()); | |
1229 | } | |
1230 | } | |
1231 | ||
1232 | if(mompdg==211 || mompdg==2212 || mompdg==321 || mompdg==11){ | |
1233 | if(TMath::Abs(eta) < 0.8 && phi < 3.145) fhMCRecPt->Fill(pt); | |
1234 | } | |
5025c139 | 1235 | |
42b156e0 | 1236 | if(mompdg==211) |
1237 | { | |
52bd777f | 1238 | fhPtPion ->Fill(pt); |
1239 | fhPhiPion->Fill(pt, phi); | |
1240 | fhEtaPion->Fill(pt, eta); | |
477d6cee | 1241 | } |
42b156e0 | 1242 | else if(mompdg==2212) |
1243 | { | |
52bd777f | 1244 | fhPtProton ->Fill(pt); |
1245 | fhPhiProton->Fill(pt, phi); | |
1246 | fhEtaProton->Fill(pt, eta); | |
477d6cee | 1247 | } |
42b156e0 | 1248 | else if(mompdg==321) |
1249 | { | |
52bd777f | 1250 | fhPtKaon ->Fill(pt); |
1251 | fhPhiKaon->Fill(pt, phi); | |
1252 | fhEtaKaon->Fill(pt, eta); | |
477d6cee | 1253 | } |
42b156e0 | 1254 | else if(mompdg==11) |
1255 | { | |
52bd777f | 1256 | fhPtElectron ->Fill(pt); |
1257 | fhPhiElectron->Fill(pt, phi); | |
1258 | fhEtaElectron->Fill(pt, eta); | |
477d6cee | 1259 | } |
52bd777f | 1260 | else |
1261 | { | |
1262 | fhPtUnknown ->Fill(pt); | |
1263 | fhPhiUnknown->Fill(pt, phi); | |
1264 | fhEtaUnknown->Fill(pt, eta); | |
727a309a | 1265 | } |
477d6cee | 1266 | }//Work with stack also |
f6661bbc | 1267 | |
477d6cee | 1268 | }// aod branch loop |
1269 | ||
727a309a | 1270 | if(IsDataMC()) |
1271 | { | |
1272 | Int_t primpdg = -1; | |
1273 | if(GetReader()->ReadStack()) { | |
1274 | AliStack * stack = GetMCStack(); | |
1275 | if(stack) { | |
1276 | for(Int_t i=0 ; i<stack->GetNtrack(); i++){ | |
1277 | TParticle *prim = stack->Particle(i); | |
1278 | primpdg = TMath::Abs(prim->GetPdgCode()); | |
1279 | if(primpdg == 211 || primpdg == 2212 || primpdg == 321 || primpdg == 11){ | |
1280 | if(prim->IsPrimary() && TMath::Abs(prim->Eta()) < 0.8 && prim->Phi() < 3.145){ | |
1281 | fhMCPt->Fill(prim->Pt()); | |
1282 | fhMCPhi->Fill(prim->Pt(),prim->Phi()); | |
1283 | fhMCEta->Fill(prim->Pt(),prim->Eta()); | |
1284 | } | |
1285 | } | |
1286 | } | |
1287 | } | |
1288 | } | |
1289 | else if(GetReader()->ReadAODMCParticles()){ | |
1290 | TClonesArray * mcparticles = GetReader()->GetAODMCParticles(); | |
1291 | if(mcparticles){ | |
1292 | Int_t nprim = mcparticles->GetEntriesFast(); | |
1293 | for(Int_t i=0; i < nprim; i++){ | |
1294 | AliAODMCParticle * prim = (AliAODMCParticle *) mcparticles->At(i); | |
1295 | primpdg = TMath::Abs(prim->GetPdgCode()); | |
1296 | if(primpdg == 211 || primpdg == 2212 || primpdg == 321 || primpdg == 11){ | |
1297 | if(prim->IsPhysicalPrimary() && TMath::Abs(prim->Eta()) < 0.8 && prim->Phi() < 3.145){ | |
1298 | fhMCPt->Fill(prim->Pt()); | |
1299 | fhMCPhi->Fill(prim->Pt(),prim->Phi()); | |
1300 | fhMCEta->Fill(prim->Pt(),prim->Eta()); | |
1301 | } | |
1302 | } | |
1303 | } | |
1304 | } | |
1305 | } | |
1306 | } | |
1307 | } |