]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding out of range protection (Marian)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Sep 2008 13:56:59 +0000 (13:56 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Sep 2008 13:56:59 +0000 (13:56 +0000)
TPC/AliTPC.cxx

index 37fd2558bfc5f698bcff2ab1f8deb011d76aec60..8880e614891163c632029834e1e778bff8d16de8 100644 (file)
@@ -2006,7 +2006,13 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
        Float_t correction =0;
        if (calib->GetPadTime0()){
          if (!calib->GetPadTime0()->GetCalROC(isec)) continue;
-         correction = calib->GetPadTime0()->GetCalROC(isec)->GetValue(TMath::Nint(xyz[0]),TMath::Nint(xyz[1]));
+         Int_t npads = fTPCParam->GetNPads(isec,TMath::Nint(xyz[0]));
+         //      Int_t pad  = TMath::Nint(xyz[1]+fTPCParam->GetNPads(isec,TMath::Nint(xyz[0]))*0.5);
+         Int_t pad  = TMath::Nint(xyz[1]);
+         if (pad<0) pad=0;
+         if (pad>=npads) pad=npads-1;
+         correction = calib->GetPadTime0()->GetCalROC(isec)->GetValue(TMath::Nint(xyz[0]),pad);
+         
        }
        xyz[2]+=correction;
        //