From 2c65609f84fd8d134c1a465dd3d3e90fecf50b91 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Tue, 11 Dec 2018 13:59:58 +0100 Subject: [PATCH] AddT0 offset bug Up to now there has been an addT0 offset bug which resulted to the following situation. Since the offset was wrong by '1', for the first addt0 the t0 of the file was used instead of the one given in the msr-file. If these t0's are substantially different, the adding of the runs was quite off, resulting in strong distortions at very early times. Pant Amba Datt pointed towards this bug which is fixed now. --- src/classes/PRunAsymmetry.cpp | 4 ++-- src/classes/PRunAsymmetryRRF.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/PRunAsymmetry.cpp b/src/classes/PRunAsymmetry.cpp index 014a2b41..0d5d2246 100644 --- a/src/classes/PRunAsymmetry.cpp +++ b/src/classes/PRunAsymmetry.cpp @@ -1640,8 +1640,8 @@ Bool_t PRunAsymmetry::GetProperT0(PRawRunData* runData, PMsrGlobalBlock *globalB } // fill in the T0's from the msr-file (if present) - for (Int_t j=0; jGetAddT0BinSize(i); j++) { - fAddT0s[i-1][j] = fRunInfo->GetAddT0Bin(i, j); + for (Int_t j=0; jGetAddT0BinSize(i-1); j++) { + fAddT0s[i-1][j] = fRunInfo->GetAddT0Bin(i-1, j); } // fill in the T0's from the data file, if not already present in the msr-file diff --git a/src/classes/PRunAsymmetryRRF.cpp b/src/classes/PRunAsymmetryRRF.cpp index b52eaf25..51595f90 100644 --- a/src/classes/PRunAsymmetryRRF.cpp +++ b/src/classes/PRunAsymmetryRRF.cpp @@ -1278,8 +1278,8 @@ Bool_t PRunAsymmetryRRF::GetProperT0(PRawRunData* runData, PMsrGlobalBlock *glob } // fill in the T0's from the msr-file (if present) - for (Int_t j=0; jGetAddT0BinSize(i); j++) { - fAddT0s[i-1][j] = fRunInfo->GetAddT0Bin(i, j); + for (Int_t j=0; jGetAddT0BinSize(i-1); j++) { + fAddT0s[i-1][j] = fRunInfo->GetAddT0Bin(i-1, j); } // fill in the T0's from the data file, if not already present in the msr-file