Skip to content

Commit 36cbb7f

Browse files
committed
ITS/MFT digi: account BC reassignment in time wrt BC
Fix from @atriolo: In continuous mode, if mCollisionTimeWrtROF < 0, the reference BC is moved one BC earlier to get the ROF ID it belongs to, but mCollisionTimeWrtROF is not increased by 24.95 ns to compensate for the shift of the reference BC: as a result the collision is placed 24.95 ns too early with respect to its ROF Also ITS3 digitization is fixed.
1 parent 04ab677 commit 36cbb7f

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)