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-commercial 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 //--------------------------------------------------------------------//
18 // AliTOFtrackerV1 Class //
19 // Task: Perform association of the ESD tracks to TOF Clusters //
20 // and Update ESD track with associated TOF Cluster parameters //
22 // -- Authors : S. Arcelli, C. Zampolli (Bologna University and INFN) //
23 // -- Contacts: Annalisa.De.Caro@cern.ch //
24 // -- : Chiara.Zampolli@bo.infn.it //
25 // -- : Silvia.Arcelli@bo.infn.it //
27 //--------------------------------------------------------------------//
32 #include <TClonesArray.h>
38 #include "AliAlignObj.h"
39 #include "AliESDtrack.h"
40 #include "AliESDEvent.h"
42 #include "AliTrackPointArray.h"
44 #include "AliTOFcalib.h"
45 #include "AliTOFRecoParam.h"
46 #include "AliTOFcluster.h"
47 #include "AliTOFGeometry.h"
48 #include "AliTOFtrackerV1.h"
49 #include "AliTOFtrack.h"
53 ClassImp(AliTOFtrackerV1)
55 //_____________________________________________________________________________
56 AliTOFtrackerV1::AliTOFtrackerV1():
80 //AliTOFtrackerV1 main Ctor
82 // Read the reconstruction parameters from the OCDB
83 AliTOFcalib *calib = new AliTOFcalib();
84 fRecoParam = (AliTOFRecoParam*)calib->ReadRecParFromCDB("TOF/Calib",-1);
85 if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
87 parPID[0]=fRecoParam->GetTimeResolution();
88 parPID[1]=fRecoParam->GetTimeNSigma();
89 fPid=new AliTOFpidESD(parPID);
94 //_____________________________________________________________________________
95 AliTOFtrackerV1::AliTOFtrackerV1(const AliTOFtrackerV1 &t):
117 fHRecSigYVsPWin(0x0),
120 //AliTOFtrackerV1 copy Ctor
124 fNseedsTOF=t.fNseedsTOF;
125 fngoodmatch=t.fngoodmatch;
126 fnbadmatch=t.fnbadmatch;
127 fnunmatch=t.fnunmatch;
129 fRecoParam=t.fRecoParam;
136 //_____________________________________________________________________________
137 AliTOFtrackerV1& AliTOFtrackerV1::operator=(const AliTOFtrackerV1 &t)
139 //AliTOFtrackerV1 assignment operator
141 this->fNseeds=t.fNseeds;
142 this->fNseedsTOF=t.fNseedsTOF;
143 this->fngoodmatch=t.fngoodmatch;
144 this->fnbadmatch=t.fnbadmatch;
145 this->fnunmatch=t.fnunmatch;
146 this->fnmatch=t.fnmatch;
147 this->fRecoParam = t.fRecoParam;
149 this->fSeeds=t.fSeeds;
150 this->fTracks=t.fTracks;
155 //_____________________________________________________________________________
156 AliTOFtrackerV1::~AliTOFtrackerV1() {
167 delete fHDigClusTime;
174 delete fHRecSigYVsPWin;
175 delete fHRecSigZVsPWin;
177 //_____________________________________________________________________________
178 Int_t AliTOFtrackerV1::PropagateBack(AliESDEvent* event) {
180 // Gets seeds from ESD event and Match with TOF Clusters
184 //Initialise some counters
193 Int_t ntrk=event->GetNumberOfTracks();
195 fSeeds= new TClonesArray("AliESDtrack",ntrk);
196 TClonesArray &aESDTrack = *fSeeds;
199 //Load ESD tracks into a local Array of ESD Seeds
201 for (Int_t i=0; i<fNseeds; i++) {
202 AliESDtrack *t=event->GetTrack(i);
203 new(aESDTrack[i]) AliESDtrack(*t);
206 //Prepare ESD tracks candidates for TOF Matching
212 AliInfo(Form("Number of matched tracks: %d",fnmatch));
213 AliInfo(Form("Number of good matched tracks: %d",fngoodmatch));
214 AliInfo(Form("Number of bad matched tracks: %d",fnbadmatch));
216 //Update the matched ESD tracks
218 for (Int_t i=0; i<ntrk; i++) {
219 AliESDtrack *t=event->GetTrack(i);
220 AliESDtrack *seed =(AliESDtrack*)fSeeds->UncheckedAt(i);
221 if(seed->GetTOFsignal()>0){
222 t->SetTOFsignal(seed->GetTOFsignal());
223 t->SetTOFcluster(seed->GetTOFcluster());
224 t->SetTOFsignalToT(seed->GetTOFsignalToT());
225 t->SetTOFsignalRaw(seed->GetTOFsignalRaw());
226 t->SetTOFsignalDz(seed->GetTOFsignalDz());
227 t->SetTOFCalChannel(seed->GetTOFCalChannel());
228 Int_t tlab[3]; seed->GetTOFLabel(tlab);
229 t->SetTOFLabel(tlab);
230 AliTOFtrack *track = new AliTOFtrack(*seed);
231 t->UpdateTrackParams(track,AliESDtrack::kTOFout);
236 //Handle Time Zero information
238 Double_t timeZero=0.;
239 Double_t timeZeroMax=99999.;
240 Bool_t usetimeZero = fRecoParam->UseTimeZero();
241 Bool_t timeZeroFromT0 = fRecoParam->GetTimeZerofromT0();
242 Bool_t timeZeroFromTOF = fRecoParam->GetTimeZerofromTOF();
244 AliDebug(1,Form("Use Time Zero?: %d",usetimeZero));
245 AliDebug(1,Form("Time Zero from T0? : %d",timeZeroFromT0));
246 AliDebug(1,Form("Time Zero From TOF? : %d",timeZeroFromTOF));
250 timeZero=GetTimeZerofromT0(event);
252 if(timeZeroFromTOF && (timeZero>timeZeroMax || !timeZeroFromT0)){
253 timeZero=GetTimeZerofromTOF(event);
256 AliDebug(2,Form("time Zero used in PID: %f",timeZero));
258 fPid->MakePID(event,timeZero);
273 //_________________________________________________________________________
274 void AliTOFtrackerV1::CollectESD() {
275 //prepare the set of ESD tracks to be matched to clusters in TOF
280 fTracks= new TClonesArray("AliTOFtrack");
281 TClonesArray &aTOFTrack = *fTracks;
282 for (Int_t i=0; i<fNseeds; i++) {
284 AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(i);
285 if ((t->GetStatus()&AliESDtrack::kTPCout)==0)continue;
287 // TRD 'good' tracks, already propagated at 371 cm
289 AliTOFtrack *track = new AliTOFtrack(*t); // New
290 Double_t x = track->GetX(); //New
292 if (((t->GetStatus()&AliESDtrack::kTRDout)!=0 ) &&
293 ( x >= AliTOFGeometry::RinTOF()) ){
294 track->SetSeedIndex(i);
295 t->UpdateTrackParams(track,AliESDtrack::kTOFout);
296 new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
302 // Propagate the rest of TPCbp
305 if(track->PropagateToInnerTOF()){
306 track->SetSeedIndex(i);
307 t->UpdateTrackParams(track,AliESDtrack::kTOFout);
308 new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
316 AliInfo(Form("Number of TOF seeds %i",fNseedsTOF));
317 AliInfo(Form("Number of TOF seeds Type 1 %i",seedsTOF1));
318 AliInfo(Form("Number of TOF seeds Type 2 %i",seedsTOF2));
320 // Sort according uncertainties on track position
324 //_________________________________________________________________________
325 void AliTOFtrackerV1::MatchTracks( ){
327 //Match ESD tracks to clusters in TOF
331 // Parameters regulating the reconstruction
332 Float_t dY=AliTOFGeometry::XPad();
333 Float_t dZ=AliTOFGeometry::ZPad();
335 const Int_t kncmax = 100;
336 Float_t sensRadius = fRecoParam->GetSensRadius();
337 Float_t scaleFact = fRecoParam->GetWindowScaleFact();
338 Float_t dyMax=fRecoParam->GetWindowSizeMaxY();
339 Float_t dzMax=fRecoParam->GetWindowSizeMaxZ();
340 Double_t maxChi2=fRecoParam->GetMaxChi2();
341 Bool_t timeWalkCorr = fRecoParam->GetTimeWalkCorr();
342 AliDebug(1,"++++++++++++++TOF Reconstruction Parameters:++++++++++++ \n");
343 AliDebug(1,Form("TOF sens radius: %f",sensRadius));
344 AliDebug(1,Form("TOF Window scale factor: %f",scaleFact));
345 AliDebug(1,Form("TOF Window max dy: %f",dyMax));
346 AliDebug(1,Form("TOF Window max dz: %f",dzMax));
347 AliDebug(1,Form("TOF Max Chi2: %f",maxChi2));
348 AliDebug(1,Form("Time Walk Correction? : %d",timeWalkCorr));
353 for (Int_t iseed=0; iseed<fNseedsTOF; iseed++) {
355 AliTOFtrack *track =(AliTOFtrack*)fTracks->UncheckedAt(iseed);
356 AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(track->GetSeedIndex());
357 if(t->GetTOFsignal()>0. ) continue;
358 AliTOFtrack *trackTOFin =new AliTOFtrack(*track);
360 // Determine a window around the track
361 Double_t x,par[5]; trackTOFin->GetExternalParameters(x,par);
362 Double_t cov[15]; trackTOFin->GetExternalCovariance(cov);
365 Double_t dz = scaleFact*3.*TMath::Sqrt(cov[2]+dZ*dZ/12);
366 Double_t dphi = scaleFact*3.*TMath::Sqrt(cov[0]+dY*dY/12.)/sensRadius;
368 Double_t phi=TMath::ATan2(par[0],x) + trackTOFin->GetAlpha();
369 if (phi<-TMath::Pi())phi+=2*TMath::Pi();
370 if (phi>=TMath::Pi())phi-=2*TMath::Pi();
372 //upper limit on window's size.
373 if(dz> dzMax) dz=dzMax;
374 if(dphi*sensRadius> dyMax) dphi=dyMax/sensRadius;
377 // find the clusters inside the selected window
379 AliTOFcluster *clusters[kncmax]; // pointers to the clusters in the window
380 Int_t index[kncmax];//to keep track of the cluster index
381 for (Int_t k=FindClusterIndex(z-dz); k<fN; k++) {
382 AliTOFcluster *c=fClusters[k];
384 if(c->GetZ() > z+dz) break;
385 if(c->IsUsed()) continue;
386 if(!c->GetStatus()) continue; // skip bad channels as declared in OCDB
387 Float_t xyz[3]; c->GetGlobalXYZ(xyz);
388 Double_t clPhi=TMath::ATan2(xyz[1],xyz[0]);
389 Double_t dph=TMath::Abs(clPhi-phi);
390 if (dph>TMath::Pi()) dph-=2.*TMath::Pi();
391 if (TMath::Abs(dph)>dphi) continue;
397 //start propagation: go to the average TOF pad middle plane at ~378.5 cm
399 Float_t xTOF = sensRadius;
400 Double_t ymax = xTOF*TMath::Tan(0.5*AliTOFGeometry::GetAlpha());
401 Bool_t skip = kFALSE;
402 Double_t ysect = trackTOFin->GetYat(xTOF,skip);
405 if (!trackTOFin->Rotate(AliTOFGeometry::GetAlpha())) {
408 } else if (ysect <-ymax) {
409 if (!trackTOFin->Rotate(AliTOFGeometry::GetAlpha())) {
413 if(!trackTOFin->PropagateTo(xTOF)) {
418 AliTOFcluster *bestCluster=0;
419 Double_t bestChi2=maxChi2;
421 for (Int_t i=0; i<nc; i++){
422 AliTOFcluster *c=clusters[i]; // one of the preselected clusters
423 Double_t chi2=trackTOFin->GetPredictedChi2((AliCluster3D*)c);
424 if (chi2 >= bestChi2) continue;
430 if (!bestCluster) { // no matching , go to the next track
439 (bestCluster->GetLabel(0)==TMath::Abs(trackTOFin->GetLabel()))
441 (bestCluster->GetLabel(1)==TMath::Abs(trackTOFin->GetLabel()))
443 (bestCluster->GetLabel(2)==TMath::Abs(trackTOFin->GetLabel()))
446 AliDebug(2,Form(" track label good %5i",trackTOFin->GetLabel()));
451 AliDebug(2,Form(" track label bad %5i",trackTOFin->GetLabel()));
454 //Propagate the track to the best matched cluster
455 trackTOFin->PropagateTo(bestCluster);
458 //now take the local distance in Z from the pad center for time walk correction
459 Float_t tiltangle = AliTOFGeometry::GetAngles(bestCluster->GetDetInd(1),bestCluster->GetDetInd(2))*TMath::DegToRad();
460 Double_t dzTW=trackTOFin->GetZ()-bestCluster->GetZ(); // in cm
461 dzTW/=TMath::Cos(tiltangle);
463 //update the ESD track and delete the TOFtrack
464 t->UpdateTrackParams(trackTOFin,AliESDtrack::kTOFout);
467 // Store quantities to be used in the TOF Calibration
468 Float_t tToT=AliTOFGeometry::ToTBinWidth()*bestCluster->GetToT()*1E-3; // in ns
469 t->SetTOFsignalToT(tToT);
470 Float_t rawTime=AliTOFGeometry::TdcBinWidth()*bestCluster->GetTDCRAW()+32; // RAW time,in ps
471 t->SetTOFsignalRaw(rawTime);
472 t->SetTOFsignalDz(dzTW);
473 AliDebug(2,Form(" Setting TOF raw time: %f z distance: %f time: %f = ",rawTime,dzTW));
475 ind[0]=bestCluster->GetDetInd(0);
476 ind[1]=bestCluster->GetDetInd(1);
477 ind[2]=bestCluster->GetDetInd(2);
478 ind[3]=bestCluster->GetDetInd(3);
479 ind[4]=bestCluster->GetDetInd(4);
480 Int_t calindex = AliTOFGeometry::GetIndex(ind);
481 t->SetTOFCalChannel(calindex);
483 // keep track of the track labels in the matched cluster
485 tlab[0]=bestCluster->GetLabel(0);
486 tlab[1]=bestCluster->GetLabel(1);
487 tlab[2]=bestCluster->GetLabel(2);
488 AliDebug(2,Form(" tdc time of the matched track %i = ",bestCluster->GetTDC()));
489 Double_t tof=AliTOFGeometry::TdcBinWidth()*bestCluster->GetTDC()+32; // in ps
490 AliDebug(2,Form(" tof time of the matched track: %f = ",tof));
491 Double_t tofcorr=tof;
492 if(timeWalkCorr)tofcorr=CorrectTimeWalk(dzTW,tof);
493 AliDebug(2,Form(" tof time of the matched track, after TW corr: %f = ",tofcorr));
494 //Set TOF time signal and pointer to the matched cluster
495 t->SetTOFsignal(tofcorr);
496 t->SetTOFcluster(idclus); // pointing to the recPoints tree
497 t->SetTOFLabel(tlab);
499 Double_t mom=t->GetP();
500 // Fill Reco-QA histos for Reconstruction
501 fHRecNClus->Fill(nc);
502 fHRecChi2->Fill(bestChi2);
503 fHRecDistZ->Fill(dzTW);
504 fHRecSigYVsP->Fill(mom,TMath::Sqrt(cov[0]));
505 fHRecSigZVsP->Fill(mom,TMath::Sqrt(cov[2]));
506 fHRecSigYVsPWin->Fill(mom,dphi*sensRadius);
507 fHRecSigZVsPWin->Fill(mom,dz);
509 // Fill Tree for on-the-fly offline Calibration
510 // no longer there - all info is in the ESDs now
515 //_________________________________________________________________________
516 Int_t AliTOFtrackerV1::LoadClusters(TTree *cTree) {
517 //--------------------------------------------------------------------
518 //This function loads the TOF clusters
519 //--------------------------------------------------------------------
521 Int_t npadX = AliTOFGeometry::NpadX();
522 Int_t npadZ = AliTOFGeometry::NpadZ();
523 Int_t nStripA = AliTOFGeometry::NStripA();
524 Int_t nStripB = AliTOFGeometry::NStripB();
525 Int_t nStripC = AliTOFGeometry::NStripC();
527 TBranch *branch=cTree->GetBranch("TOF");
529 AliError("can't get the branch with the TOF clusters !");
533 TClonesArray dummy("AliTOFcluster",10000), *clusters=&dummy;
534 branch->SetAddress(&clusters);
537 Int_t nc=clusters->GetEntriesFast();
538 fHDigNClus->Fill(nc);
540 for (Int_t i=0; i<nc; i++) {
541 AliTOFcluster *c=(AliTOFcluster*)clusters->UncheckedAt(i);
542 fClusters[i]=new AliTOFcluster(*c); fN++;
544 // Fill Digits QA histos
546 Int_t isector = c->GetDetInd(0);
547 Int_t iplate = c->GetDetInd(1);
548 Int_t istrip = c->GetDetInd(2);
549 Int_t ipadX = c->GetDetInd(4);
550 Int_t ipadZ = c->GetDetInd(3);
552 Float_t time =(AliTOFGeometry::TdcBinWidth()*c->GetTDC())*1E-3; // in ns
553 Float_t tot = (AliTOFGeometry::TdcBinWidth()*c->GetToT())*1E-3;//in ns
555 Int_t stripOffset = 0;
561 stripOffset = nStripC;
564 stripOffset = nStripC+nStripB;
567 stripOffset = nStripC+nStripB+nStripA;
570 stripOffset = nStripC+nStripB+nStripA+nStripB;
573 AliError(Form("Wrong plate number in TOF (%d) !",iplate));
576 Int_t zindex=npadZ*(istrip+stripOffset)+(ipadZ+1);
577 Int_t phiindex=npadX*isector+ipadX+1;
578 fHDigClusMap->Fill(zindex,phiindex);
579 fHDigClusTime->Fill(time);
580 fHDigClusToT->Fill(tot);
586 //_________________________________________________________________________
587 void AliTOFtrackerV1::UnloadClusters() {
588 //--------------------------------------------------------------------
589 //This function unloads TOF clusters
590 //--------------------------------------------------------------------
591 for (Int_t i=0; i<fN; i++) {
598 //_________________________________________________________________________
599 Int_t AliTOFtrackerV1::FindClusterIndex(Double_t z) const {
600 //--------------------------------------------------------------------
601 // This function returns the index of the nearest cluster
602 //--------------------------------------------------------------------
604 //Here we need to get the Z in the tracking system
607 if (z <= fClusters[0]->GetZ()) return 0;
608 if (z > fClusters[fN-1]->GetZ()) return fN;
609 Int_t b=0, e=fN-1, m=(b+e)/2;
610 for (; b<e; m=(b+e)/2) {
611 if (z > fClusters[m]->GetZ()) b=m+1;
617 //_________________________________________________________________________
618 Bool_t AliTOFtrackerV1::GetTrackPoint(Int_t index, AliTrackPoint& p) const
620 // Get track space point with index i
621 // Coordinates are in the global system
622 AliTOFcluster *cl = fClusters[index];
624 cl->GetGlobalXYZ(xyz);
625 Float_t phi=TMath::ATan2(xyz[1],xyz[0]);
626 Float_t phiangle = (Int_t(phi*TMath::RadToDeg()/20.)+0.5)*20.*TMath::DegToRad();
627 Float_t sinphi = TMath::Sin(phiangle), cosphi = TMath::Cos(phiangle);
628 Float_t tiltangle = AliTOFGeometry::GetAngles(cl->GetDetInd(1),cl->GetDetInd(2))*TMath::DegToRad();
629 Float_t sinth = TMath::Sin(tiltangle), costh = TMath::Cos(tiltangle);
630 Float_t sigmay2 = AliTOFGeometry::XPad()*AliTOFGeometry::XPad()/12.;
631 Float_t sigmaz2 = AliTOFGeometry::ZPad()*AliTOFGeometry::ZPad()/12.;
633 cov[0] = sinphi*sinphi*sigmay2 + cosphi*cosphi*sinth*sinth*sigmaz2;
634 cov[1] = -sinphi*cosphi*sigmay2 + sinphi*cosphi*sinth*sinth*sigmaz2;
635 cov[2] = -cosphi*sinth*costh*sigmaz2;
636 cov[3] = cosphi*cosphi*sigmay2 + sinphi*sinphi*sinth*sinth*sigmaz2;
637 cov[4] = -sinphi*sinth*costh*sigmaz2;
638 cov[5] = costh*costh*sigmaz2;
639 p.SetXYZ(xyz[0],xyz[1],xyz[2],cov);
641 // Detector numbering scheme
642 Int_t nSector = AliTOFGeometry::NSectors();
643 Int_t nPlate = AliTOFGeometry::NPlates();
644 Int_t nStripA = AliTOFGeometry::NStripA();
645 Int_t nStripB = AliTOFGeometry::NStripB();
646 Int_t nStripC = AliTOFGeometry::NStripC();
648 Int_t isector = cl->GetDetInd(0);
649 if (isector >= nSector)
650 AliError(Form("Wrong sector number in TOF (%d) !",isector));
651 Int_t iplate = cl->GetDetInd(1);
652 if (iplate >= nPlate)
653 AliError(Form("Wrong plate number in TOF (%d) !",iplate));
654 Int_t istrip = cl->GetDetInd(2);
656 Int_t stripOffset = 0;
662 stripOffset = nStripC;
665 stripOffset = nStripC+nStripB;
668 stripOffset = nStripC+nStripB+nStripA;
671 stripOffset = nStripC+nStripB+nStripA+nStripB;
674 AliError(Form("Wrong plate number in TOF (%d) !",iplate));
678 Int_t idet = (2*(nStripC+nStripB)+nStripA)*isector +
681 UShort_t volid = AliGeomManager::LayerToVolUID(AliGeomManager::kTOF,idet);
682 p.SetVolumeID((UShort_t)volid);
685 //_________________________________________________________________________
686 void AliTOFtrackerV1::InitCheckHists() {
688 //Init histos for Digits/Reco QA and Calibration
691 fHDigClusMap = new TH2F("TOFDig_ClusMap", "",182,0.5,182.5,864, 0.5,864.5);
692 fHDigNClus = new TH1F("TOFDig_NClus", "",200,0.5,200.5);
693 fHDigClusTime = new TH1F("TOFDig_ClusTime", "",2000,0.,200.);
694 fHDigClusToT = new TH1F("TOFDig_ClusToT", "",500,0.,100);
697 fHRecNClus =new TH1F("TOFRec_NClusW", "",50,0.5,50.5);
698 fHRecDistZ=new TH1F("TOFRec_DistZ", "",50,0.5,10.5);
699 fHRecChi2=new TH1F("TOFRec_Chi2", "",100,0.,10.);
700 fHRecSigYVsP=new TH2F("TOFDig_SigYVsP", "",40,0.,4.,100, 0.,5.);
701 fHRecSigZVsP=new TH2F("TOFDig_SigZVsP", "",40,0.,4.,100, 0.,5.);
702 fHRecSigYVsPWin=new TH2F("TOFDig_SigYVsPWin", "",40,0.,4.,100, 0.,50.);
703 fHRecSigZVsPWin=new TH2F("TOFDig_SigZVsPWin", "",40,0.,4.,100, 0.,50.);
706 //_________________________________________________________________________
707 void AliTOFtrackerV1::SaveCheckHists() {
709 //write histos for Digits/Reco QA and Calibration
711 TDirectory *dir = gDirectory;
713 TFile *logFileTOF = 0;
715 TSeqCollection *list = gROOT->GetListOfFiles();
716 int n = list->GetEntries();
717 for(int i=0; i<n; i++) {
718 logFile = (TFile*)list->At(i);
719 if (strstr(logFile->GetName(), "AliESDs.root")) break;
722 Bool_t isThere=kFALSE;
723 for(int i=0; i<n; i++) {
724 logFileTOF = (TFile*)list->At(i);
725 if (strstr(logFileTOF->GetName(), "TOFQA.root")){
732 fHDigClusMap->Write(fHDigClusMap->GetName(), TObject::kOverwrite);
733 fHDigNClus->Write(fHDigNClus->GetName(), TObject::kOverwrite);
734 fHDigClusTime->Write(fHDigClusTime->GetName(), TObject::kOverwrite);
735 fHDigClusToT->Write(fHDigClusToT->GetName(), TObject::kOverwrite);
736 fHRecNClus->Write(fHRecNClus->GetName(), TObject::kOverwrite);
737 fHRecChi2->Write(fHRecChi2->GetName(), TObject::kOverwrite);
738 fHRecDistZ->Write(fHRecDistZ->GetName(), TObject::kOverwrite);
739 fHRecSigYVsP->Write(fHRecSigYVsP->GetName(), TObject::kOverwrite);
740 fHRecSigZVsP->Write(fHRecSigZVsP->GetName(), TObject::kOverwrite);
741 fHRecSigYVsPWin->Write(fHRecSigYVsPWin->GetName(), TObject::kOverwrite);
742 fHRecSigZVsPWin->Write(fHRecSigZVsPWin->GetName(), TObject::kOverwrite);
745 if(!isThere)logFileTOF = new TFile( "TOFQA.root","RECREATE");
747 fHDigClusMap->Write(fHDigClusMap->GetName(), TObject::kOverwrite);
748 fHDigNClus->Write(fHDigNClus->GetName(), TObject::kOverwrite);
749 fHDigClusTime->Write(fHDigClusTime->GetName(), TObject::kOverwrite);
750 fHDigClusToT->Write(fHDigClusToT->GetName(), TObject::kOverwrite);
751 fHRecNClus->Write(fHRecNClus->GetName(), TObject::kOverwrite);
752 fHRecChi2->Write(fHRecChi2->GetName(), TObject::kOverwrite);
753 fHRecDistZ->Write(fHRecDistZ->GetName(), TObject::kOverwrite);
754 fHRecSigYVsP->Write(fHRecSigYVsP->GetName(), TObject::kOverwrite);
755 fHRecSigZVsP->Write(fHRecSigZVsP->GetName(), TObject::kOverwrite);
756 fHRecSigYVsPWin->Write(fHRecSigYVsPWin->GetName(), TObject::kOverwrite);
757 fHRecSigZVsPWin->Write(fHRecSigZVsPWin->GetName(), TObject::kOverwrite);
762 //_________________________________________________________________________
763 Float_t AliTOFtrackerV1::CorrectTimeWalk( Float_t dist, Float_t tof) {
765 //dummy, for the moment
767 if(dist<AliTOFGeometry::ZPad()*0.5){
769 //place here the actual correction
775 //_________________________________________________________________________
776 Float_t AliTOFtrackerV1::GetTimeZerofromT0(AliESDEvent *event) const {
778 //Returns TimeZero as measured by T0 detector
780 return event->GetT0();
782 //_________________________________________________________________________
783 Float_t AliTOFtrackerV1::GetTimeZerofromTOF(AliESDEvent * /*event*/) const {
785 //dummy, for the moment. T0 algorithm using tracks on TOF
787 //place T0 algo here...