diff --git a/algo/ca/core/tracking/CaFramework.h b/algo/ca/core/tracking/CaFramework.h
index 2aa292e237a636179a2d61f508bf062b5e58b254..deb9b164b7f700e824b10348dff0b62d99a49a2f 100644
--- a/algo/ca/core/tracking/CaFramework.h
+++ b/algo/ca/core/tracking/CaFramework.h
@@ -220,6 +220,9 @@ namespace cbm::algo::ca
     Parameters<fvec> fParameters;  ///< Object of Framework parameters class
     InputData fInputData;          ///< Tracking input data
 
+    Vector<unsigned char> fvHitKeyFlags{
+      "Framework::fvHitKeyFlags"};  ///< List of key flags: has been this hit or cluster already used
+
     TrackingMonitorData fMonitorData{};  ///< Tracking monitor data (statistics per call)
 
     int fNofThreads = 1;  ///< Number of threads to execute the track-finder
diff --git a/algo/detectors/trd/UnpackMS.cxx b/algo/detectors/trd/UnpackMS.cxx
index 1ae1f29bf267157eb9fb0c7d5a69d97a2a5aa7a9..01cdbdc10299b0fe7c62f4fe68f4b90c3ed4d15d 100644
--- a/algo/detectors/trd/UnpackMS.cxx
+++ b/algo/detectors/trd/UnpackMS.cxx
@@ -336,7 +336,7 @@ namespace cbm::algo::trd
       return Spadic::MsInfoType::kMIS;
     }
     else {
-      // TODO: track this error
+      // TODO: Track this error!
       L_(error) << "UnpackMS::GetInfoType] unknown type!";
       return Spadic::MsInfoType::kMSB;
     }
diff --git a/analysis/PWGDIL/dielectron/pi0eta/CbmKresTemperature.cxx b/analysis/PWGDIL/dielectron/pi0eta/CbmKresTemperature.cxx
index 9c09509388672d240474737db2c5b2f4adf20179..b54caef7fb1c107e5adb5202961acb0d4f1fff74 100644
--- a/analysis/PWGDIL/dielectron/pi0eta/CbmKresTemperature.cxx
+++ b/analysis/PWGDIL/dielectron/pi0eta/CbmKresTemperature.cxx
@@ -10,7 +10,7 @@
  *    modified 30.01.2020
  *
  *
- *    Class is based only on MCtrue information. 
+ *    Class is based only on MCtrue information.
  *    Loop over all MCtrue tracks and plot the temperature spectrum distribution of all produced particles of interest (pions, kaons, photons, protons).
  *    These spectra show the expectations of temperature from temperature analysis. -> one needs to fit them at the end
  *
@@ -21,12 +21,11 @@
 #include "CbmGlobalTrack.h"
 #include "CbmMCTrack.h"
 #include "CbmStsTrack.h"
-
 #include "FairRootManager.h"
-
 #include "TH1.h"
 #include "TH1D.h"
 
+#include <iostream>
 
 using namespace std;
 
diff --git a/core/data/CbmDefs.cxx b/core/data/CbmDefs.cxx
index 81049a899b6c3ffb6da4df38ee0536c8e4fb6e92..bd4d9a008245de8a0ab281f3eeea4c4e8311c0c5 100644
--- a/core/data/CbmDefs.cxx
+++ b/core/data/CbmDefs.cxx
@@ -7,6 +7,7 @@
 #include <algorithm>
 #include <array>
 #include <cctype>
+#include <ostream>
 #include <stdexcept>  // for out_of_range
 
 // operator ++ for ECbmModuleId for convenient usage in loops
diff --git a/core/data/CbmDefs.h b/core/data/CbmDefs.h
index 20121e14916e1a871584c13e0020a7b8e85c92e1..09b9994427244a5cee7d7a82fb07b48b288008e6 100644
--- a/core/data/CbmDefs.h
+++ b/core/data/CbmDefs.h
@@ -12,7 +12,7 @@
 #ifndef CBMDEFS_H
 #define CBMDEFS_H 1
 
-#include <iostream>  // for ostream
+#include <iosfwd>  // for ostream
 #include <string>
 #include <type_traits>  // for underlying_type
 
diff --git a/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx b/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx
index 1716143ea135798d4e2c11e96d7e56517486c54d..9067d508e60f492af62a7268ba7fe9d8c6b4364b 100644
--- a/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx
+++ b/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx
@@ -7,11 +7,9 @@
 #include "CbmStsCluster.h"
 #include "CbmStsDigi.h"
 #include "CbmStsHit.h"
-
 #include "FairRootManager.h"
 #include "FairRunOnline.h"
 #include "Logger.h"
-
 #include "TClonesArray.h"
 #include "TFile.h"
 #include "TH1.h"
@@ -20,6 +18,7 @@
 #include "THttpServer.h"
 
 #include <iomanip>
+#include <iostream>
 using std::fixed;
 using std::setprecision;
 
diff --git a/fles/mcbm2018/tasks/CbmMcbmCheckTimingAlgo.h b/fles/mcbm2018/tasks/CbmMcbmCheckTimingAlgo.h
index cb837ccb6614de5333b4d7d495840485f51862ec..13e4c0b52a934f20c590f78b221418564439840b 100644
--- a/fles/mcbm2018/tasks/CbmMcbmCheckTimingAlgo.h
+++ b/fles/mcbm2018/tasks/CbmMcbmCheckTimingAlgo.h
@@ -115,15 +115,15 @@ private:
    * @return size of vector
    */
   template<class Digi>
-  uint GetDigiInfo(UInt_t iDigi, std::vector<std::tuple<double, double, uint>>* vec,
-                   ECbmModuleId detId = ECbmModuleId::kNotExist);
+  UInt_t GetDigiInfo(UInt_t iDigi, std::vector<std::tuple<double, double, UInt_t>>* vec,
+                     ECbmModuleId detId = ECbmModuleId::kNotExist);
   /** @brief Retrieve the detector view corresponding to the digi data (@see CheckTimingDetector::vName)
    * @param det detector definitions
    * @param info tuple of digi info (time, charge address)
    * @return the view index for the curent data or -1 if there is none
    */
   template<class Digi>
-  int GetViewId(CheckTimingDetector det, std::tuple<double, double, uint> info);
+  int GetViewId(CheckTimingDetector det, std::tuple<double, double, UInt_t> info);
 
   /** Input array from previous already existing data level **/
   CbmDigiManager* fDigiMan = nullptr;  //!
diff --git a/reco/detectors/rich/unpack/CbmRichUnpackAlgoBase.h b/reco/detectors/rich/unpack/CbmRichUnpackAlgoBase.h
index 439e27e2f773cb30b0a39135a8e648bac8a1288f..4c55585a5fbec2b6dbbfac8273548d470805f3c2 100644
--- a/reco/detectors/rich/unpack/CbmRichUnpackAlgoBase.h
+++ b/reco/detectors/rich/unpack/CbmRichUnpackAlgoBase.h
@@ -25,7 +25,6 @@
 #include "CbmRecoUnpackAlgo.tmpl"
 #include "CbmRichDigi.h"
 #include "CbmRichUnpackMonitor.h"
-
 #include "Timeslice.hpp"  // timeslice
 
 #include <Rtypes.h>  // for types
@@ -34,6 +33,7 @@
 #include <cstddef>
 #include <cstdint>
 #include <iomanip>
+#include <iostream>
 #include <memory>
 #include <utility>
 
diff --git a/reco/detectors/trd/CbmTrdHitProducer.cxx b/reco/detectors/trd/CbmTrdHitProducer.cxx
index 8ab1405b1a55542858d2ae7815611e6eb026cfe9..16e55d6e3051551c8470a2f2978e71e3cddc0ee1 100644
--- a/reco/detectors/trd/CbmTrdHitProducer.cxx
+++ b/reco/detectors/trd/CbmTrdHitProducer.cxx
@@ -35,6 +35,7 @@
 #include <TVector3.h>
 
 #include <iomanip>
+#include <iostream>
 #include <map>
 
 using std::fixed;
diff --git a/reco/detectors/trd/CbmTrdModuleRec2D.h b/reco/detectors/trd/CbmTrdModuleRec2D.h
index e3c1b2317dd1131eea2733f92bb6399e494eb30a..440270cee672744c7f0e4f7646c1d347c5ea936d 100644
--- a/reco/detectors/trd/CbmTrdModuleRec2D.h
+++ b/reco/detectors/trd/CbmTrdModuleRec2D.h
@@ -22,7 +22,7 @@ class CbmTrdDigiRec;
 class CbmTrdParFaspChannel;
 class TF1;
 /** @class CbmTrdModuleRec2D
- ** @brief Cluster finding and hit reconstruction algorithms for the TRD(2D) module. 
+ ** @brief Cluster finding and hit reconstruction algorithms for the TRD(2D) module.
  ** @author Alexandru Bercucic <abercuci@niham.nipne.ro>
  ** @since 01.02.2019
  ** @date 01.10.2021
@@ -68,13 +68,13 @@ public:
   virtual CbmTrdHit* MakeHit(Int_t cId, const CbmTrdCluster* c, std::vector<const CbmTrdDigi*>* digis);
   /** \brief Load RAW digis into working array of RECO digis
    * \param[in] din list of RAW digis in increasing order of column no
-   * \param[in] cid cluster index in the cluster array 
+   * \param[in] cid cluster index in the cluster array
    * \return no of digis loaded
    */
   Int_t LoadDigis(vector<const CbmTrdDigi*>* din, Int_t cid);
   Int_t ProjectDigis(Int_t cid, Int_t cjd = -1);
   /** \brief Implement topologic cuts for hit merging
-   * \return index of anode wire wrt to boundary or 0 if check fails 
+   * \return index of anode wire wrt to boundary or 0 if check fails
    */
   Int_t CheckMerge(Int_t cid, Int_t cjd);
   /** \brief Algorithm for hit merging
@@ -94,7 +94,7 @@ public:
   Double_t GetXcorr(Double_t dx, Int_t typ, Int_t cls = 0) const;
   /** \brief y position correction based on LUT
    * \param[in] dy offset computed on charge sharing expressed in [ph]
-   * \param[in] cls correction class 
+   * \param[in] cls correction class
    * \return correction expresed in [cm]
    */
   Double_t GetYcorr(Double_t dy, Int_t cls = 0) const;
@@ -115,14 +115,14 @@ public:
    */
   Int_t GetHitRcClass(Int_t a0) const;
 
-  /** @brief Steer usage of helper graphs for computing time and energy per hit. 
-   * A cost wrt the additional  performance vs. CPU has to be performed. 
+  /** @brief Steer usage of helper graphs for computing time and energy per hit.
+   * A cost wrt the additional  performance vs. CPU has to be performed.
    */
   void SetUseHelpers(bool use = true)
   {
     use ? SETBIT(fConfigMap, ECbmTrdModuleRec2D::kHelpers) : CLRBIT(fConfigMap, ECbmTrdModuleRec2D::kHelpers);
   }
-  /** \brief Time offset to synchronize TRD2D hits to the rest of detectors 
+  /** \brief Time offset to synchronize TRD2D hits to the rest of detectors
    * \param dt offset in [ns]
    */
   void SetHitTimeOffset(int dt) { fHitTimeOff = dt; }
@@ -148,7 +148,7 @@ private:
   Bool_t CHELPERS() const { return TESTBIT(fConfigMap, ECbmTrdModuleRec2D::kHelpers); }
 
   /** \brief Add left and right edge channels to the cluster in case this are masked channels
-   * \return no of edges added to cluster 
+   * \return no of edges added to cluster
    */
   int AddClusterEdges(CbmTrdCluster* cl);
   /** \brief Implement cuts for hit convolution definition
@@ -158,7 +158,7 @@ private:
   Bool_t CheckConvolution(CbmTrdHit* h) const;
   /** \brief Algorithm for cluster spliting
    * \param[in] h hit to be analysed.
-   * \return TRUE if succesful. The extra cluster is added to the end of the hits array 
+   * \return TRUE if succesful. The extra cluster is added to the end of the hits array
    */
   Bool_t Deconvolute(CbmTrdHit* h);
   Double_t GetXoffset(Int_t n0 = 0) const;
@@ -171,7 +171,7 @@ private:
    * \param[in] digis initial digis list shrinked for incomplete digis.
    * \param[in] vdgM list of merged digis
    * \param[in] vmask position of merged digis in the digis list
-   * \param[in] t0 prompt time of cluster 
+   * \param[in] t0 prompt time of cluster
    * \param[out] cM relative position of maximum
    * \return no of signals loaded. if detected overflow negative number
    */
@@ -217,8 +217,8 @@ private:
 
   UChar_t fConfigMap = 0;                              //! task configuration settings
   ULong64_t fT0      = 0;                              //! start time of event/time slice [clk]
-  uint fTimeLast     = 0;                              //! time of last digi processed in module [clk]
-  uint fTimeWinKeep  = 11;                             //! time interval to still keep clusters in buffer [clk]
+  UInt_t fTimeLast    = 0;                              //! time of last digi processed in module [clk]
+  UInt_t fTimeWinKeep = 11;                             //! time interval to still keep clusters in buffer [clk]
   std::map<Int_t, std::list<CbmTrdCluster*>> fBuffer;  //row-wise organized clusters
   std::map<Int_t, vector<CbmTrdDigiRec*>> fDigis;      //!cluster-wise organized calibrated digi
   // working representation of a hit on which the reconstruction is performed
diff --git a/reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx b/reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx
index f1a1bfaf80b6c1dbfc1f9378e4ad80985b3101b0..bfae9fcfc6dd75dd9b7b28de62b2de136bfce12c 100644
--- a/reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx
+++ b/reco/eventbuilder/digis/CbmTaskBuildRawEvents.cxx
@@ -24,6 +24,7 @@
 #include <TStopwatch.h>
 
 #include <iomanip>
+#include <iostream>
 
 CbmTaskBuildRawEvents::~CbmTaskBuildRawEvents()
 {
diff --git a/reco/global/CbmRecoT0.cxx b/reco/global/CbmRecoT0.cxx
index dd603697b14aea7114a70fec13f7dabaab9530b6..fca462bb626c0e419380630fa4b991df95c7124e 100644
--- a/reco/global/CbmRecoT0.cxx
+++ b/reco/global/CbmRecoT0.cxx
@@ -16,6 +16,7 @@
 
 #include <cassert>
 #include <iomanip>
+#include <iostream>
 #include <sstream>
 
 
diff --git a/sim/detectors/bmon/CbmBmonDigitize.cxx b/sim/detectors/bmon/CbmBmonDigitize.cxx
index d848b545a89c27f95ddec3d1e3e85d7e3f757c46..14e7bc23defea8e917820139687250264b743ca8 100644
--- a/sim/detectors/bmon/CbmBmonDigitize.cxx
+++ b/sim/detectors/bmon/CbmBmonDigitize.cxx
@@ -17,6 +17,7 @@
 #include <TStopwatch.h>
 
 #include <iomanip>
+#include <iostream>
 
 using std::fixed;
 using std::left;