]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCseed.cxx
Use positive half of a mirrored axis instead of the negative half
[u/mrichter/AliRoot.git] / TPC / AliTPCseed.cxx
index 9bbe38f9caaa4ea78484c961d672c6e42ab2aea7..b5c30f4fe2df1f834e9fa72e725f28a08476422c 100644 (file)
@@ -542,15 +542,30 @@ Bool_t AliTPCseed::Update(const AliCluster *c, Double_t chisq, Int_t index)
   Int_t n=GetNumberOfClusters();
   Int_t idx=GetClusterIndex(n);    // save the current cluster index
 
-  AliCluster cl(*c);  cl.SetSigmaY2(fErrorY2); cl.SetSigmaZ2(fErrorZ2);
+  AliTPCclusterMI cl(*(AliTPCclusterMI*)c);  cl.SetSigmaY2(fErrorY2); cl.SetSigmaZ2(fErrorZ2);
+
+  AliTPCClusterParam * parcl = AliTPCcalibDB::Instance()->GetClusterParam();
+  
+  Float_t ty = TMath::Tan(TMath::ASin(GetSnp()));
+  
+  if(  parcl ){
+    Int_t padSize = 0;                          // short pads
+    if (cl.GetDetector() >= 36) {
+      padSize = 1;                              // medium pads 
+      if (cl.GetRow() > 63) padSize = 2; // long pads
+    }
+    Float_t waveCorr = parcl->GetWaveCorrection( padSize, cl.GetZ(), cl.GetMax(),cl.GetPad(), ty );
+    cl.SetY( cl.GetY() - waveCorr ); 
+  }
+
   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();
-    cl.SetY(c->GetY()-dy);  
-    cl.SetZ(c->GetZ()-dz);  
-  }
+    cl.SetY(cl.GetY()-dy);  
+    cl.SetZ(cl.GetZ()-dz);  
+  }  
 
   if (!AliTPCtrack::Update(&cl,chisq,index)) return kFALSE;