Skip to content

Commit bdec671

Browse files
dstoccosawenzel
authored andcommitted
MID: skip digits produced before the beginning of the TF
1 parent 0a2bcda commit bdec671

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Steer/DigitizerWorkflow/src/MIDDigitizerSpec.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "Framework/Task.h"
2121
#include "Steer/HitProcessingManager.h" // for DigitizationContext
2222
#include "DetectorsBase/BaseDPLDigitizer.h"
23+
#include "DetectorsRaw/HBFUtils.h"
2324
#include "SimulationDataFormat/MCTruthContainer.h"
2425
#include "DataFormatsParameters/GRPObject.h"
2526
#include "DataFormatsMID/ROFRecord.h"
@@ -83,6 +84,8 @@ class MIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
8384
context->initSimChains(o2::detectors::DetID::MID, mSimChains);
8485
auto& irecords = context->getEventRecords();
8586

87+
auto firstTFOrbit = o2::raw::HBFUtils::Instance().getFirstSampledTFIR().orbit;
88+
8689
auto& eventParts = context->getEventParts();
8790
std::vector<o2::mid::ColumnData> digits, digitsAccum;
8891
std::vector<o2::mid::ROFRecord> rofRecords;
@@ -93,6 +96,11 @@ class MIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
9396
for (int collID = 0; collID < irecords.size(); ++collID) {
9497
// for each collision, loop over the constituents event and source IDs
9598
// (background signal merging is basically taking place here)
99+
100+
// Skip digits produced before the first orbit
101+
if (irecords[collID].orbit < firstTFOrbit) {
102+
continue;
103+
}
96104
auto firstEntry = digitsAccum.size();
97105
for (auto& part : eventParts[collID]) {
98106
mDigitizer->setEventID(part.entryID);

0 commit comments

Comments
 (0)