Skip to content

Commit d0e771d

Browse files
shahor02davidrohr
authored andcommitted
Forbid sampling interaction for bc/orbit < 4/0
Since ZDC may need to read up to 3 BCs back wrt the trigger
1 parent 815f8c6 commit d0e771d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Steer/include/Steer/InteractionSampler.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ class InteractionSampler
4141
mMuBC = -1.; // invalidate
4242
}
4343
float getInteractionRate() const { return mIntRate; }
44-
void setFirstIR(const o2::InteractionRecord& ir) { mFirstIR.InteractionRecord::operator=(ir); }
44+
void setFirstIR(const o2::InteractionRecord& ir)
45+
{
46+
mFirstIR.InteractionRecord::operator=(ir);
47+
if (mFirstIR.orbit == 0 && mFirstIR.bc < 4) {
48+
mFirstIR.bc = 4;
49+
}
50+
}
4551
const o2::InteractionRecord& getFirstIR() const { return mFirstIR; }
4652

4753
void setMuPerBC(float mu)
@@ -68,7 +74,7 @@ class InteractionSampler
6874
o2::math_utils::RandomRing<1000> mCollTimeGenerator; // generator of number of interactions in BC
6975

7076
o2::InteractionTimeRecord mIR{{0, 0}, 0.};
71-
o2::InteractionTimeRecord mFirstIR{{0, 0}, 0.};
77+
o2::InteractionTimeRecord mFirstIR{{4, 0}, 0.};
7278
int mIntBCCache = 0; ///< N interactions left for current BC
7379

7480
float mIntRate = -1.; ///< total interaction rate in Hz

0 commit comments

Comments
 (0)