]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCTransform.cxx
Adding READMEs
[u/mrichter/AliRoot.git] / TPC / AliTPCTransform.cxx
index a99c508b460852a024b29ca64d9166b410f9d7fd..b6c0b5903261b9c1a877efa0c526e09d45b7e02a 100755 (executable)
@@ -156,6 +156,7 @@ void AliTPCTransform::Transform(Double_t *x,Int_t *i,UInt_t /*time*/,
   if (!time0TPC){
     AliFatal("Time unisochronity missing");
   }
+  AliTPCCorrection * correctionDelta = calib->GetTPCComposedCorrectionDelta(); 
 
   if (!param){
     AliFatal("Parameters missing");
@@ -163,8 +164,8 @@ void AliTPCTransform::Transform(Double_t *x,Int_t *i,UInt_t /*time*/,
 
   Double_t xx[3];
   //  Apply Time0 correction - Pad by pad fluctuation
-  //
-  x[2]-=time0TPC->GetCalROC(sector)->GetValue(row,pad);
+  //  
+  if (!calib->HasAlignmentOCDB()) x[2]-=time0TPC->GetCalROC(sector)->GetValue(row,pad);
   //
   // Tranform from pad - time coordinate system to the rotated global (tracking) system
   //
@@ -199,6 +200,13 @@ void AliTPCTransform::Transform(Double_t *x,Int_t *i,UInt_t /*time*/,
     xx[0]=distPoint[0];
     xx[1]=distPoint[1];
     xx[2]=distPoint[2];
+    if (correctionDelta&&fCurrentRecoParam->GetUseAlignmentTime()){  // appply time dependent correction if available and enabled
+      Float_t distPointDelta[3]={xx[0],xx[1],xx[2]};
+      correctionDelta->CorrectPoint(distPointDelta, sector);
+      xx[0]=distPointDelta[0];
+      xx[1]=distPointDelta[1];
+      xx[2]=distPointDelta[2];
+    }
   }