1 /* created by fbellini@cern.ch on 14/09/2010 */
2 /* last modified by fbellini on 31/03/2010 */
5 #ifndef ALIANALYSISTASKTOFQA_CXX
6 #define ALIANALYSISTASKTOFQA_CXX
13 #include "AliAnalysisTaskSE.h"
14 #include "AliAnalysisManager.h"
15 #include "AliESDEvent.h"
16 #include "AliESDInputHandler.h"
17 #include "AliESDpid.h"
18 #include "AliAnalysisTaskTOFqa.h"
19 #include "AliAnalysisFilter.h"
20 #include "AliESDtrackCuts.h"
22 #include "AliTOFRawStream.h"
23 #include "AliTOFGeometry.h"
25 ClassImp(AliAnalysisTaskTOFqa)
27 //________________________________________________________________________
28 AliAnalysisTaskTOFqa::AliAnalysisTaskTOFqa() :
33 fESDpid(new AliESDpid()),
35 // fNPrimaryTracks(0),
36 fEnableAdvancedCheck(kFALSE),
37 fExpTimeBinWidth(24.4),
38 fExpTimeRangeMin(-25010.),
39 fExpTimeRangeMax(25010.),
40 fExpTimeSmallRangeMin(-5002.),
41 fExpTimeSmallRangeMax(5002.),
48 // Default constructor
50 for (Int_t j=0;j<3;j++ ) {
57 //________________________________________________________________________
58 AliAnalysisTaskTOFqa::AliAnalysisTaskTOFqa(const char *name) :
59 AliAnalysisTaskSE(name),
64 fESDpid(new AliESDpid()),
66 // fNPrimaryTracks(0),
67 fEnableAdvancedCheck(kFALSE),
68 fExpTimeBinWidth(24.4),
69 fExpTimeRangeMin(-25010.),
70 fExpTimeRangeMax(25010.),
71 fExpTimeSmallRangeMin(-5002.),
72 fExpTimeSmallRangeMax(5002.),
80 // Define input and output slots here
81 Info("AliAnalysisTaskTOFqa","Calling Constructor");
83 for (Int_t j=0;j<5;j++ ) {
89 // Input slot #0 works with a TChain
90 DefineInput(0, TChain::Class());
92 // Output slot #0 writes into a TH1 container
93 // Output slot #1 writes into a user defined container
94 DefineOutput(1, TList::Class());
95 DefineOutput(2, TList::Class());
96 DefineOutput(3, TList::Class());
97 DefineOutput(4, TList::Class());
98 DefineOutput(5, TList::Class());
101 //________________________________________________________________________
102 AliAnalysisTaskTOFqa::AliAnalysisTaskTOFqa(const AliAnalysisTaskTOFqa& copy)
103 : AliAnalysisTaskSE(),
104 fRunNumber(copy.fRunNumber),
106 fTrackFilter(copy.fTrackFilter),
107 fVertex(copy.fVertex),
108 fESDpid(copy.fESDpid),
109 fNTOFtracks(copy.fNTOFtracks),
110 //fNPrimaryTracks(copy.fNPrimaryTracks),
111 fEnableAdvancedCheck(copy.fEnableAdvancedCheck),
112 fExpTimeBinWidth(copy.fExpTimeBinWidth),
113 fExpTimeRangeMin(copy.fExpTimeRangeMin),
114 fExpTimeRangeMax(copy.fExpTimeRangeMax),
115 fExpTimeSmallRangeMin(copy.fExpTimeSmallRangeMin),
116 fExpTimeSmallRangeMax(copy.fExpTimeSmallRangeMax),
118 fHlistTimeZero(copy.fHlistTimeZero),
119 fHlistPID(copy.fHlistPID),
124 for (Int_t j=0;j<5;j++ ) {
125 if (j<3) fT0[j]=copy.fT0[j];
126 fSigmaSpecie[j]=copy.fSigmaSpecie[j];
127 fTrkExpTimes[j]=copy.fTrkExpTimes[j];
128 fThExpTimes[j]=copy.fThExpTimes[j];
134 //___________________________________________________________________________
135 AliAnalysisTaskTOFqa& AliAnalysisTaskTOFqa::operator=(const AliAnalysisTaskTOFqa& copy)
138 // Assignment operator
141 AliAnalysisTaskSE::operator=(copy) ;
142 fRunNumber=copy.fRunNumber;
144 fTrackFilter=copy.fTrackFilter;
145 fVertex=copy.fVertex;
146 fESDpid=copy.fESDpid;
147 fNTOFtracks=copy.fNTOFtracks;
148 fEnableAdvancedCheck=copy.fEnableAdvancedCheck;
149 fEnableAdvancedCheck=copy.fEnableAdvancedCheck;
150 fExpTimeBinWidth=copy.fExpTimeBinWidth;
151 fExpTimeRangeMin=copy.fExpTimeRangeMin;
152 fExpTimeRangeMax=copy.fExpTimeRangeMax;
153 fExpTimeSmallRangeMin=copy.fExpTimeSmallRangeMin;
154 fExpTimeSmallRangeMax=copy.fExpTimeSmallRangeMax;
156 //fNPrimaryTracks=copy.fNPrimaryTracks;
157 for (Int_t j=0;j<5;j++ ) {
158 if (j<3) fT0[j]=copy.fT0[j];
159 fSigmaSpecie[j]=copy.fSigmaSpecie[j];
160 fTrkExpTimes[j]=copy.fTrkExpTimes[j];
161 fThExpTimes[j]=copy.fThExpTimes[j];
164 fHlistTimeZero=copy.fHlistTimeZero;
165 fHlistPID=copy.fHlistPID;
172 //___________________________________________________________________________
173 AliAnalysisTaskTOFqa::~AliAnalysisTaskTOFqa() {
178 Info("~AliAnalysisTaskTOFqa","Calling Destructor");
179 if (fESDpid) delete fESDpid;
180 if (fVertex) delete fVertex;
181 if (fTrackFilter) delete fTrackFilter;
182 if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
187 if (fHlistTimeZero) {
188 delete fHlistTimeZero;
205 //________________________________________________________________________
206 void AliAnalysisTaskTOFqa::UserCreateOutputObjects()
208 //Defines output objects and histograms
209 Info("CreateOutputObjects","CreateOutputObjects (TList) of task %s", GetName());
211 if (!fHlist) fHlist = new TList();
212 fHlist->SetOwner(kTRUE);
213 if (!fHlistTimeZero) fHlistTimeZero = new TList();
214 fHlistTimeZero->SetOwner(kTRUE);
215 if (!fHlistPID) fHlistPID = new TList();
216 fHlistPID->SetOwner(kTRUE);
217 if (!fHpos) fHpos = new TList();
218 fHpos->SetOwner(kTRUE);
219 if (!fHneg) fHneg = new TList();
220 fHneg->SetOwner(kTRUE);
222 Int_t nExpTimeBins=1;
223 Int_t nExpTimeSmallBins=1;
225 if (fExpTimeRangeMax<fExpTimeRangeMin) {
226 SetExpTimeHistoRange(-25010.,25010.);
228 nExpTimeBins = TMath::Nint((fExpTimeRangeMax - fExpTimeRangeMin)/fExpTimeBinWidth);//ps
229 fExpTimeRangeMax=fExpTimeRangeMin+nExpTimeBins*fExpTimeBinWidth;//ps
231 if (fExpTimeSmallRangeMax<fExpTimeSmallRangeMin) {
232 SetExpTimeHistoSmallRange(-5002.,5002.);
234 nExpTimeSmallBins = TMath::Nint((fExpTimeSmallRangeMax - fExpTimeSmallRangeMin)/fExpTimeBinWidth);//ps
235 fExpTimeSmallRangeMax=fExpTimeSmallRangeMin+nExpTimeSmallBins*fExpTimeBinWidth;//ps
237 // nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax
238 // nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax
241 TH1I* hTOFmatchedESDperEvt = new TH1I("hTOFmatchedPerEvt", "Matched TOF tracks per event (|#eta| #leq 0.8 and pT #geq 0.3 GeV/c);TOF-matched ESD tracks;Events", 100, 0, 100) ;
242 hTOFmatchedESDperEvt->Sumw2() ;
243 hTOFmatchedESDperEvt->SetLineWidth(2);
244 hTOFmatchedESDperEvt->SetLineColor(kBlue);
245 hTOFmatchedESDperEvt->SetMarkerStyle(20);
246 hTOFmatchedESDperEvt->SetMarkerSize(0.8);
247 hTOFmatchedESDperEvt->SetMarkerColor(kBlue);
248 fHlist->AddLast(hTOFmatchedESDperEvt) ;
250 TH1F* hTOFmatchedESDtime = new TH1F("hTOFmatchedESDtime", "Matched ESDs tracks: TOF Time spectrum; t [ns];Counts", 250, 0., 610. ) ;
251 hTOFmatchedESDtime->Sumw2() ;
252 hTOFmatchedESDtime->SetLineWidth(2);
253 hTOFmatchedESDtime->SetLineColor(kBlue);
254 hTOFmatchedESDtime->SetFillColor(kBlue);
255 hTOFmatchedESDtime->SetDrawOption("BAR");
256 fHlist->AddLast(hTOFmatchedESDtime) ;
258 TH1F* hTOFmatchedESDrawTime = new TH1F("hTOFmatchedESDrawTime", "Matched ESDs tracks: TOF raw Time spectrum;t_{raw} [ns];Counts", 250, 0., 610.) ;
259 hTOFmatchedESDrawTime->Sumw2() ;
260 hTOFmatchedESDrawTime->SetLineWidth(2);
261 hTOFmatchedESDrawTime->SetLineColor(kAzure+2);
262 hTOFmatchedESDrawTime->SetFillColor(kAzure+2);
263 hTOFmatchedESDrawTime->SetDrawOption("BAR");
264 fHlist->AddLast(hTOFmatchedESDrawTime) ;
266 TH1F* hTOFmatchedESDToT = new TH1F("hTOFmatchedESDToT", "Matched ESDs tracks: TOF ToT spectrum; ToT [ns];Counts",100, 0., 48.8) ;
267 hTOFmatchedESDToT->Sumw2() ;
268 hTOFmatchedESDToT->SetLineColor(kOrange+1);
269 hTOFmatchedESDToT->SetMarkerColor(kOrange+1);
270 hTOFmatchedESDToT->SetFillColor(kOrange+1);
271 hTOFmatchedESDToT->SetDrawOption("BAR");
272 fHlist->AddLast(hTOFmatchedESDToT) ;
274 TH1F* hTOFmatchedESDtrkLength = new TH1F("hTOFmatchedESDtrkLength", "Matched ESDs tracks length; Track length [cm];Counts", 1200, -400., 800) ;
275 hTOFmatchedESDtrkLength->Sumw2();
276 hTOFmatchedESDtrkLength->SetLineColor(kViolet-3);
277 hTOFmatchedESDtrkLength->SetMarkerColor(kViolet-3);
278 hTOFmatchedESDtrkLength->SetFillColor(kViolet-3);
279 hTOFmatchedESDtrkLength->SetDrawOption("BAR");
280 fHlist->AddLast(hTOFmatchedESDtrkLength);
282 TH1F* hTOFmatchedESDP = new TH1F("hTOFmatchedESDP", "TPC-TOF matched tracks momentum distribution (GeV/c); p (GeV/c);tracks", 500,0.,5.) ;
283 hTOFmatchedESDP->Sumw2() ;
284 hTOFmatchedESDP->SetLineColor(kBlue);
285 hTOFmatchedESDP->SetMarkerStyle(20);
286 hTOFmatchedESDP->SetMarkerSize(0.7);
287 hTOFmatchedESDP->SetMarkerColor(kBlue);
288 fHlist->AddLast(hTOFmatchedESDP) ;
290 TH1F* hTOFmatchedESDPt = new TH1F("hTOFmatchedESDPt", "TPC-TOF matched tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500,0.,5.) ;
291 hTOFmatchedESDPt->Sumw2() ;
292 hTOFmatchedESDPt->SetLineColor(kBlue);
293 hTOFmatchedESDPt->SetMarkerStyle(21);
294 hTOFmatchedESDPt->SetMarkerSize(0.7);
295 hTOFmatchedESDPt->SetMarkerColor(kBlue);
296 fHlist->AddLast(hTOFmatchedESDPt) ;
299 TH1F* hTOFmatchedESDeta = new TH1F("hTOFmatchedESDeta", "Matched ESDtracks #eta (p_{T} #geq 0.5 GeV/c); #eta;Counts", 200, -1., 1.) ;
300 hTOFmatchedESDeta->Sumw2();
301 hTOFmatchedESDeta->SetLineColor(kBlue);
302 fHlist->AddLast(hTOFmatchedESDeta) ;
304 TH1F* hTOFmatchedESDphi = new TH1F("hTOFmatchedESDphi", "Matched ESDtracks #phi; #phi (deg);Counts", 72, 0., 360.) ;
305 hTOFmatchedESDphi->Sumw2();
306 hTOFmatchedESDphi->SetLineColor(kBlue);
307 fHlist->AddLast(hTOFmatchedESDphi) ;
310 TH1F* hESDprimaryTrackP = new TH1F("hESDprimaryTrackP", "All ESDs tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0., 5.0) ;
311 hESDprimaryTrackP->Sumw2();
312 hESDprimaryTrackP->SetLineWidth(1);
313 hESDprimaryTrackP->SetMarkerStyle(24);
314 hESDprimaryTrackP->SetMarkerSize(0.7);
315 hESDprimaryTrackP->SetMarkerColor(kRed);
316 hESDprimaryTrackP->SetLineColor(kRed);
317 fHlist->AddLast(hESDprimaryTrackP);
319 TH1F* hESDprimaryTrackPt = new TH1F("hESDprimaryTrackPt", "ESDs primary tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
320 hESDprimaryTrackPt->Sumw2();
321 hESDprimaryTrackPt->SetLineWidth(1);
322 hESDprimaryTrackPt->SetMarkerStyle(25);
323 hESDprimaryTrackPt->SetMarkerSize(0.7);
324 hESDprimaryTrackPt->SetLineColor(kRed);
325 hESDprimaryTrackPt->SetMarkerColor(kRed);
326 fHlist->AddLast(hESDprimaryTrackPt);
328 TH1F* hTOFprimaryESDeta = new TH1F("hTOFprimaryESDeta", "Primary ESDtracks #eta (p_{T} #geq 0.5 GeV/c); #eta;Counts",200, -1., 1.) ;
329 hTOFprimaryESDeta->Sumw2();
330 hTOFprimaryESDeta->SetLineColor(kRed);
331 fHlist->AddLast(hTOFprimaryESDeta) ;
333 TH1F* hTOFprimaryESDphi = new TH1F("hTOFprimaryESDphi", "Primary ESDtracks #phi;#phi (deg);Counts", 72, 0., 360.) ;
334 hTOFprimaryESDphi->Sumw2();
335 hTOFprimaryESDphi->SetLineColor(kRed);
336 fHlist->AddLast(hTOFprimaryESDphi) ;
338 TH2F* hTOFmatchedDxVsPtPos = new TH2F("hTOFmatchedDxVsPtPos", "Dx vs p_{T} for positive tracks;p_{T} (GeV/c); Dx [cm]; hits", 500,0.,5.,200, -10., 10.) ;
339 hTOFmatchedDxVsPtPos->Sumw2();
340 fHlist->AddLast(hTOFmatchedDxVsPtPos) ;
342 TH2F* hTOFmatchedDxVsPtNeg = new TH2F("hTOFmatchedDxVsPtNeg", "Dx vs p_{T} for negative tracks;p_{T} (GeV/c); Dx [cm]; hits", 500,0.,5.,200, -10., 10.) ;
343 hTOFmatchedDxVsPtNeg->Sumw2();
344 fHlist->AddLast(hTOFmatchedDxVsPtNeg) ;
347 TH2F* hTOFmatchedDzVsStrip = new TH2F("hTOFmatchedDzVsStrip", "Dz vs strip; strip (#eta); Dz [cm]; hits", 92,0.,92.,200, -10., 10.) ;
348 hTOFmatchedDzVsStrip->Sumw2();
349 fHlist->AddLast(hTOFmatchedDzVsStrip) ;
351 //----------------------------------------------timeZero QA plots
353 TH1D* hEventT0DetAND = new TH1D("hEventT0DetAND", "Event timeZero from T0AC detector ; t0 [ps]; events", 1000, -25000., 25000. ) ;
354 hEventT0DetAND->Sumw2() ;
355 hEventT0DetAND->SetLineWidth(2);
356 hEventT0DetAND->SetLineColor(kRed);
357 hEventT0DetAND->SetFillColor(kRed);
358 fHlistTimeZero->AddLast(hEventT0DetAND) ;
361 TH1D* hEventT0DetA = new TH1D("hEventT0DetA", "Event timeZero from T0A detector; t0 [ps]; events", 1000, -25000., 25000. ) ;
362 hEventT0DetA->Sumw2() ;
363 hEventT0DetA->SetLineWidth(2);
364 hEventT0DetA->SetLineColor(kBlue);
365 hEventT0DetA->SetFillColor(kBlue);
366 fHlistTimeZero->AddLast(hEventT0DetA) ;
369 TH1D* hEventT0DetC = new TH1D("hEventT0DetC", "Event timeZero from T0C detector; t0 [ps]; events", 1000, -25000., 25000.) ;
370 hEventT0DetC->Sumw2() ;
371 hEventT0DetC->SetLineWidth(2);
372 hEventT0DetC->SetLineColor(kGreen);
373 hEventT0DetC->SetFillColor(kGreen);
374 fHlistTimeZero->AddLast(hEventT0DetC);
377 TH1F* hT0DetRes = new TH1F("hT0DetRes", "T0 detector (T0A-T0C)/2; (T0A-T0C)/2 [ps]; events", 200, -500.,500. ) ;
379 hT0DetRes->SetMarkerStyle(24);
380 hT0DetRes->SetMarkerSize(0.7);
381 hT0DetRes->SetMarkerColor(kMagenta+2);
382 hT0DetRes->SetLineColor(kMagenta+2);
383 hT0DetRes->SetFillColor(kMagenta+2);
384 fHlistTimeZero->AddLast(hT0DetRes) ;
387 TH1F* hT0fill = new TH1F("hT0fill", "Event timeZero of fill; t0 [ps]; events", 1000, -25000., 25000. ) ;
389 hT0fill->SetMarkerStyle(20);
390 hT0fill->SetMarkerColor(kBlack);
391 hT0fill->SetLineColor(kBlack);
392 fHlistTimeZero->AddLast(hT0fill) ;
395 TH1F* hT0TOF = new TH1F("hT0TOF", "Event timeZero estimated by TOF; t0 [ps]; events", 1000, -25000., 25000. ) ;
397 hT0TOF->SetMarkerStyle(20);
398 hT0TOF->SetMarkerColor(kBlue);
399 hT0TOF->SetLineColor(kBlue);
400 hT0TOF->SetFillColor(kBlue);
401 fHlistTimeZero->AddLast(hT0TOF) ;
405 TH1F* hT0T0 = new TH1F("hT0T0", "Event timeZero measured by T0 detector (best between AC, A, C); t0 [ps]; events", 1000, -25000.,25000. ) ;
407 hT0T0->SetMarkerStyle(20);
408 hT0T0->SetMarkerColor(kGreen+1);
409 hT0T0->SetLineColor(kGreen+1);
410 hT0T0->SetFillColor(kGreen+1);
411 fHlistTimeZero->AddLast(hT0T0) ;
414 TH1F* hT0best = new TH1F("hT0best", "Event timeZero estimated as T0best; t0 [ps]; events", 1000, -25000.,25000. ) ;
416 hT0best->SetMarkerStyle(20);
417 hT0best->SetMarkerColor(kRed);
418 hT0best->SetLineColor(kRed);
419 hT0best->SetFillColor(kRed);
420 fHlistTimeZero->AddLast(hT0best) ;
423 TH1F* hT0fillRes = new TH1F("hT0fillRes", "Resolution of fillT0; #sigma_{bestT0} [ps];events", 250, 0.,250. ) ;
424 hT0fillRes->Sumw2() ;
425 hT0fillRes->SetMarkerStyle(21);
426 hT0fillRes->SetMarkerColor(kBlack);
427 hT0fillRes->SetLineColor(kBlack);
428 hT0fillRes->SetFillColor(kBlack);
429 fHlistTimeZero->AddLast(hT0fillRes) ;
432 TH1F* hT0TOFRes = new TH1F("hT0TOFRes", "Resolution of timeZero from TOF; #sigma_{TOFT0} [ps];events", 250, 0.,250. ) ;
434 hT0TOFRes->SetLineWidth(1);
435 hT0TOFRes->SetMarkerStyle(21);
436 hT0TOFRes->SetMarkerColor(kBlue);
437 hT0TOFRes->SetLineColor(kBlue);
438 hT0TOFRes->SetFillColor(kBlue);
439 fHlistTimeZero->AddLast(hT0TOFRes) ;
442 TH1F* hT0T0res = new TH1F("hT0T0res", "Resolution of timeZero from T0;#sigma_{T0T0} [ps];events", 250, -0., 250. ) ;
444 hT0T0res->SetMarkerStyle(21);
445 hT0T0res->SetMarkerColor(kGreen+1);
446 hT0T0res->SetLineColor(kGreen+1);
447 hT0T0res->SetFillColor(kGreen+1);
448 fHlistTimeZero->AddLast(hT0T0res) ;
451 TH1F* hT0bestRes = new TH1F("hT0bestRes", "Resolution of bestT0; #sigma_{bestT0} [ps];events", 250, 0.,250. ) ;
452 hT0bestRes->Sumw2() ;
453 hT0fillRes->SetMarkerStyle(21);
454 hT0fillRes->SetMarkerColor(kRed);
455 hT0fillRes->SetLineColor(kRed);
456 hT0fillRes->SetFillColor(kRed);
457 fHlistTimeZero->AddLast(hT0bestRes) ;
460 TH2F* hT0TOFvsNtrk = new TH2F("hT0TOFvsNtrk", "Event timeZero estimated by TOF vs. number of tracks in event;TOF-matching tracks; t0 [ps]", 100, 0., 100.,1000,-25000.,25000. ) ;
461 hT0TOFvsNtrk->Sumw2() ;
462 fHlistTimeZero->AddLast(hT0TOFvsNtrk) ;
465 TH2F* hEventT0MeanVsVtx = new TH2F("hEventT0MeanVsVtx", "T0 detector: mean vs vertex ; (t0_{A}-t0_{C})/2 [ns]; (t0_{A}+t0_{C})/2 [ns]; events", 500, -25., 25., 500, -25., 25. ) ;
466 hEventT0MeanVsVtx->Sumw2() ;
467 fHlistTimeZero->AddLast(hEventT0MeanVsVtx) ;
470 TH2F* hEventV0MeanVsVtx = new TH2F("hEventV0MeanVsVtx", "V0 detector: mean vs vertex ; (V0_{A}-V0_{C})/2 [ns]; (V0_{A}+V0_{C})/2 [ns]; events", 500, -50., 50., 500, -50., 50. ) ;
471 hEventV0MeanVsVtx->Sumw2() ;
472 fHlistTimeZero->AddLast(hEventV0MeanVsVtx) ;
473 //--------------------------------------------- TOF PID QA plots
475 TH2F* hTOFmatchedESDpVsBeta = new TH2F("hTOFmatchedESDpVsBeta", "Matched ESDs tracks beta vs. p; p(GeV/c); beta", 500, 0.0, 5.0, 150, 0., 1.5) ;
476 fHlistPID->AddLast(hTOFmatchedESDpVsBeta);
479 TH1F* hTOFmatchedMass= new TH1F("hTOFmatchedMass","Matched ESD tracks mass distribution - (L>0); M (GeV/c^{2}); entries", 500, 0., 5. );
480 hTOFmatchedMass->Sumw2();
481 hTOFmatchedMass->SetLineWidth(2);
482 hTOFmatchedMass->SetLineColor(kBlue);
483 hTOFmatchedMass->SetLineColor(kBlue);
484 fHlistPID->AddLast(hTOFmatchedMass);
487 TH2F* hTOFmatchedExpTimePiVsEta = new TH2F("hTOFmatchedExpTimePiVsEta", "ESDs t_{TOF}-t_{#pi,exp} (from tracking); strip (#eta); t_{TOF}-t_{#pi,exp} [ps]", 92, 0, 92, nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
488 hTOFmatchedExpTimePiVsEta->Sumw2() ;
489 fHlistPID->AddLast(hTOFmatchedExpTimePiVsEta) ;
492 TH1F* hTOFmatchedExpTimePi = new TH1F("hTOFmatchedExpTimePi", "ESDs t_{TOF}-t_{#pi,exp} (from tracking); t_{TOF}-t_{#pi,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
493 hTOFmatchedExpTimePi->Sumw2() ;
494 hTOFmatchedExpTimePi->SetLineWidth(1);
495 hTOFmatchedExpTimePi->SetLineColor(kRed);
496 hTOFmatchedExpTimePi->SetMarkerStyle(20);
497 hTOFmatchedExpTimePi->SetMarkerSize(0.8);
498 hTOFmatchedExpTimePi->SetMarkerColor(kRed);
499 fHlistPID->AddLast(hTOFmatchedExpTimePi) ;
502 TH2F* hTOFmatchedExpTimePiVsP = new TH2F("hTOFmatchedExpTimePiVsP", "ESDs t_{TOF}-t_{#pi,exp} (from tracking) Vs P ; p (GeV/c);t_{TOF}-t_{#pi,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
503 hTOFmatchedExpTimePiVsP->Sumw2() ;
504 fHlistPID->AddLast(hTOFmatchedExpTimePiVsP) ;
507 TH1F* hTOFtheoreticalExpTimePi = new TH1F("hTOFtheoreticalExpTimePi", "ESDs t_{TOF}-t_{#pi,exp} (theoretical); t_{TOF}-t_{#pi,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
508 hTOFtheoreticalExpTimePi->Sumw2() ;
509 hTOFtheoreticalExpTimePi->SetLineWidth(1);
510 hTOFtheoreticalExpTimePi->SetLineColor(kRed);
511 hTOFtheoreticalExpTimePi->SetMarkerStyle(24);
512 hTOFtheoreticalExpTimePi->SetMarkerSize(0.8);
513 hTOFtheoreticalExpTimePi->SetMarkerColor(kRed);
514 fHlistPID->AddLast(hTOFtheoreticalExpTimePi) ;
517 TH2F* hTOFtheoreticalExpTimePiVsP = new TH2F("hTOFtheoreticalExpTimePiVsP", "ESDs t_{TOF}-t_{#pi,exp} (theoretical) Vs P ; p (GeV/c);t_{TOF}-t_{#pi,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
518 hTOFtheoreticalExpTimePiVsP->Sumw2() ;
519 fHlistPID->AddLast(hTOFtheoreticalExpTimePiVsP) ;
522 TH2F* hTOFExpSigmaPi = new TH2F("hTOFExpSigmaPi", "ESDs TOF n#sigma_{PID,#pi} vs p_{T}; p_{T} (GeV/c); n#sigma_{PID,#pi};Tracks", 500,0.,5.,200, -10., 10. ) ;
523 hTOFExpSigmaPi->Sumw2() ;
524 fHlistPID->AddLast(hTOFExpSigmaPi) ;
527 TH1F* hTOFmatchedExpTimeKa = new TH1F("hTOFmatchedExpTimeKa", "ESDs t_{TOF}-t_{K,exp} (from tracking); t_{TOF}-t_{K,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
528 hTOFmatchedExpTimeKa->Sumw2() ;
529 hTOFmatchedExpTimeKa->SetLineWidth(1);
530 hTOFmatchedExpTimeKa->SetLineColor(kBlue);
531 hTOFmatchedExpTimeKa->SetMarkerStyle(21);
532 hTOFmatchedExpTimeKa->SetMarkerSize(0.8);
533 hTOFmatchedExpTimeKa->SetMarkerColor(kBlue);
534 fHlistPID->AddLast(hTOFmatchedExpTimeKa);
537 TH2F* hTOFmatchedExpTimeKaVsP = new TH2F("hTOFmatchedExpTimeKaVsP", "ESDs t_{TOF}-t_{K,exp} (from tracking) Vs P ; p (GeV/c);t_{TOF}-t_{K,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
538 hTOFmatchedExpTimeKaVsP->Sumw2() ;
539 fHlistPID->AddLast(hTOFmatchedExpTimeKaVsP) ;
542 TH1F* hTOFtheoreticalExpTimeKa = new TH1F("hTOFtheoreticalExpTimeKa", "ESDs t_{TOF}-t_{K,exp} (theoretical); t_{TOF}-t_{K,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
543 hTOFtheoreticalExpTimeKa->Sumw2() ;
544 hTOFtheoreticalExpTimeKa->SetLineWidth(1);
545 hTOFtheoreticalExpTimeKa->SetLineColor(kBlue);
546 hTOFtheoreticalExpTimeKa->SetMarkerStyle(24);
547 hTOFtheoreticalExpTimeKa->SetMarkerSize(0.8);
548 hTOFtheoreticalExpTimeKa->SetMarkerColor(kBlue);
549 fHlistPID->AddLast(hTOFtheoreticalExpTimeKa) ;
552 TH2F* hTOFtheoreticalExpTimeKaVsP = new TH2F("hTOFtheoreticalExpTimeKaVsP", "ESDs t_{TOF}-t_{K,exp} (theoretical) Vs P ; p (GeV/c);t_{TOF}-t_{K,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
553 hTOFtheoreticalExpTimeKaVsP->Sumw2() ;
554 fHlistPID->AddLast(hTOFtheoreticalExpTimeKaVsP) ;
557 TH2F* hTOFExpSigmaKa = new TH2F("hTOFExpSigmaKa", "ESDs TOF n#sigma_{PID,K} vs p_{T}; p_{T} (GeV/c);n#sigma_{PID,K};Tracks", 500, 0.,5.,200, -10., 10. ) ;
558 hTOFExpSigmaKa->Sumw2() ;
559 fHlistPID->AddLast(hTOFExpSigmaKa) ;
562 TH1F* hTOFmatchedExpTimePro = new TH1F("hTOFmatchedExpTimePro", "ESDs t_{TOF}-t_{p,exp} (from tracking); t_{TOF}-t_{p,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin,fExpTimeRangeMax) ;
563 hTOFmatchedExpTimePro->Sumw2() ;
564 hTOFmatchedExpTimePro->SetLineWidth(1);
565 hTOFmatchedExpTimePro->SetLineColor(kGreen+1);
566 hTOFmatchedExpTimePro->SetMarkerStyle(22);
567 hTOFmatchedExpTimePro->SetMarkerSize(0.8);
568 hTOFmatchedExpTimePro->SetMarkerColor(kGreen+1);
569 fHlistPID->AddLast(hTOFmatchedExpTimePro) ;
572 TH2F* hTOFmatchedExpTimeProVsP = new TH2F("hTOFmatchedExpTimeProVsP", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
573 hTOFmatchedExpTimeProVsP->Sumw2() ;
574 fHlistPID->AddLast(hTOFmatchedExpTimeProVsP) ;
577 TH1F* hTOFtheoreticalExpTimePro = new TH1F("hTOFtheoreticalExpTimePro", "ESDs t_{TOF}-t_{p,exp} (theoretical); t_{TOF}-t_{p,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
578 hTOFtheoreticalExpTimePro->Sumw2() ;
579 hTOFtheoreticalExpTimePro->SetLineWidth(1);
580 hTOFtheoreticalExpTimePro->SetLineColor(kGreen+1);
581 hTOFtheoreticalExpTimePro->SetMarkerStyle(26);
582 hTOFtheoreticalExpTimePro->SetMarkerSize(0.8);
583 hTOFtheoreticalExpTimePro->SetMarkerColor(kGreen+1);
584 fHlistPID->AddLast(hTOFtheoreticalExpTimePro) ;
587 TH2F* hTOFtheoreticalExpTimeProVsP = new TH2F("hTOFtheoreticalExpTimeProVsP", "ESDs t_{TOF}-t_{p,exp} (theoretical) Vs P ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
588 hTOFtheoreticalExpTimeProVsP->Sumw2() ;
589 fHlistPID->AddLast(hTOFtheoreticalExpTimeProVsP) ;
592 TH2F* hTOFExpSigmaPro = new TH2F("hTOFExpSigmaPro", "ESDs TOF n#sigma_{PID,p} vs. p_{T}; p_{T} (GeV/c); n#sigma_{PID,p};Tracks", 500, 0.,5.,200, -10., 10. ) ;
593 hTOFExpSigmaPro->Sumw2() ;
594 fHlistPID->AddLast(hTOFExpSigmaPro) ;
597 TH2F* hTOFmatchedExpTimePiVsPTRDPos = new TH2F("hTOFmatchedExpTimePiVsPTRDPos", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (#phi_{outerTPC}#leq 30 || 150 #leq#phi_{outerTPC}#leq 230 || #phi_{outerTPC}#geq 310 ) ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
598 hTOFmatchedExpTimePiVsPTRDPos->Sumw2() ;
599 if (fEnableAdvancedCheck)
600 fHlistPID->AddLast(hTOFmatchedExpTimePiVsPTRDPos) ;
603 TH2F* hTOFmatchedExpTimePiVsPNoTRDPos = new TH2F("hTOFmatchedExpTimePiVsPNoTRDPos", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (50 #leq#phi_{outerTPC}#leq 130 || 250 #leq#phi_{outerTPC}#leq 290); p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
604 hTOFmatchedExpTimePiVsPNoTRDPos->Sumw2() ;
605 if (fEnableAdvancedCheck)
606 fHlistPID->AddLast(hTOFmatchedExpTimePiVsPNoTRDPos) ;
609 TH2F* hTOFmatchedExpTimePiVsPTRDNeg = new TH2F("hTOFmatchedExpTimePiVsPTRDNeg", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (#phi_{outerTPC}#leq 30 || 150 #leq#phi_{outerTPC}#leq 230 || #phi_{outerTPC}#geq 310 ) ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5., nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
610 hTOFmatchedExpTimePiVsPTRDNeg->Sumw2() ;
611 if (fEnableAdvancedCheck)
612 fHlistPID->AddLast(hTOFmatchedExpTimePiVsPTRDNeg) ;
615 TH2F* hTOFmatchedExpTimePiVsPNoTRDNeg = new TH2F("hTOFmatchedExpTimePiVsPNoTRDNeg", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (50 #leq#phi_{outerTPC}#leq 130 || 250 #leq#phi_{outerTPC}#leq 290); p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
616 hTOFmatchedExpTimePiVsPNoTRDNeg->Sumw2() ;
617 if (fEnableAdvancedCheck)
618 fHlistPID->AddLast(hTOFmatchedExpTimePiVsPNoTRDNeg) ;
621 TH2F* hTOFmatchedExpTimeKaVsPTRDPos = new TH2F("hTOFmatchedExpTimeKaVsPTRDPos", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (#phi_{outerTPC}#leq 30 || 150 #leq#phi_{outerTPC}#leq 230 || #phi_{outerTPC}#geq 310 ) ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
622 hTOFmatchedExpTimeKaVsPTRDPos->Sumw2() ;
623 if (fEnableAdvancedCheck)
624 fHlistPID->AddLast(hTOFmatchedExpTimeKaVsPTRDPos) ;
627 TH2F* hTOFmatchedExpTimeKaVsPNoTRDPos = new TH2F("hTOFmatchedExpTimeKaVsPNoTRDPos", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (50 #leq#phi_{outerTPC}#leq 130 || 250 #leq#phi_{outerTPC}#leq 290); p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
628 hTOFmatchedExpTimeKaVsPNoTRDPos->Sumw2() ;
629 if (fEnableAdvancedCheck)
630 fHlistPID->AddLast(hTOFmatchedExpTimeKaVsPNoTRDPos) ;
633 TH2F* hTOFmatchedExpTimeKaVsPTRDNeg = new TH2F("hTOFmatchedExpTimeKaVsPTRDNeg", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (#phi_{outerTPC}#leq 30 || 150 #leq#phi_{outerTPC}#leq 230 || #phi_{outerTPC}#geq 310 ) ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
634 hTOFmatchedExpTimeKaVsPTRDNeg->Sumw2() ;
635 if (fEnableAdvancedCheck)
636 fHlistPID->AddLast(hTOFmatchedExpTimeKaVsPTRDNeg) ;
639 TH2F* hTOFmatchedExpTimeKaVsPNoTRDNeg = new TH2F("hTOFmatchedExpTimeKaVsPNoTRDNeg", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (50 #leq#phi_{outerTPC}#leq 130 || 250 #leq#phi_{outerTPC}#leq 290); p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
640 hTOFmatchedExpTimeKaVsPNoTRDNeg->Sumw2() ;
641 if (fEnableAdvancedCheck)
642 fHlistPID->AddLast(hTOFmatchedExpTimeKaVsPNoTRDNeg) ;
645 TH2F* hTOFmatchedExpTimeProVsPTRDPos = new TH2F("hTOFmatchedExpTimeProVsPTRDPos", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (#phi_{outerTPC}#leq 30 || 150 #leq#phi_{outerTPC}#leq 230 || #phi_{outerTPC}#geq 310 ) ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
646 hTOFmatchedExpTimeProVsPTRDPos->Sumw2() ;
647 if (fEnableAdvancedCheck)
648 fHlistPID->AddLast(hTOFmatchedExpTimeProVsPTRDPos) ;
651 TH2F* hTOFmatchedExpTimeProVsPNoTRDPos = new TH2F("hTOFmatchedExpTimeProVsPNoTRDPos", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (50 #leq#phi_{outerTPC}#leq 130 || 250 #leq#phi_{outerTPC}#leq 290); p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
652 hTOFmatchedExpTimeProVsPNoTRDPos->Sumw2() ;
653 if (fEnableAdvancedCheck)
654 fHlistPID->AddLast(hTOFmatchedExpTimeProVsPNoTRDPos) ;
657 TH2F* hTOFmatchedExpTimeProVsPTRDNeg = new TH2F("hTOFmatchedExpTimeProVsPTRDNeg", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (#phi_{outerTPC}#leq 30 || 150 #leq#phi_{outerTPC}#leq 230 || #phi_{outerTPC}#geq 310 ) ; p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
658 hTOFmatchedExpTimeProVsPTRDNeg->Sumw2() ;
659 if (fEnableAdvancedCheck)
660 fHlistPID->AddLast(hTOFmatchedExpTimeProVsPTRDNeg) ;
663 TH2F* hTOFmatchedExpTimeProVsPNoTRDNeg = new TH2F("hTOFmatchedExpTimeProVsPNoTRDNeg", "ESDs t_{TOF}-t_{p,exp} (from tracking) Vs P (50 #leq#phi_{outerTPC}#leq 130 || 250 #leq#phi_{outerTPC}#leq 290); p (GeV/c);t_{TOF}-t_{p,exp} [ps];Counts",500, 0.,5.,nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
664 hTOFmatchedExpTimeProVsPNoTRDNeg->Sumw2() ;
665 if (fEnableAdvancedCheck)
666 fHlistPID->AddLast(hTOFmatchedExpTimeProVsPNoTRDNeg) ;
668 //----------------------------------------------------------POSITIVE TRACKS
670 TH1F* hTOFmatchedESDtrkLengthPos = new TH1F("hTOFmatchedESDtrkLengthPos", "Matched positive ESDs tracks length; Track length [cm];Counts", 1600, -800., 800) ;
671 hTOFmatchedESDtrkLengthPos->Sumw2();
672 hTOFmatchedESDtrkLengthPos->SetLineColor(kRed);
673 hTOFmatchedESDtrkLengthPos->SetMarkerColor(kRed);
674 hTOFmatchedESDtrkLengthPos->SetFillColor(kRed);
675 hTOFmatchedESDtrkLengthPos->SetDrawOption("BAR");
676 if (fEnableAdvancedCheck)
677 fHpos->AddLast(hTOFmatchedESDtrkLengthPos);
679 TH1F* hTOFmatchedESDPPos = new TH1F("hTOFmatchedESDPPos", "TPC-TOF matched positive tracks momentum distribution (GeV/c); p (GeV/c);tracks", 500,0.,5.) ;
680 hTOFmatchedESDPPos->Sumw2() ;
681 hTOFmatchedESDPPos->SetLineColor(kRed);
682 hTOFmatchedESDPPos->SetMarkerStyle(20);
683 hTOFmatchedESDPPos->SetMarkerSize(0.7);
684 hTOFmatchedESDPPos->SetMarkerColor(kRed);
685 if (fEnableAdvancedCheck)
686 fHpos->AddLast(hTOFmatchedESDPPos) ;
688 TH1F* hTOFmatchedESDPtPos = new TH1F("hTOFmatchedESDPtPos", "TPC-TOF positive matched tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500,0.,5.) ;
689 hTOFmatchedESDPtPos->Sumw2() ;
690 hTOFmatchedESDPtPos->SetLineColor(kRed);
691 hTOFmatchedESDPtPos->SetMarkerStyle(21);
692 hTOFmatchedESDPtPos->SetMarkerSize(0.7);
693 hTOFmatchedESDPtPos->SetMarkerColor(kRed);
694 if (fEnableAdvancedCheck)
695 fHpos->AddLast(hTOFmatchedESDPtPos) ;
698 TH1F* hTOFmatchedESDetaPos = new TH1F("hTOFmatchedESDetaPos", "Matched positive ESD tracks #eta (p_{T} #geq 0.5 GeV/c); eta;Counts", 200, -1., 1.) ;
699 hTOFmatchedESDetaPos->Sumw2();
700 hTOFmatchedESDetaPos->SetLineColor(kRed);
701 if (fEnableAdvancedCheck)
702 fHpos->AddLast(hTOFmatchedESDetaPos) ;
704 TH1F* hTOFmatchedESDphiPos = new TH1F("hTOFmatchedESDphiPos", "Matched Positive ESD tracks #phi; #phi (deg);Counts", 72, 0., 360.) ;
705 hTOFmatchedESDphiPos->Sumw2();
706 hTOFmatchedESDphiPos->SetLineColor(kRed);
707 if (fEnableAdvancedCheck)
708 fHpos->AddLast(hTOFmatchedESDphiPos) ;
711 TH1F* hESDmatchedTrackPtPosTRDout = new TH1F("hESDmatchedTrackPtPosTRDout", "ESDs Pos matched tracks p_{T} with kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
712 hESDmatchedTrackPtPosTRDout->Sumw2();
713 hESDmatchedTrackPtPosTRDout->SetLineWidth(1);
714 hESDmatchedTrackPtPosTRDout->SetMarkerStyle(20);
715 hESDmatchedTrackPtPosTRDout->SetMarkerSize(0.7);
716 hESDmatchedTrackPtPosTRDout->SetLineColor(kRed);
717 hESDmatchedTrackPtPosTRDout->SetMarkerColor(kRed);
718 if (fEnableAdvancedCheck)
719 fHpos->AddLast(hESDmatchedTrackPtPosTRDout);
722 TH1F* hESDmatchedTrackPtPosNoTRDout = new TH1F("hESDmatchedTrackPtPosNoTRDout", "ESDs Pos matched tracks p_{T} with !kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
723 hESDmatchedTrackPtPosNoTRDout->Sumw2();
724 hESDmatchedTrackPtPosNoTRDout->SetLineWidth(1);
725 hESDmatchedTrackPtPosNoTRDout->SetMarkerStyle(25);
726 hESDmatchedTrackPtPosNoTRDout->SetMarkerSize(0.7);
727 hESDmatchedTrackPtPosNoTRDout->SetLineColor(kRed);
728 hESDmatchedTrackPtPosNoTRDout->SetMarkerColor(kRed);
729 if (fEnableAdvancedCheck)
730 fHpos->AddLast(hESDmatchedTrackPtPosNoTRDout);
733 TH1F* hESDprimaryTrackPPos = new TH1F("hESDprimaryTrackPPos", "All Pos ESDs tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0., 5.0) ;
734 hESDprimaryTrackPPos->Sumw2();
735 hESDprimaryTrackPPos->SetLineWidth(1);
736 hESDprimaryTrackPPos->SetMarkerStyle(24);
737 hESDprimaryTrackPPos->SetMarkerSize(0.7);
738 hESDprimaryTrackPPos->SetMarkerColor(kRed);
739 hESDprimaryTrackPPos->SetLineColor(kRed);
740 if (fEnableAdvancedCheck)
741 fHpos->AddLast(hESDprimaryTrackPPos);
743 TH1F* hESDprimaryTrackPtPos = new TH1F("hESDprimaryTrackPtPos", "ESDs Pos primary tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
744 hESDprimaryTrackPtPos->Sumw2();
745 hESDprimaryTrackPtPos->SetLineWidth(1);
746 hESDprimaryTrackPtPos->SetMarkerStyle(25);
747 hESDprimaryTrackPtPos->SetMarkerSize(0.7);
748 hESDprimaryTrackPtPos->SetLineColor(kRed);
749 hESDprimaryTrackPtPos->SetMarkerColor(kRed);
750 if (fEnableAdvancedCheck)
751 fHpos->AddLast(hESDprimaryTrackPtPos);
753 TH1F* hTOFprimaryESDetaPos = new TH1F("hTOFprimaryESDetaPos", "Primary ESD Pos tracks #eta (p_{T} #geq 0.5 GeV/c); #eta;Counts", 200, -1., 1.) ;
754 hTOFprimaryESDetaPos->Sumw2();
755 hTOFprimaryESDetaPos->SetLineColor(kRed);
756 if (fEnableAdvancedCheck)
757 fHpos->AddLast(hTOFprimaryESDetaPos) ;
759 TH1F* hTOFprimaryESDphiPos = new TH1F("hTOFprimaryESDphiPos", "Primary ESD Pos tracks #phi;#phi (deg);Counts", 72, 0., 360.) ;
760 hTOFprimaryESDphiPos->Sumw2();
761 hTOFprimaryESDphiPos->SetLineColor(kRed);
762 if (fEnableAdvancedCheck)
763 fHpos->AddLast(hTOFprimaryESDphiPos) ;
766 TH1F* hESDprimaryTrackPtPosTRDout = new TH1F("hESDprimaryTrackPtPosTRDout", "ESDs Pos primary tracks p_{T} with kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
767 hESDprimaryTrackPtPosTRDout->Sumw2();
768 hESDprimaryTrackPtPosTRDout->SetLineWidth(1);
769 hESDprimaryTrackPtPosTRDout->SetMarkerStyle(20);
770 hESDprimaryTrackPtPosTRDout->SetMarkerSize(0.7);
771 hESDprimaryTrackPtPosTRDout->SetLineColor(kRed);
772 hESDprimaryTrackPtPosTRDout->SetMarkerColor(kRed);
773 if (fEnableAdvancedCheck)
774 fHpos->AddLast(hESDprimaryTrackPtPosTRDout);
777 TH1F* hESDprimaryTrackPtPosNoTRDout = new TH1F("hESDprimaryTrackPtPosNoTRDout", "ESDs Pos primary tracks p_{T} with !kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
778 hESDprimaryTrackPtPosNoTRDout->Sumw2();
779 hESDprimaryTrackPtPosNoTRDout->SetLineWidth(1);
780 hESDprimaryTrackPtPosNoTRDout->SetMarkerStyle(25);
781 hESDprimaryTrackPtPosNoTRDout->SetMarkerSize(0.7);
782 hESDprimaryTrackPtPosNoTRDout->SetLineColor(kRed);
783 hESDprimaryTrackPtPosNoTRDout->SetMarkerColor(kRed);
784 if (fEnableAdvancedCheck)
785 fHpos->AddLast(hESDprimaryTrackPtPosNoTRDout);
788 TH1F* hESDprimaryTrackEtaPosTRDout = new TH1F("hESDprimaryTrackEtaPosTRDout", "ESDs Pos primary tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
789 hESDprimaryTrackEtaPosTRDout->Sumw2();
790 hESDprimaryTrackEtaPosTRDout->SetLineWidth(1);
791 hESDprimaryTrackEtaPosTRDout->SetMarkerStyle(20);
792 hESDprimaryTrackEtaPosTRDout->SetMarkerSize(0.7);
793 hESDprimaryTrackEtaPosTRDout->SetLineColor(kBlue);
794 hESDprimaryTrackEtaPosTRDout->SetMarkerColor(kBlue);
795 if (fEnableAdvancedCheck)
796 fHpos->AddLast(hESDprimaryTrackEtaPosTRDout);
799 TH1F* hESDprimaryTrackEtaPosNoTRDout = new TH1F("hESDprimaryTrackEtaPosNoTRDout", "ESDs Pos primary tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
800 hESDprimaryTrackEtaPosNoTRDout->Sumw2();
801 hESDprimaryTrackEtaPosNoTRDout->SetLineWidth(1);
802 hESDprimaryTrackEtaPosNoTRDout->SetMarkerStyle(25);
803 hESDprimaryTrackEtaPosNoTRDout->SetMarkerSize(0.7);
804 hESDprimaryTrackEtaPosNoTRDout->SetLineColor(kBlue);
805 hESDprimaryTrackEtaPosNoTRDout->SetMarkerColor(kBlue);
806 if (fEnableAdvancedCheck)
807 fHpos->AddLast(hESDprimaryTrackEtaPosNoTRDout);
810 TH1F* hESDprimaryTrackPhiPosTRDout = new TH1F("hESDprimaryTrackPhiPosTRDout", "ESDs Pos primary tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
811 hESDprimaryTrackPhiPosTRDout->Sumw2();
812 hESDprimaryTrackPhiPosTRDout->SetLineWidth(1);
813 hESDprimaryTrackPhiPosTRDout->SetMarkerStyle(20);
814 hESDprimaryTrackPhiPosTRDout->SetMarkerSize(0.7);
815 hESDprimaryTrackPhiPosTRDout->SetLineColor(kBlue);
816 hESDprimaryTrackPhiPosTRDout->SetMarkerColor(kBlue);
817 if (fEnableAdvancedCheck)
818 fHpos->AddLast(hESDprimaryTrackPhiPosTRDout);
821 TH1F* hESDprimaryTrackPhiPosNoTRDout = new TH1F("hESDprimaryTrackPhiPosNoTRDout", "ESDs Pos primary tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
822 hESDprimaryTrackPhiPosNoTRDout->Sumw2();
823 hESDprimaryTrackPhiPosNoTRDout->SetLineWidth(1);
824 hESDprimaryTrackPhiPosNoTRDout->SetMarkerStyle(25);
825 hESDprimaryTrackPhiPosNoTRDout->SetMarkerSize(0.7);
826 hESDprimaryTrackPhiPosNoTRDout->SetLineColor(kBlue);
827 hESDprimaryTrackPhiPosNoTRDout->SetMarkerColor(kBlue);
828 if (fEnableAdvancedCheck)
829 fHpos->AddLast(hESDprimaryTrackPhiPosNoTRDout);
832 TH2F* hTOFmatchedExpTimeProVsPhiPos = new TH2F("hTOFmatchedExpTimeProVsPhiPos", "ESDs t_{TOF}-t_{p,exp} vs #phi at TOF (r=378.cm) (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., 500, -5000., 5000. ) ;
833 hTOFmatchedExpTimeProVsPhiPos->Sumw2() ;
834 if (fEnableAdvancedCheck)
835 fHpos->AddLast(hTOFmatchedExpTimeProVsPhiPos) ;
838 TH2F* hTOFmatchedExpTimeProVsPhiVertexPos = new TH2F("hTOFmatchedExpTimeProVsPhiVertexPos", "ESDs t_{TOF}-t_{p,exp} vs #phi at vtx (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
839 hTOFmatchedExpTimeProVsPhiVertexPos->Sumw2() ;
840 if (fEnableAdvancedCheck)
841 fHpos->AddLast(hTOFmatchedExpTimeProVsPhiVertexPos) ;
844 TH2F* hTOFmatchedExpTimeProVsPhiTPCPos = new TH2F("hTOFmatchedExpTimeProVsPhiTPCPos", "ESDs t_{TOF}-t_{p,exp} vs #phi at outer TPC (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
845 hTOFmatchedExpTimeProVsPhiTPCPos->Sumw2() ;
846 if (fEnableAdvancedCheck)
847 fHpos->AddLast(hTOFmatchedExpTimeProVsPhiTPCPos) ;
850 TH1F* hESDmatchedTrackEtaPosTRDout = new TH1F("hESDmatchedTrackEtaPosTRDout", "ESDs Pos matched tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
851 hESDmatchedTrackEtaPosTRDout->Sumw2();
852 hESDmatchedTrackEtaPosTRDout->SetLineWidth(1);
853 hESDmatchedTrackEtaPosTRDout->SetMarkerStyle(20);
854 hESDmatchedTrackEtaPosTRDout->SetMarkerSize(0.7);
855 hESDmatchedTrackEtaPosTRDout->SetLineColor(kBlue);
856 hESDmatchedTrackEtaPosTRDout->SetMarkerColor(kBlue);
857 if (fEnableAdvancedCheck)
858 fHpos->AddLast(hESDmatchedTrackEtaPosTRDout);
861 TH1F* hESDmatchedTrackEtaPosNoTRDout = new TH1F("hESDmatchedTrackEtaPosNoTRDout", "ESDs Pos matched tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
862 hESDmatchedTrackEtaPosNoTRDout->Sumw2();
863 hESDmatchedTrackEtaPosNoTRDout->SetLineWidth(1);
864 hESDmatchedTrackEtaPosNoTRDout->SetMarkerStyle(25);
865 hESDmatchedTrackEtaPosNoTRDout->SetMarkerSize(0.7);
866 hESDmatchedTrackEtaPosNoTRDout->SetLineColor(kBlue);
867 hESDmatchedTrackEtaPosNoTRDout->SetMarkerColor(kBlue);
868 if (fEnableAdvancedCheck)
869 fHpos->AddLast(hESDmatchedTrackEtaPosNoTRDout);
872 TH1F* hESDmatchedTrackPhiPosTRDout = new TH1F("hESDmatchedTrackPhiPosTRDout", "ESDs Pos matched tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
873 hESDmatchedTrackPhiPosTRDout->Sumw2();
874 hESDmatchedTrackPhiPosTRDout->SetLineWidth(1);
875 hESDmatchedTrackPhiPosTRDout->SetMarkerStyle(20);
876 hESDmatchedTrackPhiPosTRDout->SetMarkerSize(0.7);
877 hESDmatchedTrackPhiPosTRDout->SetLineColor(kBlue);
878 hESDmatchedTrackPhiPosTRDout->SetMarkerColor(kBlue);
879 if (fEnableAdvancedCheck)
880 fHpos->AddLast(hESDmatchedTrackPhiPosTRDout);
883 TH1F* hESDmatchedTrackPhiPosNoTRDout = new TH1F("hESDmatchedTrackPhiPosNoTRDout", "ESDs Pos matched tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
884 hESDmatchedTrackPhiPosNoTRDout->Sumw2();
885 hESDmatchedTrackPhiPosNoTRDout->SetLineWidth(1);
886 hESDmatchedTrackPhiPosNoTRDout->SetMarkerStyle(25);
887 hESDmatchedTrackPhiPosNoTRDout->SetMarkerSize(0.7);
888 hESDmatchedTrackPhiPosNoTRDout->SetLineColor(kBlue);
889 hESDmatchedTrackPhiPosNoTRDout->SetMarkerColor(kBlue);
890 if (fEnableAdvancedCheck)
891 fHpos->AddLast(hESDmatchedTrackPhiPosNoTRDout);
894 TH2F* hTOFmatchedExpTimePiVsPhiTPCPos = new TH2F("hTOFmatchedExpTimePiVsPhiTPCPos", "ESDs t_{TOF}-t_{#pi,exp} vs #phi at outer TPC (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
895 hTOFmatchedExpTimePiVsPhiTPCPos->Sumw2() ;
896 if (fEnableAdvancedCheck)
897 fHpos->AddLast(hTOFmatchedExpTimePiVsPhiTPCPos) ;
900 TH2F* hTOFmatchedExpTimeKaVsPhiTPCPos = new TH2F("hTOFmatchedExpTimeKaVsPhiTPCPos", "ESDs t_{TOF}-t_{K,exp} vs #phi at outer TPC (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
901 hTOFmatchedExpTimeKaVsPhiTPCPos->Sumw2() ;
902 if (fEnableAdvancedCheck)
903 fHpos->AddLast(hTOFmatchedExpTimeKaVsPhiTPCPos) ;
905 //----------------------------------------------------------NEGATIVE TRACKS
907 TH1F* hTOFmatchedESDtrkLengthNeg = new TH1F("hTOFmatchedESDtrkLengthNeg", "Matched positive ESDs tracks length; Track length [cm];Counts", 1600, -800., 800) ;
908 hTOFmatchedESDtrkLengthNeg->Sumw2();
909 hTOFmatchedESDtrkLengthNeg->SetLineColor(kBlue);
910 hTOFmatchedESDtrkLengthNeg->SetMarkerColor(kBlue);
911 hTOFmatchedESDtrkLengthNeg->SetFillColor(kBlue);
912 hTOFmatchedESDtrkLengthNeg->SetDrawOption("BAR");
913 if (fEnableAdvancedCheck)
914 fHneg->AddLast(hTOFmatchedESDtrkLengthNeg);
916 TH1F* hTOFmatchedESDPNeg = new TH1F("hTOFmatchedESDPNeg", "TPC-TOF matched positive tracks momentum distribution (GeV/c); p (GeV/c);tracks", 500,0.,5.) ;
917 hTOFmatchedESDPNeg->Sumw2() ;
918 hTOFmatchedESDPNeg->SetLineColor(kBlue);
919 hTOFmatchedESDPNeg->SetMarkerStyle(20);
920 hTOFmatchedESDPNeg->SetMarkerSize(0.7);
921 hTOFmatchedESDPNeg->SetMarkerColor(kBlue);
922 if (fEnableAdvancedCheck)
923 fHneg->AddLast(hTOFmatchedESDPNeg) ;
925 TH1F* hTOFmatchedESDPtNeg = new TH1F("hTOFmatchedESDPtNeg", "TPC-TOF positive matched tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500,0.,5.) ;
926 hTOFmatchedESDPtNeg->Sumw2() ;
927 hTOFmatchedESDPtNeg->SetLineColor(kBlue);
928 hTOFmatchedESDPtNeg->SetMarkerStyle(21);
929 hTOFmatchedESDPtNeg->SetMarkerSize(0.7);
930 hTOFmatchedESDPtNeg->SetMarkerColor(kBlue);
931 if (fEnableAdvancedCheck)
932 fHneg->AddLast(hTOFmatchedESDPtNeg) ;
935 TH1F* hTOFmatchedESDetaNeg = new TH1F("hTOFmatchedESDetaNeg", "Matched positive ESD tracks #eta (p_{T} #geq 0.5 GeV/c); eta;Counts", 200, -1., 1.) ;
936 hTOFmatchedESDetaNeg->Sumw2();
937 hTOFmatchedESDetaNeg->SetLineColor(kBlue);
938 if (fEnableAdvancedCheck)
939 fHneg->AddLast(hTOFmatchedESDetaNeg) ;
941 TH1F* hTOFmatchedESDphiNeg = new TH1F("hTOFmatchedESDphiNeg", "Matched Negitive ESD tracks #phi; #phi (deg);Counts", 72, 0., 360.) ;
942 hTOFmatchedESDphiNeg->Sumw2();
943 hTOFmatchedESDphiNeg->SetLineColor(kBlue);
944 if (fEnableAdvancedCheck)
945 fHneg->AddLast(hTOFmatchedESDphiNeg) ;
948 TH1F* hESDmatchedTrackPtNegTRDout = new TH1F("hESDmatchedTrackPtNegTRDout", "ESDs Neg matched tracks p_{T} with kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
949 hESDmatchedTrackPtNegTRDout->Sumw2();
950 hESDmatchedTrackPtNegTRDout->SetLineWidth(1);
951 hESDmatchedTrackPtNegTRDout->SetMarkerStyle(20);
952 hESDmatchedTrackPtNegTRDout->SetMarkerSize(0.7);
953 hESDmatchedTrackPtNegTRDout->SetLineColor(kBlue);
954 hESDmatchedTrackPtNegTRDout->SetMarkerColor(kBlue);
955 if (fEnableAdvancedCheck)
956 fHneg->AddLast(hESDmatchedTrackPtNegTRDout);
959 TH1F* hESDmatchedTrackPtNegNoTRDout = new TH1F("hESDmatchedTrackPtNegNoTRDout", "ESDs Neg matched tracks p_{T} with !kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
960 hESDmatchedTrackPtNegNoTRDout->Sumw2();
961 hESDmatchedTrackPtNegNoTRDout->SetLineWidth(1);
962 hESDmatchedTrackPtNegNoTRDout->SetMarkerStyle(25);
963 hESDmatchedTrackPtNegNoTRDout->SetMarkerSize(0.7);
964 hESDmatchedTrackPtNegNoTRDout->SetLineColor(kBlue);
965 hESDmatchedTrackPtNegNoTRDout->SetMarkerColor(kBlue);
966 if (fEnableAdvancedCheck)
967 fHneg->AddLast(hESDmatchedTrackPtNegNoTRDout);
970 TH1F* hESDprimaryTrackPNeg = new TH1F("hESDprimaryTrackPNeg", "All Neg ESDs tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0., 5.0) ;
971 hESDprimaryTrackPNeg->Sumw2();
972 hESDprimaryTrackPNeg->SetLineWidth(1);
973 hESDprimaryTrackPNeg->SetMarkerStyle(24);
974 hESDprimaryTrackPNeg->SetMarkerSize(0.7);
975 hESDprimaryTrackPNeg->SetMarkerColor(kBlue);
976 hESDprimaryTrackPNeg->SetLineColor(kBlue);
977 if (fEnableAdvancedCheck)
978 fHneg->AddLast(hESDprimaryTrackPNeg);
980 TH1F* hESDprimaryTrackPtNeg = new TH1F("hESDprimaryTrackPtNeg", "ESDs Neg primary tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
981 hESDprimaryTrackPtNeg->Sumw2();
982 hESDprimaryTrackPtNeg->SetLineWidth(1);
983 hESDprimaryTrackPtNeg->SetMarkerStyle(25);
984 hESDprimaryTrackPtNeg->SetMarkerSize(0.7);
985 hESDprimaryTrackPtNeg->SetLineColor(kBlue);
986 hESDprimaryTrackPtNeg->SetMarkerColor(kBlue);
987 if (fEnableAdvancedCheck)
988 fHneg->AddLast(hESDprimaryTrackPtNeg);
990 TH1F* hTOFprimaryESDetaNeg = new TH1F("hTOFprimaryESDetaNeg", "Primary ESD Neg tracks #eta (p_{T} #geq 0.5 GeV/c); #eta;Counts", 200, -1., 1.) ;
991 hTOFprimaryESDetaNeg->Sumw2();
992 hTOFprimaryESDetaNeg->SetLineColor(kBlue);
993 if (fEnableAdvancedCheck)
994 fHneg->AddLast(hTOFprimaryESDetaNeg) ;
996 TH1F* hTOFprimaryESDphiNeg = new TH1F("hTOFprimaryESDphiNeg", "Primary ESD Neg tracks #phi;#phi (deg);Counts", 72, 0., 360.) ;
997 hTOFprimaryESDphiNeg->Sumw2();
998 hTOFprimaryESDphiNeg->SetLineColor(kBlue);
999 if (fEnableAdvancedCheck)
1000 fHneg->AddLast(hTOFprimaryESDphiNeg) ;
1003 TH1F* hESDprimaryTrackPtNegTRDout = new TH1F("hESDprimaryTrackPtNegTRDout", "ESDs Neg primary tracks p_{T} with kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
1004 hESDprimaryTrackPtNegTRDout->Sumw2();
1005 hESDprimaryTrackPtNegTRDout->SetLineWidth(1);
1006 hESDprimaryTrackPtNegTRDout->SetMarkerStyle(20);
1007 hESDprimaryTrackPtNegTRDout->SetMarkerSize(0.7);
1008 hESDprimaryTrackPtNegTRDout->SetLineColor(kBlue);
1009 hESDprimaryTrackPtNegTRDout->SetMarkerColor(kBlue);
1010 if (fEnableAdvancedCheck)
1011 fHneg->AddLast(hESDprimaryTrackPtNegTRDout);
1014 TH1F* hESDprimaryTrackPtNegNoTRDout = new TH1F("hESDprimaryTrackPtNegNoTRDout", "ESDs Neg primary tracks p_{T} with !kTRDout distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
1015 hESDprimaryTrackPtNegNoTRDout->Sumw2();
1016 hESDprimaryTrackPtNegNoTRDout->SetLineWidth(1);
1017 hESDprimaryTrackPtNegNoTRDout->SetMarkerStyle(25);
1018 hESDprimaryTrackPtNegNoTRDout->SetMarkerSize(0.7);
1019 hESDprimaryTrackPtNegNoTRDout->SetLineColor(kBlue);
1020 hESDprimaryTrackPtNegNoTRDout->SetMarkerColor(kBlue);
1021 if (fEnableAdvancedCheck)
1022 fHneg->AddLast(hESDprimaryTrackPtNegNoTRDout);
1025 TH1F* hESDprimaryTrackEtaNegTRDout = new TH1F("hESDprimaryTrackEtaNegTRDout", "ESDs Neg primary tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
1026 hESDprimaryTrackEtaNegTRDout->Sumw2();
1027 hESDprimaryTrackEtaNegTRDout->SetLineWidth(1);
1028 hESDprimaryTrackEtaNegTRDout->SetMarkerStyle(20);
1029 hESDprimaryTrackEtaNegTRDout->SetMarkerSize(0.7);
1030 hESDprimaryTrackEtaNegTRDout->SetLineColor(kBlue);
1031 hESDprimaryTrackEtaNegTRDout->SetMarkerColor(kBlue);
1032 if (fEnableAdvancedCheck)
1033 fHneg->AddLast(hESDprimaryTrackEtaNegTRDout);
1036 TH1F* hESDprimaryTrackEtaNegNoTRDout = new TH1F("hESDprimaryTrackEtaNegNoTRDout", "ESDs Neg primary tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
1037 hESDprimaryTrackEtaNegNoTRDout->Sumw2();
1038 hESDprimaryTrackEtaNegNoTRDout->SetLineWidth(1);
1039 hESDprimaryTrackEtaNegNoTRDout->SetMarkerStyle(25);
1040 hESDprimaryTrackEtaNegNoTRDout->SetMarkerSize(0.7);
1041 hESDprimaryTrackEtaNegNoTRDout->SetLineColor(kBlue);
1042 hESDprimaryTrackEtaNegNoTRDout->SetMarkerColor(kBlue);
1043 if (fEnableAdvancedCheck)
1044 fHneg->AddLast(hESDprimaryTrackEtaNegNoTRDout);
1047 TH1F* hESDprimaryTrackPhiNegTRDout = new TH1F("hESDprimaryTrackPhiNegTRDout", "ESDs Neg primary tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1048 hESDprimaryTrackPhiNegTRDout->Sumw2();
1049 hESDprimaryTrackPhiNegTRDout->SetLineWidth(1);
1050 hESDprimaryTrackPhiNegTRDout->SetMarkerStyle(20);
1051 hESDprimaryTrackPhiNegTRDout->SetMarkerSize(0.7);
1052 hESDprimaryTrackPhiNegTRDout->SetLineColor(kBlue);
1053 hESDprimaryTrackPhiNegTRDout->SetMarkerColor(kBlue);
1054 if (fEnableAdvancedCheck)
1055 fHneg->AddLast(hESDprimaryTrackPhiNegTRDout);
1058 TH1F* hESDprimaryTrackPhiNegNoTRDout = new TH1F("hESDprimaryTrackPhiNegNoTRDout", "ESDs Neg primary tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1059 hESDprimaryTrackPhiNegNoTRDout->Sumw2();
1060 hESDprimaryTrackPhiNegNoTRDout->SetLineWidth(1);
1061 hESDprimaryTrackPhiNegNoTRDout->SetMarkerStyle(25);
1062 hESDprimaryTrackPhiNegNoTRDout->SetMarkerSize(0.7);
1063 hESDprimaryTrackPhiNegNoTRDout->SetLineColor(kBlue);
1064 hESDprimaryTrackPhiNegNoTRDout->SetMarkerColor(kBlue);
1065 if (fEnableAdvancedCheck)
1066 fHneg->AddLast(hESDprimaryTrackPhiNegNoTRDout);
1069 TH2F* hTOFmatchedExpTimeProVsPhiNeg = new TH2F("hTOFmatchedExpTimeProVsPhiNeg", "ESDs t_{TOF}-t_{p,exp} vs #phi at TOF (r=378.cm) (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
1070 hTOFmatchedExpTimeProVsPhiNeg->Sumw2() ;
1071 if (fEnableAdvancedCheck)
1072 fHneg->AddLast(hTOFmatchedExpTimeProVsPhiNeg) ;
1075 TH2F* hTOFmatchedExpTimeProVsPhiVertexNeg = new TH2F("hTOFmatchedExpTimeProVsPhiVertexNeg", "ESDs t_{TOF}-t_{p,exp} vs #phi at vtx (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
1076 hTOFmatchedExpTimeProVsPhiVertexNeg->Sumw2() ;
1077 if (fEnableAdvancedCheck)
1078 fHneg->AddLast(hTOFmatchedExpTimeProVsPhiVertexNeg) ;
1081 TH2F* hTOFmatchedExpTimeProVsPhiTPCNeg = new TH2F("hTOFmatchedExpTimeProVsPhiTPCNeg", "ESDs t_{TOF}-t_{p,exp} vs #phi at outer TPC (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
1082 hTOFmatchedExpTimeProVsPhiTPCNeg->Sumw2() ;
1083 if (fEnableAdvancedCheck)
1084 fHneg->AddLast(hTOFmatchedExpTimeProVsPhiTPCNeg) ;
1088 TH1F* hESDmatchedTrackEtaNegTRDout = new TH1F("hESDmatchedTrackEtaNegTRDout", "ESDs Neg matched tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
1089 hESDmatchedTrackEtaNegTRDout->Sumw2();
1090 hESDmatchedTrackEtaNegTRDout->SetLineWidth(1);
1091 hESDmatchedTrackEtaNegTRDout->SetMarkerStyle(20);
1092 hESDmatchedTrackEtaNegTRDout->SetMarkerSize(0.7);
1093 hESDmatchedTrackEtaNegTRDout->SetLineColor(kBlue);
1094 hESDmatchedTrackEtaNegTRDout->SetMarkerColor(kBlue);
1095 if (fEnableAdvancedCheck)
1096 fHneg->AddLast(hESDmatchedTrackEtaNegTRDout);
1099 TH1F* hESDmatchedTrackEtaNegNoTRDout = new TH1F("hESDmatchedTrackEtaNegNoTRDout", "ESDs Neg matched tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
1100 hESDmatchedTrackEtaNegNoTRDout->Sumw2();
1101 hESDmatchedTrackEtaNegNoTRDout->SetLineWidth(1);
1102 hESDmatchedTrackEtaNegNoTRDout->SetMarkerStyle(25);
1103 hESDmatchedTrackEtaNegNoTRDout->SetMarkerSize(0.7);
1104 hESDmatchedTrackEtaNegNoTRDout->SetLineColor(kBlue);
1105 hESDmatchedTrackEtaNegNoTRDout->SetMarkerColor(kBlue);
1106 if (fEnableAdvancedCheck)
1107 fHneg->AddLast(hESDmatchedTrackEtaNegNoTRDout);
1110 TH1F* hESDmatchedTrackPhiNegTRDout = new TH1F("hESDmatchedTrackPhiNegTRDout", "ESDs Neg matched tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1111 hESDmatchedTrackPhiNegTRDout->Sumw2();
1112 hESDmatchedTrackPhiNegTRDout->SetLineWidth(1);
1113 hESDmatchedTrackPhiNegTRDout->SetMarkerStyle(20);
1114 hESDmatchedTrackPhiNegTRDout->SetMarkerSize(0.7);
1115 hESDmatchedTrackPhiNegTRDout->SetLineColor(kBlue);
1116 hESDmatchedTrackPhiNegTRDout->SetMarkerColor(kBlue);
1117 if (fEnableAdvancedCheck)
1118 fHneg->AddLast(hESDmatchedTrackPhiNegTRDout);
1121 TH1F* hESDmatchedTrackPhiNegNoTRDout = new TH1F("hESDmatchedTrackPhiNegNoTRDout", "ESDs Neg matched tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1122 hESDmatchedTrackPhiNegNoTRDout->Sumw2();
1123 hESDmatchedTrackPhiNegNoTRDout->SetLineWidth(1);
1124 hESDmatchedTrackPhiNegNoTRDout->SetMarkerStyle(25);
1125 hESDmatchedTrackPhiNegNoTRDout->SetMarkerSize(0.7);
1126 hESDmatchedTrackPhiNegNoTRDout->SetLineColor(kBlue);
1127 hESDmatchedTrackPhiNegNoTRDout->SetMarkerColor(kBlue);
1128 if (fEnableAdvancedCheck)
1129 fHneg->AddLast(hESDmatchedTrackPhiNegNoTRDout);
1132 TH2F* hTOFmatchedExpTimePiVsPhiTPCNeg = new TH2F("hTOFmatchedExpTimePiVsPhiTPCNeg", "ESDs t_{TOF}-t_{#pi,exp} vs #phi at outer TPC (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
1133 hTOFmatchedExpTimePiVsPhiTPCNeg->Sumw2() ;
1134 if (fEnableAdvancedCheck)
1135 fHneg->AddLast(hTOFmatchedExpTimePiVsPhiTPCNeg) ;
1138 TH2F* hTOFmatchedExpTimeKaVsPhiTPCNeg = new TH2F("hTOFmatchedExpTimeKaVsPhiTPCNeg", "ESDs t_{TOF}-t_{K,exp} vs #phi at outer TPC (p_{T}<1GeV/c);#phi (deg); t_{TOF}-t_{p,exp} [ps];Counts",72, 0.,360., nExpTimeSmallBins, fExpTimeSmallRangeMin, fExpTimeSmallRangeMax) ;
1139 hTOFmatchedExpTimeKaVsPhiTPCNeg->Sumw2() ;
1140 if (fEnableAdvancedCheck)
1141 fHneg->AddLast(hTOFmatchedExpTimeKaVsPhiTPCNeg) ;
1143 PostData(1, fHlist);
1144 PostData(2, fHlistTimeZero);
1145 PostData(3, fHlistPID);
1149 //________________________________________________________________________
1150 void AliAnalysisTaskTOFqa::UserExec(Option_t *)
1152 /* Main - executed for each event.
1153 It extracts event information and track information after selecting
1154 primary tracks via standard cuts. */
1156 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
1158 Printf("ERROR: Could not get ESDInputHandler");
1161 fESD = (AliESDEvent*) esdH->GetEvent();
1165 Printf("ERROR: fESD not available");
1169 /* info from V0 detector QA */
1170 AliESDVZERO * vzero = fESD->GetVZEROData();
1171 Float_t V0Atime = vzero->GetV0ATime();
1172 Float_t V0Ctime = vzero->GetV0CTime();
1173 ((TH2F*)fHlistTimeZero->At(14))->Fill((V0Atime-V0Ctime)*0.5,(V0Atime+V0Ctime)*0.5);
1176 /* info from T0 detector QA */
1177 for (Int_t j=0;j<3;j++){
1178 fT0[j]= (Float_t) fESD->GetT0TOF(j);//ps
1179 if (fT0[j]>90000.) fT0[j]=99999.;//fix old default values to the new one
1181 Float_t t0cut = 90000.;
1182 //Float_t t0cut =3 * t0spread; //use this cut to check t0 used in tof response
1183 // if(t0cut < 500) t0cut = 500;
1185 if(TMath::Abs(fT0[1]) < t0cut && TMath::Abs(fT0[2]) < t0cut ) {
1186 //&& TMath::Abs(fT0[2]-fT0[1]) < 500) //add this condition to check t0 used in tof response
1187 ((TH1F*)fHlistTimeZero->At(3))->Fill((fT0[2]-fT0[1])*0.5);
1188 ((TH1F*)fHlistTimeZero->At(0))->Fill(fT0[0]);
1189 ((TH2F*)fHlistTimeZero->At(13))->Fill((fT0[2]-fT0[1])*0.5,(fT0[2]+fT0[1])*0.5);
1192 if(TMath::Abs(fT0[1]) < t0cut){
1193 ((TH1F*)fHlistTimeZero->At(1))->Fill(fT0[1]);
1195 if(TMath::Abs(fT0[2]) < t0cut){
1196 ((TH1F*)fHlistTimeZero->At(2))->Fill(fT0[2]);
1199 /* event timeZero QA via AliESDpid::SetTOFResponse() */
1200 Double_t timeZero[4]={99999.,99999.,99999.,99999.};
1201 Double_t timeZeroRes[4]={99999.,99999.,99999.,99999.};
1203 for (Int_t j=0;j<4;j++){
1204 fESDpid->SetTOFResponse(fESD, (AliESDpid::EStartTimeType_t) j);//(fill_t0, tof_t0, t0_t0, best_t0)
1205 timeZero[j]=fESDpid->GetTOFResponse().GetStartTime(10.); //timeZero for bin pT>10GeV/c
1206 timeZeroRes[j]=fESDpid->GetTOFResponse().GetStartTimeRes(10.); //timeZero for bin pT>10GeV/c
1207 ((TH1D*)fHlistTimeZero->At(4+j))->Fill(timeZero[j]);
1208 ((TH1D*)fHlistTimeZero->At(8+j))->Fill(timeZeroRes[j]);
1211 //re-set response tof_t0 for all other checks
1212 fESDpid->SetTOFResponse(fESD,AliESDpid::kTOF_T0);//(fill_t0, tof_t0, t0_t0, best_t0)
1214 /* loop over ESD tracks */
1216 // fNPrimaryTracks=0;
1218 for (Int_t iTracks = 0; iTracks < fESD->GetNumberOfTracks(); iTracks++) {
1219 AliESDtrack* track = fESD->GetTrack(iTracks);
1221 Printf("ERROR: Could not receive track %d", iTracks);
1225 //primary tracks selection: kTPCrefit and std cuts
1226 if(!fTrackFilter->IsSelected(track)) continue;
1227 Double_t eta=track->Eta();
1228 if (TMath::Abs(eta)>0.8) continue; //cut for acceptance
1230 Double_t mom=track->P();
1231 Double_t mom2 = mom*mom;
1232 Double_t length=track->GetIntegratedLength();
1233 Double_t pT = track->Pt();
1234 Double_t phi=track->Phi()*TMath::RadToDeg();
1235 track->GetIntegratedTimes(fTrkExpTimes);
1237 ((TH1F*)fHlist->At(9))->Fill(mom);
1238 ((TH1F*)fHlist->At(10))->Fill(pT);
1240 ((TH1F*)fHlist->At(11))->Fill(eta);
1241 ((TH1F*)fHlist->At(12))->Fill(phi);
1245 if (fEnableAdvancedCheck){
1246 if (track->GetSign()>0){
1247 ((TH1F*)fHpos->At(7))->Fill(mom);
1248 ((TH1F*)fHpos->At(8))->Fill(pT);
1250 ((TH1F*)fHpos->At(9))->Fill(eta);
1251 ((TH1F*)fHpos->At(10))->Fill(phi);
1253 if ( (track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1254 ((TH1F*)fHpos->At(11))->Fill(pT);
1256 ((TH1F*)fHpos->At(13))->Fill(eta);
1257 ((TH1F*)fHpos->At(15))->Fill(phi);
1260 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1261 ((TH1F*)fHpos->At(12))->Fill(pT);
1263 ((TH1F*)fHpos->At(14))->Fill(eta);
1264 ((TH1F*)fHpos->At(16))->Fill(phi);
1269 ((TH1F*)fHneg->At(7))->Fill(mom);
1270 ((TH1F*)fHneg->At(8))->Fill(pT);
1272 ((TH1F*)fHneg->At(9))->Fill(eta);
1273 ((TH1F*)fHneg->At(10))->Fill(phi);
1275 if ((track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1276 ((TH1F*)fHneg->At(11))->Fill(pT);
1278 ((TH1F*)fHneg->At(13))->Fill(eta);
1279 ((TH1F*)fHneg->At(15))->Fill(phi);
1282 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1283 ((TH1F*)fHneg->At(12))->Fill(pT);
1285 ((TH1F*)fHneg->At(14))->Fill(eta);
1286 ((TH1F*)fHneg->At(16))->Fill(phi);
1290 }//end flag advanced check
1292 //matched tracks selection: kTOFout and kTIME
1293 if ( (track->IsOn(AliESDtrack::kTOFout)) &&
1294 (track->IsOn(AliESDtrack::kTIME)) &&
1295 (track->IsOn(AliESDtrack::kTPCout)) ) {
1297 Double_t tofTime=track->GetTOFsignal();//in ps
1298 Double_t tofTimeRaw=track->GetTOFsignalRaw();//in ps
1299 Double_t tofToT=track->GetTOFsignalToT(); //in ps
1300 Int_t channel=track->GetTOFCalChannel();
1301 Int_t volId[5]; //(sector, plate,strip,padZ,padX)
1302 AliTOFGeometry::GetVolumeIndices(channel,volId);
1304 if (pT>=0.3) fNTOFtracks++; //matched counter
1305 Double_t tof= tofTime*1E-3; // ns, average T0 fill subtracted, no info from T0detector
1306 ((TH1F*)fHlist->At(1))->Fill(tof); //ns
1307 ((TH1F*)fHlist->At(2))->Fill(tofTimeRaw*1E-3); //ns
1308 ((TH1F*)fHlist->At(3))->Fill(tofToT);
1309 ((TH1F*)fHlist->At(4))->Fill(length);
1310 ((TH1F*)fHlist->At(5))->Fill(mom);
1311 ((TH1F*)fHlist->At(6))->Fill(pT);
1313 ((TH1F*)fHlist->At(7))->Fill(eta);
1314 ((TH1F*)fHlist->At(8))->Fill(phi);
1316 if (track->GetSign()>0)
1317 ((TH2F*)fHlist->At(13))->Fill(pT,track->GetTOFsignalDx());
1319 ((TH2F*)fHlist->At(14))->Fill(pT,track->GetTOFsignalDx());
1322 if (fEnableAdvancedCheck){
1323 if (track->GetSign()>0){
1324 ((TH1F*)fHpos->At(0))->Fill(length);
1325 ((TH1F*)fHpos->At(1))->Fill(mom);
1326 ((TH1F*)fHpos->At(2))->Fill(pT);
1328 ((TH1F*)fHpos->At(3))->Fill(eta);
1329 ((TH1F*)fHpos->At(4))->Fill(phi);
1331 if ( (track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1332 ((TH1F*)fHpos->At(5))->Fill(pT);
1334 ((TH1F*)fHpos->At(20))->Fill(eta);
1335 ((TH1F*)fHpos->At(22))->Fill(phi);
1338 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1339 ((TH1F*)fHpos->At(6))->Fill(pT);
1341 ((TH1F*)fHpos->At(21))->Fill(eta);
1342 ((TH1F*)fHpos->At(23))->Fill(phi);
1347 ((TH1F*)fHneg->At(0))->Fill(length);
1348 ((TH1F*)fHneg->At(1))->Fill(mom);
1349 ((TH1F*)fHneg->At(2))->Fill(pT);
1351 ((TH1F*)fHneg->At(3))->Fill(eta);
1352 ((TH1F*)fHneg->At(4))->Fill(phi);
1354 if ((track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1355 ((TH1F*)fHneg->At(5))->Fill(pT);
1357 ((TH1F*)fHneg->At(20))->Fill(eta);
1358 ((TH1F*)fHneg->At(22))->Fill(phi);
1361 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1362 ((TH1F*)fHneg->At(6))->Fill(pT);
1364 ((TH1F*)fHneg->At(21))->Fill(eta);
1365 ((TH1F*)fHneg->At(23))->Fill(phi);
1369 }//end advanced check
1370 //basic PID performance check
1372 printf("WARNING: track with negative TOF time found! Skipping this track for PID checks\n");
1376 printf("WARNING: track with negative square momentum found! Skipping this track for PID checks\n");
1380 printf("WARNING: track with negative length found!Skipping this track for PID checks\n");
1383 Double_t c=TMath::C()*1.E-9;// m/ns
1384 Double_t mass=0.; //GeV
1385 length =length*0.01; // in meters
1387 Double_t beta=length/tof;
1388 Double_t fact= (tof/length)*(tof/length) -1.;
1390 mass = -mom*TMath::Sqrt(-fact);
1392 mass = mom*TMath::Sqrt(fact);
1394 ((TH2F*)fHlistPID->At(0))->Fill(mom,beta);
1395 ((TH1F*) fHlistPID->At(1))->Fill(mass);
1398 Bool_t isValidBeta[AliPID::kSPECIES]={0,0,0,0,0};
1399 for (Int_t specie = 0; specie < AliPID::kSPECIES; specie++){
1400 fSigmaSpecie[specie] = fESDpid->GetTOFResponse().GetExpectedSigma(mom, fTrkExpTimes[specie], AliPID::ParticleMass(specie));
1401 beta=1/TMath::Sqrt(1+AliPID::ParticleMass(specie)*AliPID::ParticleMass(specie)/(mom2));
1403 fThExpTimes[specie]=length*1.E3/(beta*c);//ps
1404 isValidBeta[specie]=kTRUE;
1406 fThExpTimes[specie]=1E-10;
1407 isValidBeta[specie]=kFALSE;
1411 if (isValidBeta[AliPID::kPion]){
1412 ((TH2F*)fHlistPID->At(2))->Fill((Int_t)GetStripIndex(volId),tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1413 ((TH1F*)fHlistPID->At(3))->Fill(tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1414 ((TH2F*)fHlistPID->At(4))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1415 ((TH1F*)fHlistPID->At(5))->Fill(tofTime-fThExpTimes[AliPID::kPion]);//ps
1416 ((TH2F*)fHlistPID->At(6))->Fill(mom,(tofTime-fThExpTimes[AliPID::kPion]));
1417 ((TH2F*)fHlistPID->At(7))->Fill(pT,(tofTime-fTrkExpTimes[AliPID::kPion])/fSigmaSpecie[AliPID::kPion]);
1420 if (isValidBeta[AliPID::kKaon]){
1421 ((TH1F*)fHlistPID->At(8))->Fill(tofTime-fTrkExpTimes[AliPID::kKaon]);//ps
1422 ((TH2F*)fHlistPID->At(9))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1423 ((TH1F*)fHlistPID->At(10))->Fill(tofTime-fThExpTimes[AliPID::kKaon]);//ps
1424 ((TH2F*)fHlistPID->At(11))->Fill(mom,(tofTime-fThExpTimes[AliPID::kKaon]));
1425 ((TH2F*)fHlistPID->At(12))->Fill(pT,(tofTime-fTrkExpTimes[AliPID::kKaon])/fSigmaSpecie[AliPID::kKaon]);
1427 if (isValidBeta[AliPID::kProton]){
1428 ((TH1F*)fHlistPID->At(13))->Fill(tofTime-fTrkExpTimes[AliPID::kProton]);//3ps
1429 ((TH2F*)fHlistPID->At(14))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1430 ((TH1F*)fHlistPID->At(15))->Fill(tofTime-fThExpTimes[AliPID::kProton]);//ps
1431 ((TH2F*)fHlistPID->At(16))->Fill(mom,(tofTime-fThExpTimes[AliPID::kProton]));
1432 ((TH2F*)fHlistPID->At(17))->Fill(pT,(tofTime-fTrkExpTimes[AliPID::kProton])/fSigmaSpecie[AliPID::kProton]);
1435 if (fEnableAdvancedCheck && (pT<1.)) {
1436 Double_t pos[3]={0.,0.,0.};
1437 track->GetXYZAt(378.,5.,pos);
1438 if ((pos[0]==0.)&&(pos[1]==0.)&&(pos[2]==0.))continue;
1440 Double_t phiTOF=TMath::ATan2(pos[1],pos[0])*TMath::RadToDeg();
1441 if (phiTOF<0) phiTOF+= (2*TMath::Pi()*TMath::RadToDeg());
1443 if (isValidBeta[AliPID::kProton]){
1444 if (track->GetSign()>0){
1445 ((TH2F*)fHpos->At(17))->Fill(phiTOF,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1446 ((TH2F*)fHpos->At(18))->Fill(phi,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1448 ((TH2F*)fHneg->At(17))->Fill(phiTOF,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1449 ((TH2F*)fHneg->At(18))->Fill(phi,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1453 track->GetOuterXYZ(pos);
1454 Double_t phiOuterTPC=TMath::ATan2(pos[1],pos[0])*TMath::RadToDeg();
1455 if (phiOuterTPC<0) phiOuterTPC+= (2*TMath::Pi()*TMath::RadToDeg());
1457 if (track->GetSign()>0){
1458 if (isValidBeta[AliPID::kProton])
1459 ((TH2F*)fHpos->At(19))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1460 if (isValidBeta[AliPID::kPion])
1461 ((TH2F*)fHpos->At(24))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1462 if (isValidBeta[AliPID::kKaon])
1463 ((TH2F*)fHpos->At(25))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kKaon]);//ps
1465 if ((phiOuterTPC<=30) || ((phiOuterTPC>=150)&&(phiOuterTPC<=230)) || (phiOuterTPC>=310) ) { //TRD sectors
1466 if (isValidBeta[AliPID::kPion])
1467 ((TH2F*)fHlistPID->At(18))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1468 if (isValidBeta[AliPID::kKaon])
1469 ((TH2F*)fHlistPID->At(22))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1470 if (isValidBeta[AliPID::kProton])
1471 ((TH2F*)fHlistPID->At(26))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1473 if ( ((phiOuterTPC>=50)&&(phiOuterTPC<=130)) || ((phiOuterTPC>=250)&&(phiOuterTPC<=290)) ) {//no TRD sectors
1474 if (isValidBeta[AliPID::kPion])
1475 ((TH2F*)fHlistPID->At(19))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1476 if (isValidBeta[AliPID::kKaon])
1477 ((TH2F*)fHlistPID->At(23))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1478 if (isValidBeta[AliPID::kProton])
1479 ((TH2F*)fHlistPID->At(27))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1482 if (isValidBeta[AliPID::kPion])
1483 ((TH2F*)fHneg->At(24))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1484 if (isValidBeta[AliPID::kKaon])
1485 ((TH2F*)fHneg->At(25))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kKaon]);//ps
1486 if (isValidBeta[AliPID::kProton])
1487 ((TH2F*)fHneg->At(19))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1489 if ((phiOuterTPC<=30) || ((phiOuterTPC>=150)&&(phiOuterTPC<=230)) || (phiOuterTPC>=310) ) { //TRD sectors
1490 if (isValidBeta[AliPID::kPion])
1491 ((TH2F*)fHlistPID->At(20))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1492 if (isValidBeta[AliPID::kKaon])
1493 ((TH2F*)fHlistPID->At(24))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1494 if (isValidBeta[AliPID::kProton])
1495 ((TH2F*)fHlistPID->At(28))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1497 if ( ((phiOuterTPC>=50)&&(phiOuterTPC<=130)) || ((phiOuterTPC>=250)&&(phiOuterTPC<=290)) ) {//no TRD sectors
1498 if (isValidBeta[AliPID::kPion])
1499 ((TH2F*)fHlistPID->At(21))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1500 if (isValidBeta[AliPID::kKaon])
1501 ((TH2F*)fHlistPID->At(25))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1502 if (isValidBeta[AliPID::kProton])
1503 ((TH2F*)fHlistPID->At(29))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1507 }//end advanced checks && cut on pT for t-texp phi distrib
1509 }//end loop on tracks
1511 ((TH1F*)fHlist->At(0))->Fill(fNTOFtracks) ;
1512 ((TH2F*)fHlistTimeZero->At(12))->Fill(fNTOFtracks,timeZero[AliESDpid::kTOF_T0]);
1514 PostData(1, fHlist);
1515 PostData(2, fHlistTimeZero);
1516 PostData(3, fHlistPID);
1522 //________________________________________________________________________
1523 void AliAnalysisTaskTOFqa::Terminate(Option_t *)
1525 //check on output validity
1526 fHlist = dynamic_cast<TList*> (GetOutputData(1));
1527 if (!fHlist || !fHlistTimeZero) {
1528 Printf("ERROR: lists not available");
1534 //---------------------------------------------------------------
1535 Int_t AliAnalysisTaskTOFqa::GetStripIndex(const Int_t * const in)
1537 /* return tof strip index between 0 and 91 */
1539 Int_t nStripA = AliTOFGeometry::NStripA();
1540 Int_t nStripB = AliTOFGeometry::NStripB();
1541 Int_t nStripC = AliTOFGeometry::NStripC();
1543 Int_t iplate = in[1];
1544 Int_t istrip = in[2];
1546 Int_t stripOffset = 0;
1552 stripOffset = nStripC;
1555 stripOffset = nStripC+nStripB;
1558 stripOffset = nStripC+nStripB+nStripA;
1561 stripOffset = nStripC+nStripB+nStripA+nStripB;
1568 if (stripOffset<0 || stripOffset>92) return -1;
1570 return (stripOffset+istrip);