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