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 // AliTOFtracker Class //
19 // Task: Perform association of the ESD tracks to TOF Clusters //
20 // and Update ESD track with associated TOF Cluster parameters //
22 //-----------------------------------------------------------------//
26 #include "TClonesArray.h"
28 #include "TTreeStream.h"
30 #include "AliESDEvent.h"
31 #include "AliESDtrack.h"
33 #include "AliTOFRecoParam.h"
34 #include "AliTOFReconstructor.h"
35 #include "AliTOFcluster.h"
36 #include "AliTOFGeometry.h"
37 #include "AliTOFtrackerMI.h"
38 #include "AliTOFtrack.h"
39 #include "AliTOFpidESD.h"
43 extern TGeoManager *gGeoManager;
45 ClassImp(AliTOFtrackerMI)
47 //_____________________________________________________________________________
48 AliTOFtrackerMI::AliTOFtrackerMI():
65 fTracks(new TClonesArray("AliTOFtrack")),
66 fSeeds(new TClonesArray("AliESDtrack")),
69 //AliTOFtrackerMI main Ctor
71 fDy=AliTOFGeometry::XPad();
72 fDz=AliTOFGeometry::ZPad();
73 fDebugStreamer = new TTreeSRedirector("TOFdebug.root");
76 //_____________________________________________________________________________
77 AliTOFtrackerMI::~AliTOFtrackerMI(){
82 //fDebugStreamer->Close();
83 delete fDebugStreamer;
100 //_____________________________________________________________________________
101 Int_t AliTOFtrackerMI::PropagateBack(AliESDEvent* event) {
103 // Gets seeds from ESD event and Match with TOF Clusters
106 // initialize RecoParam for current event
108 AliInfo("Initializing params for TOF... ");
110 fRecoParam = AliTOFReconstructor::GetRecoParam(); // instantiate reco param from STEER...
112 if (fRecoParam == 0x0) {
113 AliFatal("No Reco Param found for TOF!!!");
115 //fRecoParam->Dump();
116 //if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
117 //fRecoParam->PrintParameters();
120 parPID[0]=fRecoParam->GetTimeResolution();
121 parPID[1]=fRecoParam->GetTimeNSigma();
122 fPid=new AliTOFpidESD(parPID);
124 //Initialise some counters
133 Int_t ntrk=event->GetNumberOfTracks();
135 TClonesArray &aESDTrack = *fSeeds;
138 //Load ESD tracks into a local Array of ESD Seeds
140 for (Int_t i=0; i<fNseeds; i++) {
141 AliESDtrack *t=event->GetTrack(i);
142 new(aESDTrack[i]) AliESDtrack(*t);
145 //Prepare ESD tracks candidates for TOF Matching
148 //First Step with Strict Matching Criterion
149 //MatchTracks(kFALSE);
151 //Second Step with Looser Matching Criterion
152 //MatchTracks(kTRUE);
153 MatchTracksMI(kFALSE); // assign track to clusters
154 MatchTracksMI(kTRUE); // assign clusters to esd
156 Info("PropagateBack","Number of matched tracks: %d",fnmatch);
157 Info("PropagateBack","Number of good matched tracks: %d",fngoodmatch);
158 Info("PropagateBack","Number of bad matched tracks: %d",fnbadmatch);
160 //Update the matched ESD tracks
162 for (Int_t i=0; i<ntrk; i++) {
163 AliESDtrack *t=event->GetTrack(i);
164 AliESDtrack *seed =(AliESDtrack*)fSeeds->UncheckedAt(i);
165 if(seed->GetTOFsignal()>0){
166 t->SetTOFsignal(seed->GetTOFsignal());
167 t->SetTOFcluster(seed->GetTOFcluster());
169 seed->GetTOFLabel(tlab);
170 t->SetTOFLabel(tlab);
171 AliTOFtrack *track = new AliTOFtrack(*seed);
174 seed->GetTOFInfo(info);
175 seed->GetIntegratedTimes(times);
176 t->UpdateTrackParams(track,AliESDtrack::kTOFout);
177 t->SetIntegratedLength(seed->GetIntegratedLength());
178 t->SetIntegratedTimes(times);
179 t->SetTOFsignalToT(seed->GetTOFsignalToT());
180 t->SetTOFCalChannel(seed->GetTOFCalChannel());
189 fPid->MakePID(event);
196 //_________________________________________________________________________
197 void AliTOFtrackerMI::CollectESD() {
198 //prepare the set of ESD tracks to be matched to clusters in TOF
200 TClonesArray &aTOFTrack = *fTracks;
203 for (Int_t i=0; i<fNseeds; i++) {
205 AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(i);
206 if ((t->GetStatus()&AliESDtrack::kTPCout)==0)continue;
208 // TRD good tracks, already propagated at 372 cm
210 AliTOFtrack *track = new AliTOFtrack(*t); // New
211 Double_t x = track->GetX(); //New
213 if (((t->GetStatus()&AliESDtrack::kTRDout)!=0 ) &&
214 ( x >= AliTOFGeometry::RinTOF()) ){
215 track->SetSeedIndex(i);
216 t->UpdateTrackParams(track,AliESDtrack::kTOFout);
217 new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
223 // Propagate the rest of TPCbp
226 if(track->PropagateToInnerTOF()){ // temporary solution
227 track->SetSeedIndex(i);
228 t->UpdateTrackParams(track,AliESDtrack::kTOFout);
229 new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
238 printf("TRD\tOn\t%d\tOff\t%d\n",c0,c1);
240 // Sort according uncertainties on track position
253 //_________________________________________________________________________
254 void AliTOFtrackerMI::MatchTracks( Bool_t /*mLastStep*/){
259 //_________________________________________________________________________
260 void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
262 //Match ESD tracks to clusters in TOF
263 const Float_t kTofOffset = 26; // time offset
264 const Float_t kMinQuality = -6.; // minimal quality
265 const Float_t kMaxQualityD = 1.; // max delta quality if cluster used
266 const Float_t kForbiddenR = 0.1; // minimal PID according TPC
268 static const Double_t kMasses[]={
269 0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613
272 Int_t nSteps=(Int_t)(fTOFHeigth/0.1);
274 //AliTOFcalib *calib = new AliTOFcalib(); // AdC
276 //PH Arrays (moved outside of the loop)
277 Float_t * trackPos[4];
278 for (Int_t ii=0; ii<4; ii++) trackPos[ii] = new Float_t[nSteps];
279 Int_t * clind = new Int_t[fN];
284 Float_t quality[1000];
285 Float_t dist3D[1000][6];
286 Double_t times[1000][6];
287 Float_t mintimedist[1000];
288 Float_t likelihood[1000];
289 Float_t length[1000];
290 AliTOFcluster *clusters[1000];
294 for (Int_t i=0; i<fNseedsTOF; i++) {
296 AliTOFtrack *track =(AliTOFtrack*)fTracks->UncheckedAt(i);
297 AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(track->GetSeedIndex());
298 Bool_t hasTime = ( (t->GetStatus()& AliESDtrack::kTIME)>0) ? kTRUE:kFALSE; // did we integrate time
299 Float_t trdquality = t->GetTRDQuality();
303 t->GetTPCpid(tpcpid);
305 for (Int_t ipid=0;ipid<5;ipid++){
306 sumpid+=tpcpid[ipid];
308 for (Int_t ipid=0;ipid<5;ipid++){
309 if (sumpid>0) tpcpid[ipid]/=sumpid;
315 if (trdquality<0) continue; // no chance
317 AliTOFtrack *trackTOFin =new AliTOFtrack(*track);
319 //propagat track to the middle of TOF
321 Float_t xs = 379.2; // should be defined in the TOF geometry
322 Double_t ymax=xs*TMath::Tan(0.5*AliTOFGeometry::GetAlpha());
324 Double_t ysect=trackTOFin->GetYat(xs,skip);
327 ymax=xs*TMath::Tan(0.5*AliTOFGeometry::GetAlpha());
328 ysect=trackTOFin->GetYat(xs,skip);
331 if (!trackTOFin->Rotate(AliTOFGeometry::GetAlpha())) {
334 } else if (ysect <-ymax) {
335 if (!trackTOFin->Rotate(-AliTOFGeometry::GetAlpha())) {
339 if(!trackTOFin->PropagateTo(xs)) {
343 // Determine a window around the track
346 trackTOFin->GetExternalParameters(x,par);
348 trackTOFin->GetExternalCovariance(cov);
349 Float_t scalefact=3.;
352 ((5*TMath::Sqrt(cov[0]) + 3.*fDy + 10.*TMath::Abs(par[2]))/fR);
355 (5*TMath::Sqrt(cov[2]) + 3.*fDz + 10.*TMath::Abs(par[3]));
357 Double_t phi=TMath::ATan2(par[0],x) + trackTOFin->GetAlpha();
358 if (phi<-TMath::Pi())phi+=2*TMath::Pi();
359 if (phi>=TMath::Pi())phi-=2*TMath::Pi();
364 // find the clusters in the window of the track
366 for (Int_t k=FindClusterIndex(z-dz); k<fN; k++) {
367 AliTOFcluster *c=fClusters[k];
368 if (c->GetZ() > z+dz) break;
369 // if (c->IsUsed()) continue;
371 Double_t dph=TMath::Abs(c->GetPhi()-phi);
372 if (dph>TMath::Pi()) dph-=2.*TMath::Pi();
373 if (TMath::Abs(dph)>dphi) continue;
380 // select close clusters
382 Double_t mom=t->GetP();
383 // Bool_t dump = kTRUE;
384 for (Int_t icl=0; icl<nc; icl++){
385 Float_t distances[5];
386 if (nfound>=1000) break;
387 index[nfound]=clind[icl];
388 AliTOFcluster *cluster = fClusters[clind[icl]];
389 GetLinearDistances(trackTOFin, cluster, distances);
390 dist3D[nfound][0] = distances[4];
391 dist3D[nfound][1] = distances[1];
392 dist3D[nfound][2] = distances[2];
394 if (TMath::Abs(dist3D[nfound][1])>20 || TMath::Abs(dist3D[nfound][2])>20) continue;
396 GetLikelihood(distances[1],distances[2],cov,trackTOFin, dist3D[nfound][3], dist3D[nfound][4]);
399 if (dist3D[nfound][3]*dist3D[nfound][4]<0.00000000000001) continue; // log likelihood
400 if (TMath::Log(dist3D[nfound][3]*dist3D[nfound][4])<-9) continue; // log likelihood
402 clusters[nfound] = cluster;
404 //length and TOF updates
405 trackTOFin->GetIntegratedTimes(times[nfound]);
406 length[nfound] = trackTOFin->GetIntegratedLength();
407 length[nfound]+=distances[4];
408 mintimedist[nfound]=1000;
409 Double_t tof2=AliTOFGeometry::TdcBinWidth()*cluster->GetTDC()+kTofOffset; // in ps
410 // Float_t tgamma = TMath::Sqrt(cluster->GetR()*cluster->GetR()+cluster->GetZ()*cluster->GetZ())/0.03; //time for "primary" gamma
411 //if (trackTOFin->GetPt()<0.7 && TMath::Abs(tgamma-tof2)<350) continue; // gamma conversion candidate - TEMPORARY
412 for(Int_t j=0;j<=5;j++){
413 Double_t mass=kMasses[j];
414 times[nfound][j]+=distances[4]/3e-2*TMath::Sqrt(mom*mom+mass*mass)/mom; // add time distance
415 if ( TMath::Abs(times[nfound][j]-tof2)<mintimedist[nfound] && tpcpid[j]>kForbiddenR){
416 mintimedist[nfound]=TMath::Abs(times[nfound][j]-tof2);
420 Float_t liketime = TMath::Exp(-mintimedist[nfound]/90.)+0.25*TMath::Exp(-mintimedist[nfound]/180.);
421 if (!hasTime) liketime=0.2;
422 likelihood[nfound] = TMath::Log(dist3D[nfound][3]*dist3D[nfound][4]*liketime);
424 if (TMath::Log(dist3D[nfound][3]*dist3D[nfound][4])<-1){
425 if (likelihood[nfound]<-9.) continue;
436 //choose the best cluster
438 //Float_t quality[1000];
440 for (Int_t kk=0; kk<1000; kk++) quality[kk]=0;
442 AliTOFcluster * cgold=0;
444 for (Int_t icl=0;icl<nfound;icl++){
445 quality[icl] = dist3D[icl][3]*dist3D[icl][4];
447 TMath::Sort(nfound,quality,index,kTRUE);
449 cgold = clusters[igold];
450 if (nfound>1 &&likelihood[index[1]]>likelihood[index[0]]){
451 if ( quality[index[0]]<quality[index[1]]+0.5){
453 cgold = clusters[igold];
458 Float_t qualityGold = TMath::Log(0.0000001+(quality[igold]*(0.1+TMath::Exp(-mintimedist[igold]/80.))*(0.2+trdquality)));
460 if (cgold->GetQuality()<qualityGold) cgold->SetQuality(qualityGold);
465 //signed better cluster
466 if (cgold->GetQuality()>qualityGold+kMaxQualityD) continue;
467 if (2.*qualityGold-cgold->GetQuality()<kMinQuality) continue;
472 for (Int_t icl=0;icl<nfound;icl++){
474 (clusters[index[icl]]->GetLabel(0)==TMath::Abs(trackTOFin->GetLabel()))
476 (clusters[index[icl]]->GetLabel(1)==TMath::Abs(trackTOFin->GetLabel()))
478 (clusters[index[icl]]->GetLabel(2)==TMath::Abs(trackTOFin->GetLabel()))
485 if (inonfake==0) fngoodmatch++;
491 tlab[0]=cgold->GetLabel(0);
492 tlab[1]=cgold->GetLabel(1);
493 tlab[2]=cgold->GetLabel(2);
494 // Double_t tof2=25.*cgold->GetTDC()-350; // in ps
495 Double_t tof2=AliTOFGeometry::TdcBinWidth()*cgold->GetTDC()+kTofOffset; // in ps
496 Float_t tgamma = TMath::Sqrt(cgold->GetR()*cgold->GetR()+cgold->GetZ()*cgold->GetZ())/0.03;
497 Float_t info[11]={dist3D[igold][0],dist3D[igold][1],dist3D[igold][2],dist3D[igold][3],dist3D[igold][4],mintimedist[igold],
498 -1,tgamma, qualityGold,cgold->GetQuality(),0};
499 // GetLinearDistances(trackTOFin,cgold,&info[6]);
502 // info[7] = mintimedist[index[inonfake]];
505 // Store quantities to be used for TOF Calibration
506 Float_t tToT=cgold->GetToT(); // in ps
507 t->SetTOFsignalToT(tToT);
509 ind[0]=cgold->GetDetInd(0);
510 ind[1]=cgold->GetDetInd(1);
511 ind[2]=cgold->GetDetInd(2);
512 ind[3]=cgold->GetDetInd(3);
513 ind[4]=cgold->GetDetInd(4);
514 Int_t calindex = AliTOFGeometry::GetIndex(ind);
515 t->SetTOFCalChannel(calindex);
518 t->SetTOFsignal(tof2);
519 t->SetTOFcluster(cgold->GetIndex());
521 AliDebug(2, Form("%7i %7i %10i %10i %10i %10i %7i",
524 TMath::Abs(trackTOFin->GetLabel()),
525 tlab[0], tlab[1], tlab[2],
528 AliTOFtrack *trackTOFout = new AliTOFtrack(*t);
529 trackTOFout->PropagateTo(379.);
531 // Fill the track residual histograms.
532 FillResiduals(trackTOFout,cgold,kFALSE);
534 t->UpdateTrackParams(trackTOFout,AliESDtrack::kTOFout);
535 t->SetIntegratedLength(length[igold]);
536 t->SetIntegratedTimes(times[igold]);
537 t->SetTOFLabel(tlab);
546 for (Int_t ii=0; ii<4; ii++) delete [] trackPos[ii];
548 //delete calib; // AdC
550 //_________________________________________________________________________
552 Int_t AliTOFtrackerMI::LoadClusters(TTree *cTree) {
553 //--------------------------------------------------------------------
554 //This function loads the TOF clusters
555 //--------------------------------------------------------------------
557 TBranch *branch=cTree->GetBranch("TOF");
559 AliError("can't get the branch with the TOF clusters !");
563 static TClonesArray dummy("AliTOFcluster",10000);
565 TClonesArray *clusters=&dummy;
566 branch->SetAddress(&clusters);
569 Int_t nc=clusters->GetEntriesFast();
570 AliInfo(Form("Number of clusters: %d",nc));
572 for (Int_t i=0; i<nc; i++) {
573 AliTOFcluster *c=(AliTOFcluster*)clusters->UncheckedAt(i);
575 fClusters[i]=new AliTOFcluster(*c); fN++;
577 //AliInfo(Form("%4i %4i %f %f %f %f %f %2i %1i %2i %1i %2i",i, fClusters[i]->GetIndex(),fClusters[i]->GetZ(),fClusters[i]->GetR(),fClusters[i]->GetPhi(), fClusters[i]->GetTDC(),fClusters[i]->GetADC(),fClusters[i]->GetDetInd(0),fClusters[i]->GetDetInd(1),fClusters[i]->GetDetInd(2),fClusters[i]->GetDetInd(3),fClusters[i]->GetDetInd(4)));
578 //AliInfo(Form("%i %f",i, fClusters[i]->GetZ()));
581 //AliInfo(Form("Number of clusters: %d",fN));
585 //_________________________________________________________________________
586 void AliTOFtrackerMI::UnloadClusters() {
587 //--------------------------------------------------------------------
588 //This function unloads TOF clusters
589 //--------------------------------------------------------------------
590 for (Int_t i=0; i<fN; i++) {
600 //_________________________________________________________________________
601 Int_t AliTOFtrackerMI::InsertCluster(AliTOFcluster *c) {
602 //--------------------------------------------------------------------
603 //This function adds a cluster to the array of clusters sorted in Z
604 //--------------------------------------------------------------------
605 if (fN==kMaxCluster) {
606 AliError("Too many clusters !");
610 if (fN==0) {fClusters[fN++]=c; return 0;}
611 Int_t i=FindClusterIndex(c->GetZ());
612 memmove(fClusters+i+1 ,fClusters+i,(fN-i)*sizeof(AliTOFcluster*));
613 fClusters[i]=c; fN++;
618 //_________________________________________________________________________
619 Int_t AliTOFtrackerMI::FindClusterIndex(Double_t z) const {
620 //--------------------------------------------------------------------
621 // This function returns the index of the nearest cluster
622 //--------------------------------------------------------------------
624 if (z <= fClusters[0]->GetZ()) return 0;
625 if (z > fClusters[fN-1]->GetZ()) return fN;
626 Int_t b=0, e=fN-1, m=(b+e)/2;
627 for (; b<e; m=(b+e)/2) {
628 if (z > fClusters[m]->GetZ()) b=m+1;
636 Float_t AliTOFtrackerMI::GetLinearDistances(AliTOFtrack * track, AliTOFcluster *cluster, Float_t distances[5])
639 // calclates distance between cluster and track
640 // use linear aproximation
642 const Float_t kRaddeg = 180/3.14159265358979312;
644 // Float_t tiltangle = fGeom->GetAngles(cluster->fdetIndex[1],cluster->fdetIndex[2])/kRaddeg; //tiltangle
646 cind[0]= cluster->GetDetInd(0);
647 cind[1]= cluster->GetDetInd(1);
648 cind[2]= cluster->GetDetInd(2);
649 cind[3]= cluster->GetDetInd(3);
650 cind[4]= cluster->GetDetInd(4);
651 Float_t tiltangle = AliTOFGeometry::GetAngles(cluster->GetDetInd(1),cluster->GetDetInd(2))/kRaddeg; //tiltangle
653 Float_t cpos[3]; //cluster position
654 Float_t cpos0[3]; //cluster position
655 // fGeom->GetPos(cluster->fdetIndex,cpos);
656 //fGeom->GetPos(cluster->fdetIndex,cpos0);
658 fGeom->GetPos(cind,cpos);
659 fGeom->GetPos(cind,cpos0);
661 Float_t phi = TMath::ATan2(cpos[1],cpos[0]);
662 if(phi<0) phi=2.*TMath::Pi()+phi;
663 // Get the local angle in the sector philoc
664 Float_t phiangle = (Int_t (phi*kRaddeg/20.) + 0.5)*20./kRaddeg;
669 track->GetPxPyPz(dir);
670 dir[0]/=track->GetP();
671 dir[1]/=track->GetP();
672 dir[2]/=track->GetP();
676 Float_t sinphi = TMath::Sin(phiangle);
677 Float_t cosphi = TMath::Cos(phiangle);
678 Float_t sinth = TMath::Sin(tiltangle);
679 Float_t costh = TMath::Cos(tiltangle);
682 temp = cpos[0]*cosphi+cpos[1]*sinphi;
683 cpos[1] = -cpos[0]*sinphi+cpos[1]*cosphi;
685 temp = v0[0]*cosphi+v0[1]*sinphi;
686 v0[1] = -v0[0]*sinphi+v0[1]*cosphi;
689 temp = cpos[0]*costh+cpos[2]*sinth;
690 cpos[2] = -cpos[0]*sinth+cpos[2]*costh;
692 temp = v0[0]*costh+v0[2]*sinth;
693 v0[2] = -v0[0]*sinth+v0[2]*costh;
697 //rotate direction vector
699 temp = dir[0]*cosphi+dir[1]*sinphi;
700 dir[1] = -dir[0]*sinphi+dir[1]*cosphi;
703 temp = dir[0]*costh+dir[2]*sinth;
704 dir[2] = -dir[0]*sinth+dir[2]*costh;
708 Float_t k = (cpos[0]-v0[0])/dir[0];
709 v3[0] = v0[0]+k*dir[0];
710 v3[1] = v0[1]+k*dir[1];
711 v3[2] = v0[2]+k*dir[2];
713 distances[0] = v3[0]-cpos[0];
714 distances[1] = v3[1]-cpos[1];
715 distances[2] = v3[2]-cpos[2];
716 distances[3] = TMath::Sqrt( distances[0]*distances[0]+distances[1]*distances[1]+distances[2]*distances[2]); //distance
717 distances[4] = k; //length
720 // Debuging part of the matching
722 if (track->GetLabel()==cluster->GetLabel(0) ||track->GetLabel()==cluster->GetLabel(1) ){
723 TTreeSRedirector& cstream = *fDebugStreamer;
724 Float_t tdc = cluster->GetTDC();
731 "Dist0="<<distances[0]<<
732 "Dist1="<<distances[1]<<
733 "Dist2="<<distances[2]<<
742 void AliTOFtrackerMI::GetLikelihood(Float_t dy, Float_t dz, const Double_t *cov, AliTOFtrack * /*track*/, Float_t & py, Float_t &pz)
745 // get likelihood - track covariance taken
746 // 75 % of gauss with expected sigma
747 // 25 % of gauss with extended sigma
749 Double_t kMaxSigmaY = 0.6; // ~ 90% of TRD tracks
750 Double_t kMaxSigmaZ = 1.2; // ~ 90% of TRD tracks
751 Double_t kMeanSigmaY = 0.25; // mean TRD sigma
752 Double_t kMeanSigmaZ = 0.5; // mean TRD sigma
755 Float_t normwidth, normd, p0,p1;
756 Float_t sigmay = TMath::Max(TMath::Sqrt(cov[0]+kMeanSigmaY*kMeanSigmaY),kMaxSigmaY);
757 Float_t sigmaz = TMath::Max(TMath::Sqrt(cov[2]+kMeanSigmaZ*kMeanSigmaZ),kMaxSigmaZ);
762 // py calculation - 75% admixture of original sigma - 25% tails
764 normwidth = fDy/sigmay;
766 p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
767 p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
770 normwidth = fDy/(3.*sigmay);
771 normd = dy/(3.*sigmay);
772 p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
773 p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
776 // pz calculation - 75% admixture of original sigma - 25% tails
778 normwidth = fDz/sigmaz;
780 p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
781 p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
784 normwidth = fDz/(3.*sigmaz);
785 normd = dz/(3.*sigmaz);
786 p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
787 p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
790 //_________________________________________________________________________
792 void AliTOFtrackerMI::FillClusterArray(TObjArray* arr) const
795 // Returns the TOF cluster array
801 for (Int_t i=0; i<fN; ++i) arr->Add(fClusters[i]);