Align cell #0 of each channel instead of 700. Same result, but less confusing.

This commit is contained in:
2016-11-24 14:40:27 +01:00
parent 017f72c313
commit bdd6b7fcad
+6 -7
View File
@@ -4593,18 +4593,17 @@ int DRSBoard::GetTime(unsigned int chipIndex, int channelIndex, int tc, float *t
}
if (channelIndex > 0) {
// correct all channels to channel 0 (Daniel's method)
iend = tc >= 700 ? 700+1024 : 700;
for (i=tc,gt0=0 ; i<iend ; i++)
gt0 += fCellDT[chipIndex][0][i % 1024];
// correct all channels to cell 0 of channel 0
for (i=tc,gt0=0 ; i<1024 ; i++)
gt0 += fCellDT[chipIndex][0][i];
for (i=tc,gt=0 ; i<iend ; i++)
gt += fCellDT[chipIndex][channelIndex][i % 1024];
for (i=tc,gt=0 ; i<1024 ; i++)
gt += fCellDT[chipIndex][channelIndex][i];
for (i=0 ; i<fChannelDepth ; i++)
time[i] += (float)(gt0 - gt);
}
return 1;
}