3131#include " MIDSimulation/ChamberResponse.h"
3232#include " MIDSimulation/ChamberEfficiencyResponse.h"
3333#include " MIDSimulation/Geometry.h"
34+ #include " MIDRaw/ElectronicsDelay.h"
3435#include " DataFormatsMID/MCLabel.h"
3536
3637using namespace o2 ::framework;
@@ -84,7 +85,9 @@ class MIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
8485 context->initSimChains (o2::detectors::DetID::MID, mSimChains );
8586 auto & irecords = context->getEventRecords ();
8687
87- auto firstTFOrbit = o2::raw::HBFUtils::Instance ().getFirstSampledTFIR ().orbit ;
88+ auto firstTF = o2::raw::HBFUtils::Instance ().getFirstSampledTFIR ();
89+ auto delay = InteractionRecord (mElectronicsDelay .localToBC , 0 );
90+ auto firstTimeTF = InteractionTimeRecord (firstTF + delay, 0 );
8891
8992 auto & eventParts = context->getEventParts ();
9093 std::vector<o2::mid::ColumnData> digits, digitsAccum;
@@ -98,7 +101,7 @@ class MIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
98101 // (background signal merging is basically taking place here)
99102
100103 // Skip digits produced before the first orbit
101- if (irecords[collID]. orbit < firstTFOrbit ) {
104+ if (irecords[collID] < firstTimeTF ) {
102105 continue ;
103106 }
104107 auto firstEntry = digitsAccum.size ();
@@ -144,6 +147,7 @@ class MIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
144147 std::vector<TChain*> mSimChains ;
145148 // RS: at the moment using hardcoded flag for continuos readout
146149 o2::parameters::GRPObject::ROMode mROMode = o2::parameters::GRPObject::CONTINUOUS; // readout mode
150+ ElectronicsDelay mElectronicsDelay ; // Electronics delay
147151};
148152
149153o2::framework::DataProcessorSpec getMIDDigitizerSpec (int channel, bool mctruth)
0 commit comments