Skip to content

Commit c4dda5a

Browse files
authored
ITS/MFT digi: account BC reassignment in time wrt BC (#16016)
1 parent d70ea88 commit c4dda5a

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎Detectors/ITSMFT/common/simulation/src/Digitizer.cxx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ void Digitizer::setEventTime(const o2::InteractionTimeRecord& irt, int layer)
158158
mCollisionTimeWrtROF = mEventTime.timeInBCNS; // in triggered mode the ROF starts at BC (is there a delay?)
159159
if (mParams.isContinuous()) {
160160
auto nbc = mEventTime.differenceInBC(mIRFirstSampledTF);
161-
if (mCollisionTimeWrtROF < 0 && nbc > 0) {
162-
nbc--;
161+
if (mCollisionTimeWrtROF < 0. && nbc > 0) { // move to the ROF it actually belongs to and account
162+
nbc--; // this in the time offset wrt updated reference BC
163+
mCollisionTimeWrtROF += o2::constants::lhc::LHCBunchSpacingNS;
163164
}
164165

165166
// we might get interactions to digitize from before

‎Detectors/Upgrades/ITS3/simulation/src/Digitizer.cxx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ void Digitizer::setEventTime(const o2::InteractionTimeRecord& irt, int layer)
123123
mCollisionTimeWrtROF = mEventTime.timeInBCNS; // in triggered mode the ROF starts at BC (is there a delay?)
124124
if (mParams.isContinuous()) {
125125
auto nbc = mEventTime.differenceInBC(mIRFirstSampledTF);
126-
if (mCollisionTimeWrtROF < 0 && nbc > 0) {
127-
nbc--;
126+
if (mCollisionTimeWrtROF < 0. && nbc > 0) { // move to the ROF it actually belongs to and account
127+
nbc--; // this in the time offset wrt updated reference BC
128+
mCollisionTimeWrtROF += o2::constants::lhc::LHCBunchSpacingNS;
128129
}
129130
// we might get interactions to digitize from before
130131
// the first sampled IR

0 commit comments

Comments
 (0)