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