Skip to content

Commit 0af36ba

Browse files
committed
ITS: fix truth seeding if firstOrbit is not 0
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 4de5e88 commit 0af36ba

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Detectors/ITSMFT/ITS/tracking/src/VertexerTraits.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "SimulationDataFormat/DigitizationContext.h"
2626
#include "Steer/MCKinematicsReader.h"
2727
#include "ITSMFTBase/DPLAlpideParam.h"
28+
#include "DetectorsRaw/HBFUtils.h"
2829
#include "CommonUtils/TreeStreamRedirector.h"
2930

3031
// #define VTX_DEBUG 1
@@ -514,7 +515,7 @@ void VertexerTraits::addTruthSeedingVertices()
514515
const auto& ir = irs[eveId2colId[iEve]];
515516
if (!ir.isDummy()) { // do we need this, is this for diffractive events?
516517
const auto& eve = mcReader.getMCEventHeader(iSrc, iEve);
517-
int rofId = (ir.toLong() - roFrameBiasInBC) / roFrameLengthInBC;
518+
int rofId = ((ir - raw::HBFUtils::Instance().getFirstSampledTFIR()).toLong() - roFrameBiasInBC) / roFrameLengthInBC;
518519
if (!vertices.contains(rofId)) {
519520
vertices[rofId] = bounded_vector<Vertex>(mMemoryPool.get());
520521
}

0 commit comments

Comments
 (0)