From 3dbbdd76243070e43b753d0dca0ae2b82bb28a3d Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Wed, 29 May 2024 12:06:26 +0200
Subject: [PATCH] Offline-QA clean-up:

The functions InitDataBranches and InitHistograms are merged into the InitQa function,
the functions FillHistograms and InitTimeslice are merged into the ExecQa function.
---
 core/qa/CbmQaTask.cxx                         |  18 +-
 core/qa/CbmQaTask.h                           |  33 ++-
 macro/qa/configs/qa_tasks_config_mcbm.yaml    |   4 +-
 ...ks_config_mcbm_beam_2022_05_23_nickel.yaml |  11 +-
 reco/L1/qa/CbmCaInputQaBase.cxx               | 101 ++++------
 reco/L1/qa/CbmCaInputQaBase.h                 | 122 +++++------
 reco/L1/qa/CbmCaInputQaMuch.cxx               |  42 +---
 reco/L1/qa/CbmCaInputQaMuch.h                 |  33 ++-
 reco/L1/qa/CbmCaInputQaMvd.cxx                |  43 +---
 reco/L1/qa/CbmCaInputQaMvd.h                  |  33 ++-
 reco/L1/qa/CbmCaInputQaSetup.cxx              | 181 ++++++++---------
 reco/L1/qa/CbmCaInputQaSetup.h                |  51 +++--
 reco/L1/qa/CbmCaInputQaSts.cxx                |  98 ++++-----
 reco/L1/qa/CbmCaInputQaSts.h                  |  30 ++-
 reco/L1/qa/CbmCaInputQaTof.cxx                | 156 +++++++--------
 reco/L1/qa/CbmCaInputQaTof.h                  |  27 ++-
 reco/L1/qa/CbmCaInputQaTrd.cxx                |  43 +---
 reco/L1/qa/CbmCaInputQaTrd.h                  |  34 ++--
 reco/L1/qa/CbmCaOutputQa.cxx                  | 189 +++++++++---------
 reco/L1/qa/CbmCaOutputQa.h                    | 139 ++++++-------
 reco/qa/CMakeLists.txt                        |   4 +-
 21 files changed, 580 insertions(+), 812 deletions(-)

diff --git a/core/qa/CbmQaTask.cxx b/core/qa/CbmQaTask.cxx
index 7e90ccdf1d..471b070a8d 100644
--- a/core/qa/CbmQaTask.cxx
+++ b/core/qa/CbmQaTask.cxx
@@ -48,15 +48,13 @@ void CbmQaTask::Exec(Option_t* /*option*/)
     for (int iEvt = 0; iEvt < nEvents; ++iEvt) {
       fpCurrentEvent = static_cast<CbmEvent*>(fpBrEvents->At(iEvt));
       assert(fpCurrentEvent);
-      this->InitTimeSlice();
-      this->FillHistograms();
+      this->ExecQa();
       fNofEvents.SetVal(fNofEvents.GetVal() + 1);
     }
     fpCurrentEvent = nullptr;
   }
   else {
-    this->InitTimeSlice();
-    this->FillHistograms();
+    this->ExecQa();
     fNofEvents.SetVal(fNofEvents.GetVal() + 1);
   }
 }
@@ -66,7 +64,7 @@ void CbmQaTask::Exec(Option_t* /*option*/)
 void CbmQaTask::Finish()
 {
   // Processes canvases in the end of the run
-  InitCanvases();
+  this->CreateSummary();
 
   // Write the root folder to sinker
   auto* pSink = FairRootManager::Instance()->GetSink();
@@ -95,13 +93,9 @@ InitStatus CbmQaTask::Init()
   // ----- Clear map of the histograms (note)
   DeInitBase();
 
-  // ----- Initialize data branches
-  LOG_IF(info, fVerbose > 1) << fName << ": initializing input data branches";
-  res = std::max(res, InitDataBranches());
-
-  // ----- Initialize histograms
+  // ----- Initialize task
   LOG_IF(info, fVerbose > 1) << fName << ": initializing histograms";
-  res = std::max(res, InitHistograms());
+  res = std::max(res, this->InitQa());
 
   // ----- Initialize event branch
   if (ECbmRecoMode::EventByEvent == fRecoMode) {
@@ -127,7 +121,6 @@ InitStatus CbmQaTask::Init()
 //
 InitStatus CbmQaTask::ReInit()
 {
-  LOG_IF(info, fVerbose > 2) << fName << "::DeInitBase() is called";
   return Init();
 }
 
@@ -135,7 +128,6 @@ InitStatus CbmQaTask::ReInit()
 //
 void CbmQaTask::DeInitBase()
 {
-  LOG_IF(info, fVerbose > 2) << fName << "::DeInitBase() is called";
   // De-initialize basic data members
   // ...
 
diff --git a/core/qa/CbmQaTask.h b/core/qa/CbmQaTask.h
index 8246629694..6f2e6a8f7f 100644
--- a/core/qa/CbmQaTask.h
+++ b/core/qa/CbmQaTask.h
@@ -107,11 +107,6 @@ class CbmQaTask : public FairTask, public CbmQaIO {
   /// By default, if the branch
   void DisableEventMode();
 
-  /// \brief FairTask: Defines action of the task in the event/TS
-  void Exec(Option_t* /*option*/) override;
-
-  /// \brief FairTask: Defines action of the task in the end of run
-  void Finish() override;
 
   /// \brief Gets check-list
   const std::map<std::string, CheckFlags>& GetCheckList() const { return fmCheckList; }
@@ -125,8 +120,6 @@ class CbmQaTask : public FairTask, public CbmQaIO {
   /// \brief Gets version tag
   const TString& GetVersionTag() const { return fsVersionTag; }
 
-  /// \brief FairTask: Task initialization in the beginning of the run
-  InitStatus Init() override;
 
   /// \brief Returns flag, whether MC information is used or not in the task
   bool IsMCUsed() const { return fbUseMC; }
@@ -134,8 +127,6 @@ class CbmQaTask : public FairTask, public CbmQaIO {
   /// \brief Reads check-list from the configuration file
   void ReadCheckListFromConfig();
 
-  /// \brief FairTask: Task reinitialization
-  InitStatus ReInit() override;
 
   /// \brief Sets check-file
   /// \param pCheckFile  Shared pointer to the cross-check file
@@ -166,20 +157,26 @@ class CbmQaTask : public FairTask, public CbmQaIO {
   /// \brief De-initialize the task
   virtual void DeInit() {}
 
-  /// \brief Initializes data branches
-  virtual InitStatus InitDataBranches() { return kSUCCESS; }
+  /// \brief FairTask: Defines action of the task in the event/TS
+  void Exec(Option_t* /*option*/) override final;
 
-  /// \brief Initializes histograms
-  virtual InitStatus InitHistograms() { return kSUCCESS; }
+  /// \brief FairTask: Defines action of the task in the end of run
+  void Finish() override final;
+
+  /// \brief FairTask: Task initialization in the beginning of the run
+  InitStatus Init() override final;
+
+  /// \brief FairTask: Task reinitialization
+  InitStatus ReInit() override final;
 
-  /// \brief Initializes canvases
-  virtual InitStatus InitCanvases() { return kSUCCESS; }
+  /// \brief Initializes the task
+  virtual InitStatus InitQa() { return kSUCCESS; }
 
-  /// \brief Initializes event / time-slice
-  virtual InitStatus InitTimeSlice() { return kSUCCESS; }
+  /// \brief Initializes QA-task summary: canvases, tables etc.
+  virtual void CreateSummary() {}
 
   /// \brief Method to fill histograms per event or time-slice
-  virtual void FillHistograms() {}
+  virtual void ExecQa() {}
 
   /// \brief Get current event number
   int GetEventNumber() const { return fNofEvents.GetVal(); }
diff --git a/macro/qa/configs/qa_tasks_config_mcbm.yaml b/macro/qa/configs/qa_tasks_config_mcbm.yaml
index 6db450accb..42b8cec662 100644
--- a/macro/qa/configs/qa_tasks_config_mcbm.yaml
+++ b/macro/qa/configs/qa_tasks_config_mcbm.yaml
@@ -20,9 +20,9 @@ qa:
   CbmCaInputQaSts:
     # Specific configuration, provided in the Config structure of the QA-task
     specific:
-      PullMeanThrsh: 0.2
+      PullMeanThrsh: 0.1
       PullWidthThrsh: 2.0
-      EffThrsh: 0.4
+      EffThrsh: 0.5
       MaxDiffZStHit: 1.0
     check_list:
       station_position_ordering: true
diff --git a/macro/qa/configs/qa_tasks_config_mcbm_beam_2022_05_23_nickel.yaml b/macro/qa/configs/qa_tasks_config_mcbm_beam_2022_05_23_nickel.yaml
index 3ab97fa2ed..1b1efd2be2 100644
--- a/macro/qa/configs/qa_tasks_config_mcbm_beam_2022_05_23_nickel.yaml
+++ b/macro/qa/configs/qa_tasks_config_mcbm_beam_2022_05_23_nickel.yaml
@@ -30,7 +30,7 @@ qa:
         MinMom: 0.1 # [GeV/c]
         MaxTheta: 60. # [grad]
         IsPrimary: true
-      PullMeanThrsh: 0.2
+      PullMeanThrsh: 0.1
       PullWidthThrsh: 2.0
       EffThrsh: 0.5
       MaxDiffZStHit: 1.0
@@ -84,6 +84,15 @@ qa:
       #  x: { nbins: 500, min: -100., max: 100. } 
       #  y: { nbins: 500, min: -100., max: 100. }
     profiles: none
+    specific:
+      McTrackCuts:
+        MinMom: 0.1 # [GeV/c]
+        MaxTheta: 60. # [grad]
+        IsPrimary: true
+      PullMeanThrsh: 0.1
+      PullWidthThrsh: 2.0
+      EffThrsh: 0.5
+      MaxDiffZStHit: 1.0
     check_list:
       station_position_ordering: true
       station_position_hit_delta_z: true
diff --git a/reco/L1/qa/CbmCaInputQaBase.cxx b/reco/L1/qa/CbmCaInputQaBase.cxx
index 916f819586..5cf956ed95 100644
--- a/reco/L1/qa/CbmCaInputQaBase.cxx
+++ b/reco/L1/qa/CbmCaInputQaBase.cxx
@@ -68,6 +68,7 @@ template<ca::EDetectorID DetID>
 CbmCaInputQaBase<DetID>::CbmCaInputQaBase(const char* name, int verbose, bool isMCUsed)
   : CbmQaTask(name, verbose, isMCUsed)
 {
+  SetStoringMode(EStoringMode::kSUBDIR);
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
@@ -210,7 +211,7 @@ void CbmCaInputQaBase<DetID>::Check()
     // this range, QA task fails.
     {
       auto* pPullsTable =
-        MakeQaObject<CbmQaTable>("vs Station/pulls_rms", "Pulls std. dev. values in different stations", nSt, 4);
+        MakeQaObject<CbmQaTable>("vs Station/pulls_rms", "Pulls std. dev. values in different stations", nSt, 3);
       pPullsTable->SetNamesOfCols({"Pull(x) sigm", "Pull(y) sigm", "Pull(t) sigm"});
       pPullsTable->SetColWidth(20);
 
@@ -299,11 +300,11 @@ void CbmCaInputQaBase<DetID>::DeInit()
 // ---------------------------------------------------------------------------------------------------------------------
 //
 template<ca::EDetectorID DetID>
-void CbmCaInputQaBase<DetID>::FillHistograms()
+void CbmCaInputQaBase<DetID>::ExecQa()
 {
-  int nSt       = fpDetInterface->GetNtrackingStations();
-  int nHits     = fpHits->GetEntriesFast();
-  int nMCevents = (IsMCUsed()) ? fpMCEventList->GetNofEvents() : -1;
+  const int nSt       = fpDetInterface->GetNtrackingStations();
+  const int nHits     = fpHits->GetEntriesFast();
+  const int nMCevents = (IsMCUsed()) ? fpMCEventList->GetNofEvents() : -1;
 
   // TODO: SZh 06.09.2023: Probably, this approach can fail, if there are several input files are used. Thus I propose
   //                       to use unordered_map with a CbmLink key type.
@@ -323,8 +324,6 @@ void CbmCaInputQaBase<DetID>::FillHistograms()
     }
   }
 
-  LOG(info) << fName << ": Number of hits: " << nHits;
-
   for (int iH = 0; iH < nHits; ++iH) {
     fHitQaData.Reset();
     fHitQaData.SetHitIndex(iH);
@@ -719,12 +718,11 @@ void CbmCaInputQaBase<DetID>::FillHistograms()
 // ---------------------------------------------------------------------------------------------------------------------
 //
 template<ca::EDetectorID DetID>
-InitStatus CbmCaInputQaBase<DetID>::InitDataBranches()
+InitStatus CbmCaInputQaBase<DetID>::InitQa()
 {
-  // Config initialization
+  // ----- Specific configuration initialization
   fConfig = ReadSpecificConfig<CbmCaInputQaBase<DetID>::Config>().value_or(Config{});
 
-  LOG(info) << "\n!!\n!!\n!! TEST: " << fConfig.fEffThrsh << "\n!!\n!!\n!!";
 
   LOG_IF(fatal, !fpDetInterface) << "\033[1;31m" << fName << ": tracking detector interface is undefined\033[0m";
 
@@ -826,7 +824,8 @@ InitStatus CbmCaInputQaBase<DetID>::InitDataBranches()
     }
   }
 
-  // Init monitor
+  // ----- Monitor initialization
+  //
   fMonitor.SetName(Form("Monitor for %s", fName.Data()));
   fMonitor.SetCounterName(EMonitorKey::kEvent, "N events");
   fMonitor.SetCounterName(EMonitorKey::kHit, "N hits total");
@@ -835,20 +834,10 @@ InitStatus CbmCaInputQaBase<DetID>::InitDataBranches()
   fMonitor.SetCounterName(EMonitorKey::kMcPointWrongStation, "N MC points total");
   fMonitor.SetRatioKeys({EMonitorKey::kEvent});
 
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-template<ca::EDetectorID DetID>
-InitStatus CbmCaInputQaBase<DetID>::InitHistograms()
-{
-  int nSt = fpDetInterface->GetNtrackingStations();
 
+  // ----- Histograms initialization
+  //
   //SetStoringMode(EStoringMode::kSAMEDIR);
-  SetStoringMode(EStoringMode::kSUBDIR);
-
-  // ----- Subdirectories
   MakeQaDirectory("Summary");
   MakeQaDirectory("Summary/vs Station");
   if constexpr (ca::EDetectorID::kSts == DetID) {
@@ -856,7 +845,6 @@ InitStatus CbmCaInputQaBase<DetID>::InitHistograms()
   }
   MakeQaDirectory("All stations");
 
-  // ----- Histograms initialization
   fvph_hit_xy.resize(nSt + 1, nullptr);
   fvph_hit_zy.resize(nSt + 1, nullptr);
   fvph_hit_zx.resize(nSt + 1, nullptr);
@@ -1108,28 +1096,10 @@ InitStatus CbmCaInputQaBase<DetID>::InitHistograms()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-// TODO: rename the method to Finish or Finalise or MakeSummary, since it does more than just canvases
-//
 template<ca::EDetectorID DetID>
-InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
+void CbmCaInputQaBase<DetID>::CreateSummary()
 {
   /// TODO: Move this fuction somewhere on top of the class
-  auto DivideCanvas = [](TCanvas* pCanv, int nPads) {
-    if (nPads < 1) {
-      nPads = 1;
-    }
-    int rows = static_cast<int>(std::sqrt(nPads));
-    int cols = nPads / rows;
-    if (cols * rows < nPads) {
-      cols++;
-    }
-    int newSizeX = cols * 600;
-    int newSizeY = rows * 600;
-    pCanv->SetCanvasSize(newSizeX, newSizeY);
-    pCanv->SetWindowSize(newSizeX, newSizeY);
-    pCanv->Divide(cols, rows, 0, 0);
-  };
-
   gStyle->SetOptFit(1);
   int nSt = fpDetInterface->GetNtrackingStations();
 
@@ -1147,7 +1117,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   {
     auto* canv = MakeQaObject<TCanvas>("occ_hit", "Hit Occupancy", 1600, 800);
-    DivideCanvas(canv, 3);
+    canv->Divide(1, 3);
     canv->cd(1);
     fvph_hit_xy[nSt]->DrawCopy("colz", "");
     canv->cd(2);
@@ -1158,8 +1128,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   if (IsMCUsed()) {
     auto* canv = MakeQaObject<TCanvas>("occ_point", "Point Occupancy", 1600, 800);
-    DivideCanvas(canv, 3);
-
+    canv->Divide(1, 3);
     canv->cd(1);
     fvph_point_xy[nSt]->DrawCopy("colz", "");
     canv->cd(2);
@@ -1170,7 +1139,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   if (IsMCUsed()) {
     auto* canv = MakeQaObject<TCanvas>("residual", "Hit Residuals", 1600, 800);
-    DivideCanvas(canv, 6);
+    canv->Divide(1, 5);
     canv->cd(1);
     fvph_res_x[nSt]->DrawCopy("colz", "");
     canv->cd(2);
@@ -1185,7 +1154,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   if (IsMCUsed()) {
     auto* canv = MakeQaObject<TCanvas>("pull", "Hit Pulls", 1600, 800);
-    DivideCanvas(canv, 6);
+    canv->Divide(1, 5);
     canv->cd(1);
     fvph_pull_x[nSt]->DrawCopy("colz", "");
     canv->cd(2);
@@ -1200,7 +1169,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   if (IsMCUsed()) {
     auto* canv = MakeQaObject<TCanvas>("eff", "Hit Reconstruction Efficiency", 1600, 800);
-    DivideCanvas(canv, 2);
+    canv->Divide(1, 2);
     canv->cd(1);
     fvpe_reco_eff_vs_xy[nSt]->DrawCopy("colz", "");
     canv->cd(2);
@@ -1209,7 +1178,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   {
     auto* canv = MakeQaObject<TCanvas>("err", "Hit Errors", 1600, 800);
-    DivideCanvas(canv, 6);
+    canv->Divide(2, 3);
     canv->cd(1);
     fvph_hit_dx[nSt]->DrawCopy();
     canv->cd(2);
@@ -1227,7 +1196,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
   // TODO: Split the histograms for MC and real data
   if (IsMCUsed()) {
     auto* canv = MakeQaObject<TCanvas>("other", "Other histograms", 1600, 800);
-    DivideCanvas(canv, 3);
+    canv->Divide(1, 3);
     canv->cd(1);
     fvph_n_points_per_hit[nSt]->DrawCopy("colz", "");
     canv->cd(2);
@@ -1242,7 +1211,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
   {  // ** Occupancy in XY plane
     auto* canv = MakeQaObject<TCanvas>("vs Station/hit_xy", "", 1600, 800);
-    DivideCanvas(canv, nSt);
+    canv->DivideSquare(nSt);
     for (int iSt = 0; iSt < nSt; ++iSt) {
       canv->cd(iSt + 1);
       fvph_hit_xy[iSt]->DrawCopy("colz", "");
@@ -1312,7 +1281,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // ** Occupancy in XY plane
       auto* canv = MakeQaObject<TCanvas>("vs Station/point_xy", "", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_point_xy[iSt]->DrawCopy("colz", "");
@@ -1377,7 +1346,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // x-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/res_x", "Residuals for x coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_res_x[iSt]->DrawCopy("", "");
@@ -1386,7 +1355,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // y-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/res_y", "Residuals for y coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_res_y[iSt]->DrawCopy("", "");
@@ -1395,7 +1364,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // u-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/res_u", "Residuals for u coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_res_u[iSt]->DrawCopy("", "");
@@ -1404,7 +1373,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // v-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/res_v", "Residuals for v coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_res_v[iSt]->DrawCopy("", "");
@@ -1413,7 +1382,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // t-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/res_t", "Residuals for time", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_res_t[iSt]->DrawCopy("", "");
@@ -1426,7 +1395,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // x-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/pull_x", "Pulls for x coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_pull_x[iSt]->DrawCopy("", "");
@@ -1435,7 +1404,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // y-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/pull_y", "Pulls for y coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_pull_y[iSt]->DrawCopy("", "");
@@ -1444,7 +1413,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // u-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/pull_u", "Pulls for u coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_pull_u[iSt]->DrawCopy("", "");
@@ -1453,7 +1422,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // v-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/pull_v", "Pulls for v coordinate", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_pull_v[iSt]->DrawCopy("", "");
@@ -1462,7 +1431,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {  // t-coordinate
       auto* canv = MakeQaObject<TCanvas>("vs Station/pull_t", "Pulls for time", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvph_pull_t[iSt]->DrawCopy("", "");
@@ -1474,7 +1443,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {
       auto* canv = MakeQaObject<TCanvas>("vs Station/reco_eff", "Hit efficiencies in xy bins", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         //fvph_reco_eff[iSt]->SetMarkerStyle(20);
@@ -1484,15 +1453,13 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases()
 
     {
       auto* canv = MakeQaObject<TCanvas>("vs Station/reco_eff_vs_xy", "Hit efficiencies wrt x and y", 1600, 800);
-      DivideCanvas(canv, nSt);
+      canv->DivideSquare(nSt);
       for (int iSt = 0; iSt < nSt; ++iSt) {
         canv->cd(iSt + 1);
         fvpe_reco_eff_vs_xy[iSt]->DrawCopy("colz", "");
       }
     }
   }
-
-  return kSUCCESS;
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
diff --git a/reco/L1/qa/CbmCaInputQaBase.h b/reco/L1/qa/CbmCaInputQaBase.h
index bf13aba102..46ee3b7bcf 100644
--- a/reco/L1/qa/CbmCaInputQaBase.h
+++ b/reco/L1/qa/CbmCaInputQaBase.h
@@ -4,7 +4,7 @@
 
 /// @file   CbmCaInputQaBase.h
 /// @date   13.01.2023
-/// @brief  Class providing basic functionality for CA input QA-tasks
+/// \brief  Class providing basic functionality for CA input QA-tasks
 /// @author S.Zharko <s.zharko@gsi.de>
 
 
@@ -46,15 +46,17 @@ namespace
   using cbm::algo::yaml::Property;
 }
 
-/// A QA-task class, which provides assurance of MuCh hits and geometry
+/// \class CbmCaInputQaBase
+/// \tparam DetID  Detector ID
+/// \brief A QA-task class, which provides assurance of MuCh hits and geometry
 template<EDetectorID DetID>
 class CbmCaInputQaBase : public CbmQaTask {
  protected:
-  using Point_t = cbm::ca::PointTypes_t::at<DetID>;  ///< Point type for detector ID
-  using Hit_t   = cbm::ca::HitTypes_t::at<DetID>;    ///< Hit type for detector ID
+  using Point_t = cbm::ca::PointTypes_t::at<DetID>;  ///< Point type for a given detector ID
+  using Hit_t   = cbm::ca::HitTypes_t::at<DetID>;    ///< Hit type for a given detector ID
 
   /// \struct Config
-  /// \brief  Specific configuration for the QA-task
+  /// \brief  Specific configuration for the CA input QA task
   struct Config {
     /// \struct McTrackCut
     /// \brief  MC track selection criteria
@@ -88,13 +90,13 @@ class CbmCaInputQaBase : public CbmQaTask {
   };
 
  public:
-  /// @brief Constructor from parameters
-  /// @param  name      Name of the task
-  /// @param  verbose   Verbose level
-  /// @param  isMCUsed  Flag, whether MC information is available for this task
+  /// \brief Constructor from parameters
+  /// \param  name      Name of the task
+  /// \param  verbose   Verbose level
+  /// \param  isMCUsed  Flag, whether MC information is available for this task
   CbmCaInputQaBase(const char* name, int verbose, bool isMCUsed);
 
-  /// @brief Destructor
+  /// \brief Destructor
   virtual ~CbmCaInputQaBase() = default;
 
  protected:
@@ -106,60 +108,57 @@ class CbmCaInputQaBase : public CbmQaTask {
   /// \return Map of checks: key - name of the check, value - result of the check
   void Check() override;
 
-  /// @brief Initializes data branches
-  InitStatus InitDataBranches() override;
+  /// \brief Creates summary cavases, tables etc.
+  void CreateSummary() override;
 
-  /// @brief Initializes canvases
-  InitStatus InitCanvases() override;
-
-  /// @brief Initializes histograms
-  InitStatus InitHistograms() override;
-
-  /// @brief Fills histograms per event or time-slice
-  void FillHistograms() override;
-
-  /// @brief Fills histograms per hit
+  /// \brief Fills histograms per hit
   virtual void FillHistogramsPerHit() {}
 
-  /// @brief Fills histograms per MC point
+  /// \brief Fills histograms per MC point
   virtual void FillHistogramsPerPoint() {}
 
-  /// @brief De-initializes histograms
+  /// \brief De-initializes histograms
   void DeInit() override;
 
-  /// @brief Defines parameter for a derived class
+  /// \brief Defines parameter for a derived class
   virtual void DefineParameters() = 0;
 
-  /// @brief Checks ranges for mean and standard deviation
-  /// @return  False, if variable exits the range
+  /// \brief Fills histograms per event or time-slice
+  void ExecQa() override;
+
+  /// \brief Initializes QA task
+  InitStatus InitQa() override;
+
+  /// \brief Checks ranges for mean and standard deviation
+  /// \return  False, if variable exits the range
   bool CheckRangePull(TH1* h)
   {
     return CbmQaTask::CheckRange(h, fConfig.fPullMeanThrsh, 1. - fConfig.fPullWidthThrsh, 1. + fConfig.fPullWidthThrsh);
   }
 
-  /// @brief Returns a pointer to current hit QA data object
+  /// \brief Returns a pointer to current hit QA data object
   ///
   /// The hit QA data object is filled on each step for hit reconstruction and available inside
   /// functions FillHit() and FillMCPoint()
   const cbm::ca::HitQaData& GetHitQaData() const { return fHitQaData; }
 
-  /// @brief checks if the track at mc point passes the track selection cuts
-  /// @return true when selected
+  /// \brief checks if the track at mc point passes the track selection cuts
+  /// \return true when selected
   bool IsTrackSelected(const CbmMCTrack* track, const Point_t* point) const;
 
-  /// @brief Checks, if the hit is acceptable (has reasonable parameters)
+  /// \brief Checks, if the hit is acceptable (has reasonable parameters)
   bool IsHitAcceptable(const CbmPixelHit* pHit) const;
 
-  /// @struct ResidualFitResult
-  /// @brief  Stores fit residuals result
+  /// \struct ResidualFitResult
+  /// \brief  Stores fit residuals result
   struct ResidualFitResult {
     double mean = 0;  ///< mean of the distribution
     double lo   = 0;  ///< lower limit for the mean
     double hi   = 0;  ///< higher limit for the mean
   };
 
-  /// @enum EMonitorKey
-  /// @brief QA monitor counters
+  /// \enum EMonitorKey
+  /// \brief QA monitor counters
   enum class EMonitorKey
   {
     kEvent,
@@ -169,8 +168,26 @@ class CbmCaInputQaBase : public CbmQaTask {
     kMcPointWrongStation,
     kEND
   };
+  cbm::algo::ca::Monitor<EMonitorKey> fMonitor{};  ///< Monitor for the input QA
+
+  Config fConfig;  ///< Task specific configuration parameters
+
+
+  // ----- Input data branches
 
-  cbm::algo::ca::Monitor<EMonitorKey> fMonitor{};
+  CbmTrackingDetectorInterfaceBase* fpDetInterface = nullptr;  ///< Instance of detector interface
+
+  CbmTimeSlice* fpTimeSlice = nullptr;  ///< Pointer to current time-slice
+
+  TClonesArray* fpHits     = nullptr;  ///< Array of hits
+  TClonesArray* fpClusters = nullptr;  ///< Array of hit clusters
+
+  CbmMCDataManager* fpMCDataManager = nullptr;  ///< MC data manager
+  CbmMCEventList* fpMCEventList     = nullptr;  ///< MC event list
+  CbmMCDataArray* fpMCTracks        = nullptr;  ///< Array of MC tracks
+  CbmMCDataArray* fpMCPoints        = nullptr;  ///< Array of MC points
+
+  TClonesArray* fpHitMatches = nullptr;  ///< Array of hit matches
 
   // ******************
   // **  Parameters  **
@@ -178,12 +195,6 @@ class CbmCaInputQaBase : public CbmQaTask {
 
   static constexpr double kNAN = std::numeric_limits<double>::signaling_NaN();
 
-  //TODO: remove check of residuals
-  // ----- QA constants (thresholds, ranges etc.)
-  Config fConfig;  ///< Task specific configuration parameters
-
-  // ----- Track selection for efficiencies and pulls
-
   // ----- Histogram binning parameters
   int fNbins  = 200;  ///< General number of bins
   int fNbinsZ = 800;  ///< Number of bins for z axis in overall views
@@ -204,43 +215,20 @@ class CbmCaInputQaBase : public CbmQaTask {
 
   // NOTE: Pull binning is fixed by convention, since it is used for hit finder calibrations. Please,
   //       do not modify!
+  // TODO: 29.05.2024 SZh: Put to a tuple <double, int, int>
   static constexpr int kNbinsPull   = 200;
   static constexpr double kRPull[2] = {-10., 10.};  ///< Range for pull histograms coordinate
 
   std::vector<double> frXmin;  ///< Range for hit x coordinate [cm]
   std::vector<double> frXmax;  ///< Range for hit x coordinate [cm]
-
   std::vector<double> frYmin;  ///< Range for hit y coordinate [cm]
   std::vector<double> frYmax;  ///< Range for hit y coordinate [cm]
-
   std::vector<double> frZmin;  ///< Range for hit z coordinate [cm]
   std::vector<double> frZmax;  ///< Range for hit z coordinate [cm]
 
-  // *********************
-  // **  Data branches  **
-  // *********************
-
-  CbmTrackingDetectorInterfaceBase* fpDetInterface = nullptr;  ///< Instance of detector interface
-
-  CbmTimeSlice* fpTimeSlice = nullptr;  ///< Pointer to current time-slice
-
-  TClonesArray* fpHits     = nullptr;  ///< Array of hits
-  TClonesArray* fpClusters = nullptr;  ///< Array of hit clusters
-
-  CbmMCDataManager* fpMCDataManager = nullptr;  ///< MC data manager
-  CbmMCEventList* fpMCEventList     = nullptr;  ///< MC event list
-  CbmMCDataArray* fpMCTracks        = nullptr;  ///< Array of MC tracks
-  CbmMCDataArray* fpMCPoints        = nullptr;  ///< Array of MC points
-
-  TClonesArray* fpHitMatches = nullptr;  ///< Array of hit matches
-
 
   // ----- Histograms
-
-
-  // NOTE: the last element of each vector stands for integral distribution over all stations
-
-  // ----- Additional histograms
+  //
   // Hit occupancy
   std::vector<TH2F*> fvph_hit_xy;  ///< hit y vs x in different stations
   std::vector<TH2F*> fvph_hit_zx;  ///< hit x vs z in different stations
diff --git a/reco/L1/qa/CbmCaInputQaMuch.cxx b/reco/L1/qa/CbmCaInputQaMuch.cxx
index 799d256a83..b9f55806aa 100644
--- a/reco/L1/qa/CbmCaInputQaMuch.cxx
+++ b/reco/L1/qa/CbmCaInputQaMuch.cxx
@@ -21,10 +21,6 @@ CbmCaInputQaMuch::CbmCaInputQaMuch(int verbose, bool isMCUsed) : CbmCaInputQaBas
   DefineParameters();
 }
 
-// ---------------------------------------------------------------------------------------------------------------------
-//
-void CbmCaInputQaMuch::DeInit() { CbmCaInputQaBase::DeInit(); }
-
 // ---------------------------------------------------------------------------------------------------------------------
 //
 void CbmCaInputQaMuch::DefineParameters()
@@ -48,45 +44,13 @@ void CbmCaInputQaMuch::DefineParameters()
   SetRange(fRangeDzHitPoint, -50., 50.);
 }
 
-// ---------------------------------------------------------------------------------------------------------------------
-//
-void CbmCaInputQaMuch::FillHistogramsPerHit() {}
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus CbmCaInputQaMuch::InitDataBranches()
+InitStatus CbmCaInputQaMuch::InitQa()
 {
-  // STS tracking detector interface
+  // Specific initialization
   fpDetInterface = CbmMuchTrackingInterface::Instance();
 
-  auto baseInitStatus = CbmCaInputQaBase::InitDataBranches();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaMuch::InitCanvases()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitCanvases();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaMuch::InitHistograms()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitHistograms();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
+  return CbmCaInputQaBase::InitQa();
 }
diff --git a/reco/L1/qa/CbmCaInputQaMuch.h b/reco/L1/qa/CbmCaInputQaMuch.h
index adbf58508a..14465e3c1f 100644
--- a/reco/L1/qa/CbmCaInputQaMuch.h
+++ b/reco/L1/qa/CbmCaInputQaMuch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2023-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -25,29 +25,26 @@ class CbmCaInputQaMuch : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kMu
   /// \brief  Method to check, if the QA results are acceptable
   void Check() override { return CbmCaInputQaBase::Check(); }
 
-  /// @brief Initializes data branches
-  InitStatus InitDataBranches() override;
+  /// \brief Creates summary cavases, tables etc.
+  void CreateSummary() override { CbmCaInputQaBase::CreateSummary(); }
 
-  /// @brief Initializes canvases
-  InitStatus InitCanvases() override;
-
-  /// @brief Initializes histograms
-  InitStatus InitHistograms() override;
+  /// \brief Defines parameters of the task
+  void DefineParameters() override;
 
-  /// @brief Fills histograms per event or time-slice
-  void FillHistograms() override { CbmCaInputQaBase::FillHistograms(); }
+  /// \brief De-initializes QA-task
+  void DeInit() override { CbmCaInputQaBase::DeInit(); }
 
-  /// @brief De-initializes histograms
-  void DeInit() override;
+  /// \brief Fills histograms per hit
+  void FillHistogramsPerHit() override {}
 
-  /// @brief Defines parameters of the task
-  void DefineParameters() override;
+  /// \brief Fills histograms per MC point
+  void FillHistogramsPerPoint() override {}
 
-  /// @brief Fills histograms per hit
-  void FillHistogramsPerHit() override;
+  /// \brief Fills histograms per event or time-slice
+  void ExecQa() override { CbmCaInputQaBase::ExecQa(); }
 
-  /// @brief Fills histograms per MC point
-  void FillHistogramsPerPoint() override {}
+  /// \brief Initializes QA
+  InitStatus InitQa() override;
 
  private:
   ClassDefOverride(CbmCaInputQaMuch, 0);
diff --git a/reco/L1/qa/CbmCaInputQaMvd.cxx b/reco/L1/qa/CbmCaInputQaMvd.cxx
index f54dcf53ae..c2e44efdc6 100644
--- a/reco/L1/qa/CbmCaInputQaMvd.cxx
+++ b/reco/L1/qa/CbmCaInputQaMvd.cxx
@@ -21,10 +21,6 @@ CbmCaInputQaMvd::CbmCaInputQaMvd(int verbose, bool isMCUsed) : CbmCaInputQaBase(
   DefineParameters();
 }
 
-// ---------------------------------------------------------------------------------------------------------------------
-//
-void CbmCaInputQaMvd::DeInit() { CbmCaInputQaBase::DeInit(); }
-
 // ---------------------------------------------------------------------------------------------------------------------
 //
 void CbmCaInputQaMvd::DefineParameters()
@@ -49,43 +45,10 @@ void CbmCaInputQaMvd::DefineParameters()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-void CbmCaInputQaMvd::FillHistogramsPerHit() {}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaMvd::InitDataBranches()
+InitStatus CbmCaInputQaMvd::InitQa()
 {
-  // STS tracking detector interface
+  // Specific initialization
   fpDetInterface = CbmMvdTrackingInterface::Instance();
 
-  auto baseInitStatus = CbmCaInputQaBase::InitDataBranches();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaMvd::InitCanvases()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitCanvases();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaMvd::InitHistograms()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitHistograms();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
+  return CbmCaInputQaBase::InitQa();
 }
diff --git a/reco/L1/qa/CbmCaInputQaMvd.h b/reco/L1/qa/CbmCaInputQaMvd.h
index 0a92507d62..9a145f2123 100644
--- a/reco/L1/qa/CbmCaInputQaMvd.h
+++ b/reco/L1/qa/CbmCaInputQaMvd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2023-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -25,29 +25,26 @@ class CbmCaInputQaMvd : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kMvd
   /// \brief  Method to check, if the QA results are acceptable
   void Check() override { return CbmCaInputQaBase::Check(); }
 
-  /// @brief Initializes data branches
-  InitStatus InitDataBranches() override;
+  /// \brief Creates summary cavases, tables etc.
+  void CreateSummary() override { CbmCaInputQaBase::CreateSummary(); }
 
-  /// @brief Initializes canvases
-  InitStatus InitCanvases() override;
-
-  /// @brief Initializes histograms
-  InitStatus InitHistograms() override;
+  /// \brief Defines parameters of the task
+  void DefineParameters() override;
 
-  /// @brief Fills histograms per event or time-slice
-  void FillHistograms() override { CbmCaInputQaBase::FillHistograms(); }
+  /// \brief De-initializes QA-task
+  void DeInit() override { CbmCaInputQaBase::DeInit(); }
 
-  /// @brief De-initializes histograms
-  void DeInit() override;
+  /// \brief Fills histograms per hit
+  void FillHistogramsPerHit() override {}
 
-  /// @brief Defines parameters of the task
-  void DefineParameters() override;
+  /// \brief Fills histograms per MC point
+  void FillHistogramsPerPoint() override {}
 
-  /// @brief Fills histograms per hit
-  void FillHistogramsPerHit() override;
+  /// \brief Fills histograms per event or time-slice
+  void ExecQa() override { CbmCaInputQaBase::ExecQa(); }
 
-  /// @brief Fills histograms per MC point
-  void FillHistogramsPerPoint() override {}
+  /// \brief Initializes QA
+  InitStatus InitQa() override;
 
  private:
   ClassDefOverride(CbmCaInputQaMvd, 0);
diff --git a/reco/L1/qa/CbmCaInputQaSetup.cxx b/reco/L1/qa/CbmCaInputQaSetup.cxx
index 2513fae945..39298d4004 100644
--- a/reco/L1/qa/CbmCaInputQaSetup.cxx
+++ b/reco/L1/qa/CbmCaInputQaSetup.cxx
@@ -47,6 +47,85 @@ void InputQaSetup::CheckInit() const
   }
 }
 
+// ---------------------------------------------------------------------------------------------------------------------
+//
+void InputQaSetup::CreateSummary()
+{
+  // Tracking setup by hits
+  {
+    auto* canv = MakeQaObject<TCanvas>("c_setup_hits", "Setup by hits", 1000, 1000);
+    canv->Divide(1, 2, 0.000001, 0.000001);
+    canv->cd(1);
+    gPad->SetLogz();
+    gPad->SetBottomMargin(0.000001);
+    gPad->SetRightMargin(0.05);
+    gPad->SetTitle("");
+    auto* ph_hit_xz = dynamic_cast<TH2F*>(fph_hit_xz.back()->Clone("h_hit_xz_clone"));
+    ph_hit_xz->SetTitle(";z [cm];x [cm]");
+    ph_hit_xz->Draw("col");
+    this->PutSetupNameOnPad(0.08, 0.83, 0.50, 0.89);
+    canv->cd(2);
+    gPad->SetLogz();
+    gPad->SetTopMargin(0.000001);
+    gPad->SetRightMargin(0.05);
+    gPad->SetTitle("");
+    auto* ph_hit_yz = dynamic_cast<TH2F*>(fph_hit_yz.back()->Clone("h_hit_yz_clone"));
+    ph_hit_yz->SetTitle(";z [cm];y [cm]");
+    ph_hit_yz->Draw("col");
+    this->PutSetupNameOnPad(0.08, 0.93, 0.50, 0.99);
+
+
+    auto LoBinEdge = [](TAxis* pAxis, double val) { return pAxis->GetBinLowEdge(pAxis->FindBin(val)); };
+    auto UpBinEdge = [](TAxis* pAxis, double val) { return pAxis->GetBinUpEdge(pAxis->FindBin(val)); };
+
+    for (int iDet = 0; iDet < static_cast<int>(fvpDetInterface.size()); ++iDet) {
+      if (!fvbUseDet[iDet]) {
+        continue;
+      }
+      int nSt = fvpDetInterface[iDet]->GetNtrackingStations();
+      for (int iSt = 0; iSt < nSt; ++iSt) {
+        int iStActive       = fpParameters->GetStationIndexActive(iSt, static_cast<ca::EDetectorID>(iDet));
+        Color_t boxColor    = (iStActive < 0) ? kGray + 1 : kOrange + 2;
+        const char* detName = Form("%s-%d", fvpDetInterface[iDet]->GetDetectorName().c_str(), iSt);
+        {
+          double zMin = LoBinEdge(fph_hit_xz.back()->GetXaxis(), fvZmin[iDet][iSt]);
+          double zMax = UpBinEdge(fph_hit_xz.back()->GetXaxis(), fvZmax[iDet][iSt]);
+          double xMin = LoBinEdge(fph_hit_xz.back()->GetYaxis(), fvXmin[iDet][iSt]);
+          double xMax = UpBinEdge(fph_hit_xz.back()->GetYaxis(), fvXmax[iDet][iSt]);
+          canv->cd(1);
+          auto* pBox = new TBox(zMin, xMin, zMax, xMax);
+          pBox->SetFillStyle(0);
+          pBox->SetLineWidth(2);
+          pBox->SetLineColor(boxColor);
+          pBox->Draw("same");
+          auto* pText = new TText(zMin, xMax, detName);
+          pText->SetTextColor(boxColor);
+          pText->SetTextSize(0.035);
+          pText->SetTextAngle(45);
+          pText->Draw("same");
+        }
+        {
+          double zMin = LoBinEdge(fph_hit_yz.back()->GetXaxis(), fvZmin[iDet][iSt]);
+          double zMax = UpBinEdge(fph_hit_yz.back()->GetXaxis(), fvZmax[iDet][iSt]);
+          double yMin = LoBinEdge(fph_hit_yz.back()->GetYaxis(), fvYmin[iDet][iSt]);
+          double yMax = UpBinEdge(fph_hit_yz.back()->GetYaxis(), fvYmax[iDet][iSt]);
+          canv->cd(2);
+          auto* pBox = new TBox(zMin, yMin, zMax, yMax);
+          pBox->SetFillStyle(0);
+          pBox->SetLineWidth(2);
+          pBox->SetLineColor(boxColor);
+          pBox->Draw("same");
+          auto* pText = new TText(zMin, yMax, detName);
+          pText->SetTextSize(0.035);
+          pText->SetTextColor(boxColor);
+          pText->SetTextAngle(45);
+          pText->Draw("same");
+        }
+      }
+    }
+  }
+}
+
 // -----------------------------------------------------------------------------------------------------------------
 //
 template<cbm::algo::ca::EDetectorID DetID>
@@ -54,7 +133,7 @@ void InputQaSetup::FillHistogramsDet()
 {
   using Hit_t     = HitTypes_t::at<DetID>;
   using McPoint_t = PointTypes_t::at<DetID>;
-  int nHits   = fvpBrHits[DetID]->GetEntriesFast();
+  int nHits       = fvpBrHits[DetID]->GetEntriesFast();
 
   for (int iH = 0; iH < nHits; ++iH) {
     const auto* pHit = dynamic_cast<const Hit_t*>(fvpBrHits[DetID]->At(iH));
@@ -63,7 +142,7 @@ void InputQaSetup::FillHistogramsDet()
     }
     auto address = pHit->GetAddress();
 
-    // skip Bmon hits
+    // skip Bmon hits (rule?)
     if constexpr (ca::EDetectorID::kTof == DetID) {
       if (5 == CbmTofAddress::GetSmType(address)) {
         continue;
@@ -146,7 +225,7 @@ void InputQaSetup::FillHistogramsDet()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-void InputQaSetup::FillHistograms()
+void InputQaSetup::ExecQa()
 {
   if (fvbUseDet[ca::EDetectorID::kMvd]) {
     this->FillHistogramsDet<ca::EDetectorID::kMvd>();
@@ -165,89 +244,11 @@ void InputQaSetup::FillHistograms()
   }
 }
 
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus InputQaSetup::InitCanvases()
-{
-  // Tracking setup by hits
-  {
-    auto* canv = MakeQaObject<TCanvas>("c_setup_hits", "Setup by hits", 1000, 1000);
-    canv->Divide(1, 2, 0.000001, 0.000001);
-    canv->cd(1);
-    gPad->SetLogz();
-    gPad->SetBottomMargin(0.000001);
-    gPad->SetRightMargin(0.05);
-    gPad->SetTitle("");
-    auto* ph_hit_xz = dynamic_cast<TH2F*>(fph_hit_xz.back()->Clone("h_hit_xz_clone"));
-    ph_hit_xz->SetTitle(";z [cm];x [cm]");
-    ph_hit_xz->Draw("col");
-    this->PutSetupNameOnPad(0.08, 0.83, 0.50, 0.89);
-    canv->cd(2);
-    gPad->SetLogz();
-    gPad->SetTopMargin(0.000001);
-    gPad->SetRightMargin(0.05);
-    gPad->SetTitle("");
-    auto* ph_hit_yz = dynamic_cast<TH2F*>(fph_hit_yz.back()->Clone("h_hit_yz_clone"));
-    ph_hit_yz->SetTitle(";z [cm];y [cm]");
-    ph_hit_yz->Draw("col");
-    this->PutSetupNameOnPad(0.08, 0.93, 0.50, 0.99);
-
 
-    auto LoBinEdge = [](TAxis* pAxis, double val) { return pAxis->GetBinLowEdge(pAxis->FindBin(val)); };
-    auto UpBinEdge = [](TAxis* pAxis, double val) { return pAxis->GetBinUpEdge(pAxis->FindBin(val)); };
-
-    for (int iDet = 0; iDet < static_cast<int>(fvpDetInterface.size()); ++iDet) {
-      if (!fvbUseDet[iDet]) {
-        continue;
-      }
-      int nSt = fvpDetInterface[iDet]->GetNtrackingStations();
-      for (int iSt = 0; iSt < nSt; ++iSt) {
-        int iStActive       = fpParameters->GetStationIndexActive(iSt, static_cast<ca::EDetectorID>(iDet));
-        Color_t boxColor    = (iStActive < 0) ? kGray + 1 : kOrange + 2;
-        const char* detName = Form("%s-%d", fvpDetInterface[iDet]->GetDetectorName().c_str(), iSt);
-        {
-          double zMin = LoBinEdge(fph_hit_xz.back()->GetXaxis(), fvZmin[iDet][iSt]);
-          double zMax = UpBinEdge(fph_hit_xz.back()->GetXaxis(), fvZmax[iDet][iSt]);
-          double xMin = LoBinEdge(fph_hit_xz.back()->GetYaxis(), fvXmin[iDet][iSt]);
-          double xMax = UpBinEdge(fph_hit_xz.back()->GetYaxis(), fvXmax[iDet][iSt]);
-          canv->cd(1);
-          auto* pBox = new TBox(zMin, xMin, zMax, xMax);
-          pBox->SetFillStyle(0);
-          pBox->SetLineWidth(2);
-          pBox->SetLineColor(boxColor);
-          pBox->Draw("same");
-          auto* pText = new TText(zMin, xMax, detName);
-          pText->SetTextColor(boxColor);
-          pText->SetTextSize(0.035);
-          pText->SetTextAngle(45);
-          pText->Draw("same");
-        }
-        {
-          double zMin = LoBinEdge(fph_hit_yz.back()->GetXaxis(), fvZmin[iDet][iSt]);
-          double zMax = UpBinEdge(fph_hit_yz.back()->GetXaxis(), fvZmax[iDet][iSt]);
-          double yMin = LoBinEdge(fph_hit_yz.back()->GetYaxis(), fvYmin[iDet][iSt]);
-          double yMax = UpBinEdge(fph_hit_yz.back()->GetYaxis(), fvYmax[iDet][iSt]);
-          canv->cd(2);
-          auto* pBox = new TBox(zMin, yMin, zMax, yMax);
-          pBox->SetFillStyle(0);
-          pBox->SetLineWidth(2);
-          pBox->SetLineColor(boxColor);
-          pBox->Draw("same");
-          auto* pText = new TText(zMin, yMax, detName);
-          pText->SetTextSize(0.035);
-          pText->SetTextColor(boxColor);
-          pText->SetTextAngle(45);
-          pText->Draw("same");
-        }
-      }
-    }
-  }
-  return kSUCCESS;
-}
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus InputQaSetup::InitDataBranches()
+InitStatus InputQaSetup::InitQa()
 try {
   LOG(info) << fName << ": initializing... ";
   // Tracking parameters
@@ -315,18 +316,7 @@ try {
 
   this->CheckInit();
 
-  LOG(error) << fName << ": initializing... \033[1;32mDone\033[0m";
-  return kSUCCESS;
-}
-catch (const std::exception& e) {
-  LOG(error) << fName << ": initializing... \033[1;31mFailed\033[0m\nReason: " << e.what();
-  return kFATAL;
-}
 
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus InputQaSetup::InitHistograms()
-{
   int nStGeo = fpParameters->GetNstationsGeometry();
 
   MakeQaDirectory("hit_occupancy");
@@ -403,5 +393,10 @@ InitStatus InputQaSetup::InitHistograms()
     }
   }
 
+  LOG(error) << fName << ": initializing... \033[1;32mDone\033[0m";
   return kSUCCESS;
 }
+catch (const std::exception& e) {
+  LOG(error) << fName << ": initializing... \033[1;31mFailed\033[0m\nReason: " << e.what();
+  return kFATAL;
+}
diff --git a/reco/L1/qa/CbmCaInputQaSetup.h b/reco/L1/qa/CbmCaInputQaSetup.h
index 0b7c382405..7c0f226a32 100644
--- a/reco/L1/qa/CbmCaInputQaSetup.h
+++ b/reco/L1/qa/CbmCaInputQaSetup.h
@@ -2,10 +2,10 @@
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
-/// @file   CbmCaInputQaSetup.h
-/// @brief  QA task for tracking detector interfaces
-/// @since  28.08.2023
-/// @author S.Zharko <s.zharko@gsi.de>
+/// \file   CbmCaInputQaSetup.h
+/// \brief  QA task for tracking detector interfaces
+/// \since  28.08.2023
+/// \author S.Zharko <s.zharko@gsi.de>
 
 
 #pragma once
@@ -36,46 +36,41 @@
 
 namespace cbm::ca
 {
-  /// @class InputQaSetup
-  /// @brief A QA task to analyze hit and MC point occupancy distributions in different tracking stations
+  /// \class InputQaSetup
+  /// \brief A QA task to analyze hit and MC point occupancy distributions in different tracking stations
   class InputQaSetup : public CbmQaTask {
    public:
-    /// @brief Constructor from parameters
-    /// @param verbose   Verbosity level
-    /// @param isMCUsed  Flag, if MC information is available for this task
+    /// \brief Constructor from parameters
+    /// \param verbose   Verbosity level
+    /// \param isMCUsed  Flag, if MC information is available for this task
     InputQaSetup(int verbose, bool isMCUsed);
 
-    /// @brief Reads defined parameters object from file
-    /// @param filename  Name of parameter file
-    /// @note  TEMPORARY FUNCTION, A SEPARATE PARAMETERS INITIALIZATION CLASS IS TO BE USED
+    /// \brief Reads defined parameters object from file
+    /// \param filename  Name of parameter file
+    /// \note  TEMPORARY FUNCTION, A SEPARATE PARAMETERS INITIALIZATION CLASS IS TO BE USED
     void ReadParameters(const char* filename) { fsParametersFilename = filename; }
 
-    /// @brief Sets detector flag
+    /// \brief Sets detector flag
     void SetDetectorFlag(ca::EDetectorID detID, bool flag = true) { fvbUseDet[detID] = flag; }
 
-    /// @brief Checks results of the QA and returns a success flag
+    /// \brief Checks results of the QA and returns a success flag
     void Check() override;
 
-    /// @brief Initializes canvases
-    InitStatus InitCanvases() override;
+    /// \brief Creates summary cavases, tables etc.
+    void CreateSummary() override;
 
-    /// @brief Initializes data branches
-    InitStatus InitDataBranches() override;
+    /// \brief Fills histograms
+    void ExecQa() override;
 
-    /// @brief Initializes histograms
-    InitStatus InitHistograms() override;
+    /// \brief Initializes QA-task
+    InitStatus InitQa() override;
 
-    /// @brief Initializes time slice
-    InitStatus InitTimeSlice() override { return kSUCCESS; }
-
-    /// @brief Fills histograms
-    void FillHistograms() override;
 
    private:
-    /// @brief Checks branches initialization
+    /// \brief Checks branches initialization
     void CheckInit() const;
 
-    /// @brief Fill histograms for a given detector type
+    /// \brief Fill histograms for a given detector type
     template<ca::EDetectorID DetID>
     void FillHistogramsDet();
 
@@ -83,7 +78,7 @@ namespace cbm::ca
     // *******************************
     // **  Data branches and flags  **
     // *******************************
-    /// @brief Pointers to the tracking detector interfaces for each subsystem
+    /// \brief Pointers to the tracking detector interfaces for each subsystem
     DetIdArr_t<const CbmTrackingDetectorInterfaceBase*> fvpDetInterface = {{nullptr}};
 
     DetIdArr_t<bool> fvbUseDet              = {{false}};    ///< Detector subsystem usage flag
diff --git a/reco/L1/qa/CbmCaInputQaSts.cxx b/reco/L1/qa/CbmCaInputQaSts.cxx
index e3f30e87c0..c8bb59e5b6 100644
--- a/reco/L1/qa/CbmCaInputQaSts.cxx
+++ b/reco/L1/qa/CbmCaInputQaSts.cxx
@@ -69,6 +69,36 @@ void CbmCaInputQaSts::Check()
   }  // McUsed
 }
 
+
+// ---------------------------------------------------------------------------------------------------------------------
+//
+void CbmCaInputQaSts::CreateSummary()
+{
+  gStyle->SetOptFit(1);
+
+  if (IsMCUsed()) {
+    {  // u-coordinate vs N digis
+      auto* canv = MakeQaObject<CbmQaCanvas>("vs N digi/pull_u", "Pulls for u coordinate vs N digis", 1600, 800);
+      canv->Divide2D(fkMaxDigisInClusterForPulls + 1);
+      for (int i = 0; i <= fkMaxDigisInClusterForPulls; ++i) {
+        canv->cd((i > 0) ? i : fkMaxDigisInClusterForPulls + 1);
+        fvph_pull_u_Ndig[i]->DrawCopy("", "");
+      }
+    }
+
+    {  // v-coordinate vs N digis
+      auto* canv = MakeQaObject<CbmQaCanvas>("vs N digi/pull_v", "Pulls for v coordinate vs N digis", 1600, 800);
+      canv->Divide2D(fkMaxDigisInClusterForPulls + 1);
+      for (int i = 0; i <= fkMaxDigisInClusterForPulls; ++i) {
+        canv->cd((i > 0) ? i : fkMaxDigisInClusterForPulls + 1);
+        fvph_pull_v_Ndig[i]->DrawCopy("", "");
+      }
+    }
+  }
+
+  CbmCaInputQaBase::CreateSummary();
+}
+
 // ---------------------------------------------------------------------------------------------------------------------
 //
 void CbmCaInputQaSts::DeInit()
@@ -135,68 +165,24 @@ void CbmCaInputQaSts::FillHistogramsPerPoint() {}
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus CbmCaInputQaSts::InitDataBranches()
+InitStatus CbmCaInputQaSts::InitQa()
 {
-  // STS tracking detector interface
+  // ----- Detector intereface
+  //
   fpDetInterface = CbmStsTrackingInterface::Instance();
 
-  auto baseInitStatus = CbmCaInputQaBase::InitDataBranches();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
+  auto initStatus = CbmCaInputQaBase::InitQa();
+  if (initStatus != kSUCCESS) {
+    return initStatus;
   }
 
-  // Clusters container
+  // ----- Input data initialization
+  //
   fpClusters = dynamic_cast<TClonesArray*>(FairRootManager::Instance()->GetObject("StsCluster"));
   LOG_IF(fatal, !fpClusters) << "\033[1;31m" << fName << ": container of hit clusters in STS is not found\033[0m";
 
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-// TODO: rename the method to Finish or Finalise or MakeSummary, since it does more than just canvases
-//
-InitStatus CbmCaInputQaSts::InitCanvases()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitCanvases();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  gStyle->SetOptFit(1);
-
-  if (IsMCUsed()) {
-    {  // u-coordinate vs N digis
-      auto* canv = MakeQaObject<CbmQaCanvas>("vs N digi/pull_u", "Pulls for u coordinate vs N digis", 1600, 800);
-      canv->Divide2D(fkMaxDigisInClusterForPulls + 1);
-      for (int i = 0; i <= fkMaxDigisInClusterForPulls; ++i) {
-        canv->cd((i > 0) ? i : fkMaxDigisInClusterForPulls + 1);
-        fvph_pull_u_Ndig[i]->DrawCopy("", "");
-      }
-    }
-
-    {  // v-coordinate vs N digis
-      auto* canv = MakeQaObject<CbmQaCanvas>("vs N digi/pull_v", "Pulls for v coordinate vs N digis", 1600, 800);
-      canv->Divide2D(fkMaxDigisInClusterForPulls + 1);
-      for (int i = 0; i <= fkMaxDigisInClusterForPulls; ++i) {
-        canv->cd((i > 0) ? i : fkMaxDigisInClusterForPulls + 1);
-        fvph_pull_v_Ndig[i]->DrawCopy("", "");
-      }
-    }
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaSts::InitHistograms()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitHistograms();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
+  // ----- Histogram initialization
+  //
   int nSt             = fpDetInterface->GetNtrackingStations();
   std::string detName = fpDetInterface->GetDetectorName();
 
@@ -218,10 +204,7 @@ InitStatus CbmCaInputQaSts::InitHistograms()
     }
   }
 
-
-  // ----- Initialize histograms, which are use MC-information
   if (IsMCUsed()) {
-    // Resize histogram vectors
     fvph_pull_u_Ndig.resize(fkMaxDigisInClusterForPulls + 1, nullptr);
     fvph_pull_v_Ndig.resize(fkMaxDigisInClusterForPulls + 1, nullptr);
 
@@ -255,5 +238,6 @@ InitStatus CbmCaInputQaSts::InitHistograms()
       fvph_pull_v_Ndig[idig] = MakeQaObject<TH1F>(sN, sT, kNbinsPull, kRPull[0], kRPull[1]);
     }
   }
+
   return kSUCCESS;
 }
diff --git a/reco/L1/qa/CbmCaInputQaSts.h b/reco/L1/qa/CbmCaInputQaSts.h
index 383f3c1062..7dc590ed79 100644
--- a/reco/L1/qa/CbmCaInputQaSts.h
+++ b/reco/L1/qa/CbmCaInputQaSts.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2023-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -46,37 +46,33 @@ class CbmCaInputQaSts : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kSts
   /// \brief  Method to check, if the QA results are acceptable
   void Check() override;
 
-  /// Initializes data branches
-  InitStatus InitDataBranches() override;
+  /// \brief Creates summary cavases, tables etc.
+  void CreateSummary() override;
 
-  /// Initializes canvases
-  InitStatus InitCanvases() override;
-
-  /// Initializes histograms
-  InitStatus InitHistograms() override;
-
-  /// Fills histograms per event or time-slice
-  void FillHistograms() override { CbmCaInputQaBase::FillHistograms(); }
+  /// \brief Defines parameters of the task
+  void DefineParameters() override;
 
   /// De-initializes histograms
   void DeInit() override;
 
-  /// @brief Defines parameters of the task
-  void DefineParameters() override;
-
-  /// @brief Fills histograms per hit
+  /// \brief Fills histograms per hit
   void FillHistogramsPerHit() override;
 
-  /// @brief Fills histograms per MC point
+  /// \brief Fills histograms per MC point
   void FillHistogramsPerPoint() override;
 
+  /// \brief Fills histograms per event or time-slice
+  void ExecQa() override { CbmCaInputQaBase::ExecQa(); }
+
+  /// \brief Initializes QA
+  InitStatus InitQa() override;
+
  private:
   // ----- Data branches
   TClonesArray* fpClusters = nullptr;  ///< Array of hit clusters
 
   // ----- Histograms (additional to ones from the base class)
   // NOTE: the last element of each vector stands for integral distribution over all stations
-
   const int fkMaxDigisInClusterForPulls{5};  ///< max digis in cluster for separate histogramming of puls
 
   std::vector<TH1F*> fvph_pull_u_Ndig;  ///< pull for u coordinate, depending on N digis in the cluster
diff --git a/reco/L1/qa/CbmCaInputQaTof.cxx b/reco/L1/qa/CbmCaInputQaTof.cxx
index 5df6df416c..bf57a1d3d2 100644
--- a/reco/L1/qa/CbmCaInputQaTof.cxx
+++ b/reco/L1/qa/CbmCaInputQaTof.cxx
@@ -44,6 +44,66 @@ CbmCaInputQaTof::CbmCaInputQaTof(int verbose, bool isMCUsed) : CbmCaInputQaBase(
   DefineParameters();
 }
 
+// ---------------------------------------------------------------------------------------------------------------------
+//
+void CbmCaInputQaTof::CreateSummary()
+{
+  // Base canvases
+  CbmCaInputQaBase::CreateSummary();
+
+  // Hit occupancy vs TOF cell
+  {
+    //auto DrawBox = [&](double xLo, double yLo, double xUp, double yUp) {
+    //  auto* pBox = new TBox(xLo, yLo, xUp, yUp);
+    //  pBox->SetLineWidth(kOrange + 7);
+    //  pBox->SetLineStyle(2);
+    //  pBox->SetLineColor(2);
+    //  pBox->SetFillStyle(0);
+    //  pBox->Draw("SAME");
+    //};
+
+    // NOTE: SZh 11.09.2023: Causes memory overconsumption
+    //for (int iSt = 0; iSt < fpDetInterface->GetNtrackingStations(); ++iSt) {
+    //  for (int iSmType = 0; iSmType < fDigiBdfPar->GetNbSmTypes(); ++iSmType) {
+    //    if (iSmType == 5) { continue; }  // skip Bmon
+    //    for (int iSm = 0; iSm < fDigiBdfPar->GetNbSm(iSmType); ++iSm) {
+    //      for (int iRpc = 0; iRpc < fDigiBdfPar->GetNbRpc(iSmType); ++iRpc) {
+    //        for (int iCh = 0; iCh < fDigiBdfPar->GetNbChan(iSmType, iRpc); ++iCh) {
+    //          const char* dir = "occup_cell/";
+    //          TString name    = Form("%s/occup_xy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh);
+
+    //          auto address      = CbmTofAddress::GetUniqueAddress(iSm, iRpc, iCh, /*side = */ 0, iSmType);
+    //          const auto* pCell = dynamic_cast<const CbmTofCell*>(fDigiPar->GetCell(address));
+    //          auto xLo          = pCell->GetX() - 0.5 * pCell->GetSizex();
+    //          auto xUp          = pCell->GetX() + 0.5 * pCell->GetSizex();
+    //          auto yLo          = pCell->GetY() - 0.5 * pCell->GetSizey();
+    //          auto yUp          = pCell->GetY() + 0.5 * pCell->GetSizey();
+    //          auto zLo          = pCell->GetZ() - 1.0;
+    //          auto zUp          = pCell->GetZ() + 1.0;
+
+    //          auto* canv = MakeQaObject<CbmQaCanvas>(name, "", 1500, 800);
+    //          canv->Divide(3, 1);
+    //          {
+    //            canv->cd(1);
+    //            fvph_hit_xy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", "");
+    //            DrawBox(xLo, yLo, xUp, yUp);
+
+    //            canv->cd(2);
+    //            fvph_hit_zx_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", "");
+    //            DrawBox(zLo, xLo, zUp, xUp);
+
+    //            canv->cd(3);
+    //            fvph_hit_zy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", "");
+    //            DrawBox(zLo, yLo, zUp, yUp);
+    //          }
+    //        }
+    //      }
+    //    }
+    //  }
+    //}
+  }
+}
+
 // ---------------------------------------------------------------------------------------------------------------------
 //
 void CbmCaInputQaTof::DeInit()
@@ -78,9 +138,12 @@ void CbmCaInputQaTof::DefineParameters()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-void CbmCaInputQaTof::FillHistograms()
+void CbmCaInputQaTof::ExecQa()
 {
-  CbmCaInputQaBase::FillHistograms();
+  // Base QA execution
+  CbmCaInputQaBase::ExecQa();
+
+  // TOF-specific QA execution
   if constexpr (0) {  // DEBUG
     auto PrintPoint = [&](const CbmTofPoint* point, std::stringstream& m) {
       m << "point: trk=" << point->GetTrackID() << ", ";
@@ -183,96 +246,22 @@ void CbmCaInputQaTof::FillHistogramsPerHit()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus CbmCaInputQaTof::InitDataBranches()
+InitStatus CbmCaInputQaTof::InitQa()
 {
-  // STS tracking detector interface
+  // TOF tracking detector interface
   fpDetInterface = CbmTofTrackingInterface::Instance();
 
-  auto baseInitStatus = CbmCaInputQaBase::InitDataBranches();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
+  auto initStatus = CbmCaInputQaBase::InitQa();
+  if (kSUCCESS != initStatus) {
+    return initStatus;
   }
 
+  // FIXME: Move to the parameters definition function
   auto* pRuntimeDb = FairRunAna::Instance()->GetRuntimeDb();
   fDigiPar         = dynamic_cast<CbmTofDigiPar*>(pRuntimeDb->getContainer("CbmTofDigiPar"));
   fDigiBdfPar      = dynamic_cast<CbmTofDigiBdfPar*>(pRuntimeDb->getContainer("CbmTofDigiBdfPar"));
 
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaTof::InitCanvases()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitCanvases();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  // Hit occupancy vs TOF cell
-  {
-    //auto DrawBox = [&](double xLo, double yLo, double xUp, double yUp) {
-    //  auto* pBox = new TBox(xLo, yLo, xUp, yUp);
-    //  pBox->SetLineWidth(kOrange + 7);
-    //  pBox->SetLineStyle(2);
-    //  pBox->SetLineColor(2);
-    //  pBox->SetFillStyle(0);
-    //  pBox->Draw("SAME");
-    //};
-
-    // NOTE: SZh 11.09.2023: Causes memory overconsumption
-    //for (int iSt = 0; iSt < fpDetInterface->GetNtrackingStations(); ++iSt) {
-    //  for (int iSmType = 0; iSmType < fDigiBdfPar->GetNbSmTypes(); ++iSmType) {
-    //    if (iSmType == 5) { continue; }  // skip Bmon
-    //    for (int iSm = 0; iSm < fDigiBdfPar->GetNbSm(iSmType); ++iSm) {
-    //      for (int iRpc = 0; iRpc < fDigiBdfPar->GetNbRpc(iSmType); ++iRpc) {
-    //        for (int iCh = 0; iCh < fDigiBdfPar->GetNbChan(iSmType, iRpc); ++iCh) {
-    //          const char* dir = "occup_cell/";
-    //          TString name    = Form("%s/occup_xy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh);
-
-    //          auto address      = CbmTofAddress::GetUniqueAddress(iSm, iRpc, iCh, /*side = */ 0, iSmType);
-    //          const auto* pCell = dynamic_cast<const CbmTofCell*>(fDigiPar->GetCell(address));
-    //          auto xLo          = pCell->GetX() - 0.5 * pCell->GetSizex();
-    //          auto xUp          = pCell->GetX() + 0.5 * pCell->GetSizex();
-    //          auto yLo          = pCell->GetY() - 0.5 * pCell->GetSizey();
-    //          auto yUp          = pCell->GetY() + 0.5 * pCell->GetSizey();
-    //          auto zLo          = pCell->GetZ() - 1.0;
-    //          auto zUp          = pCell->GetZ() + 1.0;
-
-    //          auto* canv = MakeQaObject<CbmQaCanvas>(name, "", 1500, 800);
-    //          canv->Divide(3, 1);
-    //          {
-    //            canv->cd(1);
-    //            fvph_hit_xy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", "");
-    //            DrawBox(xLo, yLo, xUp, yUp);
-
-    //            canv->cd(2);
-    //            fvph_hit_zx_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", "");
-    //            DrawBox(zLo, xLo, zUp, xUp);
-
-    //            canv->cd(3);
-    //            fvph_hit_zy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", "");
-    //            DrawBox(zLo, yLo, zUp, yUp);
-    //          }
-    //        }
-    //      }
-    //    }
-    //  }
-    //}
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaTof::InitHistograms()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitHistograms();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
+  // ----- Histogram initialization
   // Hit occupancy vs. TOF cell
   MakeQaDirectory("occup_cell/");
   int nSmTypes = fDigiBdfPar->GetNbSmTypes();
@@ -315,6 +304,5 @@ InitStatus CbmCaInputQaTof::InitHistograms()
     }
   }
 
-
   return kSUCCESS;
 }
diff --git a/reco/L1/qa/CbmCaInputQaTof.h b/reco/L1/qa/CbmCaInputQaTof.h
index b586fcf451..fa2a362499 100644
--- a/reco/L1/qa/CbmCaInputQaTof.h
+++ b/reco/L1/qa/CbmCaInputQaTof.h
@@ -51,30 +51,27 @@ class CbmCaInputQaTof : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kTof
   /// \brief  Method to check, if the QA results are acceptable
   void Check() override { CbmCaInputQaBase::Check(); }
 
-  /// @brief Initializes data branches
-  InitStatus InitDataBranches() override;
+  /// \brief Creates summary cavases, tables etc.
+  void CreateSummary() override;
 
-  /// @brief Initializes canvases
-  InitStatus InitCanvases() override;
-
-  /// @brief Initializes histograms
-  InitStatus InitHistograms() override;
-
-  /// @brief Fills histograms per event or time-slice
-  void FillHistograms() override;
-
-  /// @brief De-initializes histograms
+  /// \brief De-initializes histograms
   void DeInit() override;
 
-  /// @brief Defines parameters of the task
+  /// \brief Defines parameters of the task
   void DefineParameters() override;
 
-  /// @brief Fills histograms per hit
+  /// \brief Fills histograms per hit
   void FillHistogramsPerHit() override;
 
-  /// @brief Fills histograms per MC point
+  /// \brief Fills histograms per MC point
   void FillHistogramsPerPoint() override {}
 
+  /// \brief Fills histograms per event or time-slice
+  void ExecQa() override;
+
+  /// \brief Initializes histograms, data-branches and other modules in the beginning of the run
+  InitStatus InitQa() override;
+
  private:
   /// @brief Fills channel info map
   void FillChannelInfoMap();
diff --git a/reco/L1/qa/CbmCaInputQaTrd.cxx b/reco/L1/qa/CbmCaInputQaTrd.cxx
index 4331295c3c..8439768e98 100644
--- a/reco/L1/qa/CbmCaInputQaTrd.cxx
+++ b/reco/L1/qa/CbmCaInputQaTrd.cxx
@@ -21,10 +21,6 @@ CbmCaInputQaTrd::CbmCaInputQaTrd(int verbose, bool isMCUsed) : CbmCaInputQaBase(
   DefineParameters();
 }
 
-// ---------------------------------------------------------------------------------------------------------------------
-//
-void CbmCaInputQaTrd::DeInit() { CbmCaInputQaBase::DeInit(); }
-
 // ---------------------------------------------------------------------------------------------------------------------
 //
 void CbmCaInputQaTrd::DefineParameters()
@@ -49,43 +45,10 @@ void CbmCaInputQaTrd::DefineParameters()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-void CbmCaInputQaTrd::FillHistogramsPerHit() {}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaTrd::InitDataBranches()
+InitStatus CbmCaInputQaTrd::InitQa()
 {
-  // STS tracking detector interface
+  // Specific initialization
   fpDetInterface = CbmTrdTrackingInterface::Instance();
 
-  auto baseInitStatus = CbmCaInputQaBase::InitDataBranches();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaTrd::InitCanvases()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitCanvases();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus CbmCaInputQaTrd::InitHistograms()
-{
-  auto baseInitStatus = CbmCaInputQaBase::InitHistograms();
-  if (kSUCCESS != baseInitStatus) {
-    return baseInitStatus;
-  }
-
-  return kSUCCESS;
+  return CbmCaInputQaBase::InitQa();
 }
diff --git a/reco/L1/qa/CbmCaInputQaTrd.h b/reco/L1/qa/CbmCaInputQaTrd.h
index 3eac8d2119..7fbef62c0a 100644
--- a/reco/L1/qa/CbmCaInputQaTrd.h
+++ b/reco/L1/qa/CbmCaInputQaTrd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
+/* Copyright (C) 2023-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
@@ -23,31 +23,25 @@ class CbmCaInputQaTrd : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kTrd
 
  protected:
   /// \brief  Method to check, if the QA results are acceptable
-  void Check() override { CbmCaInputQaBase::Check(); }
+  void Check() override { return CbmCaInputQaBase::Check(); }
 
-  /// @brief Initializes data branches
-  InitStatus InitDataBranches() override;
+  /// \brief Creates summary cavases, tables etc.
+  void CreateSummary() override { CbmCaInputQaBase::CreateSummary(); }
 
-  /// @brief Initializes canvases
-  InitStatus InitCanvases() override;
-
-  /// @brief Initializes histograms
-  InitStatus InitHistograms() override;
-
-  /// @brief Fills histograms per event or time-slice
-  void FillHistograms() override { CbmCaInputQaBase::FillHistograms(); }
+  /// \brief Defines parameters of the task
+  void DefineParameters() override;
 
-  /// @brief De-initializes histograms
-  void DeInit() override;
+  /// \brief De-initializes QA-task
+  void DeInit() override { CbmCaInputQaBase::DeInit(); }
 
-  /// @brief Defines parameters of the task
-  void DefineParameters() override;
+  /// \brief Fills histograms per hit
+  void FillHistogramsPerHit() override {}
 
-  /// @brief Fills histograms per hit
-  void FillHistogramsPerHit() override;
+  /// \brief Fills histograms per event or time-slice
+  void ExecQa() override { CbmCaInputQaBase::ExecQa(); }
 
-  /// @brief Fills histograms per MC point
-  void FillHistogramsPerPoint() override {}
+  /// \brief Initializes QA
+  InitStatus InitQa() override;
 
  private:
   ClassDefOverride(CbmCaInputQaTrd, 0);
diff --git a/reco/L1/qa/CbmCaOutputQa.cxx b/reco/L1/qa/CbmCaOutputQa.cxx
index 815754cd5c..0e6ff2e369 100644
--- a/reco/L1/qa/CbmCaOutputQa.cxx
+++ b/reco/L1/qa/CbmCaOutputQa.cxx
@@ -408,15 +408,44 @@ void OutputQa::DrawEvent()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-void OutputQa::FillHistograms()
+void OutputQa::ExecQa()
 {
   fMonitor.IncrementCounter(EMonitorKey::kEvent);
 
+  // Read reconstructed input
+  fpTSReader->ReadEvent(this->GetCurrentEvent());
+  int nHits       = fvHits.size();
+  int nRecoTracks = fvRecoTracks.size();
+
+  fMonitor.IncrementCounter(EMonitorKey::kTrack, nRecoTracks);
+  fMonitor.IncrementCounter(EMonitorKey::kHit, nHits);
+
+  // Match tracks and points
+  // Read MC tracks and points
+  int nMCTracks = 0;
+  int nMCPoints = 0;
+  if (IsMCUsed()) {
+    fpMCModule->InitEvent(this->GetCurrentEvent());
+    nMCPoints = fMCData.GetNofPoints();
+    nMCTracks = fMCData.GetNofTracks();
+    fpMCModule->MatchHits();
+    fpMCModule->MatchTracks();
+    fMonitor.IncrementCounter(EMonitorKey::kMcPoint, nMCPoints);
+    fMonitor.IncrementCounter(EMonitorKey::kMcTrack, nMCTracks);
+
+    if (fbDrawEvents && nMCPoints > std::max(0, fEvtDisplayMinNofPoints)) {
+      DrawEvent();
+    }
+  }
+  LOG_IF(info, fVerbose > 2) << fName << ": Data sample consists of " << nHits << " hits, " << nRecoTracks
+                             << " reco tracks, " << nMCTracks << " MC tracks, " << nMCPoints << " MC points";
+
+
   // ************************************************************************
   // ** Fill distributions for reconstructed tracks (including ghost ones) **
   // ************************************************************************
 
-  for (size_t iTrkReco = 0; iTrkReco < fvRecoTracks.size(); ++iTrkReco) {
+  for (size_t iTrkReco = 0; iTrkReco < nRecoTracks; ++iTrkReco) {
     const auto& recoTrk = fvRecoTracks[iTrkReco];
 
     // Reject tracks, which do not contain hits
@@ -634,7 +663,7 @@ void OutputQa::FillHistograms()
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus OutputQa::InitCanvases()
+void OutputQa::CreateSummary()
 {
   /// Set of track types to compare
   std::vector<ETrackType> vCmpTypesGeneral = {kAll, kPrim, kSec};
@@ -752,18 +781,19 @@ InitStatus OutputQa::InitCanvases()
       }
     }
   }
-
-  return kSUCCESS;
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus OutputQa::InitDataBranches()
-{
-
-  LOG_IF(fatal, !fpParameters.get())
-    << fName << ": CA parameters object is not defined. Please, provide initializer or read parameters from binary "
-    << "via OutputQa::ReadParameters(filename) from the qa macro";
+InitStatus OutputQa::InitQa()
+try {
+
+  if (!fpParameters.get()) {
+    std::stringstream errMsg;
+    errMsg << "CA parameters object is not defined. Please, provide initializer or read parameters from binary "
+           << "via OutputQa::ReadParameters(filename) from the qa macro\n";
+    throw std::runtime_error(errMsg.str());
+  }
 
   // Turn off detectors that are not used in the reconstruction setup
 
@@ -811,7 +841,7 @@ InitStatus OutputQa::InitDataBranches()
   fpTSReader->RegisterHitIndexContainer(fvHitIds);
   fpTSReader->SetSortQaHits(true);
   if (!fpTSReader->InitRun()) {
-    return kFATAL;
+    throw std::runtime_error("Initialization of the CbmCaTimesliceReader object failed");
   }
 
   // Initialize MC module
@@ -830,7 +860,7 @@ InitStatus OutputQa::InitDataBranches()
     fpMCModule->RegisterParameters(fpParameters);
     fpMCModule->RegisterFirstHitIndexes(fpTSReader->GetHitFirstIndexDet());
     if (!fpMCModule->InitRun()) {
-      return kFATAL;
+      throw std::runtime_error("Initialization of the CbmCaMCModule object failed");
     }
   }
 
@@ -842,63 +872,8 @@ InitStatus OutputQa::InitDataBranches()
   fMonitor.SetCounterName(EMonitorKey::kMcPoint, "N MC points");
   fMonitor.SetRatioKeys({EMonitorKey::kEvent, EMonitorKey::kTrack});
 
-  return kSUCCESS;
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-void OutputQa::InitDrawingAttributes()
-{
-  fvTrackDrawAtts[ETrackType::kAll]   = {1, 20};
-  fvTrackDrawAtts[ETrackType::kGhost] = {kGray, 20};
-  fvTrackDrawAtts[ETrackType::kPrim]  = {kGray + 3, 21};
-  fvTrackDrawAtts[ETrackType::kSec]   = {kGray + 2, 25};
-
-  fvTrackDrawAtts[ETrackType::kAllPI]   = {kRed - 4, 20};
-  fvTrackDrawAtts[ETrackType::kPrimPI]  = {kRed - 2, 21};
-  fvTrackDrawAtts[ETrackType::kPrimPIP] = {kRed - 1, 22};
-  fvTrackDrawAtts[ETrackType::kPrimPIM] = {kRed - 3, 23};
-  fvTrackDrawAtts[ETrackType::kSecPI]   = {kRed - 8, 25};
-  fvTrackDrawAtts[ETrackType::kSecPIP]  = {kRed - 6, 26};
-  fvTrackDrawAtts[ETrackType::kSecPIM]  = {kRed - 10, 32};
-
-  fvTrackDrawAtts[ETrackType::kAllK]   = {kBlue - 4, 20};
-  fvTrackDrawAtts[ETrackType::kPrimK]  = {kBlue - 2, 21};
-  fvTrackDrawAtts[ETrackType::kPrimKP] = {kBlue - 1, 22};
-  fvTrackDrawAtts[ETrackType::kPrimKM] = {kBlue - 3, 23};
-  fvTrackDrawAtts[ETrackType::kSecK]   = {kBlue - 8, 25};
-  fvTrackDrawAtts[ETrackType::kSecKP]  = {kBlue - 6, 26};
-  fvTrackDrawAtts[ETrackType::kSecKM]  = {kBlue - 10, 32};
-
-  fvTrackDrawAtts[ETrackType::kAllPPBAR]  = {kGreen - 4, 20};
-  fvTrackDrawAtts[ETrackType::kPrimPPBAR] = {kGreen - 2, 21};
-  fvTrackDrawAtts[ETrackType::kPrimP]     = {kGreen - 1, 22};
-  fvTrackDrawAtts[ETrackType::kPrimPBAR]  = {kGreen - 3, 23};
-  fvTrackDrawAtts[ETrackType::kSecPPBAR]  = {kGreen - 8, 25};
-  fvTrackDrawAtts[ETrackType::kSecP]      = {kGreen - 6, 26};
-  fvTrackDrawAtts[ETrackType::kSecPBAR]   = {kGreen - 10, 32};
-
-  fvTrackDrawAtts[ETrackType::kAllE]   = {kCyan - 4, 20};
-  fvTrackDrawAtts[ETrackType::kPrimE]  = {kCyan - 2, 21};
-  fvTrackDrawAtts[ETrackType::kPrimEP] = {kCyan - 1, 22};
-  fvTrackDrawAtts[ETrackType::kPrimEM] = {kCyan - 3, 23};
-  fvTrackDrawAtts[ETrackType::kSecE]   = {kCyan - 8, 25};
-  fvTrackDrawAtts[ETrackType::kSecEP]  = {kCyan - 6, 26};
-  fvTrackDrawAtts[ETrackType::kSecEM]  = {kCyan - 10, 32};
-
-  fvTrackDrawAtts[ETrackType::kAllMU]   = {kMagenta - 4, 20};
-  fvTrackDrawAtts[ETrackType::kPrimMU]  = {kMagenta - 2, 21};
-  fvTrackDrawAtts[ETrackType::kPrimMUP] = {kMagenta - 1, 22};
-  fvTrackDrawAtts[ETrackType::kPrimMUM] = {kMagenta - 3, 23};
-  fvTrackDrawAtts[ETrackType::kSecMU]   = {kMagenta - 8, 25};
-  fvTrackDrawAtts[ETrackType::kSecMUP]  = {kMagenta - 6, 26};
-  fvTrackDrawAtts[ETrackType::kSecMUM]  = {kMagenta - 10, 32};
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-InitStatus OutputQa::InitHistograms()
-{
+  // ----- Histograms initialization
+  //
   auto RegisterTrackQa = [&](const char* typeName, const char* title, ETrackType type, bool bSuppressMC = false) {
     if (!fvbTrackTypeOn[type]) {
       return;
@@ -983,44 +958,60 @@ InitStatus OutputQa::InitHistograms()
 
   return kSUCCESS;
 }
+catch (const std::exception& err) {
+  LOG(error) << fName << ": Initialization failed. Reason: " << err.what();
+  return kFATAL;
+}
+
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-InitStatus OutputQa::InitTimeSlice()
+void OutputQa::InitDrawingAttributes()
 {
-  int nMCTracks   = 0;
-  int nMCPoints   = 0;
-  int nHits       = 0;
-  int nRecoTracks = 0;
-
-  // Read reconstructed input
-  fpTSReader->ReadEvent(this->GetCurrentEvent());
-  nHits       = fvHits.size();
-  nRecoTracks = fvRecoTracks.size();
+  fvTrackDrawAtts[ETrackType::kAll]   = {1, 20};
+  fvTrackDrawAtts[ETrackType::kGhost] = {kGray, 20};
+  fvTrackDrawAtts[ETrackType::kPrim]  = {kGray + 3, 21};
+  fvTrackDrawAtts[ETrackType::kSec]   = {kGray + 2, 25};
 
-  fMonitor.IncrementCounter(EMonitorKey::kTrack, nRecoTracks);
-  fMonitor.IncrementCounter(EMonitorKey::kHit, nHits);
+  fvTrackDrawAtts[ETrackType::kAllPI]   = {kRed - 4, 20};
+  fvTrackDrawAtts[ETrackType::kPrimPI]  = {kRed - 2, 21};
+  fvTrackDrawAtts[ETrackType::kPrimPIP] = {kRed - 1, 22};
+  fvTrackDrawAtts[ETrackType::kPrimPIM] = {kRed - 3, 23};
+  fvTrackDrawAtts[ETrackType::kSecPI]   = {kRed - 8, 25};
+  fvTrackDrawAtts[ETrackType::kSecPIP]  = {kRed - 6, 26};
+  fvTrackDrawAtts[ETrackType::kSecPIM]  = {kRed - 10, 32};
 
-  // Match tracks and points
-  // Read MC tracks and points
-  if (IsMCUsed()) {
-    fpMCModule->InitEvent(this->GetCurrentEvent());
-    nMCPoints = fMCData.GetNofPoints();
-    nMCTracks = fMCData.GetNofTracks();
-    fpMCModule->MatchHits();
-    fpMCModule->MatchTracks();
-    fMonitor.IncrementCounter(EMonitorKey::kMcPoint, nMCPoints);
-    fMonitor.IncrementCounter(EMonitorKey::kMcTrack, nMCTracks);
+  fvTrackDrawAtts[ETrackType::kAllK]   = {kBlue - 4, 20};
+  fvTrackDrawAtts[ETrackType::kPrimK]  = {kBlue - 2, 21};
+  fvTrackDrawAtts[ETrackType::kPrimKP] = {kBlue - 1, 22};
+  fvTrackDrawAtts[ETrackType::kPrimKM] = {kBlue - 3, 23};
+  fvTrackDrawAtts[ETrackType::kSecK]   = {kBlue - 8, 25};
+  fvTrackDrawAtts[ETrackType::kSecKP]  = {kBlue - 6, 26};
+  fvTrackDrawAtts[ETrackType::kSecKM]  = {kBlue - 10, 32};
 
-    if (fbDrawEvents && nMCPoints > std::max(0, fEvtDisplayMinNofPoints)) {
-      DrawEvent();
-    }
-  }
-  LOG_IF(info, fVerbose > 1) << fName << ": Data sample consists of " << nHits << " hits, " << nRecoTracks
-                             << " reco tracks, " << nMCTracks << " MC tracks, " << nMCPoints << " MC points";
+  fvTrackDrawAtts[ETrackType::kAllPPBAR]  = {kGreen - 4, 20};
+  fvTrackDrawAtts[ETrackType::kPrimPPBAR] = {kGreen - 2, 21};
+  fvTrackDrawAtts[ETrackType::kPrimP]     = {kGreen - 1, 22};
+  fvTrackDrawAtts[ETrackType::kPrimPBAR]  = {kGreen - 3, 23};
+  fvTrackDrawAtts[ETrackType::kSecPPBAR]  = {kGreen - 8, 25};
+  fvTrackDrawAtts[ETrackType::kSecP]      = {kGreen - 6, 26};
+  fvTrackDrawAtts[ETrackType::kSecPBAR]   = {kGreen - 10, 32};
 
+  fvTrackDrawAtts[ETrackType::kAllE]   = {kCyan - 4, 20};
+  fvTrackDrawAtts[ETrackType::kPrimE]  = {kCyan - 2, 21};
+  fvTrackDrawAtts[ETrackType::kPrimEP] = {kCyan - 1, 22};
+  fvTrackDrawAtts[ETrackType::kPrimEM] = {kCyan - 3, 23};
+  fvTrackDrawAtts[ETrackType::kSecE]   = {kCyan - 8, 25};
+  fvTrackDrawAtts[ETrackType::kSecEP]  = {kCyan - 6, 26};
+  fvTrackDrawAtts[ETrackType::kSecEM]  = {kCyan - 10, 32};
 
-  return kSUCCESS;
+  fvTrackDrawAtts[ETrackType::kAllMU]   = {kMagenta - 4, 20};
+  fvTrackDrawAtts[ETrackType::kPrimMU]  = {kMagenta - 2, 21};
+  fvTrackDrawAtts[ETrackType::kPrimMUP] = {kMagenta - 1, 22};
+  fvTrackDrawAtts[ETrackType::kPrimMUM] = {kMagenta - 3, 23};
+  fvTrackDrawAtts[ETrackType::kSecMU]   = {kMagenta - 8, 25};
+  fvTrackDrawAtts[ETrackType::kSecMUP]  = {kMagenta - 6, 26};
+  fvTrackDrawAtts[ETrackType::kSecMUM]  = {kMagenta - 10, 32};
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
diff --git a/reco/L1/qa/CbmCaOutputQa.h b/reco/L1/qa/CbmCaOutputQa.h
index 48a40e06eb..b490eef796 100644
--- a/reco/L1/qa/CbmCaOutputQa.h
+++ b/reco/L1/qa/CbmCaOutputQa.h
@@ -2,10 +2,10 @@
    SPDX-License-Identifier: GPL-3.0-only
    Authors: Sergei Zharko [committer] */
 
-/// @file   CbmCaOutputQa.h
-/// @brief  Tracking output QA-task (header)
-/// @since  24.02.2023
-/// @author Sergei Zharko <s.zharko@gsi.de>
+/// \file   CbmCaOutputQa.h
+/// \brief  Tracking output QA-task (header)
+/// \since  24.02.2023
+/// \author Sergei Zharko <s.zharko@gsi.de>
 
 
 #pragma once
@@ -27,7 +27,7 @@
 
 namespace cbm::ca
 {
-  /// @brief Enumeration fors track category
+  /// \brief Enumeration fors track category
   enum ETrackType
   {
     kPrimLongFast,  ///< primary long tracks (all stations in set)
@@ -92,7 +92,7 @@ namespace cbm::ca
     kEND
   };
 
-  /// @brief  QA-task for CA tracking output results
+  /// \brief  QA-task for CA tracking output results
   ///
   class OutputQa : public CbmQaTask {
     // WIP: Temporary flag to switch between two different approaches of filling track type histograms
@@ -106,29 +106,29 @@ namespace cbm::ca
     template<typename T>
     using TTypeArr_t = std::array<T, ETrackType::kEND>;
 
-    /// @brief Structure to keep drawing attributes of histograms
+    /// \brief Structure to keep drawing attributes of histograms
     struct DrawAtt {
       Color_t fColor  = 1;  ///< Marker and line color
       Style_t fMarker = 1;  ///< Marker style
     };
 
    public:
-    /// @brief  Constructor from parameters
-    /// @param  verbose   Verbosity level
-    /// @param  isMCUsed  Flag, if MC information is available for this task
-    /// @param  recoMode  Reconstruction mode (see documentation for the CbmQaTask::SetRecoMode function)
+    /// \brief  Constructor from parameters
+    /// \param  verbose   Verbosity level
+    /// \param  isMCUsed  Flag, if MC information is available for this task
+    /// \param  recoMode  Reconstruction mode (see documentation for the CbmQaTask::SetRecoMode function)
     OutputQa(int verbose, bool isMCUsed, ECbmRecoMode recoMode = ECbmRecoMode::EventByEvent);
 
-    /// @brief Adds track type
-    /// @param type  Track type
-    /// @param flag  Flag: true/false
+    /// \brief Adds track type
+    /// \param type  Track type
+    /// \param flag  Flag: true/false
     ///
     /// Adds a track type for building distributions. By default, only all, primary, secondary and ghost track
     /// distributions are booked.
     void AddTrackType(ETrackType type, bool flag = true) { fvbTrackTypeOn[type] = flag; }
 
-    /// @brief Enables debugger
-    /// @param filename  Name of output ROOT file
+    /// \brief Enables debugger
+    /// \param filename  Name of output ROOT file
     ///
     /// Creates a debugger and enables its usage inside a QA task
     void EnableDebugger(const char* filename)
@@ -138,14 +138,14 @@ namespace cbm::ca
       }
     }
 
-    /// @brief Reads defined parameters object from file
-    /// @param filename  Name of parameter file
-    /// @note  TEMPORARY FUNCTION, A SEPARATE PARAMETERS INITIALIZATION CLASS IS TO BE USED
+    /// \brief Reads defined parameters object from file
+    /// \param filename  Name of parameter file
+    /// \note  TEMPORARY FUNCTION, A SEPARATE PARAMETERS INITIALIZATION CLASS IS TO BE USED
     void ReadParameters(const char* filename);
 
-    /// @brief Sets event display
-    /// @param flag         On/off
-    /// @param minNofPoints Minimum number of points to draw the event
+    /// \brief Sets event display
+    /// \param flag         On/off
+    /// \param minNofPoints Minimum number of points to draw the event
     ///
     /// The event display draws xz- and yz-projection of the event snapshot, which includes MC and Reco tracks,
     /// hits and MC-points
@@ -155,38 +155,38 @@ namespace cbm::ca
       fEvtDisplayMinNofPoints = minNofPoints;
     }
 
-    /// @brief Sets MVD use flag
-    /// @param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
+    /// \brief Sets MVD use flag
+    /// \param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
     void SetUseMvd(bool flag = true) { fbUseMvd = flag; }
 
-    /// @brief Sets STS use flag
-    /// @param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
+    /// \brief Sets STS use flag
+    /// \param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
     void SetUseSts(bool flag = true) { fbUseSts = flag; }
 
-    /// @brief Sets MuCh use flag
-    /// @param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
+    /// \brief Sets MuCh use flag
+    /// \param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
     void SetUseMuch(bool flag = true) { fbUseMuch = flag; }
 
-    /// @brief Sets TRD use flag
-    /// @param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
+    /// \brief Sets TRD use flag
+    /// \param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
     void SetUseTrd(bool flag = true) { fbUseTrd = flag; }
 
-    /// @brief Sets TOF use flag
-    /// @param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
+    /// \brief Sets TOF use flag
+    /// \param flag  Boolean flag: true - detector subsystem is used, false - detector subsystem is ignored
     void SetUseTof(bool flag = true) { fbUseTof = flag; }
 
-    /// @brief Sets STS tracking mode
+    /// \brief Sets STS tracking mode
     void SetStsTrackingMode() { fTrackingMode = ECbmCaTrackingMode::kSTS; }
 
-    /// @brief Sets mCBM global tracking mode
+    /// \brief Sets mCBM global tracking mode
     void SetMcbmTrackingMode() { fTrackingMode = ECbmCaTrackingMode::kMCBM; }
 
-    /// @brief Sets performance mode
-    /// @param mode  Performance mode (1 is default: TODO - test)
+    /// \brief Sets performance mode
+    /// \param mode  Performance mode (1 is default: TODO - test)
     void SetPerformanceMode(int mode) { fPerformanceMode = mode; }
 
-    /// @brief Set track type list for summary table
-    /// @param trackTypes  A  of track type set
+    /// \brief Set track type list for summary table
+    /// \param trackTypes  A  of track type set
     void SetTrackTypeListForSummary(std::set<ETrackType>&& trackTypes)
     {
       fmSummaryTableEntries = std::move(trackTypes);
@@ -196,34 +196,25 @@ namespace cbm::ca
     /// \brief  Method to check, if the QA results are acceptable
     void Check() override;
 
-    /// @brief Initializes canvases
-    InitStatus InitCanvases() override;
+    /// \brief Creates summary cavases, tables etc.
+    void CreateSummary() override;
 
-    /// @brief Initialises data branches in the beginning of the run
-    InitStatus InitDataBranches() override;
-
-    /// @brief Initializes histograms
-    InitStatus InitHistograms() override;
-
-    /// @brief Initializes time slice
-    /// @note  Is called in the FairTask::Exec function
-    InitStatus InitTimeSlice() override;
-
-    /// @brief Fills histograms from time slice or event
-    void FillHistograms() override;
-
-    /// @brief De-initializes histograms
+    /// \brief De-initializes histograms
     void DeInit() override {}
 
-    /// @brief Fills histograms for a given track types
-    /// @param type  Track type
-    /// @param
+    /// \brief Fills histograms for a given track types
     void FillTrackTypeHistograms();
 
+    /// \brief Initialises the QA-task
+    InitStatus InitQa() override;
+
+    /// \brief Fills histograms from time slice or event
+    void ExecQa() override;
+
    private:
-    /// @brief Fills reconstructed track by its index
-    /// @param type      Track type
-    /// @param iTrkReco  Index of reconstructed track
+    /// \brief Fills reconstructed track by its index
+    /// \param type      Track type
+    /// \param iTrkReco  Index of reconstructed track
     [[gnu::always_inline]] void FillRecoTrack(ETrackType type, int iTrkReco)
     {
       if (fvbTrackTypeOn[type]) {
@@ -231,23 +222,23 @@ namespace cbm::ca
       }
     }
 
-    /// @brief Fills MC track by its index
-    /// @param type      Track type
-    /// @param iTrkReco  Index of MC track
+    /// \brief Fills MC track by its index
+    /// \param type      Track type
+    /// \param iTrkReco  Index of MC track
     void FillMCTrack(ETrackType type, int iTrkMC);
 
-    /// @brief Draws event
+    /// \brief Draws event
     void DrawEvent();
 
-    /// @brief Utility function to draw a generic comparison of histograms from different track types
-    /// @tparam TObj    Type of ROOT object
-    /// @param  vTypes  Vector of types to draw
-    /// @param  GetObj  Function, returning an object of a given type
+    /// \brief Utility function to draw a generic comparison of histograms from different track types
+    /// \tparam TObj    Type of ROOT object
+    /// \param  vTypes  Vector of types to draw
+    /// \param  GetObj  Function, returning an object of a given type
     template<class TObj>
     void DrawSetOf(const std::vector<ETrackType>& vTypes, std::function<TObj*(ETrackType)> GetObj);
 
 
-    /// @brief Defines drawing attributes for histograms of different track types
+    /// \brief Defines drawing attributes for histograms of different track types
     void InitDrawingAttributes();
 
     // Flags for detector subsystems being used
@@ -273,8 +264,8 @@ namespace cbm::ca
     ca::Vector<CbmL1Track> fvRecoTracks{"CbmCaOutputQa::fvRecoTracks"};
     tools::MCData fMCData;  ///< Input MC data (points and tracks)
 
-    /// @enum  EMonitorKey
-    /// @brief QA monitor counters
+    /// \enum  EMonitorKey
+    /// \brief QA monitor counters
     enum class EMonitorKey
     {
       kEvent,
@@ -336,9 +327,9 @@ void cbm::ca::OutputQa::DrawSetOf(const std::vector<ETrackType>& vTypes, std::fu
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-/// @brief Fills MC track by its index
-/// @param type      Track type
-/// @param iTrkReco  Index of MC track
+/// \brief Fills MC track by its index
+/// \param type      Track type
+/// \param iTrkReco  Index of MC track
 [[gnu::always_inline]] inline void cbm::ca::OutputQa::FillMCTrack(ETrackType type, int iTrkMC)
 {
   // Fill histograms and efficiency profiles
diff --git a/reco/qa/CMakeLists.txt b/reco/qa/CMakeLists.txt
index be3074d80b..f31759495b 100644
--- a/reco/qa/CMakeLists.txt
+++ b/reco/qa/CMakeLists.txt
@@ -7,13 +7,13 @@ set(SRCS
   CbmRecoQa.cxx
   CbmTrackingTrdQa.cxx
   CbmRecoQaTask.cxx
-  CbmRecoModuleQa.cxx
+  #CbmRecoModuleQa.cxx
   )
 
 set(LIBRARY_NAME CbmRecoQa)
 set(LINKDEF  RecoQaLinkDef.h)
 set(PUBLIC_DEPENDENCIES
-  Algo
+  #Algo
   CbmBase
   CbmData
   FairRoot::Base
-- 
GitLab