From 6ee1897792a372a89a5f1cf0dbcb2c78f44ffed1 Mon Sep 17 00:00:00 2001 From: "se.gorbunov" <se.gorbunov@gsi.de> Date: Thu, 30 Nov 2023 19:44:01 +0000 Subject: [PATCH] Ca: cleanup --- algo/ca/core/tracking/CaFramework.h | 2 +- algo/ca/core/tracking/CaTrackFinder.cxx | 2 +- algo/ca/core/tracking/CaTrackFinderWindow.cxx | 20 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/algo/ca/core/tracking/CaFramework.h b/algo/ca/core/tracking/CaFramework.h index fe73fa7784..4f5344c315 100644 --- a/algo/ca/core/tracking/CaFramework.h +++ b/algo/ca/core/tracking/CaFramework.h @@ -259,7 +259,7 @@ namespace cbm::algo::ca ///< indices of the sub-slice hits Vector<ca::HitIndex_t> fSliceHitIds[constants::size::MaxNstations]{"Framework::fSliceHitIds"}; - Vector<int> fStripToTrack{"Framework::fStripToTrack"}; // strip to track pointers + Vector<int> fHitKeyToTrack{"Framework::fHitKeyToTrack"}; // strip to track pointers TrackingMode fTrackingMode{kSts}; diff --git a/algo/ca/core/tracking/CaTrackFinder.cxx b/algo/ca/core/tracking/CaTrackFinder.cxx index 4d669171aa..eb033b402a 100644 --- a/algo/ca/core/tracking/CaTrackFinder.cxx +++ b/algo/ca/core/tracking/CaTrackFinder.cxx @@ -67,7 +67,7 @@ void TrackFinder::FindTracks() } frAlgo.fvHitKeyFlags.reset(frAlgo.fInputData.GetNhitKeys(), 0); - frAlgo.fStripToTrack.reset(frAlgo.fInputData.GetNhitKeys(), -1); + frAlgo.fHitKeyToTrack.reset(frAlgo.fInputData.GetNhitKeys(), -1); frAlgo.fHitTimeInfo.reset(frAlgo.fInputData.GetNhits()); diff --git a/algo/ca/core/tracking/CaTrackFinderWindow.cxx b/algo/ca/core/tracking/CaTrackFinderWindow.cxx index e923255cd3..23e44ab5bf 100644 --- a/algo/ca/core/tracking/CaTrackFinderWindow.cxx +++ b/algo/ca/core/tracking/CaTrackFinderWindow.cxx @@ -436,8 +436,8 @@ void TrackFinderWindow::CaTrackFinderSlice() frAlgo.fTrackCandidates.clear(); for (const auto& h : frAlgo.fWindowHits) { - frAlgo.fStripToTrack[h.FrontKey()] = -1; - frAlgo.fStripToTrack[h.BackKey()] = -1; + frAlgo.fHitKeyToTrack[h.FrontKey()] = -1; + frAlgo.fHitKeyToTrack[h.BackKey()] = -1; } //== Loop over triplets with the required level, find and store track candidates @@ -546,7 +546,7 @@ void TrackFinderWindow::CaTrackFinderSlice() const ca::Hit& h = frAlgo.fInputData.GetHit(hitId); bool isAlive = true; { // front strip - auto& stripF = (frAlgo.fStripToTrack)[h.FrontKey()]; + auto& stripF = (frAlgo.fHitKeyToTrack)[h.FrontKey()]; if ((stripF >= 0) && (stripF != tr.Id())) { // strip is used by other candidate const auto& other = frAlgo.fTrackCandidates[stripF]; if (!other.IsAlive() && tr.IsBetterThan(other)) { @@ -565,7 +565,7 @@ void TrackFinderWindow::CaTrackFinderSlice() } { // back strip - auto& stripB = (frAlgo.fStripToTrack)[h.BackKey()]; + auto& stripB = (frAlgo.fHitKeyToTrack)[h.BackKey()]; if ((stripB >= 0) && (stripB != tr.Id())) { // strip is used by other candidate const auto& other = frAlgo.fTrackCandidates[stripB]; if (!other.IsAlive() && tr.IsBetterThan(other)) { @@ -595,18 +595,18 @@ void TrackFinderWindow::CaTrackFinderSlice() tr.SetAlive(true); for (int iHit = 0; tr.IsAlive() && (iHit < (int) tr.Hits().size()); ++iHit) { const ca::Hit& h = frAlgo.fInputData.GetHit(tr.Hits()[iHit]); - tr.SetAlive(tr.IsAlive() && ((frAlgo.fStripToTrack)[h.FrontKey()] == tr.Id()) - && ((frAlgo.fStripToTrack)[h.BackKey()] == tr.Id())); + tr.SetAlive(tr.IsAlive() && ((frAlgo.fHitKeyToTrack)[h.FrontKey()] == tr.Id()) + && ((frAlgo.fHitKeyToTrack)[h.BackKey()] == tr.Id())); } if (!tr.IsAlive()) { // release strips for (auto hitId : tr.Hits()) { const ca::Hit& h = frAlgo.fInputData.GetHit(hitId); - if (frAlgo.fStripToTrack[h.FrontKey()] == tr.Id()) { - frAlgo.fStripToTrack[h.FrontKey()] = -1; + if (frAlgo.fHitKeyToTrack[h.FrontKey()] == tr.Id()) { + frAlgo.fHitKeyToTrack[h.FrontKey()] = -1; } - if (frAlgo.fStripToTrack[h.BackKey()] == tr.Id()) { - frAlgo.fStripToTrack[h.BackKey()] = -1; + if (frAlgo.fHitKeyToTrack[h.BackKey()] == tr.Id()) { + frAlgo.fHitKeyToTrack[h.BackKey()] = -1; } } } -- GitLab