1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercialf purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliTRDtrackingResolution.cxx 27496 2008-07-22 08:35:45Z cblume $ */
18 ////////////////////////////////////////////////////////////////////////////
20 // TRD tracking resolution //
22 // The class performs resolution and residual studies
23 // of the TRD tracks for the following quantities :
24 // - spatial position (y, [z])
25 // - angular (phi) tracklet
26 // - momentum at the track level
28 // The class has to be used for regular detector performance checks using the official macros:
29 // - $ALICE_ROOT/TRD/qaRec/run.C
30 // - $ALICE_ROOT/TRD/qaRec/makeResults.C
32 // For stand alone usage please refer to the following example:
34 // gSystem->Load("libANALYSIS.so");
35 // gSystem->Load("libTRDqaRec.so");
36 // AliTRDtrackingResolution *res = new AliTRDtrackingResolution();
37 // //res->SetMCdata();
38 // //res->SetVerbose();
39 // //res->SetVisual();
40 // res->Load("TRD.TaskResolution.root");
41 // if(!res->PostProcess()) return;
42 // res->GetRefFigure(0);
46 // Alexandru Bercuci <A.Bercuci@gsi.de> //
47 // Markus Fasel <M.Fasel@gsi.de> //
49 ////////////////////////////////////////////////////////////////////////////
54 #include <TObjArray.h>
61 #include <TGraphErrors.h>
63 #include "TTreeStream.h"
64 #include "TGeoManager.h"
66 #include "AliAnalysisManager.h"
67 #include "AliTrackReference.h"
68 #include "AliTrackPointArray.h"
69 #include "AliCDBManager.h"
71 #include "AliTRDSimParam.h"
72 #include "AliTRDgeometry.h"
73 #include "AliTRDpadPlane.h"
74 #include "AliTRDcluster.h"
75 #include "AliTRDseedV1.h"
76 #include "AliTRDtrackV1.h"
77 #include "AliTRDtrackerV1.h"
78 #include "AliTRDReconstructor.h"
79 #include "AliTRDrecoParam.h"
81 #include "AliTRDtrackInfo/AliTRDclusterInfo.h"
82 #include "AliTRDtrackInfo/AliTRDtrackInfo.h"
83 #include "AliTRDtrackingResolution.h"
85 ClassImp(AliTRDtrackingResolution)
87 //________________________________________________________
88 AliTRDtrackingResolution::AliTRDtrackingResolution()
89 :AliTRDrecoTask("Resolution", "Tracking Resolution")
97 ,fTrkltResolution(0x0)
99 fReconstructor = new AliTRDReconstructor();
100 fReconstructor->SetRecoParam(AliTRDrecoParam::GetLowFluxParam());
101 fGeo = new AliTRDgeometry();
105 DefineOutput(1+kClusterResidual, TObjArray::Class());
106 DefineOutput(1+kClusterResolution, TObjArray::Class());
107 DefineOutput(1+kTrackletYResolution, TObjArray::Class());
110 //________________________________________________________
111 AliTRDtrackingResolution::~AliTRDtrackingResolution()
113 if(fGraphS){fGraphS->Delete(); delete fGraphS;}
114 if(fGraphM){fGraphM->Delete(); delete fGraphM;}
116 delete fReconstructor;
117 if(gGeoManager) delete gGeoManager;
118 if(fClResiduals){fClResiduals->Delete(); delete fClResiduals;}
119 if(fClResolution){fClResolution->Delete(); delete fClResolution;}
120 if(fTrkltResolution){fTrkltResolution->Delete(); delete fTrkltResolution;}
124 //________________________________________________________
125 void AliTRDtrackingResolution::CreateOutputObjects()
127 // spatial resolution
128 OpenFile(0, "RECREATE");
130 fContainer = Histos();
132 fClResiduals = new TObjArray();
133 fClResiduals->SetOwner(kTRUE);
134 fClResolution = new TObjArray();
135 fClResolution->SetOwner(kTRUE);
136 fTrkltResolution = new TObjArray();
137 fTrkltResolution->SetOwner(kTRUE);
140 //________________________________________________________
141 void AliTRDtrackingResolution::Exec(Option_t *opt)
143 fClResiduals->Delete();
144 fClResolution->Delete();
145 fTrkltResolution->Delete();
147 AliTRDrecoTask::Exec(opt);
149 PostData(1+kClusterResidual, fClResiduals);
150 PostData(1+kClusterResolution, fClResolution);
151 PostData(1+kTrackletYResolution, fTrkltResolution);
154 //________________________________________________________
155 TH1* AliTRDtrackingResolution::PlotClusterResiduals(const AliTRDtrackV1 *track)
157 if(track) fTrack = track;
159 AliWarning("No Track defined.");
163 if(!(h = ((TH2I*)fContainer->At(kClusterResidual)))){
164 AliWarning("No output histogram defined.");
168 Int_t pdg = (HasMCdata() && fMC) ? fMC->GetPDG() : 0;
170 Float_t x0, y0, z0, dy, dydx, dzdx;
171 AliTRDseedV1 *fTracklet = 0x0;
172 for(Int_t ily=0; ily<AliTRDgeometry::kNlayer; ily++){
173 if(!(fTracklet = fTrack->GetTracklet(ily))) continue;
174 if(!fTracklet->IsOK()) continue;
175 x0 = fTracklet->GetX0();
177 // retrive the track angle with the chamber
178 if(HasMCdata() && fMC){
179 if(!fMC->GetDirections(x0, y0, z0, dydx, dzdx, s)) continue;
181 y0 = fTracklet->GetYref(0);
182 z0 = fTracklet->GetZref(0);
183 dydx = fTracklet->GetYref(1);
184 dzdx = fTracklet->GetZref(1);
187 AliTRDseedV1 trklt(*fTracklet);
188 if(!trklt.Fit(kFALSE)) continue;
190 AliTRDcluster *c = 0x0;
191 fTracklet->ResetClusterIter(kFALSE);
192 while((c = fTracklet->PrevCluster())){
193 dy = trklt.GetYat(c->GetX()) - c->GetY();
197 Float_t q = c->GetQ();
198 // Get z-position with respect to anode wire
199 AliTRDSimParam *simParam = AliTRDSimParam::Instance();
200 Int_t det = c->GetDetector();
201 Float_t x = c->GetX();
202 Float_t z = z0-(x0-x)*dzdx;
203 Int_t istk = fGeo->GetStack(det);
204 AliTRDpadPlane *pp = fGeo->GetPadPlane(ily, istk);
205 Float_t row0 = pp->GetRow0();
206 Float_t d = row0 - z + simParam->GetAnodeWireOffset();
207 d -= ((Int_t)(2 * d)) / 2.0;
208 if (d > 0.25) d = 0.5 - d;
210 (*fDebugStream) << "ClusterResidual"
230 //________________________________________________________
231 TH1* AliTRDtrackingResolution::PlotResolution(const AliTRDtrackV1 *track)
234 AliWarning("No MC defined. Results will not be available.");
237 if(track) fTrack = track;
239 AliWarning("No Track defined.");
243 if(!(h = ((TH2I*)fContainer->At(kClusterResolution)))){
244 AliWarning("No output histogram defined.");
247 if(!(h = ((TH2I*)fContainer->At(kTrackletYResolution)))){
248 AliWarning("No output histogram defined.");
251 if(!(h = ((TH2I*)fContainer->At(kTrackletZResolution)))){
252 AliWarning("No output histogram defined.");
255 if(!(h = ((TH2I*)fContainer->At(kTrackletAngleResolution)))){
256 AliWarning("No output histogram defined.");
259 //printf("called for %d tracklets ... \n", fTrack->GetNumberOfTracklets());
261 Int_t pdg = fMC->GetPDG(), det=-1;
262 Float_t x0, y0, z0, dy, dydx, dzdx;
263 AliTRDseedV1 *fTracklet = 0x0;
264 for(Int_t ily=0; ily<AliTRDgeometry::kNlayer; ily++){
265 if(!(fTracklet = fTrack->GetTracklet(ily))) continue;
266 if(!fTracklet->IsOK()) continue;
267 //printf("process layer[%d]\n", ily);
268 // retrive the track position and direction within the chamber
269 det = fTracklet->GetDetector();
270 x0 = fTracklet->GetX0();
271 if(!fMC->GetDirections(x0, y0, z0, dydx, dzdx, s)) continue;
273 // recalculate tracklet based on the MC info
274 AliTRDseedV1 tt(*fTracklet);
277 if(!tt.Fit(kFALSE)) continue;
279 dy = tt.GetYfit(0) - y0;
280 Float_t dphi = TMath::ATan(tt.GetYfit(1)) - TMath::ATan(dydx);
282 Bool_t cross = fTracklet->GetNChange();
284 Double_t *xyz = tt.GetCrossXYZ();
285 dz = xyz[2] - (z0 - (x0 - xyz[0])*dzdx) ;
286 ((TH2I*)fContainer->At(kTrackletZResolution))->Fill(dzdx, dz);
290 ((TH2I*)fContainer->At(kTrackletYResolution))->Fill(dydx, dy);
291 ((TH2I*)fContainer->At(kTrackletAngleResolution))->Fill(dydx, dphi*TMath::RadToDeg());
295 Float_t p = fMC->GetTrackRef() ? fMC->GetTrackRef()->P() : -1.;
296 (*fDebugStream) << "TrkltResolution"
311 Int_t istk = AliTRDgeometry::GetStack(det);
312 AliTRDpadPlane *pp = fGeo->GetPadPlane(ily, istk);
313 Float_t zr0 = pp->GetRow0() + AliTRDSimParam::Instance()->GetAnodeWireOffset();
314 Float_t tilt = fTracklet->GetTilt();
316 AliTRDcluster *c = 0x0;
317 fTracklet->ResetClusterIter(kFALSE);
318 while((c = fTracklet->PrevCluster())){
319 Float_t q = TMath::Abs(c->GetQ());
320 Float_t xc = c->GetX();
321 Float_t yc = c->GetY();
322 Float_t zc = c->GetZ();
323 Float_t dx = x0 - xc;
324 Float_t yt = y0 - dx*dydx;
325 Float_t zt = z0 - dx*dzdx;
326 dy = yt - (yc - tilt*(zc-zt));
329 if(q>100.) ((TH2I*)fContainer->At(kClusterResolution))->Fill(dydx, dy);
333 Float_t d = zr0 - zt;
334 d -= ((Int_t)(2 * d)) / 2.0;
335 if (d > 0.25) d = 0.5 - d;
336 Int_t label = fMC->GetLabel();
338 AliTRDclusterInfo *clInfo = new AliTRDclusterInfo;
339 fClResolution->Add(clInfo);
340 clInfo->SetCluster(c);
341 clInfo->SetMC(pdg, label);
342 clInfo->SetGlobalPosition(yt, zt, dydx, dzdx);
343 clInfo->SetResolution(dy);
344 clInfo->SetAnisochronity(d);
345 clInfo->SetDriftLength(x0-xc);
347 (*fDebugStream) << "ClusterResolution"
348 <<"clInfo.=" << clInfo
357 //________________________________________________________
358 void AliTRDtrackingResolution::GetRefFigure(Int_t ifig)
362 TGraphErrors *g = 0x0;
364 case kClusterResidual:
365 if(!(g = (TGraphErrors*)fGraphS->At(ifig))) break;
367 ax = g->GetHistogram()->GetYaxis();
368 ax->SetRangeUser(-.5, 1.);
369 ax->SetTitle("Clusters Y Residuals #sigma/#mu [mm]");
370 ax = g->GetHistogram()->GetXaxis();
371 ax->SetTitle("tg(#phi)");
372 if(!(g = (TGraphErrors*)fGraphM->At(ifig))) break;
374 b = new TBox(-.15, -.5, .15, 1.);
375 b->SetFillStyle(3002);b->SetFillColor(kGreen);
376 b->SetLineColor(0); b->Draw();
378 case kClusterResolution:
379 if(!(g = (TGraphErrors*)fGraphS->At(ifig))) break;
380 ax = g->GetHistogram()->GetYaxis();
381 ax->SetRangeUser(-.5, 1.);
382 ax->SetTitle("Cluster Y Resolution #sigma/#mu [mm]");
383 ax = g->GetHistogram()->GetXaxis();
384 ax->SetTitle("tg(#phi)");
386 if(!(g = (TGraphErrors*)fGraphM->At(ifig))) break;
388 b = new TBox(-.15, -.5, .15, 1.);
389 b->SetFillStyle(3002);b->SetFillColor(kGreen);
390 b->SetLineColor(0); b->Draw();
392 case kTrackletYResolution:
393 if(!(g = (TGraphErrors*)fGraphS->At(ifig))) break;
394 ax = g->GetHistogram()->GetYaxis();
395 ax->SetRangeUser(-.5, 1.);
396 ax->SetTitle("Tracklet Y Resolution #sigma/#mu [mm]");
397 ax = g->GetHistogram()->GetXaxis();
398 ax->SetTitle("tg(#phi)");
400 if(!(g = (TGraphErrors*)fGraphM->At(ifig))) break;
403 case kTrackletZResolution:
404 if(!(g = (TGraphErrors*)fGraphS->At(ifig))) break;
405 ax = g->GetHistogram()->GetYaxis();
406 ax->SetRangeUser(-.5, 1.);
407 ax->SetTitle("Tracklet Z Resolution #sigma/#mu [mm]");
408 ax = g->GetHistogram()->GetXaxis();
409 ax->SetTitle("tg(#theta)");
411 if(!(g = (TGraphErrors*)fGraphM->At(ifig))) break;
414 case kTrackletAngleResolution:
415 if(!(g = (TGraphErrors*)fGraphS->At(ifig))) break;
416 ax = g->GetHistogram()->GetYaxis();
417 ax->SetRangeUser(-.05, .2);
418 ax->SetTitle("Tracklet Angular Resolution #sigma/#mu [deg]");
419 ax = g->GetHistogram()->GetXaxis();
420 ax->SetTitle("tg(#phi)");
422 if(!(g = (TGraphErrors*)fGraphM->At(ifig))) break;
426 AliInfo(Form("Reference plot [%d] not implemented yet", ifig));
429 AliInfo(Form("Reference plot [%d] missing result", ifig));
433 //________________________________________________________
434 Bool_t AliTRDtrackingResolution::PostProcess()
436 //fContainer = dynamic_cast<TObjArray*>(GetOutputData(0));
438 Printf("ERROR: list not available");
441 fNRefFigures = fContainer->GetEntriesFast();
443 fGraphS = new TObjArray(fNRefFigures);
447 fGraphM = new TObjArray(fNRefFigures);
453 TGraphErrors *gm = 0x0, *gs = 0x0;
456 TF1 f("f1", "gaus", -.5, .5);
458 TF1 fb("fb", "[0]*exp(-0.5*((x-[1])/[2])**2)+[3]", -.5, .5);
460 TF1 fc("fc", "[0]*exp(-0.5*((x-[1])/[2])**2)+[3]*exp(-0.5*((x-[4])/[5])**2)", -.5, .5);
463 if(IsVisual()) c = new TCanvas("c", Form("%s Visual", GetName()), 500, 500);
465 sprintf(opt, "%c%c", IsVerbose() ? ' ' : 'Q', IsVisual() ? ' ': 'N');
468 //PROCESS RESIDUAL DISTRIBUTIONS
470 // Clusters residuals
471 h2 = (TH2I *)(fContainer->At(kClusterResidual));
472 gm = new TGraphErrors();
473 gm->SetLineColor(kBlue);
474 gm->SetMarkerStyle(7);
475 gm->SetMarkerColor(kBlue);
476 gm->SetNameTitle("clm", "");
477 fGraphM->AddAt(gm, kClusterResidual);
478 gs = new TGraphErrors();
479 gs->SetLineColor(kRed);
480 gs->SetMarkerStyle(23);
481 gs->SetMarkerColor(kRed);
482 gs->SetNameTitle("cls", "");
483 fGraphS->AddAt(gs, kClusterResidual);
484 for(Int_t ibin = 1; ibin <= h2->GetNbinsX(); ibin++){
485 Double_t phi = h2->GetXaxis()->GetBinCenter(ibin);
486 h = h2->ProjectionY("py", ibin, ibin);
487 if(h->GetEntries()<100) continue;
490 if(IsVisual()){c->cd(); c->SetLogy();}
491 h->Fit(&f, opt, "", -0.5, 0.5);
492 if(IsVisual()){c->Modified(); c->Update(); gSystem->Sleep(500);}
494 Int_t ip = gm->GetN();
495 gm->SetPoint(ip, phi, 10.*f.GetParameter(1));
496 gm->SetPointError(ip, 0., 10.*f.GetParError(1));
497 gs->SetPoint(ip, phi, 10.*f.GetParameter(2));
498 gs->SetPointError(ip, 0., 10.*f.GetParError(2));
502 //PROCESS RESOLUTION DISTRIBUTIONS
505 // cluster y resolution
506 h2 = (TH2I*)fContainer->At(kClusterResolution);
507 gm = new TGraphErrors();
508 gm->SetLineColor(kBlue);
509 gm->SetMarkerStyle(7);
510 gm->SetMarkerColor(kBlue);
511 gm->SetNameTitle("clym", "");
512 fGraphM->AddAt(gm, kClusterResolution);
513 gs = new TGraphErrors();
514 gs->SetLineColor(kRed);
515 gs->SetMarkerStyle(23);
516 gs->SetMarkerColor(kRed);
517 gs->SetNameTitle("clys", "");
518 fGraphS->AddAt(gs, kClusterResolution);
519 for(Int_t iphi=1; iphi<=h2->GetNbinsX(); iphi++){
520 h = h2->ProjectionY("py", iphi, iphi);
521 if(h->GetEntries()<100) continue;
524 if(IsVisual()){c->cd(); c->SetLogy();}
525 h->Fit(&f, opt, "", -0.5, 0.5);
527 printf("phi[%d] mean[%e] sigma[%e]\n\n", iphi, 10.*f.GetParameter(1), 10.*f.GetParameter(2));
529 if(IsVisual()){c->Modified(); c->Update(); gSystem->Sleep(500);}
531 Double_t phi = h2->GetXaxis()->GetBinCenter(iphi);
532 Int_t ip = gm->GetN();
533 gm->SetPoint(ip, phi, 10.*f.GetParameter(1));
534 gm->SetPointError(ip, 0., 10.*f.GetParError(1));
535 gs->SetPoint(ip, phi, 10.*f.GetParameter(2));
536 gs->SetPointError(ip, 0., 10.*f.GetParError(2));
539 // tracklet y resolution
540 h2 = (TH2I*)fContainer->At(kTrackletYResolution);
541 gm = new TGraphErrors();
542 gm->SetLineColor(kBlue);
543 gm->SetMarkerStyle(7);
544 gm->SetMarkerColor(kBlue);
545 gm->SetNameTitle("trkltym", "");
546 fGraphM->AddAt(gm, kTrackletYResolution);
547 gs = new TGraphErrors();
548 gs->SetLineColor(kRed);
549 gs->SetMarkerStyle(23);
550 gs->SetMarkerColor(kRed);
551 gs->SetNameTitle("trkltys", "");
552 fGraphS->AddAt(gs, kTrackletYResolution);
553 for(Int_t iphi=1; iphi<=h2->GetNbinsX(); iphi++){
554 h = h2->ProjectionY("py", iphi, iphi);
555 if(h->GetEntries()<100) continue;
558 if(IsVisual()){c->cd(); c->SetLogy();}
559 h->Fit(&fb, opt, "", -0.5, 0.5);
560 if(IsVisual()){c->Modified(); c->Update(); gSystem->Sleep(500);}
562 Double_t phi = h2->GetXaxis()->GetBinCenter(iphi);
563 Int_t ip = gm->GetN();
564 gm->SetPoint(ip, phi, 10.*fb.GetParameter(1));
565 gm->SetPointError(ip, 0., 10.*fb.GetParError(1));
566 gs->SetPoint(ip, phi, 10.*fb.GetParameter(2));
567 gs->SetPointError(ip, 0., 10.*fb.GetParError(2));
570 // tracklet z resolution
571 h2 = (TH2I*)fContainer->At(kTrackletZResolution);
572 gm = new TGraphErrors();
573 gm->SetLineColor(kBlue);
574 gm->SetMarkerStyle(7);
575 gm->SetMarkerColor(kBlue);
576 gm->SetNameTitle("trkltzm", "");
577 fGraphM->AddAt(gm, kTrackletZResolution);
578 gs = new TGraphErrors();
579 gs->SetLineColor(kRed);
580 gs->SetMarkerStyle(23);
581 gs->SetMarkerColor(kRed);
582 gs->SetNameTitle("trkltzs", "");
583 fGraphS->AddAt(gs, kTrackletZResolution);
584 for(Int_t iphi=1; iphi<=h2->GetNbinsX(); iphi++){
585 h = h2->ProjectionY("py", iphi, iphi);
586 if(h->GetEntries()<100) continue;
589 if(IsVisual()){c->cd(); c->SetLogy();}
590 h->Fit(&fb, opt, "", -0.5, 0.5);
591 if(IsVisual()){c->Modified(); c->Update(); gSystem->Sleep(500);}
593 Double_t phi = h2->GetXaxis()->GetBinCenter(iphi);
594 Int_t ip = gm->GetN();
595 gm->SetPoint(ip, phi, 10.*fb.GetParameter(1));
596 gm->SetPointError(ip, 0., 10.*fb.GetParError(1));
597 gs->SetPoint(ip, phi, 10.*fb.GetParameter(2));
598 gs->SetPointError(ip, 0., 10.*fb.GetParError(2));
601 // tracklet phi resolution
602 h2 = (TH2I*)fContainer->At(kTrackletAngleResolution);
603 gm = new TGraphErrors();
604 gm->SetLineColor(kBlue);
605 gm->SetMarkerStyle(7);
606 gm->SetMarkerColor(kBlue);
607 gm->SetNameTitle("trkltym", "");
608 fGraphM->AddAt(gm, kTrackletAngleResolution);
609 gs = new TGraphErrors();
610 gs->SetLineColor(kRed);
611 gs->SetMarkerStyle(23);
612 gs->SetMarkerColor(kRed);
613 gs->SetNameTitle("trkltys", "");
614 fGraphS->AddAt(gs, kTrackletAngleResolution);
615 for(Int_t iphi=1; iphi<=h2->GetNbinsX(); iphi++){
616 h = h2->ProjectionY("py", iphi, iphi);
617 if(h->GetEntries()<100) continue;
619 if(IsVisual()){c->cd(); c->SetLogy();}
620 h->Fit(&f, opt, "", -0.5, 0.5);
621 if(IsVisual()){c->Modified(); c->Update(); gSystem->Sleep(500);}
623 Double_t phi = h2->GetXaxis()->GetBinCenter(iphi);
624 Int_t ip = gm->GetN();
625 gm->SetPoint(ip, phi, f.GetParameter(1));
626 gm->SetPointError(ip, 0., f.GetParError(1));
627 gs->SetPoint(ip, phi, f.GetParameter(2));
628 gs->SetPointError(ip, 0., f.GetParError(2));
637 //________________________________________________________
638 void AliTRDtrackingResolution::Terminate(Option_t *)
645 if(HasPostProcess()) PostProcess();
648 //________________________________________________________
649 void AliTRDtrackingResolution::AdjustF1(TH1 *h, TF1 *f)
651 // Helper function to avoid duplication of code
652 // Make first guesses on the fit parameters
654 // find the intial parameters of the fit !! (thanks George)
655 Int_t nbinsy = Int_t(.5*h->GetNbinsX());
657 for(Int_t jbin=nbinsy-4; jbin<=nbinsy+4; jbin++) sum+=h->GetBinContent(jbin); sum/=9.;
658 f->SetParLimits(0, 0., 3.*sum);
659 f->SetParameter(0, .9*sum);
661 f->SetParLimits(1, -.2, .2);
662 f->SetParameter(1, -0.1);
664 f->SetParLimits(2, 0., 4.e-1);
665 f->SetParameter(2, 2.e-2);
666 if(f->GetNpar() <= 4) return;
668 f->SetParLimits(3, 0., sum);
669 f->SetParameter(3, .1*sum);
671 f->SetParLimits(4, -.3, .3);
672 f->SetParameter(4, 0.);
674 f->SetParLimits(5, 0., 1.e2);
675 f->SetParameter(5, 2.e-1);
678 //________________________________________________________
679 TObjArray* AliTRDtrackingResolution::Histos()
681 if(fContainer) return fContainer;
683 fContainer = new TObjArray(5);
686 // cluster to tracklet residuals [2]
687 fContainer->AddAt(h = new TH2I("fYCl", "Clusters Residuals", 21, -.33, .33, 100, -.5, .5), kClusterResidual);
688 h->GetXaxis()->SetTitle("tg(#phi)");
689 h->GetYaxis()->SetTitle("#Delta y [cm]");
690 h->GetZaxis()->SetTitle("entries");
691 // // tracklet to Riemann fit residuals [2]
692 // fContainer->AddAt(new TH2I("fYTrkltRRes", "Tracklet Riemann Residuals", 21, -21., 21., 100, -.5, .5), kTrackletRiemanYResidual);
693 // fContainer->AddAt(new TH2I("fAngleTrkltRRes", "Tracklet Riemann Angular Residuals", 21, -21., 21., 100, -.5, .5), kTrackletRiemanAngleResidual);
694 // fContainer->AddAt(new TH2I("fYTrkltKRes", "Tracklet Kalman Residuals", 21, -21., 21., 100, -.5, .5), kTrackletKalmanYResidual);
695 // fContainer->AddAt(new TH2I("fAngleTrkltKRes", "Tracklet Kalman Angular Residuals", 21, -21., 21., 100, -.5, .5), kTrackletKalmanAngleResidual);
699 // cluster y resolution [0]
700 fContainer->AddAt(h = new TH2I("fYClMC", "Cluster Resolution", 31, -.48, .48, 100, -.5, .5), kClusterResolution);
701 h->GetXaxis()->SetTitle("tg(#phi)");
702 h->GetYaxis()->SetTitle("#Delta y [cm]");
703 h->GetZaxis()->SetTitle("entries");
704 // tracklet y resolution [0]
705 fContainer->AddAt(h = new TH2I("fYTrkltMC", "Tracklet Resolution (Y)", 31, -.48, .48, 100, -.5, .5), kTrackletYResolution);
706 h->GetXaxis()->SetTitle("tg(#phi)");
707 h->GetYaxis()->SetTitle("#Delta y [cm]");
708 h->GetZaxis()->SetTitle("entries");
709 // tracklet y resolution [0]
710 fContainer->AddAt(h = new TH2I("fZTrkltMC", "Tracklet Resolution (Z)", 31, -.48, .48, 100, -.5, .5), kTrackletZResolution);
711 h->GetXaxis()->SetTitle("tg(#theta)");
712 h->GetYaxis()->SetTitle("#Delta z [cm]");
713 h->GetZaxis()->SetTitle("entries");
714 // tracklet angular resolution [1]
715 fContainer->AddAt(h = new TH2I("fPhiTrkltMC", "Tracklet Resolution (Angular)", 31, -.48, .48, 100, -10., 10.), kTrackletAngleResolution);
716 h->GetXaxis()->SetTitle("tg(#phi)");
717 h->GetYaxis()->SetTitle("#Delta #phi [deg]");
718 h->GetZaxis()->SetTitle("entries");
720 // // Riemann track resolution [y, z, angular]
721 // fContainer->AddAt(new TH2I("fYRT", "Track Riemann Y Resolution", 21, -21., 21., 100, -.5, .5), kTrackRYResolution);
722 // fContainer->AddAt(new TH2I("fZRT", "Track Riemann Z Resolution", 21, -21., 21., 100, -.5, .5), kTrackRZResolution);
723 // fContainer->AddAt(new TH2I("fPhiRT", "Track Riemann Angular Resolution", 21, -21., 21., 100, -10., 10.), kTrackRAngleResolution);
725 // Kalman track resolution [y, z, angular]
726 // fContainer->AddAt(new TH2I("fYKT", "", 21, -21., 21., 100, -.5, .5), kTrackKYResolution);
727 // fContainer->AddAt(new TH2I("fZKT", "", 21, -21., 21., 100, -.5, .5), kTrackKZResolution);
728 // fContainer->AddAt(new TH2I("fPhiKT", "", 21, -21., 21., 100, -10., 10.), kTrackKAngleResolution);
734 //________________________________________________________
735 void AliTRDtrackingResolution::SetRecoParam(AliTRDrecoParam *r)
738 fReconstructor->SetRecoParam(r);