Skip to content

Commit 852be0a

Browse files
dstoccosawenzel
authored andcommitted
Account for the electronics delay in the simulated digits
It was accounted for only in the raw data so far.
1 parent bdec671 commit 852be0a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Steer/DigitizerWorkflow/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ o2_add_executable(digitizer-workflow
5151
O2::MCHDigitFiltering
5252
O2::MFTSimulation
5353
O2::MIDSimulation
54+
O2::MIDRaw
5455
O2::PHOSSimulation
5556
O2::CPVSimulation
5657
O2::TOFSimulation

Steer/DigitizerWorkflow/src/MIDDigitizerSpec.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
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

3637
using 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

149153
o2::framework::DataProcessorSpec getMIDDigitizerSpec(int channel, bool mctruth)

0 commit comments

Comments
 (0)