From 179011d26b815d5bae285acbb7dfd5f05231e758 Mon Sep 17 00:00:00 2001 From: Felix Schlepper Date: Mon, 6 Oct 2025 14:11:58 +0200 Subject: [PATCH] Glo: only initialzed AB geom helper up to lowest layer We can skip initializing the layers below the lowest allowed AB layer. This allows to run the AB for ITS3 otherwise the initialization of the RecoGeomHelper is not well defined and crashed for layers < 3 since the chip mapping is not well defined. Currently we anyways allow AB tracks only to go down to layer 3 by default and this might not change for Run 4 anytime soon. If it does the RecoGeomHelper class has to be adapted then. Signed-off-by: Felix Schlepper --- Detectors/GlobalTracking/src/MatchTPCITS.cxx | 4 ++-- .../reconstruction/include/ITSReconstruction/RecoGeomHelper.h | 2 +- Detectors/ITSMFT/ITS/reconstruction/src/RecoGeomHelper.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Detectors/GlobalTracking/src/MatchTPCITS.cxx b/Detectors/GlobalTracking/src/MatchTPCITS.cxx index e16031f641829..7e3f8d9f78fc9 100644 --- a/Detectors/GlobalTracking/src/MatchTPCITS.cxx +++ b/Detectors/GlobalTracking/src/MatchTPCITS.cxx @@ -245,8 +245,8 @@ void MatchTPCITS::init() } #endif - if (mParams->runAfterBurner) { // only used in AfterBurner - mRGHelper.init(); // prepare helper for TPC track / ITS clusters matching + if (mParams->runAfterBurner) { // only used in AfterBurner + mRGHelper.init(mParams->lowestLayerAB); // prepare helper for TPC track / ITS clusters matching } clear(); diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/RecoGeomHelper.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/RecoGeomHelper.h index f9d3f1ae46752..a7d814f02d011 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/RecoGeomHelper.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/RecoGeomHelper.h @@ -103,7 +103,7 @@ struct RecoGeomHelper { static constexpr float ladderWidth() { return o2::itsmft::SegmentationAlpide::SensorSizeRows; } static constexpr float ladderWidthInv() { return 1. / ladderWidth(); } - void init(); + void init(int minLayer = 0, int maxLayer = getNLayers()); void print() const; ClassDefNV(RecoGeomHelper, 0); diff --git a/Detectors/ITSMFT/ITS/reconstruction/src/RecoGeomHelper.cxx b/Detectors/ITSMFT/ITS/reconstruction/src/RecoGeomHelper.cxx index 8f2efef0b34cd..712ec6a022d16 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/src/RecoGeomHelper.cxx +++ b/Detectors/ITSMFT/ITS/reconstruction/src/RecoGeomHelper.cxx @@ -229,9 +229,9 @@ void RecoGeomHelper::RecoLayer::print() const } //_____________________________________________________________________ -void RecoGeomHelper::init() +void RecoGeomHelper::init(int minLayer, int maxLayer) { - for (int il = int(layers.size()); il--;) { + for (int il = maxLayer; --il >= minLayer;) { auto& lr = layers[il]; lr.id = il; lr.init();