From f97e12b9fca886067c15e748efc25f18d44a8a4a Mon Sep 17 00:00:00 2001
From: Valentina <v.akishina@gsi.de>
Date: Mon, 17 May 2021 18:08:58 +0200
Subject: [PATCH] L1 turn on clone merge prosedure

---
 reco/L1/L1Algo/L1Algo.h            |  2 +-
 reco/L1/L1Algo/L1CATrackFinder.cxx | 11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h
index 703c5fb2d7..6323165164 100644
--- a/reco/L1/L1Algo/L1Algo.h
+++ b/reco/L1/L1Algo/L1Algo.h
@@ -15,7 +15,7 @@ class L1AlgoDraw;
 //#define XXX               // time debug
 //#define COUNTERS          // diff counters (hits, doublets, ... )
 
-//#define MERGE_CLONES
+#define MERGE_CLONES
 // #define TRACKS_FROM_TRIPLETS_ITERATION kAllPrimIter
 
 //#define HitErrors
diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx
index cfc2abd6bc..85df5b9538 100644
--- a/reco/L1/L1Algo/L1CATrackFinder.cxx
+++ b/reco/L1/L1Algo/L1CATrackFinder.cxx
@@ -532,12 +532,6 @@ inline void L1Algo::f20(  // input
 #endif  // DOUB_PERFORMANCE
       hitsm_2.push_back(imh);
 
-      TripForHit[0][hitsl_1[i1] + StsHitsUnusedStartIndex[&stam - vStations - 1]] = 0;
-      TripForHit[1][hitsl_1[i1] + StsHitsUnusedStartIndex[&stam - vStations - 1]] = 0;
-
-      TripForHit[0][hitsl_1[i1] + StsHitsUnusedStartIndex[&stam - vStations - 2]] = 0;
-      TripForHit[1][hitsl_1[i1] + StsHitsUnusedStartIndex[&stam - vStations - 2]] = 0;
-
       if (n2 > 8000) return;
 
       n2++;
@@ -1776,8 +1770,11 @@ void L1Algo::CATrackFinder()
 
     n_g1.assign(n_g1.size(), Portion);
 
+    TripForHit[0].assign(nDontUsedHits, 0);
+    TripForHit[1].assign(nDontUsedHits, 0);
+
     for (int n = 0; n < nTh; n++)
-      for (int j = 0; j < 12; j++)
+      for (int j = 0; j < NStations; j++)
         nTripletsThread[j][n] = 0;
 
         /// isec - number of current iterations, fNFindIterations - number of all iterations
-- 
GitLab