]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Corrected propagation to PHOS (Yu.Belikov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Feb 2004 15:52:32 +0000 (15:52 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Feb 2004 15:52:32 +0000 (15:52 +0000)
STEER/AliESDtrack.cxx

index ebf05f6cedd6c86a9472fe13c4f2530f01c7be4d..3b353bfb129dd6e4cc38b1c6dba9441b97965c6b 100644 (file)
@@ -192,12 +192,11 @@ Bool_t AliESDtrack::UpdateTrackParams(AliKalmanTrack *t, ULong_t flags) {
   case kTRDout:
     { //requested by the PHOS  ("temporary solution")
       Double_t r=474.;
-      t->PropagateTo(r,30.,0.);  
-      fOalpha=fRalpha;
-      fOx=fRx;
-      Int_t i;
-      for (i=0; i<5; i++) fOp[i]=fRp[i];
-      for (i=0; i<15;i++) fOc[i]=fRc[i];
+      if (t->PropagateTo(r,30.,0.)) {  
+         fOalpha=t->GetAlpha();
+         t->GetExternalParameters(fOx,fOp);
+         t->GetExternalCovariance(fOc);
+      }
     }
   case kTRDin: case kTRDrefit:
     fTRDncls=t->GetNumberOfClusters();
@@ -313,6 +312,7 @@ void AliESDtrack::GetInnerPxPyPz(Double_t *p) const {
   // This function returns the global track momentum components
   // af the entrance of the TPC
   //---------------------------------------------------------------------
+  if (fIx==0) {p[0]=p[1]=p[2]=0.; return;}
   Double_t phi=TMath::ASin(fIp[2]) + fIalpha;
   Double_t pt=1./TMath::Abs(fIp[4]);
   p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fIp[3]; 
@@ -323,6 +323,7 @@ void AliESDtrack::GetInnerXYZ(Double_t *xyz) const {
   // This function returns the global track position
   // af the entrance of the TPC
   //---------------------------------------------------------------------
+  if (fIx==0) {xyz[0]=xyz[1]=xyz[2]=0.; return;}
   Double_t phi=TMath::ATan2(fIp[0],fIx) + fIalpha;
   Double_t r=TMath::Sqrt(fIx*fIx + fIp[0]*fIp[0]);
   xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fIp[1]; 
@@ -352,6 +353,7 @@ void AliESDtrack::GetOuterPxPyPz(Double_t *p) const {
   // This function returns the global track momentum components
   // af the radius of the PHOS
   //---------------------------------------------------------------------
+  if (fOx==0) {p[0]=p[1]=p[2]=0.; return;}
   Double_t phi=TMath::ASin(fOp[2]) + fOalpha;
   Double_t pt=1./TMath::Abs(fOp[4]);
   p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fOp[3]; 
@@ -362,6 +364,7 @@ void AliESDtrack::GetOuterXYZ(Double_t *xyz) const {
   // This function returns the global track position
   // af the radius of the PHOS
   //---------------------------------------------------------------------
+  if (fOx==0) {xyz[0]=xyz[1]=xyz[2]=0.; return;}
   Double_t phi=TMath::ATan2(fOp[0],fOx) + fOalpha;
   Double_t r=TMath::Sqrt(fOx*fOx + fOp[0]*fOp[0]);
   xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fOp[1];