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