Better weight function from the improved time slewing correction.
[u/mrichter/AliRoot.git] / PWG1 / AliAnalysisTaskQASym.cxx
CommitLineData
9f9631f3 1#include "TChain.h"
2#include "TTree.h"
3#include "TH1F.h"
4#include "TH2F.h"
1d55ca60 5#include "TH3F.h"
9f9631f3 6#include "TCanvas.h"
7#include "TList.h"
8#include "TParticle.h"
9#include "TParticlePDG.h"
10#include "TProfile.h"
11#include "TNtuple.h"
12#include "TFile.h"
13
14#include "AliAnalysisTask.h"
15#include "AliAnalysisManager.h"
16
17#include "AliESDEvent.h"
e4ab7356 18#include "AliLog.h"
9f9631f3 19#include "AliESDVertex.h"
20#include "AliESDInputHandler.h"
21#include "AliESDtrackCuts.h"
22#include "AliMultiplicity.h"
23
9f9631f3 24#include "AliAnalysisTaskQASym.h"
25#include "AliExternalTrackParam.h"
26#include "AliTrackReference.h"
9f9631f3 27#include "AliHeader.h"
28#include "AliGenEventHeader.h"
29#include "AliGenDPMjetEventHeader.h"
30
1d55ca60 31// Analysis Task for basic QA on the ESD
32
33// Authors: Jan Fiete Grosse-Oetringhaus, Christian Klein-Boesing,
34// Andreas Morsch, Eva Sicking
35
9f9631f3 36ClassImp(AliAnalysisTaskQASym)
37
1d55ca60 38 //________________________________________________________________________
39 AliAnalysisTaskQASym::AliAnalysisTaskQASym(const char *name)
40 : AliAnalysisTaskSE(name)
41 ,fTrackType(0)
2efff183 42 ,fFieldOn(kTRUE)
43 ,fHists(0)
44 ,fHistRECpt(0)
45 ,fEta(0)
46 ,fEtaPhi(0)
47 ,fEtaPt(0)
48 ,fQPt(0)
49 ,fDca(0)
50 ,fqRec(0)
51 ,fsigmaPt(0)
cbac53a7 52
2efff183 53 ,fRecPtPos(0)
54 ,fRecPtNeg(0)
55 ,fRecPhiPos(0)
56 ,fRecPhiNeg(0)
57 ,fRecEtaPos(0)
58 ,fRecEtaNeg(0)
59 ,fRecEtaPtPos(0)
60 ,fRecEtaPtNeg(0)
61 ,fRecDcaPos(0)
62 ,fRecDcaNeg(0)
63 ,fRecDcaNegInv(0)
64 ,fRecDPos(0)
65 ,fRecDNeg(0)
cbac53a7 66
67
2efff183 68 ,fRecQPtPosEta(0)
69 ,fRecQPtNegEta(0)
70 ,fRecPtPosEta(0)
71 ,fRecPtNegEta(0)
72 ,fRecPhiPosEta(0)
73 ,fRecPhiNegEta(0)
74 ,fRecDcaPosEta(0)
75 ,fRecDcaNegEta(0)
76 ,fRecDPosEta(0)
77 ,fRecDNegEta(0)
cbac53a7 78
2efff183 79 ,fRecPtPosVz(0)
80 ,fRecPtNegVz(0)
81 ,fRecEtaPosVz(0)
82 ,fRecEtaNegVz(0)
83 ,fRecPhiPosVz(0)
84 ,fRecPhiNegVz(0)
85 ,fSignedDcaPosVz(0)
86 ,fSignedDcaNegVz(0)
87 ,fRecQPtPosEtaVz(0)
88 ,fRecQPtNegEtaVz(0)
89 ,fRecEtaPtPosVz(0)
90 ,fRecEtaPtNegVz(0)
cbac53a7 91
92
2efff183 93 ,fDeltaPhiAll(0)
94 ,fDeltaPhiLeading(0)
95 ,fDiffDcaD(0)
cbac53a7 96
2efff183 97 ,fPhiRec(0)
98 ,fThetaRec(0)
99 ,fNumber(0)
100 ,fVx(0)
101 ,fVy(0)
102 ,fVz(0)
cbac53a7 103 ,fVertexX(0)
104 ,fVertexY(0)
105 ,fVertexZ(0)
1d55ca60 106 ,test(0)
9f9631f3 107
1d55ca60 108 ,fRecDcaPosPhi(0)
109 ,fRecDcaNegPhi(0)
110 ,fRecPtPosPhi(0)
111 ,fRecPtNegPhi(0)
112 ,fRecEtaPosPhi(0)
113 ,fRecEtaNegPhi(0)
114 ,fRecQPtPhi(0)
115 ,fRecEtaPtPosPhi(0)
116 ,fRecEtaPtNegPhi(0)
117
118 ,fRecPtPosEtaPos(0)
119 ,fRecPtNegEtaPos(0)
120 ,fRecPtPosEtaNeg(0)
121 ,fRecPtNegEtaNeg(0)
122
123 ,fRec1PtPosEtaPos(0)
124 ,fRec1PtNegEtaPos(0)
125 ,fRec1PtPosEtaNeg(0)
126 ,fRec1PtNegEtaNeg(0)
127
128 ,fRecPhiPosEtaPos(0)
129 ,fRecPhiNegEtaPos(0)
130 ,fRecPhiPosEtaNeg(0)
131 ,fRecPhiNegEtaNeg(0)
132
133 ,fRecDcaPosPhiEtaPos(0)
134 ,fRecDcaNegPhiEtaPos(0)
135 ,fRecDcaPosPhiEtaNeg(0)
136 ,fRecDcaNegPhiEtaNeg(0)
98a5f582 137
138 ,fRecDcaPosPtEtaPos(0)
139 ,fRecDcaNegPtEtaPos(0)
140 ,fRecDcaPosPtEtaNeg(0)
141 ,fRecDcaNegPtEtaNeg(0)
142
1d55ca60 143 ,fRecPtPosPhiEtaPos(0)
144 ,fRecPtNegPhiEtaPos(0)
145 ,fRecPtPosPhiEtaNeg(0)
146 ,fRecPtNegPhiEtaNeg(0)
147
148
149 ,fRecDcaPhiPtPosEtaPos(0)
150 ,fRecDcaPhiPtNegEtaPos(0)
151 ,fRecDcaPhiPtPosEtaNeg(0)
152 ,fRecDcaPhiPtNegEtaNeg(0)
153 ,fEtavPt(0)
98a5f582 154 ,fCompareTPCparam(0)
9f9631f3 155
1d55ca60 156
157 ,sdca(0)
158 ,xy(0)
159 ,z(0)
160 ,xvertexcor(0)
161 ,yvertexcor(0)
162
9f9631f3 163 ,fCuts(0)
1d55ca60 164
9f9631f3 165{
1d55ca60 166 // Constructor
9f9631f3 167 for(Int_t i = 0;i<18;++i){
168 fRecPtTpcSector[i] = 0;
169 fRecEtaTpcSector[i] = 0;
170 fSignedDcaTpcSector[i] = 0;
171 fRecQPtTpcSector[i] = 0;
172 fRecEtaPtTpcSector[i] = 0;
173 }
174
175 for(Int_t i = 0;i< 7;++i){
176 fRecPtPosLadder[i] = 0;
177 fRecPtNegLadder[i] = 0;
178 fRecPhiPosLadder[i] = 0;
179 fRecPhiNegLadder[i] = 0;
180 fRecEtaPosLadder[i] = 0;
181 fRecEtaNegLadder[i] = 0;
182 fSignDcaPos[i] = 0;
183 fSignDcaNeg[i] = 0;
184 fSignDcaNegInv[i] = 0;
185 fPtSigmaPos[i] =0;
186 fPtSigmaNeg[i] =0;
187 fqPtRec[i] =0;
188 fDcaSigmaPos[i] =0;
189 fDcaSigmaNeg[i] =0;
190 }
191
192 DefineOutput(1, TList::Class());
193
194
195
196}
197
198
199//________________________________________________________________________
200void AliAnalysisTaskQASym::UserCreateOutputObjects()
201{
202 // Create histograms
203 // Called once
204
1d55ca60 205 Bool_t oldStatus = TH1::AddDirectoryStatus();
206 TH1::AddDirectory(kFALSE);
207
cbac53a7 208 Double_t range = 1.0;
9f9631f3 209 Double_t pt = 20.;
210
211 fHists = new TList();
1d55ca60 212 // test = new TNtuple("test","test",
213 // "pt:phi:theta:x:y:z:charge");
9f9631f3 214 fHistRECpt = new TH1F("fHistRECpt",
215 " p_{T}",
cbac53a7 216 200, 0., pt);
9f9631f3 217 fEta = new TH1F("fEta",
1d55ca60 218 " #eta",
219 200, -2., 2.);
98a5f582 220 fEtavPt = new TH2F("fEtavPt",
221 " #eta -p_{T}",
222 200, -2., 2.,
223 100, 0, 1.5);
224 fCompareTPCparam = new TH2F("fCompareTPCparam",
225 "fCompareTPCparam",
226 100, -1., 1.,100,-5, 5);
227
e4ab7356 228 fEtaPhi = new TH2F("fEtaPhi",
1d55ca60 229 " #eta - #phi",
230 200, -2., 2., 128, 0., 2. * TMath::Pi());
e4ab7356 231
9f9631f3 232 fThetaRec = new TH1F("fThetaRec",
1d55ca60 233 " #theta",
234 180, 0., TMath::Pi());
9f9631f3 235 fPhiRec = new TH1F("fPhiRec",
1d55ca60 236 " #phi",
237 180, 0., 2*TMath::Pi());
9f9631f3 238 fNumber = new TH1F("fNumber",
239 "number of tracks per event",
cbac53a7 240 200, -0.5, 199.5);
9f9631f3 241 fVx = new TH1F("fVx",
cbac53a7 242 "X of first track point",
1d55ca60 243 100, -1., 1.);
9f9631f3 244 fVy = new TH1F("fVy",
cbac53a7 245 "Y of first track point",
1d55ca60 246 100, -1., 1.);
9f9631f3 247 fVz = new TH1F("fVz",
cbac53a7 248 "Z of first track point",
1d55ca60 249 200, -50., 50.);
cbac53a7 250 fVertexX = new TH1F("fVerteX",
251 "X of vertex",
252 100, -1., 1.);
253 fVertexY = new TH1F("fVertexY",
254 "Y of vertex",
255 100, -1., 1.);
256 fVertexZ = new TH1F("fVertexZ",
257 "Z of vertex",
258 200, -50., 50.);
259
9f9631f3 260 fEtaPt = new TH1F("fEtaPt",
1d55ca60 261 " #eta/p_{T} ",
262 100, -1., 1.);
9f9631f3 263
264 fQPt = new TH1F("fQPt",
1d55ca60 265 " charge/p_{T} ",
266 100, -1., 1.);
9f9631f3 267
268 fDca = new TH1F("fDca",
1d55ca60 269 " dca ",
270 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 271
272
273 fqRec = new TH1F("fqRec",
1d55ca60 274 " charge all reconstructed particle",
275 21, -9.5, 10.5);
9f9631f3 276
277 fsigmaPt = new TH1F("fsigmaPt",
1d55ca60 278 "Log_{10}(#sigma_{p_{T}})",
279 200, -4., 8.);
9f9631f3 280
281
282
283
284 //------------
285 for(Int_t ITSlayer_case=0;ITSlayer_case<7;ITSlayer_case++){
286
287 fSignDcaPos[ITSlayer_case] = new TH1F(Form("fSignDcaPos%d", ITSlayer_case),
1d55ca60 288 " Signed dca",
289 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 290 fSignDcaPos[ITSlayer_case]->GetXaxis()->SetTitle("dca");
291 fSignDcaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
292
293
294 fSignDcaNeg[ITSlayer_case] = new TH1F(Form("fSignDcaNeg%d", ITSlayer_case),
1d55ca60 295 " Signed dcas",
296 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 297 fSignDcaNeg[ITSlayer_case]->GetXaxis()->SetTitle("dca");
298 fSignDcaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
299
300 fSignDcaNegInv[ITSlayer_case] = new TH1F(Form("fSignDcaNegInv%d", ITSlayer_case),
1d55ca60 301 " inverse Signed dca ",
302 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 303 fSignDcaNegInv[ITSlayer_case]->GetXaxis()->SetTitle("-dca");
304 fSignDcaNegInv[ITSlayer_case]->GetYaxis()->SetTitle("");
305
306
307
308
309 fPtSigmaPos[ITSlayer_case] = new TH1F(Form("fPtSigmaPos%d", ITSlayer_case),
1d55ca60 310 " #sigma_{pT} ",
311 208, -4., 8.);
9f9631f3 312 fPtSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
313 fPtSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
314
315
316 fPtSigmaNeg[ITSlayer_case] = new TH1F(Form("fPtSigmaNeg%d",ITSlayer_case),
1d55ca60 317 " #sigma_{pT}",
318 208, -4., 8.);
9f9631f3 319 fPtSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
320 fPtSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
321
322
323
324
325
326 fqPtRec[ITSlayer_case] = new TH1F(Form("fqPtRec%d",ITSlayer_case),
1d55ca60 327 "q/ p_{T}",
328 200, -100., 100.);
9f9631f3 329 fqPtRec[ITSlayer_case]->GetXaxis()->SetTitle("q_{tr}/p_{T, tr} (GeV/c)");
330 fqPtRec[ITSlayer_case]->GetYaxis()->SetTitle("");
331
332
333
334
335
336 fDcaSigmaPos[ITSlayer_case] = new TH2F(Form("fDcaSigmaPos%d", ITSlayer_case),
1d55ca60 337 " p_{T} shift vs #sigma_{pT} ",
338 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9),200, -4., 4. );
9f9631f3 339 fDcaSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA)");
340 fDcaSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
341
342
343 fDcaSigmaNeg[ITSlayer_case] = new TH2F(Form("fDcaSigmaNeg%d", ITSlayer_case),
1d55ca60 344 " p_{T} shift vs #sigma_{pT} ",
345 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9),200, -4., 4. );
9f9631f3 346 fDcaSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA");
347 fDcaSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
1d55ca60 348
349
2efff183 350 }
9f9631f3 351
352
353
1d55ca60 354 // YIELDs---------- positive and negative particles
9f9631f3 355
1d55ca60 356 fRecPtPos = new TH1F("fRecPtPos",
357 " p_{T}",
358 100, 0.,pt);
359 fRecPtPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
360 fRecPtNeg = new TH1F("fRecPtNeg",
361 " p_{T} ",
362 100, 0., pt);
363 fRecPtNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
9f9631f3 364
365
1d55ca60 366 fRecPhiPos = new TH1F("fRecPhiPos",
367 "#phi",
368 361, 0., 360.);
369 fRecPhiPos->GetXaxis()->SetTitle("#phi (deg)");
9f9631f3 370
1d55ca60 371 fRecPhiNeg = new TH1F("fRecPhiNeg",
372 "#phi ",
373 361, 0., 360.);
374 fRecPhiNeg->GetXaxis()->SetTitle("#phi (deg)");
9f9631f3 375
1d55ca60 376 fRecEtaPos = new TH1F("fRecEtaPos",
377 "#eta",
378 200, -2., 2.);
379 fRecEtaPos->GetXaxis()->SetTitle("#eta");
9f9631f3 380
1d55ca60 381 fRecEtaNeg = new TH1F("fRecEtaNeg",
382 "#eta",
383 200, -2., 2.);
384 fRecEtaNeg->GetXaxis()->SetTitle("#eta");
385
386 fRecEtaPtPos = new TH1F("fRecEtaPtPos",
387 "#eta/p_{T}",
388 200, -0.1, .1);
389 fRecEtaPtPos->GetXaxis()->SetTitle("#eta/p_{T}");
390
391 fRecEtaPtNeg = new TH1F("fRecEtaPtNeg",
392 "#eta/p_{T}",
393 200, -.1, .1);
394 fRecEtaPtNeg->GetXaxis()->SetTitle("#eta/p_{T}");
395
396 fRecDcaPos = new TH1F("fRecDcaPos",
397 " dca",
398 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
399 fRecDcaPos->GetXaxis()->SetTitle("dca (cm)");
400 fRecDcaNeg = new TH1F("fRecDcaNeg",
401 " dca",
402 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
403 fRecDcaNeg->GetXaxis()->SetTitle("dca (cm)");
404
405 fRecDcaNegInv = new TH1F("fRecDcaNegInv",
406 " dca",
407 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
408 fRecDcaNegInv->GetXaxis()->SetTitle("dca (cm)");
409
410
411 fRecDPos = new TH1F("fRecDPos",
412 " d",
413 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
414 fRecDPos->GetXaxis()->SetTitle("d (cm)");
415 fRecDNeg = new TH1F("fRecDNeg",
416 "d",
417 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
418 fRecDNeg->GetXaxis()->SetTitle("d (cm)");
419
420
421 // YIELDs ---------------- positive and negative eta
9f9631f3 422
423
1d55ca60 424 fRecQPtPosEta = new TH1F("fRecQPtPosEta",
425 "q/p_{T}",
426 200, -0.5, 0.5);
427 fRecQPtPosEta->GetXaxis()->SetTitle("q/p_{T} ");
428
429 fRecQPtNegEta = new TH1F("fRecQPtNegEta",
430 "q/p_{T}",
431 200, -0.5, 0.5);
432 fRecQPtNegEta->GetXaxis()->SetTitle("q/p_{T}");
9f9631f3 433
1d55ca60 434 fRecPtPosEta = new TH1F("fRecPtPosEta",
435 " p_{T} ",
436 100, 0., pt);
437 fRecPtPosEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
438
439 fRecPtNegEta = new TH1F("fRecPtNegEta",
440 " p_{T}",
441 100, 0., pt);
442 fRecPtNegEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
9f9631f3 443
1d55ca60 444 fRecPhiPosEta = new TH1F("fRecPhiPosEta",
445 "#phi",
446 361, 0., 360);
447 fRecPhiPosEta->GetXaxis()->SetTitle("#phi (deg)");
448
449 fRecPhiNegEta = new TH1F("fRecPhiNegEta",
450 "#phi ",
451 361, 0, 360);
452 fRecPhiNegEta->GetXaxis()->SetTitle("#phi (deg)");
453
454 fRecDcaPosEta = new TH1F("fRecDcaPosEta",
455 " dca ",
456 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
457 fRecDcaPosEta->GetXaxis()->SetTitle("dca (cm)");
458 fRecDcaNegEta = new TH1F("fRecDcaNegEta",
459 " dca",
460 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
461 fRecDcaNegEta->GetXaxis()->SetTitle("dca (cm)");
462
463 fRecDPosEta = new TH1F("fRecDPosEta",
464 " d",
465 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
466 fRecDPosEta->GetXaxis()->SetTitle("d (cm)");
467 fRecDNegEta = new TH1F("fRecDNegEta",
9f9631f3 468 "d",
469 100, -5., 5.);
1d55ca60 470 fRecDNegEta->GetXaxis()->SetTitle("d (cm)");
471
472 fRecDcaPosPhi = new TH2F("fRecDcaPosPhi",
473 " dca vs. phi",
474 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
475 fRecDcaPosPhi->GetXaxis()->SetTitle("dca (cm)");
476 fRecDcaPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
477 fRecDcaNegPhi = new TH2F("fRecDcaNegPhi",
478 " dca vs. phi",
479 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
480 fRecDcaNegPhi->GetXaxis()->SetTitle("dca (cm)");
481 fRecDcaNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
482
483 fRecPtPosPhi = new TH2F("fRecPtPosPhi",
484 " log(p_T) vs. phi",
485 100, -2.5, 2., 180, 0, TMath::Pi()*2);
486 fRecPtPosPhi->GetXaxis()->SetTitle("log_{10}(p_{T})");
487 fRecPtPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
488 fRecPtNegPhi = new TH2F("fRecPtNegPhi",
489 " log(p_T) vs. phi",
490 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
491 fRecPtNegPhi->GetXaxis()->SetTitle("log_{10}(p_{T})");
492 fRecPtNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
493
494 fRecEtaPosPhi = new TH2F("fRecEtaPosPhi",
495 " eta vs. phi",
496 100, -1.5, 1.5, 180, 0, TMath::Pi()*2);
497 fRecEtaPosPhi->GetXaxis()->SetTitle("#eta");
498 fRecEtaPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
499 fRecEtaNegPhi = new TH2F("fRecEtaNegPhi",
500 " eta vs. phi",
501 100, -1.5, 1.5, 180, 0, TMath::Pi()*2);
502 fRecEtaNegPhi->GetXaxis()->SetTitle("#eta");
503 fRecEtaNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
504
505 fRecQPtPhi = new TH2F("fRecQPtPhi",
506 " charge/p_T vs. phi",
507 100,-1. , 1., 180, 0, TMath::Pi()*2);
508 fRecQPtPhi->GetXaxis()->SetTitle("charge/p_{T}");
509 fRecQPtPhi->GetYaxis()->SetTitle("#phi (rad.)");
510
511 fRecEtaPtPosPhi = new TH2F("fRecEtaPtPosPhi",
512 " eta/p_T vs. phi",
513 100, -5, 5., 180, 0, TMath::Pi()*2);
514 fRecEtaPtPosPhi->GetXaxis()->SetTitle("#eta/p_{T}");
515 fRecEtaPtPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
516 fRecEtaPtNegPhi = new TH2F("fRecEtaPtNegPhi",
517 " eta/p_T vs. phi",
518 100,-5 , 5., 180, 0, TMath::Pi()*2);
519 fRecEtaPtNegPhi->GetXaxis()->SetTitle("#eta/p_{T}");
520 fRecEtaPtNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
521
522
523
524
525
526 fRecDcaPosPhiEtaPos = new TH2F("fRecDcaPosPhiEtaPos",
527 " dca vs. phi",
528 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
529 fRecDcaPosPhiEtaPos->GetXaxis()->SetTitle("dca (cm)");
530 fRecDcaPosPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
531 fRecDcaNegPhiEtaPos = new TH2F("fRecDcaNegPhiEtaPos",
532 " dca vs. phi",
533 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
534 fRecDcaNegPhiEtaPos->GetXaxis()->SetTitle("dca (cm)");
535 fRecDcaNegPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
536
537 fRecPtPosPhiEtaPos = new TH2F("fRecPtPosPhiEtaPos",
538 " log(p_T) vs. phi",
539 100, -2.5, 2., 180, 0, TMath::Pi()*2);
540 fRecPtPosPhiEtaPos->GetXaxis()->SetTitle("log_{10}(p_{T})");
541 fRecPtPosPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
542 fRecPtNegPhiEtaPos = new TH2F("fRecPtNegPhiEtaPos",
543 " log(p_T) vs. phi",
544 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
545 fRecPtNegPhiEtaPos->GetXaxis()->SetTitle("log_{10}(p_{T})");
546 fRecPtNegPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
547
548
549 fRecDcaPosPhiEtaNeg = new TH2F("fRecDcaPosPhiEtaNeg",
550 " dca vs. phi",
551 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
552 fRecDcaPosPhiEtaNeg->GetXaxis()->SetTitle("dca (cm)");
553 fRecDcaPosPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
554 fRecDcaNegPhiEtaNeg = new TH2F("fRecDcaNegPhiEtaNeg",
555 " dca vs. phi",
556 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
557 fRecDcaNegPhiEtaNeg->GetXaxis()->SetTitle("dca (cm)");
558 fRecDcaNegPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
559
560 fRecPtPosPhiEtaNeg = new TH2F("fRecPtPosPhiEtaNeg",
561 " log(p_T) vs. phi",
562 100, -2.5, 2., 180, 0, TMath::Pi()*2);
563 fRecPtPosPhiEtaNeg->GetXaxis()->SetTitle("log_{10}(p_{T})");
564 fRecPtPosPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
565 fRecPtNegPhiEtaNeg = new TH2F("fRecPtNegPhiEtaNeg",
566 " log(p_T) vs. phi",
567 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
568 fRecPtNegPhiEtaNeg->GetXaxis()->SetTitle("log_{10}(p_{T})");
569 fRecPtNegPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
98a5f582 570
571 //new
572 fRecDcaPosPtEtaPos = new TH2F("fRecDcaPosPtEtaPos",
573 " dca vs. pt",
574 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
575 fRecDcaPosPtEtaPos->GetXaxis()->SetTitle("dca (cm)");
576 fRecDcaPosPtEtaPos->GetYaxis()->SetTitle("log_{10}(p_{T})");
577
578 fRecDcaPosPtEtaNeg = new TH2F("fRecDcaPosPtEtaNeg",
579 " dca vs. pt",
580 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
581 fRecDcaPosPtEtaNeg->GetXaxis()->SetTitle("dca (cm)");
582 fRecDcaPosPtEtaNeg->GetYaxis()->SetTitle("log_{10}(p_{T})");
583
584 fRecDcaNegPtEtaPos = new TH2F("fRecDcaNegPtEtaPos",
585 " dca vs. pt",
586 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
587 fRecDcaNegPtEtaPos->GetXaxis()->SetTitle("dca (cm)");
588 fRecDcaNegPtEtaPos->GetYaxis()->SetTitle("log_{10}(p_{T})");
589
590 fRecDcaNegPtEtaNeg = new TH2F("fRecDcaNegPtEtaNeg",
591 " dca vs. pt",
592 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
593 fRecDcaNegPtEtaNeg->GetXaxis()->SetTitle("dca (cm)");
594 fRecDcaNegPtEtaNeg->GetYaxis()->SetTitle("log_{10}(p_{T})");
595
1d55ca60 596
9f9631f3 597
1d55ca60 598 // YIELDs ---------------- for TPC sectors
599 for(Int_t sector=0; sector<18;sector++){
9f9631f3 600
601
1d55ca60 602 fRecPtTpcSector[sector] = new TH1F(Form("fRecPtTpcSector%02d",sector),
603 Form("p_{T} distribution: TPC sector %d",
604 sector),100, 0., pt);
605 fRecPtTpcSector[sector]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
606
607 fRecEtaTpcSector[sector] = new TH1F(Form("fRecEtaTpcSector%02d",sector),
608 Form("#eta distribution: TPC sector %d",
609 sector),200, -2., 2.);
610 fRecEtaTpcSector[sector]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
611
612
613 fSignedDcaTpcSector[sector] = new TH1F(Form("fSignedDcaTpcSector%02d",sector),
614 Form("dca distribution: TPC sector %d",
615 sector),200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9) );
616 fSignedDcaTpcSector[sector]->GetXaxis()->SetTitle("dca");
617
618 fRecQPtTpcSector[sector] = new TH1F(Form("fRecQPtTpcSector%02d",sector),
619 Form("Q/ p_{T} distribution: TPC sector %d",
620 sector),100, -1., 1.);
621 fRecQPtTpcSector[sector]->GetXaxis()->SetTitle("Q/p_{T} (GeV/c)");
622
623 fRecEtaPtTpcSector[sector] = new TH1F(Form("fRecEtaPtTpcSector%02d",sector),
624 Form("#eta/ p_{T} distribution: TPC sector %d",
625 sector),100, -1., 1.);
626 fRecEtaPtTpcSector[sector]->GetXaxis()->SetTitle("#eta/p_{T} (GeV/c)");
627
628 }
629 // YIELDS ITS ladder
630 for(Int_t i=0;i<7;i++){
631 fRecPtPosLadder[i] = new TH1F(Form("fRecPtPosLadder%d", i),
632 " p_{T} distribution",
633 100, 0., pt);
634 fRecPtPosLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
635 fRecPtNegLadder[i] = new TH1F(Form("fRecPtNegLadder%d",i),
636 " p_{T} distribution ",
637 100, 0., pt);
638 fRecPtNegLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
639
640
641 fRecPhiPosLadder[i] = new TH1F(Form("fRecPhiPosLadder%d",i),
642 "#phi distribution: all pos eta",
643 361, 0., 360);
644 fRecPhiPosLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
645
646 fRecPhiNegLadder[i] = new TH1F(Form("fRecPhiNegLadder%d", i),
647 "#phi distribution: all neg eta",
648 361, 0, 360);
649 fRecPhiNegLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
650
651
652
653 fRecEtaPosLadder[i] = new TH1F(Form("fRecEtaPosLadder%d",i),
654 "#eta distribution",
655 200, -2., 2.);
656 fRecEtaPosLadder[i]->GetXaxis()->SetTitle("#eta)");
657
658 fRecEtaNegLadder[i] = new TH1F(Form("fRecEtaNegLadder%d", i),
659 "#eta distribution",
660 200, -2., 2.);
661 fRecEtaNegLadder[i]->GetXaxis()->SetTitle("#eta");
662 }
663
664 Double_t vzmax = 15;
665
666 fRecPtPosVz = new TH2F("fRecPtPosVz",
667 "p_{T} distribution vs Vz()",
668 100, -1., 2., 200,-vzmax,vzmax);
669 fRecPtPosVz->GetXaxis()->SetTitle("log_{10}(p_{T})");
9f9631f3 670
1d55ca60 671 fRecPtNegVz = new TH2F("fRecPtNegVz",
672 "p_{T} distribution vs Vz()",
673 100, -1., 2.,200,-vzmax,vzmax);
674 fRecPtNegVz->GetXaxis()->SetTitle("Log_{10}(p_{T})");
9f9631f3 675
676
1d55ca60 677 fRecEtaPosVz= new TH2F("fRecEtaPosVz",
678 "#eta distribution vs Vz()",
679 100, -2., 2., 200,-vzmax,vzmax);
680 fRecEtaPosVz->GetXaxis()->SetTitle("#eta");
681 fRecEtaNegVz = new TH2F("fRecEtaNegVz",
9f9631f3 682 "#eta distribution vs Vz()",
1d55ca60 683 100, -2., 2.,200,-vzmax,vzmax);
684 fRecEtaNegVz->GetXaxis()->SetTitle("#eta");
685
686 fRecPhiPosVz= new TH2F("fRecPhiPosVz",
687 "#eta distribution vs Vz()",
688 361, 0., 360., 200,-vzmax,vzmax);
689 fRecPhiPosVz->GetXaxis()->SetTitle("#phi (deg)");
690 fRecPhiNegVz = new TH2F("fRecPhiNegVz",
691 "dca vs Vz()",
692 361, 0., 360.,200,-vzmax,vzmax);
693 fRecPhiNegVz->GetXaxis()->SetTitle("#phi (deg)");
694
695 fSignedDcaPosVz= new TH2F("fSignedDcaPosVz",
696 "#eta distribution vs Vz()",
697 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200,-vzmax,vzmax);
698 fSignedDcaPosVz->GetXaxis()->SetTitle("dca (cm)");
699 fSignedDcaNegVz = new TH2F("fSignedDcaNegVz",
700 "dca vs Vz()",
701 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9),200,-vzmax,vzmax);
702 fSignedDcaNegVz->GetXaxis()->SetTitle("dca (cm)");
703
704 fRecQPtPosEtaVz= new TH2F("fRecQPtPosEtaVz",
705 " Q/p_{T} distribution vs Vz()",
706 100, -1., 1., 200,-vzmax,vzmax);
707 fRecQPtPosEtaVz->GetXaxis()->SetTitle("Q/p_{T}");
708 fRecQPtNegEtaVz = new TH2F("fRecQPtNegEtaVz",
709 " Q/p_{T} distribution vs Vz()",
710 100, -1., 1.,200,-vzmax,vzmax);
711 fRecQPtNegEtaVz->GetXaxis()->SetTitle("Q/p_{T}");
9f9631f3 712
713
1d55ca60 714 fRecEtaPtPosVz= new TH2F("fRecEtaPtPosVz",
715 " #eta/p_{T} distribution vs Vz()",
716 100, -1., 1., 200,-vzmax,vzmax);
717 fRecEtaPtPosVz->GetXaxis()->SetTitle("#eta/p_{T");
718 fRecEtaPtNegVz = new TH2F("fRecEtaPtNegVz",
719 " #eta/p_{T} distribution vs Vz()",
720 100, -1., 1.,200,-vzmax,vzmax);
721 fRecEtaPtNegVz->GetXaxis()->SetTitle("#eta/p_{T}");
722
723 //new
724 fDeltaPhiAll = new TH1F("fDeltaPhiAll",
725 " #Delta #phi",200,-360,360);
726 fDeltaPhiAll->GetXaxis()->SetTitle("#Delta #phi");
727
728
729 fDeltaPhiLeading = new TH2F("fDeltaPhiLeading",
730 " #Delta #phi",361,-360,360, 361,0, 360);
731 fDeltaPhiLeading->GetXaxis()->SetTitle("#Delta #phi (deg.)");
732 fDeltaPhiLeading->GetYaxis()->SetTitle("#phi_{leading particle} (deg.)");
733
734 fDiffDcaD = new TH1F("fDiffDcaD",
735 "dca-d",
736 200, -1., 1.);
737
738
739 fRecPtPosEtaPos = new TH1F("fRecPtPosEtaPos",
740 "p_{T} distribution",100,0,pt);
741 fRecPtPosEtaPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
742
743 fRecPtNegEtaPos = new TH1F("fRecPtNegEtaPos",
744 "p_{T} distribution",100,0,pt);
745 fRecPtNegEtaPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
746
747 fRecPtPosEtaNeg = new TH1F("fRecPtPosEtaNeg",
748 "p_{T} distribution",100,0,pt);
749 fRecPtPosEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
750
751 fRecPtNegEtaNeg = new TH1F("fRecPtNegEtaNeg",
752 "p_{T} distribution",100,0,pt);
753 fRecPtNegEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
754
755
756
757 fRec1PtPosEtaPos = new TH1F("fRec1PtPosEtaPos",
758 "1/p_{T} distribution",100,0,0.5);
759 fRec1PtPosEtaPos->GetXaxis()->SetTitle("p_{T} (c/GeV)");
760
761 fRec1PtNegEtaPos = new TH1F("fRec1PtNegEtaPos",
762 "1/p_{T} distribution",100,0,0.5);
763 fRec1PtNegEtaPos->GetXaxis()->SetTitle("p_{T} (c/GeV)");
764
765 fRec1PtPosEtaNeg = new TH1F("fRec1PtPosEtaNeg",
766 "1/p_{T} distribution",100,0,0.5);
767 fRec1PtPosEtaNeg->GetXaxis()->SetTitle("p_{T} (c/GeV)");
768
769 fRec1PtNegEtaNeg = new TH1F("fRec1PtNegEtaNeg",
770 "1/p_{T} distribution",100,0,0.5);
771 fRec1PtNegEtaNeg->GetXaxis()->SetTitle("1/p_{T} (c/GeV)");
772
773
774
775 fRecPhiPosEtaPos = new TH1F("fRecPhiPosEtaPos",
776 "#phi",180,0,2*TMath::Pi());
777 fRecPhiPosEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
778
779 fRecPhiNegEtaPos = new TH1F("fRecPhiNegEtaPos",
780 "#phi",180,0,2*TMath::Pi());
781 fRecPhiNegEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
782
783 fRecPhiPosEtaNeg = new TH1F("fRecPhiPosEtaNeg",
784 "#phi",180,0,2*TMath::Pi());
785 fRecPhiPosEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
786
787 fRecPhiNegEtaNeg = new TH1F("fRecPhiNegEtaNeg",
788 "#phi",180,0,2*TMath::Pi());
789 fRecPhiNegEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
790
791
792
793 fRecDcaPhiPtPosEtaPos = new TH3F("fRecDcaPhiPtPosEtaPos",
794 "#phi- p_{T} - DCA",
795 180,0,2*TMath::Pi(),
796 100,0,pt,
797 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
798 fRecDcaPhiPtPosEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
799 fRecDcaPhiPtPosEtaPos->GetYaxis()->SetTitle("p_{T} (GeV/c)");
800 fRecDcaPhiPtPosEtaPos->GetZaxis()->SetTitle("dca (cm)");
801
802 fRecDcaPhiPtPosEtaNeg = new TH3F("fRecDcaPhiPtPosEtaNeg",
803 "#phi- p_{T} - DCA",
804 180,0,2*TMath::Pi(),
805 100,0,pt,
806 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
807 fRecDcaPhiPtPosEtaNeg->GetZaxis()->SetTitle("dca (cm)");
808 fRecDcaPhiPtPosEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
809 fRecDcaPhiPtPosEtaNeg->GetYaxis()->SetTitle("p_{T} (GeV/c)");
810
811 fRecDcaPhiPtNegEtaPos = new TH3F("fRecDcaPhiPtNegEtaPos",
812 "#phi- p_{T} - DCA",
813 180,0,2*TMath::Pi(),
814 100,0,pt,
815 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
816 fRecDcaPhiPtNegEtaPos->GetZaxis()->SetTitle("dca (cm)");
817 fRecDcaPhiPtNegEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
818 fRecDcaPhiPtNegEtaPos->GetYaxis()->SetTitle("p_{T} (GeV/c)");
819
820 fRecDcaPhiPtNegEtaNeg = new TH3F("fRecDcaPhiPtNegEtaNeg",
821 "#phi- p_{T} - DCA",
822 180,0,2*TMath::Pi(),
823 100,0,pt,
824 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
825 fRecDcaPhiPtNegEtaNeg->GetZaxis()->SetTitle("dca (cm)");
826 fRecDcaPhiPtNegEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
827 fRecDcaPhiPtNegEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
828
829
830
9f9631f3 831
832 fHists->SetOwner();
833
9f9631f3 834 fHists->Add(fHistRECpt);
835 fHists->Add(fEta);
1d55ca60 836 fHists->Add(fEtavPt);
98a5f582 837 fHists->Add(fCompareTPCparam);
e4ab7356 838 fHists->Add(fEtaPhi);
9f9631f3 839 fHists->Add(fThetaRec);
840 fHists->Add(fPhiRec);
841 fHists->Add(fNumber);
842 fHists->Add(fVx);
843 fHists->Add(fVy);
844 fHists->Add(fVz);
cbac53a7 845 fHists->Add(fVertexX);
846 fHists->Add(fVertexY);
847 fHists->Add(fVertexZ);
9f9631f3 848
849 fHists->Add(fEtaPt);
850 fHists->Add(fQPt);
851 fHists->Add(fDca);
852
853 fHists->Add(fDeltaPhiAll);
854 fHists->Add(fDeltaPhiLeading);
855 fHists->Add(fDiffDcaD);
856
857 fHists->Add(fqRec);
858 fHists->Add(fsigmaPt);
859
860 fHists->Add(fRecPtPos);
861 fHists->Add(fRecPtNeg);
862 fHists->Add(fRecPhiPos);
863 fHists->Add(fRecPhiNeg);
864 fHists->Add(fRecEtaPos);
865 fHists->Add(fRecEtaNeg);
866 fHists->Add(fRecEtaPtPos);
867 fHists->Add(fRecEtaPtNeg);
868 fHists->Add(fRecDcaPos);
869 fHists->Add(fRecDcaNeg);
870 fHists->Add(fRecDcaNegInv);
871 fHists->Add(fRecDPos);
872 fHists->Add(fRecDNeg);
873
874
875 fHists->Add(fRecQPtPosEta);
876 fHists->Add(fRecQPtNegEta);
877 fHists->Add(fRecPtPosEta);
878 fHists->Add(fRecPtNegEta);
879 fHists->Add(fRecPhiPosEta);
880 fHists->Add(fRecPhiNegEta);
881 fHists->Add(fRecDcaPosEta);
882 fHists->Add(fRecDcaNegEta);
883 fHists->Add(fRecDPosEta);
884 fHists->Add(fRecDNegEta);
885
886
887 for(Int_t i=0;i<18;i++){
888 fHists->Add(fRecPtTpcSector[i]);
889 fHists->Add(fRecEtaTpcSector[i]);
890 fHists->Add(fSignedDcaTpcSector[i]);
891 fHists->Add(fRecQPtTpcSector[i]);
892 fHists->Add(fRecEtaPtTpcSector[i]);
893 }
894
895 for(Int_t i=0;i<7;i++){
896 fHists->Add(fRecPtPosLadder[i]);
897 fHists->Add(fRecPtNegLadder[i]);
898 fHists->Add(fRecPhiPosLadder[i]);
899 fHists->Add(fRecPhiNegLadder[i]);
900 fHists->Add(fRecEtaPosLadder[i]);
901 fHists->Add(fRecEtaNegLadder[i]);
902 }
903
904 fHists->Add(fRecPtPosVz);
905 fHists->Add(fRecPtNegVz);
906 fHists->Add(fRecEtaPosVz);
907 fHists->Add(fRecEtaNegVz);
908 fHists->Add(fRecPhiPosVz);
909 fHists->Add(fRecPhiNegVz);
910 fHists->Add(fSignedDcaPosVz);
911 fHists->Add(fSignedDcaNegVz);
912 fHists->Add(fRecQPtPosEtaVz);
913 fHists->Add(fRecQPtNegEtaVz);
914 fHists->Add(fRecEtaPtPosVz);
915 fHists->Add(fRecEtaPtNegVz);
916
917
918 for(Int_t i=0;i<7;i++){
919 fHists->Add(fSignDcaPos[i]);
920 fHists->Add(fSignDcaNeg[i]);
921 fHists->Add(fSignDcaNegInv[i]);
922
923 fHists->Add(fPtSigmaPos[i]);
924 fHists->Add(fPtSigmaNeg[i]);
925 fHists->Add(fqPtRec[i]);
926
927 fHists->Add(fDcaSigmaPos[i]);
928 fHists->Add(fDcaSigmaNeg[i]);
929
930
931 }
932
1d55ca60 933 fHists->Add(fRecDcaPosPhi);
934 fHists->Add(fRecDcaNegPhi);
935 fHists->Add(fRecPtPosPhi);
936 fHists->Add(fRecPtNegPhi);
937 fHists->Add(fRecEtaPosPhi);
938 fHists->Add(fRecEtaNegPhi);
939 fHists->Add(fRecQPtPhi);
940 fHists->Add(fRecEtaPtPosPhi);
941 fHists->Add(fRecEtaPtNegPhi);
942
943 fHists->Add(fRecPtPosEtaPos);
944 fHists->Add(fRecPtNegEtaPos);
945 fHists->Add(fRecPtPosEtaNeg);
946 fHists->Add(fRecPtNegEtaNeg);
947
948 fHists->Add(fRec1PtPosEtaPos);
949 fHists->Add(fRec1PtNegEtaPos);
950 fHists->Add(fRec1PtPosEtaNeg);
951 fHists->Add(fRec1PtNegEtaNeg);
952
953
954 fHists->Add(fRecPhiPosEtaPos);
955 fHists->Add(fRecPhiNegEtaPos);
956 fHists->Add(fRecPhiPosEtaNeg);
957 fHists->Add(fRecPhiNegEtaNeg);
958
959 fHists->Add(fRecDcaPosPhiEtaPos);
960 fHists->Add(fRecDcaNegPhiEtaPos);
961 fHists->Add(fRecPtPosPhiEtaPos);
962 fHists->Add(fRecPtNegPhiEtaPos);
963 fHists->Add(fRecDcaPosPhiEtaNeg);
964 fHists->Add(fRecDcaNegPhiEtaNeg);
965 fHists->Add(fRecPtPosPhiEtaNeg);
966 fHists->Add(fRecPtNegPhiEtaNeg);
967
98a5f582 968 fHists->Add(fRecDcaPosPtEtaPos);
969 fHists->Add(fRecDcaNegPtEtaPos);
970 fHists->Add(fRecDcaPosPtEtaNeg);
971 fHists->Add(fRecDcaNegPtEtaNeg);
972
1d55ca60 973 fHists->Add(fRecDcaPhiPtPosEtaPos);
974 fHists->Add(fRecDcaPhiPtPosEtaNeg);
975 fHists->Add(fRecDcaPhiPtNegEtaPos);
976 fHists->Add(fRecDcaPhiPtNegEtaNeg);
9f9631f3 977
978
1d55ca60 979
980
981
982// for (Int_t i=0; i<fHists->GetEntries(); ++i) {
983// TH1 *h1 = dynamic_cast<TH1*>(fHists->At(i));
984// if (h1){
985// // Printf("%s ",h1->GetName());
986// h1->Sumw2();
987// }
988// }
989 // BKC
990
991 TH1::AddDirectory(oldStatus);
9f9631f3 992}
993
994//__________________________________________________________
995
996void AliAnalysisTaskQASym::UserExec(Option_t *)
997{
998 AliVEvent *event = InputEvent();
999 if (!event) {
1d55ca60 1000 Printf("ERROR: Could not retrieve event");
1001 return;
9f9631f3 1002 }
1003
1004
1005 if(Entry()==0){
1006 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
1007 if(esd){
1008 Printf("We are reading from ESD");
1009 }
1010
1011 }
1012
1d55ca60 1013
1014
1015 if(fDebug>1)Printf("There are %d tracks in this event", event->GetNumberOfTracks());
1016
9f9631f3 1017
50dbca26 1018 Int_t leadingTrack = 0;
1019 Float_t leadingEnergy = -20.;
1020 Float_t leadingPhi = 0;//TMath::Pi();
9f9631f3 1021
1022
1023 if(event->GetNumberOfTracks()!=0) fNumber->Fill(event->GetNumberOfTracks());
1024
e4ab7356 1025 const AliVVertex* vertex = event->GetPrimaryVertex();
cbac53a7 1026 Float_t vx = vertex->GetX();
1027 Float_t vy = vertex->GetY();
e4ab7356 1028 Float_t vz = vertex->GetZ();
cbac53a7 1029
1030 fVertexX->Fill(vx);
1031 fVertexY->Fill(vy);
1032 fVertexZ->Fill(vz);
1033
e4ab7356 1034 if (TMath::Abs(vz) > 10.) return;
1035
1fcb92ef 1036 AliESDtrack *tpcP = 0x0;
1037
9f9631f3 1038 for (Int_t iTrack = 0; iTrack < event->GetNumberOfTracks(); iTrack++) {
1039
1fcb92ef 1040 //prevent mem leak for TPConly track
1041 if(fTrackType==2&&tpcP){
1042 delete tpcP;
1043 tpcP = 0;
1044 }
9f9631f3 1045
1046 AliVParticle *track = event->GetTrack(iTrack);
1047 AliESDtrack *esdtrack = dynamic_cast<AliESDtrack*>(track);
1d55ca60 1048 esdtrack->PropagateToDCA(event->GetPrimaryVertex(),
1049 event->GetMagneticField(), 10000.);
1050
9f9631f3 1051 if (!track) {
1052 Printf("ERROR: Could not receive track %d", iTrack);
1053 continue;
1054 }
1d55ca60 1055 //__________
1056 // run Task for global tracks or ITS tracks or TPC tracks
1d55ca60 1057 const AliExternalTrackParam *tpcPin = 0x0;
1058 Double_t phiIn=0;
cbac53a7 1059
1d55ca60 1060 if(fTrackType==0){
1061 //Fill all histograms with global tracks
1062 tpcP = esdtrack;
1063 phiIn = tpcP->Phi();
1064 if (!tpcP) continue;
1065 if (!fCuts->AcceptTrack(tpcP)) continue;
1066 }
1067 else if(fTrackType==1){
1068 //Fill all histograms with ITS tracks
1069 tpcP = esdtrack;
1070 phiIn = tpcP->Phi();
1071 if (!tpcP) continue;
1072 if (!fCuts->AcceptTrack(tpcP)) continue;
1073 }
1074 else if(fTrackType==2){
1075 //Fill all histograms with TPC track information
1076 tpcPin = esdtrack->GetInnerParam();
1077 if (!tpcPin) continue;
1078 phiIn=tpcPin->Phi();
1079
1080 tpcP = AliESDtrackCuts::GetTPCOnlyTrack(dynamic_cast<AliESDEvent*>(event),esdtrack->GetID());
1081 if (!tpcP) continue;
1082 if (!fCuts->AcceptTrack(tpcP)) continue;
1083 if(tpcP->GetNcls(1)>160)continue;//jacek's track cut
1084 if(tpcP->GetConstrainedChi2TPC()<0)continue; // jacek's track cut
1085 }
1086 else{
1087 Printf("ERROR: wrong track type \n");
1088 continue;
1089 }
1090 //___________
1091 //
1092
1093
50dbca26 1094 if(tpcP->E()>leadingEnergy){
1095 leadingTrack=iTrack;
1096 leadingEnergy=tpcP->E();
1d55ca60 1097 leadingPhi=phiIn;
9f9631f3 1098 }
1099
98a5f582 1100
9f9631f3 1101 fqRec->Fill(tpcP->Charge());
1102
1103
1104 Double_t sigmapt = tpcP->GetSigma1Pt2();
1105 sigmapt= sqrt(sigmapt);
1106 sigmapt= sigmapt *(tpcP->Pt()*tpcP->Pt());
1107
1d55ca60 1108 if(sigmapt == 0.)continue;
9f9631f3 1109 fsigmaPt->Fill(TMath::Log10(sigmapt));
1d55ca60 1110
9f9631f3 1111
9f9631f3 1112 // hits in ITS layer
1113 Int_t cas=-1;
1d55ca60 1114 if(tpcP->HasPointOnITSLayer(0))
9f9631f3 1115 cas=0;
1d55ca60 1116 else if(!tpcP->HasPointOnITSLayer(0)
1117 && tpcP->HasPointOnITSLayer(1))
9f9631f3 1118 cas=1;
1d55ca60 1119 else if(!tpcP->HasPointOnITSLayer(0)
1120 && !tpcP->HasPointOnITSLayer(1)
1121 && tpcP->HasPointOnITSLayer(2))
9f9631f3 1122 cas=2;
1d55ca60 1123 else if(!tpcP->HasPointOnITSLayer(0)
1124 && !tpcP->HasPointOnITSLayer(1)
1125 && !tpcP->HasPointOnITSLayer(2)
1126 && tpcP->HasPointOnITSLayer(3))
9f9631f3 1127 cas=3;
1d55ca60 1128 else if(!tpcP->HasPointOnITSLayer(0)
1129 && !tpcP->HasPointOnITSLayer(1)
1130 && !tpcP->HasPointOnITSLayer(2)
1131 && !tpcP->HasPointOnITSLayer(3)
1132 && tpcP->HasPointOnITSLayer(4))
9f9631f3 1133 cas=4;
1d55ca60 1134 else if( !tpcP->HasPointOnITSLayer(0)
1135 && !tpcP->HasPointOnITSLayer(1)
1136 && !tpcP->HasPointOnITSLayer(2)
1137 && !tpcP->HasPointOnITSLayer(3)
1138 && !tpcP->HasPointOnITSLayer(4)
1139 && tpcP->HasPointOnITSLayer(5))
9f9631f3 1140 cas=5;
1141 else
1142 cas=6;
1143
1144
1145
1146 //-------------------
1147
1d55ca60 1148 xvertexcor = tpcP->Xv() - vertex->GetX(); // coordinate corrected for vertex position
1149 yvertexcor = tpcP->Yv() - vertex->GetY(); // "
1150 sdca = (tpcP->Py()*xvertexcor - tpcP->Px()*yvertexcor)/tpcP->Pt();
9f9631f3 1151
1152
1153 fqPtRec[cas]->Fill(tpcP->Charge()/tpcP->Pt());
1154
1d55ca60 1155
1156
9f9631f3 1157 fHistRECpt->Fill(tpcP->Pt());
1158 fEta->Fill(tpcP->Eta());
1d55ca60 1159 fEtavPt->Fill(tpcP->Eta(), tpcP->Pt());
1160 fEtaPhi->Fill(tpcP->Eta(), phiIn);
9f9631f3 1161 fThetaRec->Fill(tpcP->Theta());
1d55ca60 1162 fPhiRec->Fill(phiIn);
9f9631f3 1163 fVx->Fill(tpcP->Xv());
1164 fVy->Fill(tpcP->Yv());
1165 fVz->Fill(tpcP->Zv());
1166
1167
1168 fEtaPt->Fill(tpcP->Eta()/tpcP->Pt());
1169 fQPt->Fill(tpcP->Charge()/tpcP->Pt());
1d55ca60 1170 fDca->Fill(sdca);
1171 fRecQPtPhi->Fill(tpcP->Charge()/tpcP->Pt(), phiIn);
9f9631f3 1172
1173
1d55ca60 1174 tpcP->GetImpactParameters(xy,z);
1175 fDiffDcaD->Fill(sdca+xy);
9f9631f3 1176
98a5f582 1177 if(fTrackType==2) fCompareTPCparam->Fill(z,tpcPin->GetTgl());
9f9631f3 1178
1179 //for positive particles
e4ab7356 1180
9f9631f3 1181 if(tpcP->Charge()>0){
1182 fRecPtPos->Fill(tpcP->Pt());
1183 fRecPtPosLadder[cas]->Fill(tpcP->Pt());
1184 fRecPtPosVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1d55ca60 1185 fRecPhiPos->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1186
1187
1d55ca60 1188 fRecPhiPosLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1189 fRecPhiPosVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
1190 fSignedDcaPosVz->Fill(sdca,tpcP->Zv());
9f9631f3 1191
1192 fRecEtaPos->Fill(tpcP->Eta());
1193 fRecEtaPosLadder[cas]->Fill(tpcP->Eta());
1194 fRecEtaPtPos->Fill(tpcP->Eta()/tpcP->Pt());
1195 fRecEtaPosVz->Fill(tpcP->Eta(),tpcP->Zv());
1196 fRecEtaPtPosVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
1197
1d55ca60 1198 fRecDcaPos->Fill(sdca);
1199 fRecDcaPosPhi->Fill(sdca, phiIn);
1200 fRecPtPosPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1201 fRecEtaPtPosPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
1202 fRecEtaPosPhi->Fill(tpcP->Eta(), phiIn);
9f9631f3 1203 fRecDPos->Fill(xy);
1d55ca60 1204 fSignDcaPos[cas]->Fill(sdca);
9f9631f3 1205
1206
1d55ca60 1207 fDcaSigmaPos[cas]->Fill(sdca, TMath::Log10(sigmapt));
9f9631f3 1208
1209 fPtSigmaPos[cas]->Fill(TMath::Log10(sigmapt));
1d55ca60 1210 //pos eta
1211 if(tpcP->Eta()>0){
1212 fRecPtPosEtaPos->Fill(tpcP->Pt());
1213 fRec1PtPosEtaPos->Fill(1/tpcP->Pt());
1214 fRecPhiPosEtaPos->Fill(phiIn);
1215 fRecDcaPosPhiEtaPos->Fill(sdca, phiIn);
98a5f582 1216 fRecDcaPosPtEtaPos->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1217 fRecPtPosPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1218 fRecDcaPhiPtPosEtaPos->Fill(phiIn, tpcP->Pt(), sdca);
1219 }
1220 //neg eta
1221 else{
1222 fRecPtPosEtaNeg->Fill(tpcP->Pt());
1223 fRec1PtPosEtaNeg->Fill(1/tpcP->Pt());
1224 fRecPhiPosEtaNeg->Fill(phiIn);
1225 fRecDcaPosPhiEtaNeg->Fill(sdca, phiIn);
98a5f582 1226 fRecDcaPosPtEtaNeg->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1227 fRecPtPosPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1228 fRecDcaPhiPtPosEtaNeg->Fill(phiIn, tpcP->Pt(), sdca);
1229 }
1230
9f9631f3 1231 }
1232 //and negative particles
1233 else {
1234 fRecPtNeg->Fill(tpcP->Pt());
1235 fRecPtNegLadder[cas]->Fill(tpcP->Pt());
1236 fRecPtNegVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1237
1d55ca60 1238 fRecPhiNeg->Fill(TMath::RadToDeg()*phiIn);
1239 fRecPhiNegLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1240 fRecPhiNegVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
1241 fSignedDcaNegVz->Fill(sdca,tpcP->Zv());
9f9631f3 1242 fRecEtaPtNegVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
1243
1244 fRecEtaNeg->Fill(tpcP->Eta());
1245 fRecEtaNegLadder[cas]->Fill(tpcP->Eta());
1246 fRecEtaPtNeg->Fill(tpcP->Eta()/tpcP->Pt());
1247 fRecEtaNegVz->Fill(tpcP->Eta(),tpcP->Zv());
1248
1d55ca60 1249 fRecDcaNeg->Fill(sdca);
1250 fRecDcaNegInv->Fill(-sdca);
1251 fRecDcaNegPhi->Fill(sdca, phiIn);
1252 fRecPtNegPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1253 fRecEtaNegPhi->Fill(tpcP->Eta(), phiIn);
1254 fRecEtaPtNegPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
9f9631f3 1255 fRecDNeg->Fill(xy);
1d55ca60 1256 fSignDcaNeg[cas]->Fill(sdca);
1257 fSignDcaNegInv[cas]->Fill(-sdca);
9f9631f3 1258
1259
1d55ca60 1260 fDcaSigmaNeg[cas]->Fill(sdca,TMath::Log10(sigmapt));
9f9631f3 1261
1262 fPtSigmaNeg[cas]->Fill(TMath::Log10(sigmapt));
1d55ca60 1263
1264 //pos eta
1265 if(tpcP->Eta()>0){
1266 fRecPtNegEtaPos->Fill(tpcP->Pt());
1267 fRec1PtNegEtaPos->Fill(1/tpcP->Pt());
1268 fRecPhiNegEtaPos->Fill(phiIn);
1269 fRecDcaNegPhiEtaPos->Fill(sdca, phiIn);
98a5f582 1270 fRecDcaNegPtEtaPos->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1271 fRecPtNegPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1272 fRecDcaPhiPtNegEtaPos->Fill(phiIn, tpcP->Pt(), sdca);
1273 }
1274 //neg eta
1275 else{
1276 fRecPtNegEtaNeg->Fill(tpcP->Pt());
1277 fRec1PtNegEtaNeg->Fill(1/tpcP->Pt());
1278 fRecPhiNegEtaNeg->Fill(phiIn);
1279 fRecDcaNegPhiEtaNeg->Fill(sdca, phiIn);
98a5f582 1280 fRecDcaNegPtEtaNeg->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1281 fRecPtNegPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1282 fRecDcaPhiPtNegEtaNeg->Fill(phiIn, tpcP->Pt(), sdca);
1283 }
1284
9f9631f3 1285 }
1286
1287
1288
1289 //all particles with positive eta
1290 if(tpcP->Eta()>0){
1291 fRecQPtPosEta->Fill(tpcP->Charge()/tpcP->Pt());
1292 fRecPtPosEta->Fill(tpcP->Pt());
1d55ca60 1293 fRecPhiPosEta->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1294 fRecQPtPosEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
1d55ca60 1295 fRecDcaPosEta->Fill(sdca);
9f9631f3 1296 fRecDPosEta->Fill(xy);
1297 }
1298 //all particles with negative eta (and eta==0)
1299 else{
1300 fRecQPtNegEta->Fill(tpcP->Charge()/tpcP->Pt());
1301 fRecPtNegEta->Fill(tpcP->Pt());
1d55ca60 1302 fRecPhiNegEta->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1303 fRecQPtNegEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
1d55ca60 1304 fRecDcaNegEta->Fill(sdca);
9f9631f3 1305 fRecDNegEta->Fill(xy);
1306
1307 }
9f9631f3 1308
1d55ca60 1309
1310 fRecPtTpcSector[Int_t(phiIn*
9f9631f3 1311 TMath::RadToDeg()/20)]->Fill(tpcP->Pt());
1d55ca60 1312 fRecEtaTpcSector[Int_t(phiIn*
1313 TMath::RadToDeg()/20)]->Fill(tpcP->Eta());
1314 fSignedDcaTpcSector[Int_t(phiIn*
1315 TMath::RadToDeg()/20)]->Fill(sdca);
1316 fRecQPtTpcSector[Int_t(phiIn*
1317 TMath::RadToDeg()/20)]->Fill(tpcP->Charge()/tpcP->Pt());
1318 fRecEtaPtTpcSector[Int_t(phiIn*
1319 TMath::RadToDeg()/20)]->Fill(tpcP->Eta()/tpcP->Pt());
9f9631f3 1320
1321
1322
1d55ca60 1323// // another track loop
1324// for (Int_t iTrack2 = 0; iTrack2 < event->GetNumberOfTracks(); iTrack2++) {
9f9631f3 1325
1d55ca60 1326// if(LeadingTrack==iTrack2) continue;
1327
1328// AliVParticle *track2 = event->GetTrack(iTrack2);
1329// AliESDtrack* esdtrack2 = dynamic_cast<AliESDtrack*>(track2);
1330// if (!track2) {
1331// Printf("ERROR: Could not receive track %d", iTrack);
1332// continue;
1333// }
1334// if (!fCuts->AcceptTrack(esdtrack2)) continue;
1335// //propagate to dca
1336// esdtrack2->PropagateToDCA(event->GetPrimaryVertex(),
1337// event->GetMagneticField(), 10000.);
9f9631f3 1338
1d55ca60 1339// fDeltaPhiLeading->Fill((LeadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
1340// LeadingPhi*TMath::RadToDeg() );
9f9631f3 1341
1342
1343
1d55ca60 1344// }//second track loop
98a5f582 1345
1fcb92ef 1346 // if(fTrackType==2) delete tpcP; // delete in case of TPCOnlyTrack
98a5f582 1347
9f9631f3 1348 }//first track loop
1349
1fcb92ef 1350 //prevent mem leak for TPConly track
1351 if(fTrackType==2&&tpcP){
1352 delete tpcP;
1353 tpcP = 0;
1354 }
9f9631f3 1355
9f9631f3 1356
1357 // Post output data.
1358 // PostData(1, fHistPt);
1359 PostData(1, fHists);
1360}
1361
1362
1363
1364
1365
1366//________________________________________________________________________
1367void AliAnalysisTaskQASym::Terminate(Option_t *)
1368{
1d55ca60 1369
9f9631f3 1370
1371}
1372
1373
1374
1375
1376