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 distribution (GeV/c); p(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_{fillT0} [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 hT0bestRes->SetMarkerStyle(21);
454 hT0bestRes->SetMarkerColor(kRed);
455 hT0bestRes->SetLineColor(kRed);
456 hT0bestRes->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) ;
669 TH1F* hTOFmatchedTimePion1GeV = new TH1F("hTOFmatchedTimePion1GeV", "ESDs t_{TOF}-t_{0}^{TOF}-t_{#pi,exp} (from tracking) for 0.95 <= p_{T} <= 1.05 GeV/c; t_{TOF}-t_{0}^{TOF}-t_{#pi,exp} [ps];Counts", nExpTimeBins, fExpTimeRangeMin, fExpTimeRangeMax) ;
670 hTOFmatchedTimePion1GeV->Sumw2() ;
671 hTOFmatchedTimePion1GeV->SetLineWidth(1);
672 hTOFmatchedTimePion1GeV->SetLineColor(kBlue);
673 hTOFmatchedTimePion1GeV->SetMarkerStyle(20);
674 hTOFmatchedTimePion1GeV->SetMarkerSize(0.8);
675 hTOFmatchedTimePion1GeV->SetMarkerColor(kBlue);
676 fHlistPID->AddLast(hTOFmatchedTimePion1GeV) ;
678 //----------------------------------------------------------POSITIVE TRACKS
680 TH1F* hTOFmatchedESDtrkLengthPos = new TH1F("hTOFmatchedESDtrkLengthPos", "Matched positive ESDs tracks length; Track length [cm];Counts", 1600, -800., 800) ;
681 hTOFmatchedESDtrkLengthPos->Sumw2();
682 hTOFmatchedESDtrkLengthPos->SetLineColor(kRed);
683 hTOFmatchedESDtrkLengthPos->SetMarkerColor(kRed);
684 hTOFmatchedESDtrkLengthPos->SetFillColor(kRed);
685 hTOFmatchedESDtrkLengthPos->SetDrawOption("BAR");
686 if (fEnableAdvancedCheck)
687 fHpos->AddLast(hTOFmatchedESDtrkLengthPos);
689 TH1F* hTOFmatchedESDPPos = new TH1F("hTOFmatchedESDPPos", "TPC-TOF matched positive tracks momentum distribution (GeV/c); p (GeV/c);tracks", 500,0.,5.) ;
690 hTOFmatchedESDPPos->Sumw2() ;
691 hTOFmatchedESDPPos->SetLineColor(kRed);
692 hTOFmatchedESDPPos->SetMarkerStyle(20);
693 hTOFmatchedESDPPos->SetMarkerSize(0.7);
694 hTOFmatchedESDPPos->SetMarkerColor(kRed);
695 if (fEnableAdvancedCheck)
696 fHpos->AddLast(hTOFmatchedESDPPos) ;
698 TH1F* hTOFmatchedESDPtPos = new TH1F("hTOFmatchedESDPtPos", "TPC-TOF positive matched tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500,0.,5.) ;
699 hTOFmatchedESDPtPos->Sumw2() ;
700 hTOFmatchedESDPtPos->SetLineColor(kRed);
701 hTOFmatchedESDPtPos->SetMarkerStyle(21);
702 hTOFmatchedESDPtPos->SetMarkerSize(0.7);
703 hTOFmatchedESDPtPos->SetMarkerColor(kRed);
704 if (fEnableAdvancedCheck)
705 fHpos->AddLast(hTOFmatchedESDPtPos) ;
708 TH1F* hTOFmatchedESDetaPos = new TH1F("hTOFmatchedESDetaPos", "Matched positive ESD tracks #eta (p_{T} #geq 0.5 GeV/c); eta;Counts", 200, -1., 1.) ;
709 hTOFmatchedESDetaPos->Sumw2();
710 hTOFmatchedESDetaPos->SetLineColor(kRed);
711 if (fEnableAdvancedCheck)
712 fHpos->AddLast(hTOFmatchedESDetaPos) ;
714 TH1F* hTOFmatchedESDphiPos = new TH1F("hTOFmatchedESDphiPos", "Matched Positive ESD tracks #phi; #phi (deg);Counts", 72, 0., 360.) ;
715 hTOFmatchedESDphiPos->Sumw2();
716 hTOFmatchedESDphiPos->SetLineColor(kRed);
717 if (fEnableAdvancedCheck)
718 fHpos->AddLast(hTOFmatchedESDphiPos) ;
721 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) ;
722 hESDmatchedTrackPtPosTRDout->Sumw2();
723 hESDmatchedTrackPtPosTRDout->SetLineWidth(1);
724 hESDmatchedTrackPtPosTRDout->SetMarkerStyle(20);
725 hESDmatchedTrackPtPosTRDout->SetMarkerSize(0.7);
726 hESDmatchedTrackPtPosTRDout->SetLineColor(kRed);
727 hESDmatchedTrackPtPosTRDout->SetMarkerColor(kRed);
728 if (fEnableAdvancedCheck)
729 fHpos->AddLast(hESDmatchedTrackPtPosTRDout);
732 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) ;
733 hESDmatchedTrackPtPosNoTRDout->Sumw2();
734 hESDmatchedTrackPtPosNoTRDout->SetLineWidth(1);
735 hESDmatchedTrackPtPosNoTRDout->SetMarkerStyle(25);
736 hESDmatchedTrackPtPosNoTRDout->SetMarkerSize(0.7);
737 hESDmatchedTrackPtPosNoTRDout->SetLineColor(kRed);
738 hESDmatchedTrackPtPosNoTRDout->SetMarkerColor(kRed);
739 if (fEnableAdvancedCheck)
740 fHpos->AddLast(hESDmatchedTrackPtPosNoTRDout);
743 TH1F* hESDprimaryTrackPPos = new TH1F("hESDprimaryTrackPPos", "All Pos ESDs tracks p distribution (GeV/c); p(GeV/c);tracks", 500, 0., 5.0) ;
744 hESDprimaryTrackPPos->Sumw2();
745 hESDprimaryTrackPPos->SetLineWidth(1);
746 hESDprimaryTrackPPos->SetMarkerStyle(24);
747 hESDprimaryTrackPPos->SetMarkerSize(0.7);
748 hESDprimaryTrackPPos->SetMarkerColor(kRed);
749 hESDprimaryTrackPPos->SetLineColor(kRed);
750 if (fEnableAdvancedCheck)
751 fHpos->AddLast(hESDprimaryTrackPPos);
753 TH1F* hESDprimaryTrackPtPos = new TH1F("hESDprimaryTrackPtPos", "ESDs Pos primary tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
754 hESDprimaryTrackPtPos->Sumw2();
755 hESDprimaryTrackPtPos->SetLineWidth(1);
756 hESDprimaryTrackPtPos->SetMarkerStyle(25);
757 hESDprimaryTrackPtPos->SetMarkerSize(0.7);
758 hESDprimaryTrackPtPos->SetLineColor(kRed);
759 hESDprimaryTrackPtPos->SetMarkerColor(kRed);
760 if (fEnableAdvancedCheck)
761 fHpos->AddLast(hESDprimaryTrackPtPos);
763 TH1F* hTOFprimaryESDetaPos = new TH1F("hTOFprimaryESDetaPos", "Primary ESD Pos tracks #eta (p_{T} #geq 0.5 GeV/c); #eta;Counts", 200, -1., 1.) ;
764 hTOFprimaryESDetaPos->Sumw2();
765 hTOFprimaryESDetaPos->SetLineColor(kRed);
766 if (fEnableAdvancedCheck)
767 fHpos->AddLast(hTOFprimaryESDetaPos) ;
769 TH1F* hTOFprimaryESDphiPos = new TH1F("hTOFprimaryESDphiPos", "Primary ESD Pos tracks #phi;#phi (deg);Counts", 72, 0., 360.) ;
770 hTOFprimaryESDphiPos->Sumw2();
771 hTOFprimaryESDphiPos->SetLineColor(kRed);
772 if (fEnableAdvancedCheck)
773 fHpos->AddLast(hTOFprimaryESDphiPos) ;
776 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) ;
777 hESDprimaryTrackPtPosTRDout->Sumw2();
778 hESDprimaryTrackPtPosTRDout->SetLineWidth(1);
779 hESDprimaryTrackPtPosTRDout->SetMarkerStyle(20);
780 hESDprimaryTrackPtPosTRDout->SetMarkerSize(0.7);
781 hESDprimaryTrackPtPosTRDout->SetLineColor(kRed);
782 hESDprimaryTrackPtPosTRDout->SetMarkerColor(kRed);
783 if (fEnableAdvancedCheck)
784 fHpos->AddLast(hESDprimaryTrackPtPosTRDout);
787 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) ;
788 hESDprimaryTrackPtPosNoTRDout->Sumw2();
789 hESDprimaryTrackPtPosNoTRDout->SetLineWidth(1);
790 hESDprimaryTrackPtPosNoTRDout->SetMarkerStyle(25);
791 hESDprimaryTrackPtPosNoTRDout->SetMarkerSize(0.7);
792 hESDprimaryTrackPtPosNoTRDout->SetLineColor(kRed);
793 hESDprimaryTrackPtPosNoTRDout->SetMarkerColor(kRed);
794 if (fEnableAdvancedCheck)
795 fHpos->AddLast(hESDprimaryTrackPtPosNoTRDout);
798 TH1F* hESDprimaryTrackEtaPosTRDout = new TH1F("hESDprimaryTrackEtaPosTRDout", "ESDs Pos primary tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
799 hESDprimaryTrackEtaPosTRDout->Sumw2();
800 hESDprimaryTrackEtaPosTRDout->SetLineWidth(1);
801 hESDprimaryTrackEtaPosTRDout->SetMarkerStyle(20);
802 hESDprimaryTrackEtaPosTRDout->SetMarkerSize(0.7);
803 hESDprimaryTrackEtaPosTRDout->SetLineColor(kBlue);
804 hESDprimaryTrackEtaPosTRDout->SetMarkerColor(kBlue);
805 if (fEnableAdvancedCheck)
806 fHpos->AddLast(hESDprimaryTrackEtaPosTRDout);
809 TH1F* hESDprimaryTrackEtaPosNoTRDout = new TH1F("hESDprimaryTrackEtaPosNoTRDout", "ESDs Pos primary tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
810 hESDprimaryTrackEtaPosNoTRDout->Sumw2();
811 hESDprimaryTrackEtaPosNoTRDout->SetLineWidth(1);
812 hESDprimaryTrackEtaPosNoTRDout->SetMarkerStyle(25);
813 hESDprimaryTrackEtaPosNoTRDout->SetMarkerSize(0.7);
814 hESDprimaryTrackEtaPosNoTRDout->SetLineColor(kBlue);
815 hESDprimaryTrackEtaPosNoTRDout->SetMarkerColor(kBlue);
816 if (fEnableAdvancedCheck)
817 fHpos->AddLast(hESDprimaryTrackEtaPosNoTRDout);
820 TH1F* hESDprimaryTrackPhiPosTRDout = new TH1F("hESDprimaryTrackPhiPosTRDout", "ESDs Pos primary tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
821 hESDprimaryTrackPhiPosTRDout->Sumw2();
822 hESDprimaryTrackPhiPosTRDout->SetLineWidth(1);
823 hESDprimaryTrackPhiPosTRDout->SetMarkerStyle(20);
824 hESDprimaryTrackPhiPosTRDout->SetMarkerSize(0.7);
825 hESDprimaryTrackPhiPosTRDout->SetLineColor(kBlue);
826 hESDprimaryTrackPhiPosTRDout->SetMarkerColor(kBlue);
827 if (fEnableAdvancedCheck)
828 fHpos->AddLast(hESDprimaryTrackPhiPosTRDout);
831 TH1F* hESDprimaryTrackPhiPosNoTRDout = new TH1F("hESDprimaryTrackPhiPosNoTRDout", "ESDs Pos primary tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
832 hESDprimaryTrackPhiPosNoTRDout->Sumw2();
833 hESDprimaryTrackPhiPosNoTRDout->SetLineWidth(1);
834 hESDprimaryTrackPhiPosNoTRDout->SetMarkerStyle(25);
835 hESDprimaryTrackPhiPosNoTRDout->SetMarkerSize(0.7);
836 hESDprimaryTrackPhiPosNoTRDout->SetLineColor(kBlue);
837 hESDprimaryTrackPhiPosNoTRDout->SetMarkerColor(kBlue);
838 if (fEnableAdvancedCheck)
839 fHpos->AddLast(hESDprimaryTrackPhiPosNoTRDout);
842 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. ) ;
843 hTOFmatchedExpTimeProVsPhiPos->Sumw2() ;
844 if (fEnableAdvancedCheck)
845 fHpos->AddLast(hTOFmatchedExpTimeProVsPhiPos) ;
848 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) ;
849 hTOFmatchedExpTimeProVsPhiVertexPos->Sumw2() ;
850 if (fEnableAdvancedCheck)
851 fHpos->AddLast(hTOFmatchedExpTimeProVsPhiVertexPos) ;
854 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) ;
855 hTOFmatchedExpTimeProVsPhiTPCPos->Sumw2() ;
856 if (fEnableAdvancedCheck)
857 fHpos->AddLast(hTOFmatchedExpTimeProVsPhiTPCPos) ;
860 TH1F* hESDmatchedTrackEtaPosTRDout = new TH1F("hESDmatchedTrackEtaPosTRDout", "ESDs Pos matched tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
861 hESDmatchedTrackEtaPosTRDout->Sumw2();
862 hESDmatchedTrackEtaPosTRDout->SetLineWidth(1);
863 hESDmatchedTrackEtaPosTRDout->SetMarkerStyle(20);
864 hESDmatchedTrackEtaPosTRDout->SetMarkerSize(0.7);
865 hESDmatchedTrackEtaPosTRDout->SetLineColor(kBlue);
866 hESDmatchedTrackEtaPosTRDout->SetMarkerColor(kBlue);
867 if (fEnableAdvancedCheck)
868 fHpos->AddLast(hESDmatchedTrackEtaPosTRDout);
871 TH1F* hESDmatchedTrackEtaPosNoTRDout = new TH1F("hESDmatchedTrackEtaPosNoTRDout", "ESDs Pos matched tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
872 hESDmatchedTrackEtaPosNoTRDout->Sumw2();
873 hESDmatchedTrackEtaPosNoTRDout->SetLineWidth(1);
874 hESDmatchedTrackEtaPosNoTRDout->SetMarkerStyle(25);
875 hESDmatchedTrackEtaPosNoTRDout->SetMarkerSize(0.7);
876 hESDmatchedTrackEtaPosNoTRDout->SetLineColor(kBlue);
877 hESDmatchedTrackEtaPosNoTRDout->SetMarkerColor(kBlue);
878 if (fEnableAdvancedCheck)
879 fHpos->AddLast(hESDmatchedTrackEtaPosNoTRDout);
882 TH1F* hESDmatchedTrackPhiPosTRDout = new TH1F("hESDmatchedTrackPhiPosTRDout", "ESDs Pos matched tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
883 hESDmatchedTrackPhiPosTRDout->Sumw2();
884 hESDmatchedTrackPhiPosTRDout->SetLineWidth(1);
885 hESDmatchedTrackPhiPosTRDout->SetMarkerStyle(20);
886 hESDmatchedTrackPhiPosTRDout->SetMarkerSize(0.7);
887 hESDmatchedTrackPhiPosTRDout->SetLineColor(kBlue);
888 hESDmatchedTrackPhiPosTRDout->SetMarkerColor(kBlue);
889 if (fEnableAdvancedCheck)
890 fHpos->AddLast(hESDmatchedTrackPhiPosTRDout);
893 TH1F* hESDmatchedTrackPhiPosNoTRDout = new TH1F("hESDmatchedTrackPhiPosNoTRDout", "ESDs Pos matched tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
894 hESDmatchedTrackPhiPosNoTRDout->Sumw2();
895 hESDmatchedTrackPhiPosNoTRDout->SetLineWidth(1);
896 hESDmatchedTrackPhiPosNoTRDout->SetMarkerStyle(25);
897 hESDmatchedTrackPhiPosNoTRDout->SetMarkerSize(0.7);
898 hESDmatchedTrackPhiPosNoTRDout->SetLineColor(kBlue);
899 hESDmatchedTrackPhiPosNoTRDout->SetMarkerColor(kBlue);
900 if (fEnableAdvancedCheck)
901 fHpos->AddLast(hESDmatchedTrackPhiPosNoTRDout);
904 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) ;
905 hTOFmatchedExpTimePiVsPhiTPCPos->Sumw2() ;
906 if (fEnableAdvancedCheck)
907 fHpos->AddLast(hTOFmatchedExpTimePiVsPhiTPCPos) ;
910 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) ;
911 hTOFmatchedExpTimeKaVsPhiTPCPos->Sumw2() ;
912 if (fEnableAdvancedCheck)
913 fHpos->AddLast(hTOFmatchedExpTimeKaVsPhiTPCPos) ;
915 //----------------------------------------------------------NEGATIVE TRACKS
917 TH1F* hTOFmatchedESDtrkLengthNeg = new TH1F("hTOFmatchedESDtrkLengthNeg", "Matched positive ESDs tracks length; Track length [cm];Counts", 1600, -800., 800) ;
918 hTOFmatchedESDtrkLengthNeg->Sumw2();
919 hTOFmatchedESDtrkLengthNeg->SetLineColor(kBlue);
920 hTOFmatchedESDtrkLengthNeg->SetMarkerColor(kBlue);
921 hTOFmatchedESDtrkLengthNeg->SetFillColor(kBlue);
922 hTOFmatchedESDtrkLengthNeg->SetDrawOption("BAR");
923 if (fEnableAdvancedCheck)
924 fHneg->AddLast(hTOFmatchedESDtrkLengthNeg);
926 TH1F* hTOFmatchedESDPNeg = new TH1F("hTOFmatchedESDPNeg", "TPC-TOF matched positive tracks momentum distribution (GeV/c); p (GeV/c);tracks", 500,0.,5.) ;
927 hTOFmatchedESDPNeg->Sumw2() ;
928 hTOFmatchedESDPNeg->SetLineColor(kBlue);
929 hTOFmatchedESDPNeg->SetMarkerStyle(20);
930 hTOFmatchedESDPNeg->SetMarkerSize(0.7);
931 hTOFmatchedESDPNeg->SetMarkerColor(kBlue);
932 if (fEnableAdvancedCheck)
933 fHneg->AddLast(hTOFmatchedESDPNeg) ;
935 TH1F* hTOFmatchedESDPtNeg = new TH1F("hTOFmatchedESDPtNeg", "TPC-TOF positive matched tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500,0.,5.) ;
936 hTOFmatchedESDPtNeg->Sumw2() ;
937 hTOFmatchedESDPtNeg->SetLineColor(kBlue);
938 hTOFmatchedESDPtNeg->SetMarkerStyle(21);
939 hTOFmatchedESDPtNeg->SetMarkerSize(0.7);
940 hTOFmatchedESDPtNeg->SetMarkerColor(kBlue);
941 if (fEnableAdvancedCheck)
942 fHneg->AddLast(hTOFmatchedESDPtNeg) ;
945 TH1F* hTOFmatchedESDetaNeg = new TH1F("hTOFmatchedESDetaNeg", "Matched positive ESD tracks #eta (p_{T} #geq 0.5 GeV/c); eta;Counts", 200, -1., 1.) ;
946 hTOFmatchedESDetaNeg->Sumw2();
947 hTOFmatchedESDetaNeg->SetLineColor(kBlue);
948 if (fEnableAdvancedCheck)
949 fHneg->AddLast(hTOFmatchedESDetaNeg) ;
951 TH1F* hTOFmatchedESDphiNeg = new TH1F("hTOFmatchedESDphiNeg", "Matched Negitive ESD tracks #phi; #phi (deg);Counts", 72, 0., 360.) ;
952 hTOFmatchedESDphiNeg->Sumw2();
953 hTOFmatchedESDphiNeg->SetLineColor(kBlue);
954 if (fEnableAdvancedCheck)
955 fHneg->AddLast(hTOFmatchedESDphiNeg) ;
958 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) ;
959 hESDmatchedTrackPtNegTRDout->Sumw2();
960 hESDmatchedTrackPtNegTRDout->SetLineWidth(1);
961 hESDmatchedTrackPtNegTRDout->SetMarkerStyle(20);
962 hESDmatchedTrackPtNegTRDout->SetMarkerSize(0.7);
963 hESDmatchedTrackPtNegTRDout->SetLineColor(kBlue);
964 hESDmatchedTrackPtNegTRDout->SetMarkerColor(kBlue);
965 if (fEnableAdvancedCheck)
966 fHneg->AddLast(hESDmatchedTrackPtNegTRDout);
969 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) ;
970 hESDmatchedTrackPtNegNoTRDout->Sumw2();
971 hESDmatchedTrackPtNegNoTRDout->SetLineWidth(1);
972 hESDmatchedTrackPtNegNoTRDout->SetMarkerStyle(25);
973 hESDmatchedTrackPtNegNoTRDout->SetMarkerSize(0.7);
974 hESDmatchedTrackPtNegNoTRDout->SetLineColor(kBlue);
975 hESDmatchedTrackPtNegNoTRDout->SetMarkerColor(kBlue);
976 if (fEnableAdvancedCheck)
977 fHneg->AddLast(hESDmatchedTrackPtNegNoTRDout);
980 TH1F* hESDprimaryTrackPNeg = new TH1F("hESDprimaryTrackPNeg", "All Neg ESDs tracks p distribution (GeV/c); p(GeV/c);tracks", 500, 0., 5.0) ;
981 hESDprimaryTrackPNeg->Sumw2();
982 hESDprimaryTrackPNeg->SetLineWidth(1);
983 hESDprimaryTrackPNeg->SetMarkerStyle(24);
984 hESDprimaryTrackPNeg->SetMarkerSize(0.7);
985 hESDprimaryTrackPNeg->SetMarkerColor(kBlue);
986 hESDprimaryTrackPNeg->SetLineColor(kBlue);
987 if (fEnableAdvancedCheck)
988 fHneg->AddLast(hESDprimaryTrackPNeg);
990 TH1F* hESDprimaryTrackPtNeg = new TH1F("hESDprimaryTrackPtNeg", "ESDs Neg primary tracks p_{T} distribution (GeV/c); p_{T}(GeV/c);tracks", 500, 0.0, 5.0) ;
991 hESDprimaryTrackPtNeg->Sumw2();
992 hESDprimaryTrackPtNeg->SetLineWidth(1);
993 hESDprimaryTrackPtNeg->SetMarkerStyle(25);
994 hESDprimaryTrackPtNeg->SetMarkerSize(0.7);
995 hESDprimaryTrackPtNeg->SetLineColor(kBlue);
996 hESDprimaryTrackPtNeg->SetMarkerColor(kBlue);
997 if (fEnableAdvancedCheck)
998 fHneg->AddLast(hESDprimaryTrackPtNeg);
1000 TH1F* hTOFprimaryESDetaNeg = new TH1F("hTOFprimaryESDetaNeg", "Primary ESD Neg tracks #eta (p_{T} #geq 0.5 GeV/c); #eta;Counts", 200, -1., 1.) ;
1001 hTOFprimaryESDetaNeg->Sumw2();
1002 hTOFprimaryESDetaNeg->SetLineColor(kBlue);
1003 if (fEnableAdvancedCheck)
1004 fHneg->AddLast(hTOFprimaryESDetaNeg) ;
1006 TH1F* hTOFprimaryESDphiNeg = new TH1F("hTOFprimaryESDphiNeg", "Primary ESD Neg tracks #phi;#phi (deg);Counts", 72, 0., 360.) ;
1007 hTOFprimaryESDphiNeg->Sumw2();
1008 hTOFprimaryESDphiNeg->SetLineColor(kBlue);
1009 if (fEnableAdvancedCheck)
1010 fHneg->AddLast(hTOFprimaryESDphiNeg) ;
1013 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) ;
1014 hESDprimaryTrackPtNegTRDout->Sumw2();
1015 hESDprimaryTrackPtNegTRDout->SetLineWidth(1);
1016 hESDprimaryTrackPtNegTRDout->SetMarkerStyle(20);
1017 hESDprimaryTrackPtNegTRDout->SetMarkerSize(0.7);
1018 hESDprimaryTrackPtNegTRDout->SetLineColor(kBlue);
1019 hESDprimaryTrackPtNegTRDout->SetMarkerColor(kBlue);
1020 if (fEnableAdvancedCheck)
1021 fHneg->AddLast(hESDprimaryTrackPtNegTRDout);
1024 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) ;
1025 hESDprimaryTrackPtNegNoTRDout->Sumw2();
1026 hESDprimaryTrackPtNegNoTRDout->SetLineWidth(1);
1027 hESDprimaryTrackPtNegNoTRDout->SetMarkerStyle(25);
1028 hESDprimaryTrackPtNegNoTRDout->SetMarkerSize(0.7);
1029 hESDprimaryTrackPtNegNoTRDout->SetLineColor(kBlue);
1030 hESDprimaryTrackPtNegNoTRDout->SetMarkerColor(kBlue);
1031 if (fEnableAdvancedCheck)
1032 fHneg->AddLast(hESDprimaryTrackPtNegNoTRDout);
1035 TH1F* hESDprimaryTrackEtaNegTRDout = new TH1F("hESDprimaryTrackEtaNegTRDout", "ESDs Neg primary tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
1036 hESDprimaryTrackEtaNegTRDout->Sumw2();
1037 hESDprimaryTrackEtaNegTRDout->SetLineWidth(1);
1038 hESDprimaryTrackEtaNegTRDout->SetMarkerStyle(20);
1039 hESDprimaryTrackEtaNegTRDout->SetMarkerSize(0.7);
1040 hESDprimaryTrackEtaNegTRDout->SetLineColor(kBlue);
1041 hESDprimaryTrackEtaNegTRDout->SetMarkerColor(kBlue);
1042 if (fEnableAdvancedCheck)
1043 fHneg->AddLast(hESDprimaryTrackEtaNegTRDout);
1046 TH1F* hESDprimaryTrackEtaNegNoTRDout = new TH1F("hESDprimaryTrackEtaNegNoTRDout", "ESDs Neg primary tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
1047 hESDprimaryTrackEtaNegNoTRDout->Sumw2();
1048 hESDprimaryTrackEtaNegNoTRDout->SetLineWidth(1);
1049 hESDprimaryTrackEtaNegNoTRDout->SetMarkerStyle(25);
1050 hESDprimaryTrackEtaNegNoTRDout->SetMarkerSize(0.7);
1051 hESDprimaryTrackEtaNegNoTRDout->SetLineColor(kBlue);
1052 hESDprimaryTrackEtaNegNoTRDout->SetMarkerColor(kBlue);
1053 if (fEnableAdvancedCheck)
1054 fHneg->AddLast(hESDprimaryTrackEtaNegNoTRDout);
1057 TH1F* hESDprimaryTrackPhiNegTRDout = new TH1F("hESDprimaryTrackPhiNegTRDout", "ESDs Neg primary tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1058 hESDprimaryTrackPhiNegTRDout->Sumw2();
1059 hESDprimaryTrackPhiNegTRDout->SetLineWidth(1);
1060 hESDprimaryTrackPhiNegTRDout->SetMarkerStyle(20);
1061 hESDprimaryTrackPhiNegTRDout->SetMarkerSize(0.7);
1062 hESDprimaryTrackPhiNegTRDout->SetLineColor(kBlue);
1063 hESDprimaryTrackPhiNegTRDout->SetMarkerColor(kBlue);
1064 if (fEnableAdvancedCheck)
1065 fHneg->AddLast(hESDprimaryTrackPhiNegTRDout);
1068 TH1F* hESDprimaryTrackPhiNegNoTRDout = new TH1F("hESDprimaryTrackPhiNegNoTRDout", "ESDs Neg primary tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1069 hESDprimaryTrackPhiNegNoTRDout->Sumw2();
1070 hESDprimaryTrackPhiNegNoTRDout->SetLineWidth(1);
1071 hESDprimaryTrackPhiNegNoTRDout->SetMarkerStyle(25);
1072 hESDprimaryTrackPhiNegNoTRDout->SetMarkerSize(0.7);
1073 hESDprimaryTrackPhiNegNoTRDout->SetLineColor(kBlue);
1074 hESDprimaryTrackPhiNegNoTRDout->SetMarkerColor(kBlue);
1075 if (fEnableAdvancedCheck)
1076 fHneg->AddLast(hESDprimaryTrackPhiNegNoTRDout);
1079 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) ;
1080 hTOFmatchedExpTimeProVsPhiNeg->Sumw2() ;
1081 if (fEnableAdvancedCheck)
1082 fHneg->AddLast(hTOFmatchedExpTimeProVsPhiNeg) ;
1085 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) ;
1086 hTOFmatchedExpTimeProVsPhiVertexNeg->Sumw2() ;
1087 if (fEnableAdvancedCheck)
1088 fHneg->AddLast(hTOFmatchedExpTimeProVsPhiVertexNeg) ;
1091 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) ;
1092 hTOFmatchedExpTimeProVsPhiTPCNeg->Sumw2() ;
1093 if (fEnableAdvancedCheck)
1094 fHneg->AddLast(hTOFmatchedExpTimeProVsPhiTPCNeg) ;
1098 TH1F* hESDmatchedTrackEtaNegTRDout = new TH1F("hESDmatchedTrackEtaNegTRDout", "ESDs Neg matched tracks #eta with kTRDout distribution; #eta;tracks", 200, -1.0, 1.0) ;
1099 hESDmatchedTrackEtaNegTRDout->Sumw2();
1100 hESDmatchedTrackEtaNegTRDout->SetLineWidth(1);
1101 hESDmatchedTrackEtaNegTRDout->SetMarkerStyle(20);
1102 hESDmatchedTrackEtaNegTRDout->SetMarkerSize(0.7);
1103 hESDmatchedTrackEtaNegTRDout->SetLineColor(kBlue);
1104 hESDmatchedTrackEtaNegTRDout->SetMarkerColor(kBlue);
1105 if (fEnableAdvancedCheck)
1106 fHneg->AddLast(hESDmatchedTrackEtaNegTRDout);
1109 TH1F* hESDmatchedTrackEtaNegNoTRDout = new TH1F("hESDmatchedTrackEtaNegNoTRDout", "ESDs Neg matched tracks #eta with !kTRDout distribution;#eta;tracks", 200, -1.0, 1.0) ;
1110 hESDmatchedTrackEtaNegNoTRDout->Sumw2();
1111 hESDmatchedTrackEtaNegNoTRDout->SetLineWidth(1);
1112 hESDmatchedTrackEtaNegNoTRDout->SetMarkerStyle(25);
1113 hESDmatchedTrackEtaNegNoTRDout->SetMarkerSize(0.7);
1114 hESDmatchedTrackEtaNegNoTRDout->SetLineColor(kBlue);
1115 hESDmatchedTrackEtaNegNoTRDout->SetMarkerColor(kBlue);
1116 if (fEnableAdvancedCheck)
1117 fHneg->AddLast(hESDmatchedTrackEtaNegNoTRDout);
1120 TH1F* hESDmatchedTrackPhiNegTRDout = new TH1F("hESDmatchedTrackPhiNegTRDout", "ESDs Neg matched tracks #phi with kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1121 hESDmatchedTrackPhiNegTRDout->Sumw2();
1122 hESDmatchedTrackPhiNegTRDout->SetLineWidth(1);
1123 hESDmatchedTrackPhiNegTRDout->SetMarkerStyle(20);
1124 hESDmatchedTrackPhiNegTRDout->SetMarkerSize(0.7);
1125 hESDmatchedTrackPhiNegTRDout->SetLineColor(kBlue);
1126 hESDmatchedTrackPhiNegTRDout->SetMarkerColor(kBlue);
1127 if (fEnableAdvancedCheck)
1128 fHneg->AddLast(hESDmatchedTrackPhiNegTRDout);
1131 TH1F* hESDmatchedTrackPhiNegNoTRDout = new TH1F("hESDmatchedTrackPhiNegNoTRDout", "ESDs Neg matched tracks #phi with !kTRDout distribution; #phi(deg);tracks", 72, 0., 360.) ;
1132 hESDmatchedTrackPhiNegNoTRDout->Sumw2();
1133 hESDmatchedTrackPhiNegNoTRDout->SetLineWidth(1);
1134 hESDmatchedTrackPhiNegNoTRDout->SetMarkerStyle(25);
1135 hESDmatchedTrackPhiNegNoTRDout->SetMarkerSize(0.7);
1136 hESDmatchedTrackPhiNegNoTRDout->SetLineColor(kBlue);
1137 hESDmatchedTrackPhiNegNoTRDout->SetMarkerColor(kBlue);
1138 if (fEnableAdvancedCheck)
1139 fHneg->AddLast(hESDmatchedTrackPhiNegNoTRDout);
1142 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) ;
1143 hTOFmatchedExpTimePiVsPhiTPCNeg->Sumw2() ;
1144 if (fEnableAdvancedCheck)
1145 fHneg->AddLast(hTOFmatchedExpTimePiVsPhiTPCNeg) ;
1148 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) ;
1149 hTOFmatchedExpTimeKaVsPhiTPCNeg->Sumw2() ;
1150 if (fEnableAdvancedCheck)
1151 fHneg->AddLast(hTOFmatchedExpTimeKaVsPhiTPCNeg) ;
1153 PostData(1, fHlist);
1154 PostData(2, fHlistTimeZero);
1155 PostData(3, fHlistPID);
1159 //________________________________________________________________________
1160 void AliAnalysisTaskTOFqa::UserExec(Option_t *)
1162 /* Main - executed for each event.
1163 It extracts event information and track information after selecting
1164 primary tracks via standard cuts. */
1166 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
1168 Printf("ERROR: Could not get ESDInputHandler");
1171 fESD = (AliESDEvent*) esdH->GetEvent();
1175 Printf("ERROR: fESD not available");
1179 // info from V0 detector QA
1180 AliESDVZERO * vzero = fESD->GetVZEROData();
1181 Float_t V0Atime = vzero->GetV0ATime();
1182 Float_t V0Ctime = vzero->GetV0CTime();
1183 ((TH2F*)fHlistTimeZero->FindObject("hEventV0MeanVsVtx"))->Fill((V0Atime-V0Ctime)*0.5,(V0Atime+V0Ctime)*0.5);
1186 // info from T0 detector QA
1187 for (Int_t j=0;j<3;j++){
1188 fT0[j]= (Float_t) fESD->GetT0TOF(j);//ps
1189 if (fT0[j]>90000.) fT0[j]=99999.;//fix old default values to the new one
1191 Float_t t0cut = 90000.;
1192 //Float_t t0cut =3 * t0spread; //use this cut to check t0 used in tof response
1193 // if(t0cut < 500) t0cut = 500;
1195 if(TMath::Abs(fT0[1]) < t0cut && TMath::Abs(fT0[2]) < t0cut ) {
1196 //&& TMath::Abs(fT0[2]-fT0[1]) < 500) //add this condition to check t0 used in tof response
1197 ((TH1F*)fHlistTimeZero->FindObject("hT0DetRes"))->Fill((fT0[2]-fT0[1])*0.5);
1198 ((TH1F*)fHlistTimeZero->FindObject("hEventT0DetAND"))->Fill(fT0[0]);
1199 ((TH2F*)fHlistTimeZero->FindObject("hEventT0MeanVsVtx"))->Fill((fT0[2]-fT0[1])*0.5,(fT0[2]+fT0[1])*0.5);
1201 if(TMath::Abs(fT0[1]) < t0cut){
1202 ((TH1F*)fHlistTimeZero->FindObject("hEventT0DetA"))->Fill(fT0[1]);
1204 if(TMath::Abs(fT0[2]) < t0cut){
1205 ((TH1F*)fHlistTimeZero->FindObject("hEventT0DetC"))->Fill(fT0[2]);
1208 // event timeZero QA via AliESDpid::SetTOFResponse()
1209 Double_t timeZero[4]={99999.,99999.,99999.,99999.};
1210 Double_t timeZeroRes[4]={99999.,99999.,99999.,99999.};
1212 TString timeZeroHisto[4]={"hT0fill","hT0TOF","hT0T0","hT0best"};
1213 TString timeZeroHistoRes[4]={"hT0fillRes","hT0TOFRes","hT0T0Res","hT0bestRes"};
1214 for (Int_t j=0;j<4;j++){
1215 fESDpid->SetTOFResponse(fESD, (AliESDpid::EStartTimeType_t) j);//(fill_t0, tof_t0, t0_t0, best_t0)
1216 timeZero[j]=fESDpid->GetTOFResponse().GetStartTime(10.); //timeZero for bin pT>10GeV/c
1217 timeZeroRes[j]=fESDpid->GetTOFResponse().GetStartTimeRes(10.); //timeZero for bin pT>10GeV/c
1218 ((TH1D*)(fHlistTimeZero->FindObject(timeZeroHisto[j].Data())))->Fill(timeZero[j]);
1219 ((TH1D*)(fHlistTimeZero->FindObject(timeZeroHistoRes[j].Data())))->Fill(timeZeroRes[j]);
1222 //re-set response tof_t0 for all other checks
1223 fESDpid->SetTOFResponse(fESD,AliESDpid::kTOF_T0);//(fill_t0, tof_t0, t0_t0, best_t0)
1225 // loop over ESD tracks
1227 // fNPrimaryTracks=0;
1229 for (Int_t iTracks = 0; iTracks < fESD->GetNumberOfTracks(); iTracks++) {
1230 AliESDtrack* track = fESD->GetTrack(iTracks);
1232 Printf("ERROR: Could not receive track %d", iTracks);
1236 //primary tracks selection: kTPCrefit and std cuts
1238 if(!fTrackFilter->IsSelected(track)) continue;
1241 Printf("No track filter found, skipping the track loop");
1245 Double_t eta=track->Eta();
1246 if (TMath::Abs(eta)>0.8) continue; //cut for acceptance
1248 Double_t mom=track->P();
1249 Double_t mom2 = mom*mom;
1250 Double_t length=track->GetIntegratedLength();
1251 Double_t pT = track->Pt();
1252 Double_t phi=track->Phi()*TMath::RadToDeg();
1253 track->GetIntegratedTimes(fTrkExpTimes);
1255 ((TH1F*)fHlist->FindObject("hESDprimaryTrackP"))->Fill(mom);
1256 ((TH1F*)fHlist->FindObject("hESDprimaryTrackPt"))->Fill(pT);
1258 ((TH1F*)fHlist->FindObject("hTOFprimaryESDeta"))->Fill(eta);
1259 ((TH1F*)fHlist->FindObject("hTOFprimaryESDphi"))->Fill(phi);
1262 if (fEnableAdvancedCheck){
1263 if (track->GetSign()>0){
1264 ((TH1F*)fHpos->FindObject("hESDprimaryTrackPPos"))->Fill(mom);
1265 ((TH1F*)fHpos->FindObject("hESDprimaryTrackPtPos"))->Fill(pT);
1267 ((TH1F*)fHpos->FindObject("hTOFprimaryESDetaPos"))->Fill(eta);
1268 ((TH1F*)fHpos->FindObject("hTOFprimaryESDphiPos"))->Fill(phi);
1270 if ( (track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1271 ((TH1F*)fHpos->FindObject("hESDprimaryTrackPtPosTRDout"))->Fill(pT);
1273 ((TH1F*)fHpos->FindObject("hESDprimaryTrackEtaPosTRDout"))->Fill(eta);
1274 ((TH1F*)fHpos->FindObject("hESDprimaryTrackPhiPosTRDout"))->Fill(phi);
1277 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1278 ((TH1F*)fHpos->FindObject("hESDprimaryTrackPtPosNoTRDout"))->Fill(pT);
1280 ((TH1F*)fHpos->FindObject("hESDprimaryTrackEtaPosNoTRDout"))->Fill(eta);
1281 ((TH1F*)fHpos->FindObject("hESDprimaryTrackPhiPosNoTRDout"))->Fill(phi);
1286 ((TH1F*)fHneg->FindObject("hESDprimaryTrackPNeg"))->Fill(mom);
1287 ((TH1F*)fHneg->FindObject("hESDprimaryTrackPtNeg"))->Fill(pT);
1289 ((TH1F*)fHneg->FindObject("hTOFprimaryESDetaNeg"))->Fill(eta);
1290 ((TH1F*)fHneg->FindObject("hTOFprimaryESDphiNeg"))->Fill(phi);
1292 if ((track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1293 ((TH1F*)fHneg->FindObject("hESDprimaryTrackPtNegTRDout"))->Fill(pT);
1295 ((TH1F*)fHneg->FindObject("hESDprimaryTrackEtaNegTRDout"))->Fill(eta);
1296 ((TH1F*)fHneg->FindObject("hESDprimaryTrackPhiNegTRDout"))->Fill(phi);
1299 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1300 ((TH1F*)fHneg->FindObject("hESDprimaryTrackPtNegNoTRDout"))->Fill(pT);
1302 ((TH1F*)fHneg->FindObject("hESDprimaryTrackEtaNegNoTRDout"))->Fill(eta);
1303 ((TH1F*)fHneg->FindObject("hESDprimaryTrackPhiNegNoTRDout"))->Fill(phi);
1307 }//end flag advanced check
1309 //matched tracks selection: kTOFout and kTIME
1310 if ( (track->IsOn(AliESDtrack::kTOFout)) &&
1311 (track->IsOn(AliESDtrack::kTIME)) &&
1312 (track->IsOn(AliESDtrack::kTPCout)) ) {
1314 Double_t tofTime=track->GetTOFsignal();//in ps
1315 Double_t tofTimeRaw=track->GetTOFsignalRaw();//in ps
1316 Double_t tofToT=track->GetTOFsignalToT(); //in ps
1317 Int_t channel=track->GetTOFCalChannel();
1318 Int_t volId[5]; //(sector, plate,strip,padZ,padX)
1319 AliTOFGeometry::GetVolumeIndices(channel,volId);
1321 if (pT>=0.3) fNTOFtracks++; //matched counter
1322 Double_t tof= tofTime*1E-3; // ns, average T0 fill subtracted, no info from T0detector
1323 ((TH1F*)fHlist->FindObject("hTOFmatchedESDtime"))->Fill(tof); //ns
1324 ((TH1F*)fHlist->FindObject("hTOFmatchedESDrawTime"))->Fill(tofTimeRaw*1E-3); //ns
1325 ((TH1F*)fHlist->FindObject("hTOFmatchedESDToT"))->Fill(tofToT);
1326 ((TH1F*)fHlist->FindObject("hTOFmatchedESDtrkLength"))->Fill(length);
1327 ((TH1F*)fHlist->FindObject("hTOFmatchedESDP"))->Fill(mom);
1328 ((TH1F*)fHlist->FindObject("hTOFmatchedESDPt"))->Fill(pT);
1330 ((TH1F*)fHlist->FindObject("hTOFmatchedESDeta"))->Fill(eta);
1331 ((TH1F*)fHlist->FindObject("hTOFmatchedESDphi"))->Fill(phi);
1333 if (track->GetSign()>0)
1334 ((TH2F*)fHlist->FindObject("hTOFmatchedDxVsPtPos"))->Fill(pT,track->GetTOFsignalDx());
1335 else ((TH2F*)fHlist->FindObject("hTOFmatchedDxVsPtNeg"))->Fill(pT,track->GetTOFsignalDx());
1336 ((TH2F*)fHlist->FindObject("hTOFmatchedDzVsStrip"))->Fill((Int_t)GetStripIndex(volId),track->GetTOFsignalDz());
1339 if (fEnableAdvancedCheck){
1340 if (track->GetSign()>0){
1341 ((TH1F*)fHpos->FindObject("hTOFmatchedESDtrkLengthPos"))->Fill(length);
1342 ((TH1F*)fHpos->FindObject("hTOFmatchedESDPPos"))->Fill(mom);
1343 ((TH1F*)fHpos->FindObject("hTOFmatchedESDPtPos"))->Fill(pT);
1345 ((TH1F*)fHpos->FindObject("hTOFmatchedESDetaPos"))->Fill(eta);
1346 ((TH1F*)fHpos->FindObject("hTOFmatchedESDphiPos"))->Fill(phi);
1348 if ( (track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1349 ((TH1F*)fHpos->FindObject("hESDmatchedTrackPtPosTRDout"))->Fill(pT);
1351 ((TH1F*)fHpos->FindObject("hESDmatchedTrackEtaPosTRDout"))->Fill(eta);
1352 ((TH1F*)fHpos->FindObject("hESDmatchedTrackPhiPosTRDout"))->Fill(phi);
1355 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1356 ((TH1F*)fHpos->FindObject("hESDmatchedTrackPtPosNoTRDout"))->Fill(pT);
1358 ((TH1F*)fHpos->FindObject("hESDmatchedTrackEtaPosNoTRDout"))->Fill(eta);
1359 ((TH1F*)fHpos->FindObject("hESDmatchedTrackPhiPosNoTRDout"))->Fill(phi);
1364 ((TH1F*)fHneg->FindObject("hTOFmatchedESDtrkLengthNeg"))->Fill(length);
1365 ((TH1F*)fHneg->FindObject("hTOFmatchedESDPNeg"))->Fill(mom);
1366 ((TH1F*)fHneg->FindObject("hTOFmatchedESDPtNeg"))->Fill(pT);
1368 ((TH1F*)fHneg->FindObject("hTOFmatchedESDetaNeg"))->Fill(eta);
1369 ((TH1F*)fHneg->FindObject("hTOFmatchedESDphiNeg"))->Fill(phi);
1371 if ((track->IsOn(AliESDtrack::kTRDout)) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1372 ((TH1F*)fHneg->FindObject("hESDmatchedTrackPtNegTRDout"))->Fill(pT);
1374 ((TH1F*)fHneg->FindObject("hESDmatchedTrackEtaNegTRDout"))->Fill(eta);
1375 ((TH1F*)fHneg->FindObject("hESDmatchedTrackPhiNegTRDout"))->Fill(phi);
1378 if ((!(track->IsOn(AliESDtrack::kTRDout))) && (track->IsOn(AliESDtrack::kTPCout)) ) {
1379 ((TH1F*)fHneg->FindObject("hESDmatchedTrackPtNegNoTRDout"))->Fill(pT);
1381 ((TH1F*)fHneg->FindObject("hESDmatchedTrackEtaNegNoTRDout"))->Fill(eta);
1382 ((TH1F*)fHneg->FindObject("hESDmatchedTrackPhiNegNoTRDout"))->Fill(phi);
1386 }//end advanced check
1388 //basic PID performance check
1390 printf("WARNING: track with negative TOF time found! Skipping this track for PID checks\n");
1394 printf("WARNING: track with negative square momentum found! Skipping this track for PID checks\n");
1398 printf("WARNING: track with negative length found!Skipping this track for PID checks\n");
1401 Double_t c=TMath::C()*1.E-9;// m/ns
1402 Double_t mass=0.; //GeV
1403 length =length*0.01; // in meters
1405 Double_t beta=length/tof;
1406 Double_t fact= (tof/length)*(tof/length) -1.;
1408 mass = -mom*TMath::Sqrt(-fact);
1410 mass = mom*TMath::Sqrt(fact);
1412 ((TH2F*)fHlistPID->FindObject("hTOFmatchedESDpVsBeta"))->Fill(mom,beta);
1413 ((TH1F*) fHlistPID->FindObject("hTOFmatchedMass"))->Fill(mass);
1416 Bool_t isValidBeta[AliPID::kSPECIES]={0,0,0,0,0};
1417 for (Int_t specie = 0; specie < AliPID::kSPECIES; specie++){
1418 fSigmaSpecie[specie] = fESDpid->GetTOFResponse().GetExpectedSigma(mom, fTrkExpTimes[specie], AliPID::ParticleMass(specie));
1419 beta=1/TMath::Sqrt(1+AliPID::ParticleMass(specie)*AliPID::ParticleMass(specie)/(mom2));
1421 fThExpTimes[specie]=length*1.E3/(beta*c);//ps
1422 isValidBeta[specie]=kTRUE;
1424 fThExpTimes[specie]=1E-10;
1425 isValidBeta[specie]=kFALSE;
1429 if (isValidBeta[AliPID::kPion]){
1430 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimePiVsEta"))->Fill((Int_t)GetStripIndex(volId),tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1431 ((TH1F*)fHlistPID->FindObject("hTOFmatchedExpTimePi"))->Fill(tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1432 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimePiVsP"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1433 if ((pT>=0.95)&&(pT<=1.05)){
1434 Double_t t0tofTrack=fESDpid->GetTOFResponse().GetStartTime(pT);
1435 ((TH1F*)fHlistPID->FindObject("hTOFmatchedTimePion1GeV"))->Fill(tofTime-t0tofTrack-fTrkExpTimes[AliPID::kPion]);
1437 ((TH1F*)fHlistPID->FindObject("hTOFtheoreticalExpTimePi"))->Fill(tofTime-fThExpTimes[AliPID::kPion]);//ps
1438 ((TH2F*)fHlistPID->FindObject("hTOFtheoreticalExpTimePiVsP"))->Fill(mom,(tofTime-fThExpTimes[AliPID::kPion]));
1439 ((TH2F*)fHlistPID->FindObject("hTOFExpSigmaPi"))->Fill(pT,(tofTime-fTrkExpTimes[AliPID::kPion])/fSigmaSpecie[AliPID::kPion]);
1442 if (isValidBeta[AliPID::kKaon]){
1443 ((TH1F*)fHlistPID->FindObject("hTOFmatchedExpTimeKa"))->Fill(tofTime-fTrkExpTimes[AliPID::kKaon]);//ps
1444 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeKaVsP"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1445 ((TH1F*)fHlistPID->FindObject("hTOFtheoreticalExpTimeKa"))->Fill(tofTime-fThExpTimes[AliPID::kKaon]);//ps
1446 ((TH2F*)fHlistPID->FindObject("hTOFtheoreticalExpTimeKaVsP"))->Fill(mom,(tofTime-fThExpTimes[AliPID::kKaon]));
1447 ((TH2F*)fHlistPID->FindObject("hTOFExpSigmaKa"))->Fill(pT,(tofTime-fTrkExpTimes[AliPID::kKaon])/fSigmaSpecie[AliPID::kKaon]);
1449 if (isValidBeta[AliPID::kProton]){
1450 ((TH1F*)fHlistPID->FindObject("hTOFmatchedExpTimePro"))->Fill(tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1451 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeProVsP"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1452 ((TH1F*)fHlistPID->FindObject("hTOFtheoreticalExpTimePro"))->Fill(tofTime-fThExpTimes[AliPID::kProton]);//ps
1453 ((TH2F*)fHlistPID->FindObject("hTOFtheoreticalExpTimeProVsP"))->Fill(mom,(tofTime-fThExpTimes[AliPID::kProton]));
1454 ((TH2F*)fHlistPID->FindObject("hTOFExpSigmaPro"))->Fill(pT,(tofTime-fTrkExpTimes[AliPID::kProton])/fSigmaSpecie[AliPID::kProton]);
1457 if (fEnableAdvancedCheck && (pT<1.)) {
1458 Double_t pos[3]={0.,0.,0.};
1459 track->GetXYZAt(378.,5.,pos);
1460 if ((pos[0]==0.)&&(pos[1]==0.)&&(pos[2]==0.))continue;
1462 Double_t phiTOF=TMath::ATan2(pos[1],pos[0])*TMath::RadToDeg();
1463 if (phiTOF<0) phiTOF+= (2*TMath::Pi()*TMath::RadToDeg());
1465 if (isValidBeta[AliPID::kProton]){
1466 if (track->GetSign()>0){
1467 ((TH2F*)fHpos->FindObject("hTOFmatchedExpTimeProVsPhiPos"))->Fill(phiTOF,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1468 ((TH2F*)fHpos->FindObject("hTOFmatchedExpTimeProVsPhiVertexPos"))->Fill(phi,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1470 ((TH2F*)fHneg->FindObject("hTOFmatchedExpTimeProVsPhiNeg"))->Fill(phiTOF,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1471 ((TH2F*)fHneg->FindObject("hTOFmatchedExpTimeProVsPhiVertexNeg"))->Fill(phi,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1475 track->GetOuterXYZ(pos);
1476 Double_t phiOuterTPC=TMath::ATan2(pos[1],pos[0])*TMath::RadToDeg();
1477 if (phiOuterTPC<0) phiOuterTPC+= (2*TMath::Pi()*TMath::RadToDeg());
1479 if (track->GetSign()>0){
1480 if (isValidBeta[AliPID::kProton])
1481 ((TH2F*)fHpos->FindObject("hTOFmatchedExpTimeProVsPhiTPCPos"))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1482 if (isValidBeta[AliPID::kPion])
1483 ((TH2F*)fHpos->FindObject("hTOFmatchedExpTimePiVsPhiTPCPos"))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1484 if (isValidBeta[AliPID::kKaon])
1485 ((TH2F*)fHpos->FindObject("hTOFmatchedExpTimeKaVsPhiTPCPos"))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kKaon]);//ps
1487 if ((phiOuterTPC<=30) || ((phiOuterTPC>=150)&&(phiOuterTPC<=230)) || (phiOuterTPC>=310) ) { //TRD sectors
1488 if (isValidBeta[AliPID::kPion])
1489 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimePiVsPTRDPos"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1490 if (isValidBeta[AliPID::kKaon])
1491 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeKaVsPTRDPos"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1492 if (isValidBeta[AliPID::kProton])
1493 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeProVsPTRDPos"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1495 if ( ((phiOuterTPC>=50)&&(phiOuterTPC<=130)) || ((phiOuterTPC>=250)&&(phiOuterTPC<=290)) ) {//no TRD sectors
1496 if (isValidBeta[AliPID::kPion])
1497 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimePiVsPNoTRDPos"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1498 if (isValidBeta[AliPID::kKaon])
1499 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeKaVsPNoTRDPos"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1500 if (isValidBeta[AliPID::kProton])
1501 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeProVsPNoTRDPos"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1504 if (isValidBeta[AliPID::kPion])
1505 ((TH2F*)fHneg->FindObject("hTOFmatchedExpTimePiVsPhiTPCNeg"))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kPion]);//ps
1506 if (isValidBeta[AliPID::kKaon])
1507 ((TH2F*)fHneg->FindObject("hTOFmatchedExpTimeKaVsPhiTPCNeg"))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kKaon]);//ps
1508 if (isValidBeta[AliPID::kProton])
1509 ((TH2F*)fHneg->FindObject("hTOFmatchedExpTimeProVsPhiTPCNeg"))->Fill(phiOuterTPC,tofTime-fTrkExpTimes[AliPID::kProton]);//ps
1511 if ((phiOuterTPC<=30) || ((phiOuterTPC>=150)&&(phiOuterTPC<=230)) || (phiOuterTPC>=310) ) { //TRD sectors
1512 if (isValidBeta[AliPID::kPion])
1513 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimePiVsPTRDNeg"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1514 if (isValidBeta[AliPID::kKaon])
1515 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeKaVsPTRDNeg"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1516 if (isValidBeta[AliPID::kProton])
1517 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeProVsPTRDNeg"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1519 if ( ((phiOuterTPC>=50)&&(phiOuterTPC<=130)) || ((phiOuterTPC>=250)&&(phiOuterTPC<=290)) ) {//no TRD sectors
1520 if (isValidBeta[AliPID::kPion])
1521 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimePiVsPNoTRDNeg"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kPion]));
1522 if (isValidBeta[AliPID::kKaon])
1523 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeKaVsPNoTRDNeg"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kKaon]));
1524 if (isValidBeta[AliPID::kProton])
1525 ((TH2F*)fHlistPID->FindObject("hTOFmatchedExpTimeProVsPNoTRDNeg"))->Fill(mom,(tofTime-fTrkExpTimes[AliPID::kProton]));
1529 }//end advanced checks && cut on pT for t-texp phi distrib
1531 }//end loop on tracks
1533 ((TH1F*)fHlist->FindObject("hTOFmatchedPerEvt"))->Fill(fNTOFtracks) ;
1534 ((TH2F*)fHlistTimeZero->FindObject("hT0TOFvsNtrk"))->Fill(fNTOFtracks,timeZero[AliESDpid::kTOF_T0]);
1536 PostData(1, fHlist);
1537 PostData(2, fHlistTimeZero);
1538 PostData(3, fHlistPID);
1544 //________________________________________________________________________
1545 void AliAnalysisTaskTOFqa::Terminate(Option_t *)
1547 //check on output validity
1548 fHlist = dynamic_cast<TList*> (GetOutputData(1));
1549 if (!fHlist || !fHlistTimeZero) {
1550 Printf("ERROR: lists not available");
1556 //---------------------------------------------------------------
1557 Int_t AliAnalysisTaskTOFqa::GetStripIndex(const Int_t * const in)
1559 /* return tof strip index between 0 and 91 */
1561 Int_t nStripA = AliTOFGeometry::NStripA();
1562 Int_t nStripB = AliTOFGeometry::NStripB();
1563 Int_t nStripC = AliTOFGeometry::NStripC();
1565 Int_t iplate = in[1];
1566 Int_t istrip = in[2];
1568 Int_t stripOffset = 0;
1574 stripOffset = nStripC;
1577 stripOffset = nStripC+nStripB;
1580 stripOffset = nStripC+nStripB+nStripA;
1583 stripOffset = nStripC+nStripB+nStripA+nStripB;
1590 if (stripOffset<0 || stripOffset>92) return -1;
1592 return (stripOffset+istrip);