/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ //----------------------------------------------------------------- // Implementation of the TPC track class // // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //----------------------------------------------------------------- #include #include "AliCluster.h" #include "AliTPCtrack.h" #include "AliTPCcluster.h" #include "AliTPCClustersRow.h" #include "AliTPCClustersArray.h" ClassImp(AliTPCtrack) //_________________________________________________________________________ AliTPCtrack::AliTPCtrack(UInt_t index, const Double_t xx[5], const Double_t cc[15], Double_t xref, Double_t alpha) : AliKalmanTrack() { //----------------------------------------------------------------- // This is the main track constructor. //----------------------------------------------------------------- fdEdx=0.; fAlpha=alpha; fX=xref; fP0=xx[0]; fP1=xx[1]; fP2=xx[2]; fP3=xx[3]; fP4=xx[4]; fC00=cc[0]; fC10=cc[1]; fC11=cc[2]; fC20=cc[3]; fC21=cc[4]; fC22=cc[5]; fC30=cc[6]; fC31=cc[7]; fC32=cc[8]; fC33=cc[9]; fC40=cc[10]; fC41=cc[11]; fC42=cc[12]; fC43=cc[13]; fC44=cc[14]; fIndex[fN++]=index; } //_____________________________________________________________________________ AliTPCtrack::AliTPCtrack(const AliTPCtrack& t) : AliKalmanTrack(t) { //----------------------------------------------------------------- // This is a track copy constructor. //----------------------------------------------------------------- for (Int_t i=0; i= 0.99999) { if (fN>4) cerr<GetSigmaY2(), r01=0., r11=c->GetSigmaZ2(); r00+=fC00; r01+=fC10; r11+=fC11; Double_t det=r00*r11 - r01*r01; Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det; Double_t k00=fC00*r00+fC10*r01, k01=fC00*r01+fC10*r11; Double_t k10=fC10*r00+fC11*r01, k11=fC10*r01+fC11*r11; Double_t k20=fC20*r00+fC21*r01, k21=fC20*r01+fC21*r11; Double_t k30=fC30*r00+fC31*r01, k31=fC30*r01+fC31*r11; Double_t k40=fC40*r00+fC41*r01, k41=fC40*r01+fC41*r11; Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1; Double_t cur=fP3 + k30*dy + k31*dz, eta=fP2 + k20*dy + k21*dz; if (TMath::Abs(cur*fX-eta) >= 0.99999) { if (fN>4) cerr<= 0.99999) { if (fN>4) cerr<= 0.) { if (fN>4) cerr<GetRow(sec,row); clusters[i]=(AliTPCcluster*)(*clrow)[ncl]; } Int_t lab=123456789; for (i=0; iGetLabel(0)); Int_t j; for (j=0; jmax) {max=mx[i]; lab=lb[i];} for (i=0; iGetLabel(1)) == lab || TMath::Abs(c->GetLabel(2)) == lab ) max++; } SetLabel(-lab); if (1.-Float_t(max)/fN <= 0.10) { //Int_t tail=Int_t(0.08*fN); Int_t tail=14; max=0; for (i=1; i<=tail; i++) { AliTPCcluster *c=clusters[fN-i]; if (lab == TMath::Abs(c->GetLabel(0)) || lab == TMath::Abs(c->GetLabel(1)) || lab == TMath::Abs(c->GetLabel(2))) max++; } if (max >= Int_t(0.5*tail)) SetLabel(lab); } delete[] lb; delete[] mx; delete[] clusters; }