From d92455a2ee3101365c9d1c20c283eff4f5fd2602 Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Wed, 18 May 2022 10:13:35 +0200
Subject: [PATCH] L1Algo: bugfix

---
 reco/L1/CbmL1.cxx              | 21 ++++-----------------
 reco/L1/L1Algo/L1InitManager.h |  2 +-
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx
index 2ef778d137..1b34c98b30 100644
--- a/reco/L1/CbmL1.cxx
+++ b/reco/L1/CbmL1.cxx
@@ -478,9 +478,9 @@ InitStatus CbmL1::Init()
   vector<float> TofStationZ;
   vector<int> TofStationN;
   if (fUseTOF) {
-    NTOFStation = fTofDigiBdfPar->GetNbTrackingStations();
-    TofStationZ.resize(NTOFStation, 0);
-    TofStationN.resize(NTOFStation, 0);
+    NTOFStationGeom = fTofDigiBdfPar->GetNbTrackingStations();
+    TofStationZ.resize(NTOFStationGeom, 0);
+    TofStationN.resize(NTOFStationGeom, 0);
 
     for (int iSmType = 0; iSmType < fTofDigiBdfPar->GetNbSmTypes(); iSmType++) {
       for (int iSm = 0; iSm < fTofDigiBdfPar->GetNbSm(iSmType); iSm++) {
@@ -504,7 +504,7 @@ InitStatus CbmL1::Init()
         }
       }
     }
-    for (Int_t i = 0; i < NTOFStation; i++)
+    for (Int_t i = 0; i < NTOFStationGeom; i++)
       TofStationZ[i] = TofStationZ[i] / TofStationN[i];
   }
 
@@ -710,19 +710,6 @@ InitStatus CbmL1::Init()
   NTOFStation   = fpInitManager->GetNstations(L1DetectorID::kTof);
   NStation      = fpInitManager->GetNstations();
 
-  L1_SHOW(NMvdStations);
-  L1_SHOW(NStsStations);
-  L1_SHOW(NTrdStations);
-  L1_SHOW(NMuchStations);
-  L1_SHOW(NTOFStation);
-  L1_SHOW(NStation);
-  //fpInitManager->PrintStations(/*verbosity = */2);
-  //std::cout  << "Active stations map: ";
-  //for (auto index: fpInitManager->GetActiveStationsIndexMap()) {
-  //  std::cout << index << ' ';
-  //}
-  //std::cout << '\n';
-
   /****************************************
    **                                    **
    ** TRACKING ITERATIONS INITIALIZATION **
diff --git a/reco/L1/L1Algo/L1InitManager.h b/reco/L1/L1Algo/L1InitManager.h
index 7e8384be76..123af865f9 100644
--- a/reco/L1/L1Algo/L1InitManager.h
+++ b/reco/L1/L1Algo/L1InitManager.h
@@ -213,7 +213,7 @@ private:
   /// Example: let stations 1 and 4 be inactive. Then:
   ///   actual index:  0  1  2  3  4  5  6  7  8  9
   ///   active index:  0 -1  1  2 -1  3  4  5  6  7
-  L1Vector<int> fActiveStationsIndexMap {};
+  L1Vector<int> fActiveStationsIndexMap {"L1InitManager::fActiveStationsIndexMap"};
 
   /// Actual number of stations in the setup
   L1DetectorIDIntMap_t fNstationsActualCrosscheck {};
-- 
GitLab