From 1e0792667929fa8c47ac0514d85700311aabe0de Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Fri, 24 Feb 2023 11:46:36 +0100
Subject: [PATCH] CA: New MC module was temporarily removed from CbmL1

---
 reco/L1/CbmCaMCModule.cxx         | 3 +++
 reco/L1/CbmCaMCModule.h           | 2 +-
 reco/L1/CbmL1.cxx                 | 6 +-----
 reco/L1/CbmL1.h                   | 1 -
 reco/L1/CbmL1Performance.cxx      | 1 +
 reco/L1/CbmL1ReadEvent.cxx        | 5 +----
 reco/L1/L1Algo/L1Algo.cxx         | 2 --
 reco/L1/catools/CaToolsMCData.cxx | 2 ++
 8 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/reco/L1/CbmCaMCModule.cxx b/reco/L1/CbmCaMCModule.cxx
index 01b7c99506..c81d4e7b11 100644
--- a/reco/L1/CbmCaMCModule.cxx
+++ b/reco/L1/CbmCaMCModule.cxx
@@ -189,9 +189,11 @@ void CbmCaMCModule::ProcessEvent(CbmEvent*) { fpQaModule->FillHistograms(); }
 //
 void CbmCaMCModule::InitTrackInfo(const L1Vector<CbmL1HitDebugInfo>& vHits)
 {
+  LOG(info) << "\033[1;32m!!!! FLAG 1\033[0m";
   // ----- Initialize stations arrangement and hit indexes
   fMCData.InitTrackInfo(vHits);
 
+  LOG(info) << "\033[1;32m!!!! FLAG 2\033[0m";
   // ----- Define reconstructable and additional flags
   for (auto& aTrk : fMCData.GetTrackContainer()) {
     bool isRec = true;  // is track reconstructable
@@ -226,6 +228,7 @@ void CbmCaMCModule::InitTrackInfo(const L1Vector<CbmL1HitDebugInfo>& vHits)
     aTrk.SetFlagReconstructable(isRec);
     aTrk.SetFlagAdditional(isAdd);
   }
+  LOG(info) << "\033[1;32m!!!! FLAG 3\033[0m";
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
diff --git a/reco/L1/CbmCaMCModule.h b/reco/L1/CbmCaMCModule.h
index 56266d0606..da9658ecfe 100644
--- a/reco/L1/CbmCaMCModule.h
+++ b/reco/L1/CbmCaMCModule.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2022-2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx
index 1e533d2c86..0be8e167f9 100644
--- a/reco/L1/CbmL1.cxx
+++ b/reco/L1/CbmL1.cxx
@@ -866,6 +866,7 @@ InitStatus CbmL1::Init()
   fNTofStations  = fpAlgo->GetParameters()->GetNstationsActive(L1DetectorID::kTof);
   fNStations     = fpAlgo->GetParameters()->GetNstationsActive();
 
+  LOG(info) << fpAlgo->GetParameters()->ToString(0);
 
   LOG(info) << "----- Numbers of stations active in tracking -----";
   LOG(info) << "  MVD:    " << fNMvdStations;
@@ -875,7 +876,6 @@ InitStatus CbmL1::Init()
   LOG(info) << "  ToF:    " << fNTofStations;
   LOG(info) << "  Total:  " << fNStations;
 
-
   return kSUCCESS;
 }
 
@@ -1009,8 +1009,6 @@ void CbmL1::Reconstruct(CbmEvent* event)
   if (fPerformance) {
     if (fVerbose > 1) { cout << "Performance..." << endl; }
     TrackMatch();
-    //fpMCModule->MatchRecoAndMCTracks(fvRecoTracks, fvHitDebugInfo);
-    //fpMCModule->ProcessEvent(event);
     EfficienciesPerformance();
     HistoPerformance();
     TrackFitPerformance();
@@ -1025,8 +1023,6 @@ void CbmL1::Reconstruct(CbmEvent* event)
 // -----   Finish CbmStsFitPerformanceTask task   -----------------------------
 void CbmL1::Finish()
 {
-  //if (fPerformance) { fpMCModule->Finish(); }
-
   TDirectory* curr   = gDirectory;
   TFile* currentFile = gFile;
 
diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h
index 2a45101085..db0ee01adc 100644
--- a/reco/L1/CbmL1.h
+++ b/reco/L1/CbmL1.h
@@ -22,7 +22,6 @@
 #define _CbmL1_h_
 
 
-#include "CbmCaMCModule.h"
 #include "CbmL1DetectorID.h"
 #include "CbmL1Hit.h"
 #include "CbmL1MCPoint.h"
diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx
index a7b56af548..9457caa3db 100644
--- a/reco/L1/CbmL1Performance.cxx
+++ b/reco/L1/CbmL1Performance.cxx
@@ -275,6 +275,7 @@ struct TL1PerfEfficiencies : public TL1Efficiencies {
                                          "All Reco", "All MC", "MCl(hits)", "MCl(MCps)"};
 
     CbmQaTable* aTable = new CbmQaTable(nameOfTable.c_str(), "Track Efficiency", NCounters + 2, 9);
+    aTable->SetColWidth(20);
     aTable->SetNamesOfRows(rowNames);
     aTable->SetNamesOfCols(colNames);
     for (int iC = 0; iC < NCounters; iC++) {
diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx
index 4925155135..3a96dd7dbb 100644
--- a/reco/L1/CbmL1ReadEvent.cxx
+++ b/reco/L1/CbmL1ReadEvent.cxx
@@ -1153,7 +1153,6 @@ void CbmL1::ReadEvent(CbmEvent* event)
   fIODataManager.ResetInputData();
   fIODataManager.ReserveNhits(nHits);
   fIODataManager.SetNhitKeys(NStrips);
-  //if (fPerformance) { fpMCModule->GetMCData()->ReserveNofHits(nHits); }
 
   // ----- Fill
   for (int iHit = 0; iHit < nHits; ++iHit) {
@@ -1196,10 +1195,8 @@ void CbmL1::ReadEvent(CbmEvent* event)
 
     fvHitDebugInfo.push_back(s);
     fvHitPointIndexes.push_back(th.iMC);
-    //if (fPerformance) { fpMCModule->GetMCData()->RegisterPointIndexForHit(iHit, th.iMC); }
   }
-  if (fPerformance) { HitMatch(); }  /// OLD
-  //if (fPerformance) { fpMCModule->MatchPointsWithHits(fvHitDebugInfo); }  /// NEW
+  if (fPerformance) { HitMatch(); }                                       /// OLD
 
   if (fVerbose >= 2) cout << "ReadEvent: mvd and sts are saved." << endl;
 
diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx
index 4477cf7128..d454ddad23 100644
--- a/reco/L1/L1Algo/L1Algo.cxx
+++ b/reco/L1/L1Algo/L1Algo.cxx
@@ -167,8 +167,6 @@ void L1Algo::ReceiveParameters(L1Parameters&& parameters)
   fMomentumCutOff   = fParameters.GetMomentumCutOff();
 
   L1FieldRegion::ForceUseOfOriginalField(fParameters.DevIsUseOfOriginalField());
-
-  LOG(info) << fParameters.ToString(3);
 }
 
 /// TODO: Move to L1Hit
diff --git a/reco/L1/catools/CaToolsMCData.cxx b/reco/L1/catools/CaToolsMCData.cxx
index c01fe96611..15ceb5263c 100644
--- a/reco/L1/catools/CaToolsMCData.cxx
+++ b/reco/L1/catools/CaToolsMCData.cxx
@@ -97,6 +97,7 @@ void MCData::Clear()
 //
 void MCData::InitTrackInfo(const L1Vector<CbmL1HitDebugInfo>& vHits)
 {
+  LOG(info) << "\033[1;32m!!!! FLAG a\033[0m";
   for (auto& aTrk : fvTracks) {
     // Assign hits to tracks
     aTrk.ClearHitIndexes();
@@ -111,6 +112,7 @@ void MCData::InitTrackInfo(const L1Vector<CbmL1HitDebugInfo>& vHits)
     aTrk.InitPointsInfo(fvPoints);
     aTrk.InitHitsInfo(vHits);
   }
+  LOG(info) << "\033[1;32m!!!! FLAG b\033[0m";
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
-- 
GitLab