From 3157b08c6c7832669bdb01b4fa3b51139513b275 Mon Sep 17 00:00:00 2001
From: P-A Loizeau <p.-a.loizeau@gsi.de>
Date: Wed, 24 Mar 2021 10:17:30 +0100
Subject: [PATCH] Improve variable names in CbmMatchRecoToMC and fix log levels
 and comments in mcbm macros

---
 core/base/CbmMatchRecoToMC.cxx | 20 ++++++++++----------
 macro/mcbm/mcbm_match_check.C  |  2 +-
 macro/mcbm/mcbm_reco_event.C   |  1 -
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/core/base/CbmMatchRecoToMC.cxx b/core/base/CbmMatchRecoToMC.cxx
index 7a1ba0aff0..c3dc5e4a24 100644
--- a/core/base/CbmMatchRecoToMC.cxx
+++ b/core/base/CbmMatchRecoToMC.cxx
@@ -540,8 +540,8 @@ void CbmMatchRecoToMC::MatchHitsTof(const TClonesArray* HitDigiMatches,
                << iNbTofDigis << " VS " << iNbTofDigiMatches;
 
   Int_t nofHits     = hits->GetEntriesFast();
-  CbmTofDigi pTofDigi;
-  CbmMatch pMatchDigiPnt;
+  CbmTofDigi digiTof;
+  CbmMatch matchDigiPnt;
 
   for (Int_t iHit = 0; iHit < nofHits; iHit++) {
     CbmMatch* hitDigiMatch = static_cast<CbmMatch*>(HitDigiMatches->At(iHit));
@@ -562,25 +562,25 @@ void CbmMatchRecoToMC::MatchHitsTof(const TClonesArray* HitDigiMatches,
         continue;
       }  // if( iNbTofDigis <= iDigiIdx )
 
-      pTofDigi            = fTofDigis->at(iDigiIdx);
-      pMatchDigiPnt       = fTofDigiMatch->at(iDigiIdx);
-      Int_t iNbPointsDigi = pMatchDigiPnt.GetNofLinks();
+      digiTof             = fTofDigis->at(iDigiIdx);
+      matchDigiPnt        = fTofDigiMatch->at(iDigiIdx);
+      Int_t iNbPointsDigi = matchDigiPnt.GetNofLinks();
       if (iNbPointsDigi <= 0) {
         LOG(error) << "CbmMatchRecoToMC::MatchHitsTof => No entries in Digi to point match for Hit #" << iHit << "/"
                    << nofHits << " Digi " << iDigi << "/" << iNbDigisHit << ": " << iNbPointsDigi << " (digi index is "
                    << iDigiIdx << "/" << iNbTofDigis << ") => ignore it!!!";
         LOG(error) << "                                  Digi address: 0x" << std::setw(8) << std::hex
-                   << pTofDigi.GetAddress() << std::dec;
+                   << digiTof.GetAddress() << std::dec;
         continue;
-      }                                                      // if( iNbTofDigis <= iDigiIdx )
-      CbmLink lTruePoint  = pMatchDigiPnt.GetMatchedLink();  // Point generating the Digi
+      }                                                     // if( iNbTofDigis <= iDigiIdx )
+      CbmLink lTruePoint  = matchDigiPnt.GetMatchedLink();  // Point generating the Digi
       Int_t iTruePointIdx = lTruePoint.GetIndex();
       for (Int_t iPoint = 0; iPoint < iNbPointsDigi; iPoint++) {
-        CbmLink lPoint  = pMatchDigiPnt.GetLink(iPoint);
+        CbmLink lPoint  = matchDigiPnt.GetLink(iPoint);
         Int_t iPointIdx = lPoint.GetIndex();
 
         if (iPointIdx == iTruePointIdx)
-          hitMatch->AddLink(CbmLink(pTofDigi.GetTot(), iPointIdx, lPoint.GetEntry(),
+          hitMatch->AddLink(CbmLink(digiTof.GetTot(), iPointIdx, lPoint.GetEntry(),
                                     lPoint.GetFile()));  // Point generating the Digi
         else
           hitMatch->AddLink(CbmLink(
diff --git a/macro/mcbm/mcbm_match_check.C b/macro/mcbm/mcbm_match_check.C
index fcf4bdbb00..c875080f39 100644
--- a/macro/mcbm/mcbm_match_check.C
+++ b/macro/mcbm/mcbm_match_check.C
@@ -7,7 +7,7 @@ void mcbm_match_check(Int_t nEvents = 10, TString setup = "mcbm_beam_2020_03", c
   TString ParFile   = dataset + ".par.root";
   TString OutFile   = dataset + ".match_check.root";
 
-  FairLogger::GetLogger()->SetLogScreenLevel("DEBUG");
+  FairLogger::GetLogger()->SetLogScreenLevel("INFO");
   FairLogger::GetLogger()->SetLogVerbosityLevel("HIGH");
 
   // -----   Timer   --------------------------------------------------------
diff --git a/macro/mcbm/mcbm_reco_event.C b/macro/mcbm/mcbm_reco_event.C
index f85a8e8eca..7913e8e1aa 100644
--- a/macro/mcbm/mcbm_reco_event.C
+++ b/macro/mcbm/mcbm_reco_event.C
@@ -20,7 +20,6 @@ void mcbm_reco_event(Int_t nEvents = 10, TString dataset = "data/test", const ch
 
   // --- Logger settings ----------------------------------------------------
   TString logLevel     = "INFO";
-  //TString logLevel     = "DEBUG";
   TString logVerbosity = "LOW";
   // ------------------------------------------------------------------------
 
-- 
GitLab