|
29 | 29 | #include "DetectorsBase/BaseDPLDigitizer.h" |
30 | 30 | #include "SimConfig/DigiParams.h" |
31 | 31 | #include "Framework/CCDBParamSpec.h" |
| 32 | +#include "DetectorsRaw/HBFUtils.h" |
32 | 33 |
|
33 | 34 | using namespace o2::framework; |
34 | 35 | using SubSpecificationType = o2::framework::DataAllocator::SubSpecificationType; |
@@ -121,9 +122,21 @@ void DigitizerSpec::run(framework::ProcessingContext& pc) |
121 | 122 | bool isLastStream = true; |
122 | 123 | double eventTime = timesview[0].getTimeNS() - o2::cpv::CPVSimParams::Instance().mDeadTime; // checked above that list not empty |
123 | 124 | int eventId = 0; |
| 125 | + |
| 126 | + // the interaction record marking the timeframe start |
| 127 | + auto firstTF = InteractionTimeRecord(o2::raw::HBFUtils::Instance().getFirstSampledTFIR(), 0); |
| 128 | + |
124 | 129 | // loop over all composite collisions given from context |
125 | 130 | // (aka loop over all the interaction records) |
126 | 131 | for (int collID = 0; collID < n; ++collID) { |
| 132 | + // Note: Very crude filter to neglect collisions coming before |
| 133 | + // the first interaction record of the timeframe. Remove this, once these collisions can be handled |
| 134 | + // within the digitization routine. Collisions before this timeframe might impact digits of this timeframe. |
| 135 | + // See https://its.cern.ch/jira/browse/O2-5395. |
| 136 | + if (timesview[collID] < firstTF) { |
| 137 | + LOG(info) << "Too early: Not digitizing collision " << collID; |
| 138 | + continue; |
| 139 | + } |
127 | 140 |
|
128 | 141 | double dt = timesview[collID].getTimeNS() - eventTime; // start new PHOS readout, continue current or dead time? |
129 | 142 | if (dt > mReadoutTime && dt < mDeadTime) { // dead time, skip event |
|
0 commit comments