From 23efc75046ed6ae4bf4a408313e3872056a3d3bc Mon Sep 17 00:00:00 2001 From: jesgum Date: Mon, 3 Nov 2025 10:43:30 +0100 Subject: [PATCH 1/2] Fix retrieving of DetLayer for otf strangeness tracking --- ALICE3/Core/FastTracker.cxx | 14 -------------- ALICE3/Core/FastTracker.h | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index b03a58e6c9e..8302be2cb57 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -66,20 +66,6 @@ void FastTracker::addDeadPhiRegionInLayer(const std::string& layerName, float ph layers[layerIdx].addDeadPhiRegion(phiStart, phiEnd); } -DetLayer FastTracker::GetLayer(int layer, bool ignoreBarrelLayers) const -{ - int layerIdx = layer; - if (ignoreBarrelLayers) { - for (int il = 0, trackingLayerIdx = 0; trackingLayerIdx <= layer; il++) { - if (layers[il].isInert()) - continue; - trackingLayerIdx++; - layerIdx = il; - } - } - return layers[layerIdx]; -} - int FastTracker::GetLayerIndex(const std::string& name) const { int i = 0; diff --git a/ALICE3/Core/FastTracker.h b/ALICE3/Core/FastTracker.h index dd88d381424..d4d88cb13d9 100644 --- a/ALICE3/Core/FastTracker.h +++ b/ALICE3/Core/FastTracker.h @@ -48,7 +48,7 @@ class FastTracker /// \param phiStart Start angle of the dead region (in radians) /// \param phiEnd End angle of the dead region (in radians) void addDeadPhiRegionInLayer(const std::string& layerName, float phiStart, float phiEnd); - DetLayer GetLayer(const int layer, bool ignoreBarrelLayers = true) const; + DetLayer GetLayer(const int layer) const { return layers[layer]; } std::vector GetLayers() const { return layers; } int GetLayerIndex(const std::string& name) const; size_t GetNLayers() const { return layers.size(); } From 51cb4051ae422f362e17c4dbf4624e5e67af6336 Mon Sep 17 00:00:00 2001 From: jesgum Date: Mon, 3 Nov 2025 10:56:20 +0100 Subject: [PATCH 2/2] fix include and casting --- ALICE3/Core/FastTracker.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index 8302be2cb57..d43bf10fc6d 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -325,7 +326,7 @@ void FastTracker::AddGenericDetector(std::string filename, o2::ccdb::BasicCCDBMa LOG(fatal) << "Cannot open dead phi regions file " << deadPhiRegions; return; } - TGraph* g = (TGraph*)infile.Get(infile.GetListOfKeys()->At(0)->GetName()); + TGraph* g = reinterpret_cast(infile.Get(infile.GetListOfKeys()->At(0)->GetName())); infile.Close(); addedLayer->setDeadPhiRegions(g); }