Skip to content

Commit 0516cbe

Browse files
lhusovaLucia Anna Tarasovicova
andauthored
fix for the BC ID shift (#2480)
Co-authored-by: Lucia Anna Tarasovicova <lucia.anna.husova@cern.ch>
1 parent 5db0583 commit 0516cbe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Modules/CTP/src/RawDataQcTask.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,13 @@ void CTPRawDataReaderTask::monitorData(o2::framework::ProcessingContext& ctx)
226226
mHistoInputs->getNum()->Fill(i);
227227
mHistoInputRatios->getNum()->Fill(i);
228228
if (i == indexMB1 - 1) {
229-
mHistoBCMinBias1->Fill((bcid - mShiftInput1) % 3564, 1. / mScaleInput1);
229+
int bc = bcid - mShiftInput1 >= 0 ? bcid - mShiftInput1 : bcid - mShiftInput1 + 3564;
230+
mHistoBCMinBias1->Fill(bc, 1. / mScaleInput1);
230231
mHistoInputRatios->getDen()->Fill(0., 1);
231232
}
232233
if (i == indexMB2 - 1) {
233-
mHistoBCMinBias2->Fill((bcid - mShiftInput2) % 3564, 1. / mScaleInput2);
234+
int bc = bcid - mShiftInput2 >= 0 ? bcid - mShiftInput2 : bcid - mShiftInput2 + 3564;
235+
mHistoBCMinBias2->Fill(bc, 1. / mScaleInput2);
234236
}
235237
}
236238
}

0 commit comments

Comments
 (0)