Bug fix: Take into account R distortion in the calculation of chi2.
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Mar 2009 21:15:44 +0000 (21:15 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Mar 2009 21:15:44 +0000 (21:15 +0000)
The correction was applied in the AliTPCseed::Update
but forgotten in  AliTPCseed::GetPredictedChi2

(Marian)

TPC/AliTPCseed.cxx

index 2d745fa..c967e8d 100644 (file)
@@ -480,6 +480,15 @@ Double_t AliTPCseed::GetPredictedChi2(const AliCluster *c) const
   //-----------------------------------------------------------------
   Double_t p[2]={c->GetY(), c->GetZ()};
   Double_t cov[3]={fErrorY2, 0., fErrorZ2};
+
+  Float_t dx = ((AliTPCclusterMI*)c)->GetX()-GetX();
+  if (TMath::Abs(dx)>0){
+    Float_t ty = TMath::Tan(TMath::ASin(GetSnp()));
+    Float_t dy = dx*ty;
+    Float_t dz = dx*TMath::Sqrt(1.+ty*ty)*GetTgl();
+    p[0] = c->GetY()-dy;  
+    p[1] = c->GetZ()-dz;  
+  }
   return AliExternalTrackParam::GetPredictedChi2(p,cov);
 }