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