]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCTransform.cxx
AliCFGridSparse : propagate the bin labels during projections
[u/mrichter/AliRoot.git] / TPC / AliTPCTransform.cxx
index ca80142ebc8b6e377db036a5445446f0b6f25300..6781ba97c48d24dd09a3c4eb905e98230df63649 100755 (executable)
@@ -304,7 +304,8 @@ void AliTPCTransform::Local2RotatedGlobal(Int_t sector, Double_t *x) const {
   //
   const Int_t kNIS=param->GetNInnerSector(), kNOS=param->GetNOuterSector();
   Double_t sign = 1.;
-  Double_t zwidth    = param->GetZWidth()*driftCorr*vdcorrectionTime;
+  Double_t zwidth    = param->GetZWidth()*driftCorr;
+  if (AliTPCRecoParam:: GetUseTimeCalibration()) zwidth*=vdcorrectionTime;
   Double_t padWidth  = 0;
   Double_t padLength = 0;
   Double_t    maxPad    = 0;
@@ -340,8 +341,11 @@ void AliTPCTransform::Local2RotatedGlobal(Int_t sector, Double_t *x) const {
   if (AliTPCcalibDB::Instance()->IsTrgL0()){
     // by defualt we assume L1 trigger is used - make a correction in case of  L0
     AliCTPTimeParams* ctp = AliTPCcalibDB::Instance()->GetCTPTimeParams();
-    Double_t delay = ctp->GetDelayL1L0()*0.000000025;
-    x[2]-=delay/param->GetTSample();
+    if (ctp){
+      //for TPC standalone runs no ctp info
+      Double_t delay = ctp->GetDelayL1L0()*0.000000025;
+      x[2]-=delay/param->GetTSample();
+    }
   }
   x[2]-= param->GetNTBinsL1();
   x[2]*= zwidth;  // tranform time bin to the distance to the ROC