diff --git a/reco/KF/CbmKFParticleFinder.cxx b/reco/KF/CbmKFParticleFinder.cxx
index 6b9992843d6c7f1dfd8efbb6c0a7ed77ffd41fdc..88d7ab49516ca5346e17faec2ed315d8136ab6fa 100644
--- a/reco/KF/CbmKFParticleFinder.cxx
+++ b/reco/KF/CbmKFParticleFinder.cxx
@@ -165,8 +165,8 @@ void CbmKFParticleFinder::Exec(Option_t* /*opt*/)
         }
       }
       else {
-        Error("CbmKFParticleFinder::Event", "PID task has a wrong number of tracks: %l of %l", fPID->GetPID().size(),
-              nTracksEvent);
+        Error("CbmKFParticleFinder::Event", "PID task has a wrong number of tracks: %i of %i",
+              (int) fPID->GetPID().size(), nTracksEvent);
       }
     }
 
diff --git a/reco/littrack/cbm/qa/CbmLitCreateStandaloneData.cxx b/reco/littrack/cbm/qa/CbmLitCreateStandaloneData.cxx
index 8f2b0f4f2c1dfefeead13416a179fe5d12530150..1cf846279231f424782739b6f3f0641827f3e9d7 100644
--- a/reco/littrack/cbm/qa/CbmLitCreateStandaloneData.cxx
+++ b/reco/littrack/cbm/qa/CbmLitCreateStandaloneData.cxx
@@ -68,7 +68,7 @@ InitStatus CbmLitCreateStandaloneData::Init()
 
 void CbmLitCreateStandaloneData::SetParContainers() {}
 
-void CbmLitCreateStandaloneData::Exec(Option_t* opt)
+void CbmLitCreateStandaloneData::Exec(Option_t* /*opt*/)
 {
   fSeedsFile << fEventNo << " " << fStsTracks->GetEntriesFast() << std::endl;
   for (Int_t iStsTrack = 0; iStsTrack < fStsTracks->GetEntriesFast(); iStsTrack++) {
diff --git a/reco/littrack/cbm/qa/CbmLitTestMatrixMath.cxx b/reco/littrack/cbm/qa/CbmLitTestMatrixMath.cxx
index 0e5c90eabbf52000f7551b72af5a72127e33b602..260ac8f82e5422e3f8a9306d37c1a29653660cfd 100644
--- a/reco/littrack/cbm/qa/CbmLitTestMatrixMath.cxx
+++ b/reco/littrack/cbm/qa/CbmLitTestMatrixMath.cxx
@@ -90,7 +90,7 @@ void CbmLitTestMatrixMath::TestMult15On5(int testId)
   Mult15On5(input1, input2, a1);
   std::cout << "Output Mult15On5: " << VectorToString(a1);
 
-  litfloat rd1[25], rd2[15];
+  litfloat rd1[25];
   Convert15To25(&input1[0], rd1);
   TMatrixTSym<litfloat> r1(5, rd1);
   TMatrixT<litfloat> v1(5, 1, &input2[0]);
@@ -166,7 +166,7 @@ void CbmLitTestMatrixMath::Convert25To15(const litfloat* a25, litfloat* a15)
 std::string CbmLitTestMatrixMath::VectorToString(const std::vector<litfloat>& a)
 {
   std::stringstream out;
-  for (int i = 0; i < a.size(); i++) {
+  for (unsigned int i = 0; i < a.size(); i++) {
     out << a[i] << " ";
   }
   out << std::endl;
diff --git a/reco/littrack/cbm/qa/base/CbmLitAcceptanceFunction.h b/reco/littrack/cbm/qa/base/CbmLitAcceptanceFunction.h
index fd1167e0645c2f5717ee2ec2e38dca543f4a5af2..1c1196bb56af13d2f62cde58d432d5ca2966989b 100644
--- a/reco/littrack/cbm/qa/base/CbmLitAcceptanceFunction.h
+++ b/reco/littrack/cbm/qa/base/CbmLitAcceptanceFunction.h
@@ -27,7 +27,10 @@
 
 class CbmLitAcceptanceFunction {
 public:
-  static Bool_t AllTrackAcceptanceFunction(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index) { return true; }
+  static Bool_t AllTrackAcceptanceFunction(CbmMCDataArray* /*mcTracks*/, Int_t /*eventNo*/, Int_t /*index*/)
+  {
+    return true;
+  }
 
   static Bool_t NegativeTrackAcceptanceFunction(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index)
   {
@@ -155,7 +158,8 @@ public:
     return (mcTrack->GetPdgCode() == -321);
   }
 
-  static Bool_t AllRingAcceptanceFunction(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index, Int_t nofHitsInRing)
+  static Bool_t AllRingAcceptanceFunction(CbmMCDataArray* /*mcTracks*/, Int_t /*eventNo*/, Int_t /*index*/,
+                                          Int_t /*nofHitsInRing*/)
   {
     return true;
   }
@@ -169,7 +173,7 @@ public:
   }
 
   static Bool_t PrimaryElectronRingAcceptanceFunction(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index,
-                                                      Int_t nofHitsInRing)
+                                                      Int_t /*nofHitsInRing*/)
   {
     if (index < 0) return false;
     const CbmMCTrack* mcTrack = static_cast<const CbmMCTrack*>(mcTracks->Get(0, eventNo, index));
@@ -187,7 +191,8 @@ public:
            && (nofHitsInRing >= 15);
   }
 
-  static Bool_t PionRingAcceptanceFunction(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index, Int_t nofHitsInRing)
+  static Bool_t PionRingAcceptanceFunction(CbmMCDataArray* mcTracks, Int_t eventNo, Int_t index,
+                                           Int_t /*nofHitsInRing*/)
   {
     if (index < 0) return false;
     const CbmMCTrack* mcTrack = static_cast<const CbmMCTrack*>(mcTracks->Get(0, eventNo, index));
@@ -202,8 +207,8 @@ public:
     return (TMath::Abs(mcTrack->GetPdgCode()) == 211) && (nofHitsInRing >= 15);
   }
 
-  static Bool_t AllPiSuppAcceptanceFunction(const TClonesArray* globalTracks, const TClonesArray* stsMatches,
-                                            const TClonesArray* richMatches, Int_t index)
+  static Bool_t AllPiSuppAcceptanceFunction(const TClonesArray* /*globalTracks*/, const TClonesArray* /*stsMatches*/,
+                                            const TClonesArray* /*richMatches*/, Int_t /*index*/)
   {
     return true;
   }
diff --git a/reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx b/reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx
index 2e4a03820f60169211ea914ca2d918a9b5ad75ee..e8c0712daa0ca268877ea207f531910ec46e7f57 100644
--- a/reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx
+++ b/reco/littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx
@@ -99,7 +99,7 @@ InitStatus CbmLitClusteringQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitClusteringQa::Exec(Option_t* opt)
+void CbmLitClusteringQa::Exec(Option_t*)
 {
   fHM->H1("hen_EventNo_ClusteringQa")->Fill(0.5);
   Int_t eventNum = fHM->H1("hen_EventNo_ClusteringQa")->GetEntries() - 1;
@@ -558,8 +558,8 @@ void CbmLitClusteringQa::CreateHitEfficiencyHistograms(ECbmModuleId detId, const
   if (!fDet.GetDet(detId)) return;
   vector<string> types = list_of("Acc")("Rec")("Eff")("Clone")("CloneProb");
   vector<string> cat   = list_of("All");
-  for (Int_t iCat = 0; iCat < cat.size(); iCat++) {
-    for (Int_t iType = 0; iType < types.size(); iType++) {
+  for (UInt_t iCat = 0; iCat < cat.size(); iCat++) {
+    for (UInt_t iType = 0; iType < types.size(); iType++) {
       string yTitle    = (types[iType] == "Eff")         ? "Efficiency [%]"
                          : (types[iType] == "CloneProb") ? "Probability [%]"
                                                          : "Counter";
diff --git a/reco/littrack/cbm/qa/clustering/CbmLitClusteringQaStudyReport.cxx b/reco/littrack/cbm/qa/clustering/CbmLitClusteringQaStudyReport.cxx
index 963c3b9cb4db5d584d6f13c7edcce838650e6e57..6377a0b424662502d6ddb71074def8ffeea2e30c 100644
--- a/reco/littrack/cbm/qa/clustering/CbmLitClusteringQaStudyReport.cxx
+++ b/reco/littrack/cbm/qa/clustering/CbmLitClusteringQaStudyReport.cxx
@@ -49,7 +49,7 @@ string CbmLitClusteringQaStudyReport::PrintNofObjects() const
     histos[i] = HM(i)->H1Vector("hno_NofObjects_.+_Event");
   }
   string str = R()->TableBegin("Number of objects", list_of(string("")).range(GetStudyNames()));
-  for (Int_t iHist = 0; iHist < histos[0].size(); iHist++) {
+  for (UInt_t iHist = 0; iHist < histos[0].size(); iHist++) {
     string cellName = Split(histos[0][iHist]->GetName(), '_')[2];
     vector<string> cells(nofStudies);
     for (Int_t i = 0; i < nofStudies; i++) {
diff --git a/reco/littrack/cbm/qa/field/CbmLitFieldQa.cxx b/reco/littrack/cbm/qa/field/CbmLitFieldQa.cxx
index 194c14f44b53052ffd32e9626b65e41502c028c4..a41479846c81d48104d27812a2a1957329ec4e5c 100644
--- a/reco/littrack/cbm/qa/field/CbmLitFieldQa.cxx
+++ b/reco/littrack/cbm/qa/field/CbmLitFieldQa.cxx
@@ -37,22 +37,21 @@ using namespace std;
 
 CbmLitFieldQa::CbmLitFieldQa()
   : fField(NULL)
-  , fNofSlices(0)
   , fZSlicePosition()
   , fXSlicePosition()
   , fYSlicePosition()
+  , fNofSlices(0)
+  , fNofBinsX(100)
+  , fNofBinsY(100)
+  , fMinZFieldIntegral(171.)
+  , fMaxZFieldIntegral(330.)
   , fAlongZAngles()
   , fAlongZXY()
   , fZMin(-10.)
   , fZMax(300.)
   , fZStep(1.)
-  ,
-  //fAcceptanceAngleX(35.),
-  //fAcceptanceAngleY(35.),
-  fNofBinsX(100)
-  , fNofBinsY(100)
-  , fMinZFieldIntegral(171.)
-  , fMaxZFieldIntegral(330.)
+  //, fAcceptanceAngleX(35.)
+  //, fAcceptanceAngleY(35.)
   , fHM(NULL)
   , fOutputDir("./")
 {
@@ -107,7 +106,7 @@ InitStatus CbmLitFieldQa::Init()
   // print some field values at RICH entrance
   Double_t B[3];
   vector<vector<Double_t>> pos = {{0., 0., 170.}, {0., 80., 170.}, {50., 0., 170.}, {0., 0., 250.}};
-  for (Int_t i = 0; i < pos.size(); i++) {
+  for (UInt_t i = 0; i < pos.size(); i++) {
     fField->GetFieldValue(&pos[i][0], B);
     Double_t magB = sqrt(B[0] * B[0] + B[1] * B[1] + B[2] * B[2]);
     cout << "B at (" << pos[i][0] << ", " << pos[i][1] << ", " << pos[i][2] << ") = " << magB << " kGauss" << endl;
@@ -118,7 +117,7 @@ InitStatus CbmLitFieldQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitFieldQa::Exec(Option_t* opt) {}
+void CbmLitFieldQa::Exec(Option_t*) {}
 
 void CbmLitFieldQa::Finish() {}
 
@@ -139,14 +138,14 @@ void CbmLitFieldQa::CreateHistos()
   }
 
   for (Int_t v = 0; v < 4; v++) {
-    for (Int_t i = 0; i < fAlongZAngles.size(); i++) {
+    for (UInt_t i = 0; i < fAlongZAngles.size(); i++) {
       TGraph* graph = new TGraph();
       string name   = "hmf_" + names[v] + "AlongZAngle_Graph_" + ToString<Int_t>(fAlongZAngles[i]);
       string title  = name + ";Z [cm];B [kGauss]";
       graph->SetNameTitle(name.c_str(), title.c_str());
       fHM->Add(name, graph);
     }
-    for (Int_t i = 0; i < fAlongZXY.size(); i++) {
+    for (UInt_t i = 0; i < fAlongZXY.size(); i++) {
       TGraph* graph = new TGraph();
       string name   = "hmf_" + names[v] + "AlongZXY_Graph_" + ToString<Int_t>(fAlongZXY[i].first) + "_"
                     + ToString<Int_t>(fAlongZXY[i].second);
@@ -154,7 +153,7 @@ void CbmLitFieldQa::CreateHistos()
       graph->SetNameTitle(name.c_str(), title.c_str());
       fHM->Add(name, graph);
     }
-    for (Int_t i = 0; i < fAlongZXY.size(); i++) {
+    for (UInt_t i = 0; i < fAlongZXY.size(); i++) {
       TGraph* graph = new TGraph();
       string name   = "hmf_" + names[v] + "AlongZXYIntegral_Graph_" + ToString<Int_t>(fAlongZXY[i].first) + "_"
                     + ToString<Int_t>(fAlongZXY[i].second);
@@ -181,7 +180,7 @@ void CbmLitFieldQa::FillBHistos()
 {
   string names[] = {"Bx", "By", "Bz", "Mod"};
   // Fill graphs for magnetic field for each (X, Y) slice
-  for (UInt_t iSlice = 0; iSlice < fNofSlices; iSlice++) {  // loop over slices
+  for (Int_t iSlice = 0; iSlice < fNofSlices; iSlice++) {  // loop over slices
     Double_t Z = fZSlicePosition[iSlice];
 
     Int_t cnt   = 0;
@@ -208,7 +207,7 @@ void CbmLitFieldQa::FillBHistos()
   }
 
   // Fill histograms for magnetic field along Z for different angles
-  for (Int_t i = 0; i < fAlongZAngles.size(); i++) {
+  for (UInt_t i = 0; i < fAlongZAngles.size(); i++) {
     Int_t nofSteps = Int_t((fZMax - fZMin) / fZStep);
     for (Int_t istep = 0; istep < nofSteps; istep++) {
       Double_t Z         = fZMin + istep * fZStep;
@@ -230,7 +229,7 @@ void CbmLitFieldQa::FillBHistos()
     }
   }
   // Fill histograms for magnetic field along Z for different X position
-  for (Int_t i = 0; i < fAlongZXY.size(); i++) {
+  for (UInt_t i = 0; i < fAlongZXY.size(); i++) {
     Int_t nofSteps        = Int_t((fZMax - fZMin) / fZStep);
     Double_t integralB[4] = {0., 0., 0., 0.};
     for (Int_t istep = 0; istep < nofSteps; istep++) {
@@ -252,8 +251,8 @@ void CbmLitFieldQa::FillBHistos()
         // Calculate field integral in the RICH detector
         if (Z >= fMinZFieldIntegral && Z <= fMaxZFieldIntegral) {
           integralB[v] += 0.01 * fZStep * fabs(B[v]);  // in kGauss * meter
-          string name = "hmf_" + names[v] + "AlongZXYIntegral_Graph_" + ToString<Int_t>(fAlongZXY[i].first) + "_"
-                        + ToString<Int_t>(fAlongZXY[i].second);
+          name = "hmf_" + names[v] + "AlongZXYIntegral_Graph_" + ToString<Int_t>(fAlongZXY[i].first) + "_"
+                 + ToString<Int_t>(fAlongZXY[i].second);
           fHM->G1(name)->SetPoint(istep, Z, integralB[v]);
           fHM->G1(name)->SetMaximum(1.1 * integralB[v]);
         }
@@ -269,8 +268,8 @@ void CbmLitFieldQa::FillRichPmtPlaneBHistos()
   if (pixels.size() == 0) return;
 
   Double_t maxModB = 0.;
-  int iS           = -1;
-  for (Int_t i = 0; i < pixels.size(); i++) {
+  //int iS           = -1;
+  for (UInt_t i = 0; i < pixels.size(); i++) {
     TVector3 inPos;
     CbmRichPixelData* pixelData = CbmRichDigiMapManager::GetInstance().GetPixelDataByAddress(pixels[i]);
     inPos.SetXYZ(pixelData->fX, pixelData->fY, pixelData->fZ);
diff --git a/reco/littrack/cbm/qa/field/CbmLitFieldQaReport.cxx b/reco/littrack/cbm/qa/field/CbmLitFieldQaReport.cxx
index d3e3f2d4abc1c7d1a08d0146b4ad2527a4e4d320..62367bcda0c19fa54206bd4ff2dd1d1cf55c8534 100644
--- a/reco/littrack/cbm/qa/field/CbmLitFieldQaReport.cxx
+++ b/reco/littrack/cbm/qa/field/CbmLitFieldQaReport.cxx
@@ -52,7 +52,7 @@ void CbmLitFieldQaReport::Draw()
 void CbmLitFieldQaReport::DrawFieldSlices()
 {
   vector<TGraph2D*> graphsBx = HM()->G2Vector("hmf_Bx_Graph2D_.*");
-  for (Int_t i = 0; i < graphsBx.size(); i++) {
+  for (UInt_t i = 0; i < graphsBx.size(); i++) {
     string name       = graphsBx[i]->GetName();
     string canvasName = GetReportName() + "_map_at_z_" + Split(name, '_')[3];
     TCanvas* canvas   = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
@@ -75,13 +75,13 @@ void CbmLitFieldQaReport::DrawFieldAlongZ()
 {
   // Draw for different angles
   vector<TGraph*> graphsBx = HM()->G1Vector("hmf_BxAlongZAngle_Graph_.*");
-  for (Int_t i = 0; i < graphsBx.size(); i++) {
+  for (UInt_t i = 0; i < graphsBx.size(); i++) {
     string name       = graphsBx[i]->GetName();
     string canvasName = GetReportName() + "_map_along_z_angle_" + Split(name, '_')[3];
-    TCanvas* canvas   = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
-    TGraph* graphBy   = HM()->G1(FindAndReplace(name, "_Bx", "_By"));
-    TGraph* graphBz   = HM()->G1(FindAndReplace(name, "_Bx", "_Bz"));
-    TGraph* graphMod  = HM()->G1(FindAndReplace(name, "_Bx", "_Mod"));
+    CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
+    TGraph* graphBy  = HM()->G1(FindAndReplace(name, "_Bx", "_By"));
+    TGraph* graphBz  = HM()->G1(FindAndReplace(name, "_Bx", "_Bz"));
+    TGraph* graphMod = HM()->G1(FindAndReplace(name, "_Bx", "_Mod"));
     DrawGraph({graphsBx[i], graphBy, graphBz, graphMod}, {"B_{x}", "B_{y}", "B_{z}", "|B|"}, kLinear, kLinear, true,
               0.7, 0.5, 0.9, 0.3);
     gPad->SetGrid(true, true);
@@ -89,14 +89,14 @@ void CbmLitFieldQaReport::DrawFieldAlongZ()
 
   // Draw for different XY positions
   graphsBx = HM()->G1Vector("hmf_BxAlongZXY_Graph_.*");
-  for (Int_t i = 0; i < graphsBx.size(); i++) {
+  for (UInt_t i = 0; i < graphsBx.size(); i++) {
     string name           = graphsBx[i]->GetName();
     vector<string> splits = Split(name, '_');
     string canvasName     = GetReportName() + "_map_along_z_xy_" + splits[3] + "_" + splits[4];
-    TCanvas* canvas       = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
-    TGraph* graphBy       = HM()->G1(FindAndReplace(name, "_Bx", "_By"));
-    TGraph* graphBz       = HM()->G1(FindAndReplace(name, "_Bx", "_Bz"));
-    TGraph* graphMod      = HM()->G1(FindAndReplace(name, "_Bx", "_Mod"));
+    CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
+    TGraph* graphBy  = HM()->G1(FindAndReplace(name, "_Bx", "_By"));
+    TGraph* graphBz  = HM()->G1(FindAndReplace(name, "_Bx", "_Bz"));
+    TGraph* graphMod = HM()->G1(FindAndReplace(name, "_Bx", "_Mod"));
     DrawGraph({graphsBx[i], graphBy, graphBz, graphMod}, {"B_{x}", "B_{y}", "B_{z}", "|B|"}, kLinear, kLinear, true,
               0.7, 0.5, 0.9, 0.3);
     gPad->SetGrid(true, true);
@@ -104,14 +104,14 @@ void CbmLitFieldQaReport::DrawFieldAlongZ()
 
   // Draw integral for different XY positions
   graphsBx = HM()->G1Vector("hmf_BxAlongZXYIntegral_Graph_.*");
-  for (Int_t i = 0; i < graphsBx.size(); i++) {
+  for (UInt_t i = 0; i < graphsBx.size(); i++) {
     string name           = graphsBx[i]->GetName();
     vector<string> splits = Split(name, '_');
     string canvasName     = GetReportName() + "_map_along_z_integral_xy_" + splits[3] + "_" + splits[4];
-    TCanvas* canvas       = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
-    TGraph* graphBy       = HM()->G1(FindAndReplace(name, "_Bx", "_By"));
-    TGraph* graphBz       = HM()->G1(FindAndReplace(name, "_Bx", "_Bz"));
-    TGraph* graphMod      = HM()->G1(FindAndReplace(name, "_Bx", "_Mod"));
+    CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
+    TGraph* graphBy  = HM()->G1(FindAndReplace(name, "_Bx", "_By"));
+    TGraph* graphBz  = HM()->G1(FindAndReplace(name, "_Bx", "_Bz"));
+    TGraph* graphMod = HM()->G1(FindAndReplace(name, "_Bx", "_Mod"));
     DrawGraph({graphsBx[i], graphBy, graphBz, graphMod}, {"B_{x}", "B_{y}", "B_{z}", "|B|"}, kLinear, kLinear, true,
               0.7, 0.5, 0.9, 0.3);
     gPad->SetGrid(true, true);
@@ -132,12 +132,12 @@ void CbmLitFieldQaReport::DrawFieldRichPmtPlane()
   }
 
   string canvasName = GetReportName() + "_rich_pmt_projection_edge";
-  TCanvas* canvas   = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
-  TH2D* h2U         = HM()->G2("hmf_Mod_Rich_Pmt_up")->GetHistogram();
-  TH2D* h2D         = HM()->G2("hmf_Mod_Rich_Pmt_down")->GetHistogram();
-  Int_t nBins       = h2D->GetNbinsY();
-  TH1D* hPrU        = h2U->ProjectionX("_px", 1, 1);
-  TH1D* hPrD        = h2D->ProjectionX("_px", nBins, nBins);
+  CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
+  TH2D* h2U   = HM()->G2("hmf_Mod_Rich_Pmt_up")->GetHistogram();
+  TH2D* h2D   = HM()->G2("hmf_Mod_Rich_Pmt_down")->GetHistogram();
+  Int_t nBins = h2D->GetNbinsY();
+  TH1D* hPrU  = h2U->ProjectionX("_px", 1, 1);
+  TH1D* hPrD  = h2D->ProjectionX("_px", nBins, nBins);
   hPrU->GetYaxis()->SetTitle(h2U->GetZaxis()->GetTitle());
   hPrD->GetYaxis()->SetTitle(h2D->GetZaxis()->GetTitle());
 
diff --git a/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQa.cxx b/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQa.cxx
index 85c386d6ee6ff90063a5d3ff212460d77d67fbc8..f98836b725bdaabfd62f3121330f2cb58d76477f 100644
--- a/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQa.cxx
+++ b/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQa.cxx
@@ -61,19 +61,19 @@ CbmLitFieldApproximationQa::CbmLitFieldApproximationQa()
   , fZSlicePosition()
   , fXSlicePosition()
   , fYSlicePosition()
-  , fFixedBounds(true)
+  , fOutputDir("./field/")
   , fAcceptanceAngleX(25.)
   , fAcceptanceAngleY(25.)
   , fNofBinsX(30)
   , fNofBinsY(30)
   , fUseEllipseAcc(true)
-  , fOutputDir("./field/")
-  , fFitter()
-  , fGridCreator()
   , fPolynomDegreeIndex(1)
   , fNofPolynoms(4)
   , fPolynomDegrees()
+  , fFitter()
+  , fGridCreator()
   , fHM(NULL)
+  , fFixedBounds(true)
 {
 }
 
@@ -133,7 +133,7 @@ InitStatus CbmLitFieldApproximationQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitFieldApproximationQa::Exec(Option_t* opt) {}
+void CbmLitFieldApproximationQa::Exec(Option_t*) {}
 
 void CbmLitFieldApproximationQa::Finish() {}
 
@@ -164,8 +164,8 @@ void CbmLitFieldApproximationQa::CreateFitterHistos()
 {
   string names[] = {"Bx", "By", "Bz", "Mod"};
 
-  Int_t nofBinsX       = fNofBinsX;
-  Int_t nofBinsY       = fNofBinsY;
+  //Int_t nofBinsX       = fNofBinsX;
+  //Int_t nofBinsY       = fNofBinsY;
   Int_t nofBinsErrB    = 100;
   Int_t nofBinsRelErrB = 100;
   Int_t nofBinsErrX    = 100;
@@ -186,7 +186,7 @@ void CbmLitFieldApproximationQa::CreateFitterHistos()
   // Create histograms
   for (Int_t v = 0; v < 4; v++) {
     for (Int_t i = 0; i < fNofSlices; i++) {
-      for (Int_t j = 0; j < fNofPolynoms; j++) {
+      for (UInt_t j = 0; j < fNofPolynoms; j++) {
         TGraph2D* graph = new TGraph2D();
         string name     = "hfa_" + names[v] + "Apr_Graph2D" + "_" + ToString<Int_t>(fZSlicePosition[i]) + "_"
                       + ToString<Int_t>(fPolynomDegrees[j]);
@@ -227,8 +227,8 @@ void CbmLitFieldApproximationQa::CreateGridHistos()
 {
   string names[] = {"Bx", "By", "Bz", "Mod"};
 
-  Int_t nofBinsX       = fNofBinsX;
-  Int_t nofBinsY       = fNofBinsY;
+  //Int_t nofBinsX       = fNofBinsX;
+  //Int_t nofBinsY       = fNofBinsY;
   Int_t nofBinsErrB    = 100;
   Int_t nofBinsRelErrB = 100;
   Int_t nofBinsErrX    = 100;
@@ -282,7 +282,7 @@ void CbmLitFieldApproximationQa::CreateGridHistos()
 void CbmLitFieldApproximationQa::FillBHistos()
 {
   // Fill graphs for magnetic field for each (X, Y) slice
-  for (UInt_t iSlice = 0; iSlice < fNofSlices; iSlice++) {  // loop over slices
+  for (Int_t iSlice = 0; iSlice < fNofSlices; iSlice++) {  // loop over slices
     Double_t Z = fZSlicePosition[iSlice];
 
     Int_t cnt   = 0;
@@ -334,8 +334,8 @@ void CbmLitFieldApproximationQa::FillFieldApproximationHistos()
   }
 
   // Fill graph for approximated field map
-  for (UInt_t iSlice = 0; iSlice < fNofSlices; iSlice++) {  // Loop over slices
-    Double_t Z = fZSlicePosition[iSlice];
+  for (Int_t iSlice = 0; iSlice < fNofSlices; iSlice++) {  // Loop over slices
+    //Double_t Z = fZSlicePosition[iSlice];
     Int_t cnt  = 0;
 
     Double_t HX = 2 * fXSlicePosition[iSlice] / fNofBinsX;  // Step size for X position
@@ -350,7 +350,7 @@ void CbmLitFieldApproximationQa::FillFieldApproximationHistos()
                       + (Y * Y) / (fYSlicePosition[iSlice] * fYSlicePosition[iSlice]);
         if (fUseEllipseAcc && el > 1.) { continue; }
 
-        for (Int_t p = 0; p < fNofPolynoms; p++) {
+        for (UInt_t p = 0; p < fNofPolynoms; p++) {
           LitFieldValueScal v;
           slices[p][iSlice].GetFieldValue(X, Y, v);
           Double_t mod = sqrt(v.Bx * v.Bx + v.By * v.By + v.Bz * v.Bz);
@@ -389,7 +389,7 @@ void CbmLitFieldApproximationQa::FillFieldApproximationHistos()
 
         Double_t Bmod = sqrt(B[0] * B[0] + B[1] * B[1] + B[2] * B[2]);
 
-        for (Int_t p = 0; p < fNofPolynoms; p++) {
+        for (UInt_t p = 0; p < fNofPolynoms; p++) {
           LitFieldValueScal v;
           slices[p][iSlice].GetFieldValue(X, Y, v);
           Double_t mod = sqrt(v.Bx * v.Bx + v.By * v.By + v.Bz * v.Bz);
@@ -437,7 +437,7 @@ void CbmLitFieldApproximationQa::FillGridCreatorHistos()
   // Fill graph
   for (Int_t iSlice = 0; iSlice < fNofSlices; iSlice++) {
     Int_t cnt   = 0;
-    Double_t Z  = fZSlicePosition[iSlice];
+    //Double_t Z  = fZSlicePosition[iSlice];
     Double_t HX = 2 * fXSlicePosition[iSlice] / fNofBinsX;  // step size for X position
     Double_t HY = 2 * fYSlicePosition[iSlice] / fNofBinsY;  // step size for Y position
     for (Int_t iX = 0; iX < fNofBinsX; iX++) {              // loop over x position
diff --git a/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQaReport.cxx b/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQaReport.cxx
index bc4dbff5a9732a348b3b88a1a861cf020217a894..250dad29d413c70633373bccad7569b114c15e3e 100644
--- a/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQaReport.cxx
+++ b/reco/littrack/cbm/qa/fieldapr/CbmLitFieldApproximationQaReport.cxx
@@ -122,7 +122,7 @@ void CbmLitFieldApproximationQaReport::Draw()
 void CbmLitFieldApproximationQaReport::DrawSlices(const string& b, const string& m)
 {
   vector<TGraph2D*> graphs2D = HM()->G2Vector("hfa_" + b + "_Graph2D_.*");
-  for (Int_t i = 0; i < graphs2D.size(); i++) {
+  for (UInt_t i = 0; i < graphs2D.size(); i++) {
     string name       = graphs2D[i]->GetName();
     string canvasName = GetReportName() + "_slice_" + b + "_" + m + "_at_z_" + Split(name, '_')[3];
     TCanvas* canvas   = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
@@ -150,7 +150,7 @@ void CbmLitFieldApproximationQaReport::DrawSlices(const string& b, const string&
 void CbmLitFieldApproximationQaReport::DrawApr(const string& err)
 {
   vector<TGraph2D*> graphs2D = HM()->G2Vector("hfa_Bx_Graph2D_.*");
-  for (Int_t i = 0; i < graphs2D.size(); i++) {
+  for (UInt_t i = 0; i < graphs2D.size(); i++) {
     string z          = Split(graphs2D[i]->GetName(), '_')[3];
     string canvasName = GetReportName() + "_" + err + "_degree_z_" + z;
     TCanvas* canvas   = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 1000, 1000);
@@ -171,7 +171,7 @@ void CbmLitFieldApproximationQaReport::DrawApr(const string& err)
     vector<TH1*> errBy(errBx.size());
     vector<TH1*> errBz(errBx.size());
     vector<TH1*> errMod(errBx.size());
-    for (Int_t iP = 0; iP < errBx.size(); iP++) {
+    for (UInt_t iP = 0; iP < errBx.size(); iP++) {
       string name = errBx[iP]->GetName();
 
       errBy[iP]       = HM()->H1(FindAndReplace(name, "_Bx", "_By"));
diff --git a/reco/littrack/cbm/qa/fit/CbmLitFitQa.cxx b/reco/littrack/cbm/qa/fit/CbmLitFitQa.cxx
index 420ed9e64220976b26f9a63bc3b301162db74b50..88ced740983abc40d550e464d068123b14befd64 100644
--- a/reco/littrack/cbm/qa/fit/CbmLitFitQa.cxx
+++ b/reco/littrack/cbm/qa/fit/CbmLitFitQa.cxx
@@ -47,10 +47,10 @@ CbmLitFitQa::CbmLitFitQa()
   , fTrdMinNofHits(0)
   , fMuchMinNofHits(0)
   , fOutputDir("./test/")
-  , fHM(NULL)
   , fPRangeMin(0.)
   , fPRangeMax(10.)
   , fPRangeBins(20)
+  , fHM(NULL)
   , fGlobalTracks(NULL)
   , fStsTracks(NULL)
   , fStsTrackMatches(NULL)
@@ -89,7 +89,7 @@ InitStatus CbmLitFitQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitFitQa::Exec(Option_t* opt)
+void CbmLitFitQa::Exec(Option_t*)
 {
   static Int_t nofEvents = 0;
   nofEvents++;
@@ -453,8 +453,8 @@ void CbmLitFitQa::ProcessTrackMomentumAtVertex()
   for (int i = 0; i < nofTracks; ++i) {
     CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(fGlobalTracks->At(i));
     Int_t stsId                 = globalTrack->GetStsTrackIndex();
-    CbmStsTrack* stsTrack       = static_cast<CbmStsTrack*>(fStsTracks->At(stsId));
-    CbmTrackMatchNew* match     = static_cast<CbmTrackMatchNew*>(fStsTrackMatches->At(stsId));
+    //CbmStsTrack* stsTrack       = static_cast<CbmStsTrack*>(fStsTracks->At(stsId));
+    CbmTrackMatchNew* match = static_cast<CbmTrackMatchNew*>(fStsTrackMatches->At(stsId));
 
     if (match->GetNofLinks() < 1) continue;
 
diff --git a/reco/littrack/cbm/qa/fit/CbmLitFitQaReport.cxx b/reco/littrack/cbm/qa/fit/CbmLitFitQaReport.cxx
index 8f65c6ba4182c3f56c727fa5879d2959e713679c..3626969141b55353bdf358088a953a7813018c9c 100644
--- a/reco/littrack/cbm/qa/fit/CbmLitFitQaReport.cxx
+++ b/reco/littrack/cbm/qa/fit/CbmLitFitQaReport.cxx
@@ -239,7 +239,7 @@ void CbmLitFitQaReport::DrawTrackParamsAtVertex()
   Int_t nBins    = hMomres->GetNbinsX();
   TH1* momResRms = hMomres->ProjectionX();
   for (Int_t i = 1; i < nBins; i++) {
-    TH1* projY   = hMomres->ProjectionY("_py", i, i);
+    projY        = hMomres->ProjectionY("_py", i, i);
     Double_t rms = projY->GetRMS();
     momResRms->SetBinContent(i, rms);
     momResRms->SetBinError(i, momslice->GetBinError(i));
diff --git a/reco/littrack/cbm/qa/fit/CbmLitFitQaStudyReport.cxx b/reco/littrack/cbm/qa/fit/CbmLitFitQaStudyReport.cxx
index 48fcbd588d1f4277eda4242cf646697f72c17b03..f2c87201bc86fe7686e53bc6297b8dbb4548ab47 100644
--- a/reco/littrack/cbm/qa/fit/CbmLitFitQaStudyReport.cxx
+++ b/reco/littrack/cbm/qa/fit/CbmLitFitQaStudyReport.cxx
@@ -55,9 +55,9 @@ void CbmLitFitQaStudyReport::DrawTrackParamsAtVertex()
 {
   Int_t nofStudies = HM().size();
 
-  TCanvas* canvas2 = CreateCanvas("fit_study_qa_momentum_projection", "fit_study_qa_momentum_projection", 600, 600);
+  CreateCanvas("fit_study_qa_momentum_projection", "fit_study_qa_momentum_projection", 600, 600);
   vector<TH1*> histos1(nofStudies);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     histos1[iStudy] = HM()[iStudy]
                         ->H2("htf_MomRes_Mom")
                         ->ProjectionY(string("htf_MomRes_Mom_ProjectionY_" + NumberToString<Int_t>(iStudy)).c_str());
@@ -66,16 +66,15 @@ void CbmLitFitQaStudyReport::DrawTrackParamsAtVertex()
     histos1[iStudy]->SetMaximum(histos1[iStudy]->GetMaximum() * 1.25);
   }
   DrawH1(histos1, GetStudyNames(), kLinear, kLinear);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     histos1[iStudy]->GetFunction("gaus")->SetLineColor(histos1[iStudy]->GetLineColor());
   }
   gPad->SetGridx(true);
   gPad->SetGridy(true);
 
-  TCanvas* canvas3 =
-    CreateCanvas("fit_study_qa_momentum_momres_mom_sigma", "fit_study_qa_momentum_momres_mom_sigma", 600, 600);
+  CreateCanvas("fit_study_qa_momentum_momres_mom_sigma", "fit_study_qa_momentum_momres_mom_sigma", 600, 600);
   vector<TH1*> histos2(nofStudies);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     HM()[iStudy]->H2("htf_MomRes_Mom")->FitSlicesY();
     histos2[iStudy] = (TH1*) gDirectory->Get("htf_MomRes_Mom_2");
     histos2[iStudy]->SetName(string("htf_MomRes_Mom_2_" + NumberToString<Int_t>(iStudy)).c_str());
@@ -88,10 +87,9 @@ void CbmLitFitQaStudyReport::DrawTrackParamsAtVertex()
   gPad->SetGridx(true);
   gPad->SetGridy(true);
 
-  TCanvas* canvas4 =
-    CreateCanvas("fit_study_qa_momentum_momres_mom_rms", "fit_study_qa_momentum_momres_mom_rms", 600, 600);
+  CreateCanvas("fit_study_qa_momentum_momres_mom_rms", "fit_study_qa_momentum_momres_mom_rms", 600, 600);
   vector<TH1*> histos3(nofStudies);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     TH2* hMomres = HM()[iStudy]->H2("htf_MomRes_Mom");
     Int_t nBins  = hMomres->GetNbinsX();
     histos3[iStudy] =
@@ -111,9 +109,9 @@ void CbmLitFitQaStudyReport::DrawTrackParamsAtVertex()
   gPad->SetGridx(true);
   gPad->SetGridy(true);
 
-  TCanvas* canvas5 = CreateCanvas("fit_study_qa_chi_primary", "fit_study_qa_chi_primary", 600, 600);
+  CreateCanvas("fit_study_qa_chi_primary", "fit_study_qa_chi_primary", 600, 600);
   vector<TH1*> histos4(nofStudies);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     histos4[iStudy] = HM()[iStudy]->H1("htf_ChiPrimary");
     histos4[iStudy]->Scale(1. / histos4[iStudy]->Integral());
   }
diff --git a/reco/littrack/cbm/qa/mc/CbmLitMCTrackCreator.cxx b/reco/littrack/cbm/qa/mc/CbmLitMCTrackCreator.cxx
index 06c3f5c0caeddda7cd8d70a0baafc8253e3edc9b..212668dd82c00a651df481c26d13844714f0c175 100644
--- a/reco/littrack/cbm/qa/mc/CbmLitMCTrackCreator.cxx
+++ b/reco/littrack/cbm/qa/mc/CbmLitMCTrackCreator.cxx
@@ -97,7 +97,6 @@ void CbmLitMCTrackCreator::Create(Int_t eventNum)
   AddRingParameters(eventNum);
 
   std::map<std::pair<Int_t, Int_t>, CbmLitMCTrack>::iterator it;
-  int counter = 0;
   for (it = fLitMCTracks.begin(); it != fLitMCTracks.end(); it++) {
     it->second.CalculateNofConsecutivePoints();
   }
@@ -186,7 +185,7 @@ void CbmLitMCTrackCreator::AddRichHits(Int_t iEvent)
     if (NULL == hit) continue;
     vector<pair<Int_t, Int_t>> motherIds =
       CbmMatchRecoToMC::GetMcTrackMotherIdsForRichHit(fDigiMan, hit, fRichPoints, fMCTracks, iEvent);
-    for (Int_t i = 0; i < motherIds.size(); i++) {
+    for (UInt_t i = 0; i < motherIds.size(); i++) {
       nofHitsInRing[motherIds[i]]++;
     }
   }
@@ -224,7 +223,6 @@ void CbmLitMCTrackCreator::AddRingParameters(Int_t iEvent)
 
 
   map<pair<Int_t, Int_t>, CbmRichRingLight>::const_iterator it;
-  int i = 0;
   for (it = mapRings.begin(); it != mapRings.end(); it++) {
     CbmRichRingLight ring(it->second);
     fTauFit->DoFit(&ring);  //fLitMCTracks[it->first].SetNofRichHits(it->second);
diff --git a/reco/littrack/cbm/qa/radlength/CbmLitRadLengthGenerator.cxx b/reco/littrack/cbm/qa/radlength/CbmLitRadLengthGenerator.cxx
index b62d1bfa7172bc5b8d657b38845e9ebfd0035d8e..0b495bd983db36e4f2f691264e0c99f51dcbe614 100644
--- a/reco/littrack/cbm/qa/radlength/CbmLitRadLengthGenerator.cxx
+++ b/reco/littrack/cbm/qa/radlength/CbmLitRadLengthGenerator.cxx
@@ -12,7 +12,7 @@ Bool_t CbmLitRadLengthGenerator::Init() { return kTRUE; }
 
 Bool_t CbmLitRadLengthGenerator::ReadEvent(FairPrimaryGenerator* primGen)
 {
-  static Int_t eventNo = 0;
+  static UInt_t eventNo = 0;
 
   if (eventNo < fX.size() && eventNo < fY.size()) { primGen->AddTrack(0, 0, 0, 1, fX[eventNo], fY[eventNo], 0); }
   else {
diff --git a/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQa.cxx b/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQa.cxx
index ab193da181a3a5126eced33e32787c6f08a71418..b967283ab7e7bdc623a892d581a73bb7298a83e7 100644
--- a/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQa.cxx
+++ b/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQa.cxx
@@ -60,7 +60,7 @@ InitStatus CbmLitRadLengthQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitRadLengthQa::Exec(Option_t* opt)
+void CbmLitRadLengthQa::Exec(Option_t*)
 {
   static Int_t eventNo = 0;
   eventNo++;
@@ -198,7 +198,7 @@ void CbmLitRadLengthQa::ExecDetector(const string& pathPattern, const string& de
   map<Int_t, Double_t> thicknessOnTrack;         // track ID -> sum of track lengthens on track
   map<Int_t, Double_t> thicknessSiliconOnTrack;  // track ID -> sum of track lengthens on track in silicon equivalent
 
-  Double_t x, y;
+  Double_t x = 0., y = 0.;
   Double_t r2max = std::numeric_limits<Double_t>::min();
   for (Int_t iRL = 0; iRL < fRadLen->GetEntriesFast(); iRL++) {
     FairRadLenPoint* point = (FairRadLenPoint*) fRadLen->At(iRL);
@@ -210,10 +210,10 @@ void CbmLitRadLengthQa::ExecDetector(const string& pathPattern, const string& de
     //x = middle.X();
     //y = middle.Y();
 
-    TGeoNode* nodeOut = gGeoManager->FindNode(posOut.X(), posOut.Y(), posOut.Z());
-    Bool_t isOutside  = gGeoManager->IsOutside();
-    TGeoNode* node    = gGeoManager->FindNode(middle.X(), middle.Y(), middle.Z());
-    TString path      = gGeoManager->GetPath();
+    /* TGeoNode* nodeOut = */ gGeoManager->FindNode(posOut.X(), posOut.Y(), posOut.Z());
+    Bool_t isOutside = gGeoManager->IsOutside();
+    /* TGeoNode* node = */ gGeoManager->FindNode(middle.X(), middle.Y(), middle.Z());
+    TString path = gGeoManager->GetPath();
     if (!isOutside && path.Contains(TRegexp(pathPattern.c_str()))) {
       Double_t r2 = posOut.X() * posOut.X() + posOut.Y() * posOut.Y();
       if (r2 > r2max) {
@@ -271,7 +271,7 @@ void CbmLitRadLengthQa::ExecDetector(const string& detName, Int_t (*getStationId
   for (Int_t iRL = 0; iRL < fRadLen->GetEntriesFast(); iRL++) {
     FairRadLenPoint* point = (FairRadLenPoint*) fRadLen->At(iRL);
     Int_t trackId          = point->GetTrackID();
-    Int_t detId            = point->GetDetectorID();
+    //Int_t detId            = point->GetDetectorID();
 
     TVector3 pos    = point->GetPosition();
     TVector3 posOut = point->GetPositionOut();
@@ -280,7 +280,7 @@ void CbmLitRadLengthQa::ExecDetector(const string& detName, Int_t (*getStationId
     //x = posOut.X();
     //y = posOut.Y();
 
-    TGeoNode* node  = gGeoManager->FindNode(middle.X(), middle.Y(), middle.Z());
+    /* TGeoNode* node  = */ gGeoManager->FindNode(middle.X(), middle.Y(), middle.Z());
     TString path    = gGeoManager->GetPath();
     Int_t stationId = getStationId(path);
 
@@ -327,7 +327,7 @@ void CbmLitRadLengthQa::FillHistosDetector(const map<Int_t, map<Int_t, Double_t>
   }
 }
 
-Int_t CbmLitRadLengthQa::GetMvdStationId(const TString& nodePath)
+Int_t CbmLitRadLengthQa::GetMvdStationId(const TString& /*nodePath*/)
 {
   std::cout << "-W- CbmLitRadLengthQa::GetMvdStationId: function not implemented\n";
   return 0;
@@ -410,8 +410,8 @@ void CbmLitRadLengthQa::SaveDetectorMaterialBudgetToFile(const string& detName)
     (*it)->Write();
   }
   if (detName == "Much") {
-    vector<TH1*> histos = fHM->H1Vector("hrl_ThicknessSilicon_MuchAbsorber_.+_P2");
-    for (vector<TH1*>::const_iterator it = histos.begin(); it != histos.end(); it++) {
+    vector<TH1*> histos1 = fHM->H1Vector("hrl_ThicknessSilicon_MuchAbsorber_.+_P2");
+    for (vector<TH1*>::const_iterator it = histos1.begin(); it != histos1.end(); it++) {
       (*it)->Write();
     }
   }
diff --git a/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQaReport.cxx b/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQaReport.cxx
index f0088be55526e955236ac98dbd5f6fd0b40c2ac6..99241101a8b4259beeb1145ffa9789a67152a8a6 100644
--- a/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQaReport.cxx
+++ b/reco/littrack/cbm/qa/radlength/CbmLitRadLengthQaReport.cxx
@@ -52,45 +52,45 @@ void CbmLitRadLengthQaReport::Draw()
 void CbmLitRadLengthQaReport::DrawDetector(const string& detName)
 {
   if (HM()->Exists("hrl_Thickness_" + detName + "_H1")) {
-    TCanvas* canvas1 = CreateCanvas(string("hrl_Thickness_" + detName + "_H1").c_str(),
-                                    string("hrl_Thickness_" + detName + "_H1").c_str(), 1200, 1000);
+    CreateCanvas(string("hrl_Thickness_" + detName + "_H1").c_str(), string("hrl_Thickness_" + detName + "_H1").c_str(),
+                 1200, 1000);
     DrawH1(HM()->H1("hrl_Thickness_" + detName + "_H1"));
   }
 
   if (HM()->Exists("hrl_Thickness_" + detName + "_P2")) {
-    TCanvas* canvas2 = CreateCanvas(string("hrl_Thickness_" + detName + "_P2").c_str(),
-                                    string("hrl_Thickness_" + detName + "_P2").c_str(), 1200, 1000);
+    CreateCanvas(string("hrl_Thickness_" + detName + "_P2").c_str(), string("hrl_Thickness_" + detName + "_P2").c_str(),
+                 1200, 1000);
     DrawH2(HM()->P2("hrl_Thickness_" + detName + "_P2"));
   }
 
   if (HM()->Exists("hrl_RadThickness_" + detName + "_H1")) {
-    TCanvas* canvas3 = CreateCanvas(string("hrl_RadThickness_" + detName + "_H1").c_str(),
-                                    string("hrl_RadThickness_" + detName + "_H1").c_str(), 1200, 1000);
+    CreateCanvas(string("hrl_RadThickness_" + detName + "_H1").c_str(),
+                 string("hrl_RadThickness_" + detName + "_H1").c_str(), 1200, 1000);
     DrawH1(HM()->H1("hrl_RadThickness_" + detName + "_H1"));
   }
 
   if (HM()->Exists("hrl_RadThickness_" + detName + "_P2")) {
-    TCanvas* canvas4 = CreateCanvas(string("hrl_RadThickness_" + detName + "_P2").c_str(),
-                                    string("hrl_RadThickness_" + detName + "_P2").c_str(), 1200, 1000);
+    CreateCanvas(string("hrl_RadThickness_" + detName + "_P2").c_str(),
+                 string("hrl_RadThickness_" + detName + "_P2").c_str(), 1200, 1000);
     DrawH2(HM()->P2("hrl_RadThickness_" + detName + "_P2"));
 
 
-    TCanvas* canvas4_2 = CreateCanvas(string("hrl_RadThickness_" + detName + "_P2_zoom").c_str(),
-                                      string("hrl_RadThickness_" + detName + "_P2_zoom").c_str(), 1200, 1000);
-    TProfile2D* pr     = (TProfile2D*) HM()->P2("hrl_RadThickness_" + detName + "_P2")->Clone();
+    CreateCanvas(string("hrl_RadThickness_" + detName + "_P2_zoom").c_str(),
+                 string("hrl_RadThickness_" + detName + "_P2_zoom").c_str(), 1200, 1000);
+    TProfile2D* pr = (TProfile2D*) HM()->P2("hrl_RadThickness_" + detName + "_P2")->Clone();
     pr->GetZaxis()->SetRangeUser(0, 100);
     DrawH2(pr);
   }
 
   if (HM()->Exists("hrl_ThicknessSilicon_" + detName + "_H1")) {
-    TCanvas* canvas5 = CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(),
-                                    string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(), 1200, 1000);
+    CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(),
+                 string("hrl_ThicknessSilicon_" + detName + "_H1").c_str(), 1200, 1000);
     DrawH1(HM()->H1("hrl_ThicknessSilicon_" + detName + "_H1"));
   }
 
   if (HM()->Exists("hrl_ThicknessSilicon_" + detName + "_P2")) {
-    TCanvas* canvas6 = CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(),
-                                    string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(), 1200, 1000);
+    CreateCanvas(string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(),
+                 string("hrl_ThicknessSilicon_" + detName + "_P2").c_str(), 1200, 1000);
     DrawH2(HM()->P2("hrl_ThicknessSilicon_" + detName + "_P2"));
   }
 }
diff --git a/reco/littrack/cbm/qa/tof/CbmLitTofQa.cxx b/reco/littrack/cbm/qa/tof/CbmLitTofQa.cxx
index d4da15c6e753feaba4efd29611d74fd4191605d9..ad38be67bad491e5fe0b86e76aecde0c5147b403 100644
--- a/reco/littrack/cbm/qa/tof/CbmLitTofQa.cxx
+++ b/reco/littrack/cbm/qa/tof/CbmLitTofQa.cxx
@@ -47,10 +47,10 @@ using std::vector;
 CbmLitTofQa::CbmLitTofQa()
   : fIsFixedBounds(true)
   , fOutputDir("./test/")
-  , fHM(NULL)
   , fPRangeMin(0.)
   , fPRangeMax(15.)
   , fPRangeBins(400)
+  , fHM(NULL)
   , fGlobalTracks(NULL)
   , fStsTracks(NULL)
   , fStsTrackMatches(NULL)
@@ -83,7 +83,7 @@ InitStatus CbmLitTofQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitTofQa::Exec(Option_t* opt)
+void CbmLitTofQa::Exec(Option_t* /*opt*/)
 {
   static Int_t nofEvents = 0;
   nofEvents++;
@@ -207,7 +207,7 @@ void CbmLitTofQa::ProcessMC(Int_t iEvent)
 
   Int_t nofHits = fTofHits->GetEntriesFast();
   for (Int_t iHit = 0; iHit < nofHits; iHit++) {
-    const CbmTofHit* tofHit = static_cast<const CbmTofHit*>(fTofHits->At(iHit));
+    //const CbmTofHit* tofHit = static_cast<const CbmTofHit*>(fTofHits->At(iHit));
     CbmMatch* tofHitMatch   = static_cast<CbmMatch*>(fTofHitsMatches->At(iHit));
     if (tofHitMatch == NULL) { continue; }
     Int_t tofPointIndex         = tofHitMatch->GetMatchedLink().GetIndex();
@@ -262,7 +262,7 @@ void CbmLitTofQa::ProcessGlobalTracks()
     //      Double_t ctCorrection = -0.007;
     Double_t ctCorrection = 0.0;
     Double_t ctReco       = 0.299792458 * tofHit->GetTime() + ctCorrection;  // ToF time in ns -> transfrom to ct in m
-    Double_t ctMC         = 0.299792458 * tofPoint->GetTime();               // mc time in ns -> transfrom to ct in m
+    //Double_t ctMC         = 0.299792458 * tofPoint->GetTime();               // mc time in ns -> transfrom to ct in m
     Double_t trackLengthReco = globalTrack->GetLength() / 100.;              //global length
     // Double_t trackLengthMC = tofPoint->GetLength() / 100.; //mc length
     Double_t preco     = (vtxTrack.GetQp() != 0) ? std::abs(1. / vtxTrack.GetQp()) : 0;
@@ -322,7 +322,7 @@ void CbmLitTofQa::ProcessTofHits()
     Int_t tofMCPointId          = tofHitMatch->GetMatchedLink().GetIndex();
     Int_t tofMCEventId          = tofHitMatch->GetMatchedLink().GetEntry();
     const CbmTofPoint* tofPoint = static_cast<const CbmTofPoint*>(fTofPoints->Get(0, tofMCEventId, tofMCPointId));
-    Int_t tofMCTrackId          = tofPoint->GetTrackID();
+    //Int_t tofMCTrackId          = tofPoint->GetTrackID();
 
     fHM->H1("hmp_Tof_dTime")->Fill(1000 * (tofPoint->GetTime() - tofHit->GetTime()));
   }
diff --git a/reco/littrack/cbm/qa/tracking/CbmLitTrackingQa.cxx b/reco/littrack/cbm/qa/tracking/CbmLitTrackingQa.cxx
index 3b76658f1e99cecc13bb957bb318fb272ef688c8..88f7c53653abe953116ac2aa6fc1631e88161f9c 100644
--- a/reco/littrack/cbm/qa/tracking/CbmLitTrackingQa.cxx
+++ b/reco/littrack/cbm/qa/tracking/CbmLitTrackingQa.cxx
@@ -60,26 +60,25 @@ CbmLitTrackingQa::CbmLitTrackingQa()
   ,  // SIS100
   fMinNofPointsMuch(10)
   , fMinNofPointsTof(1)
-  , fMinNofHitsRich(7)
   , fQuota(0.7)
+  , fUseConsecutivePointsInSts(true)
+  , fMinNofHitsRich(7)
   , fQuotaRich(0.6)
   , fMinNofHitsTrd(2)
   ,  // SIS100
   fMinNofHitsMuch(10)
-  , fUseConsecutivePointsInSts(true)
   , fPRangeMin(0.)
   , fPRangeMax(10.)
   , fPRangeBins(20.)
-  , fYRangeMin(0.)
-  , fYRangeMax(4.)
-  , fYRangeBins(16)
   , fPtRangeMin(0.)
   , fPtRangeMax(3.)
   , fPtRangeBins(12.)
+  , fYRangeMin(0.)
+  , fYRangeMax(4.)
+  , fYRangeBins(16)
   , fAngleRangeMin(0.)
   , fAngleRangeMax(25.)
   , fAngleRangeBins(10)
-  , fMcToRecoMap()
   , fMCTracks(NULL)
   , fGlobalTracks(NULL)
   , fMvdPoints(NULL)
@@ -93,8 +92,9 @@ CbmLitTrackingQa::CbmLitTrackingQa()
   , fTrdMatches(NULL)
   , fTofPoints(NULL)
   , fTofMatches(NULL)
-  , fRichAnnCut(0.25)
+  , fMcToRecoMap()
   , fTrdAnnCut(0.85)
+  , fRichAnnCut(0.25)
 {
 }
 
@@ -130,7 +130,7 @@ InitStatus CbmLitTrackingQa::Init()
 
   fMcToRecoMap.clear();
   vector<string> trackVariants = GlobalTrackVariants();
-  for (Int_t i = 0; i < trackVariants.size(); i++) {
+  for (UInt_t i = 0; i < trackVariants.size(); i++) {
     fMcToRecoMap.insert(make_pair(trackVariants[i], multimap<pair<Int_t, Int_t>, Int_t>()));
   }
 
@@ -140,7 +140,7 @@ InitStatus CbmLitTrackingQa::Init()
   return kSUCCESS;
 }
 
-void CbmLitTrackingQa::Exec(Option_t* opt)
+void CbmLitTrackingQa::Exec(Option_t* /*opt*/)
 {
   // Increase event counter
   fHM->H1("hen_EventNo_TrackingQa")->Fill(0.5);
@@ -306,7 +306,7 @@ void CbmLitTrackingQa::CreateH1Efficiency(const string& name, const string& para
                          : (opt == "track_pid") ? fTrackCategoriesPID
                                                 : fRingCategoriesPID;
 
-  for (Int_t iCat = 0; iCat < cat.size(); iCat++) {
+  for (UInt_t iCat = 0; iCat < cat.size(); iCat++) {
     for (Int_t iType = 0; iType < 3; iType++) {
       string yTitle    = (types[iType] == "Eff") ? "Efficiency [%]" : "Counter";
       string histName  = name + "_" + cat[iCat] + "_" + types[iType] + "_" + parameter;
@@ -327,7 +327,7 @@ void CbmLitTrackingQa::CreateH2Efficiency(const string& name, const string& para
                          : (opt == "track_pid") ? fTrackCategoriesPID
                                                 : fRingCategoriesPID;
 
-  for (Int_t iCat = 0; iCat < cat.size(); iCat++) {
+  for (UInt_t iCat = 0; iCat < cat.size(); iCat++) {
     for (Int_t iType = 0; iType < 3; iType++) {
       string zTitle    = (types[iType] == "Eff") ? "Efficiency [%]" : "Counter";
       string histName  = name + "_" + cat[iCat] + "_" + types[iType] + "_" + parameter;
@@ -342,7 +342,7 @@ void CbmLitTrackingQa::CreateH1PionSuppression(const string& name, const string&
                                                Int_t nofBins, Double_t minBin, Double_t maxBin)
 {
   vector<string> types = list_of("RecPions")("Rec")("PionSup");
-  for (Int_t iCat = 0; iCat < fPiSuppCategories.size(); iCat++) {
+  for (UInt_t iCat = 0; iCat < fPiSuppCategories.size(); iCat++) {
     for (Int_t iType = 0; iType < 3; iType++) {
       string yTitle    = (types[iType] == "PionSup") ? "Pion suppression" : "Counter";
       string histName  = name + "_" + fPiSuppCategories[iCat] + "_" + types[iType] + "_" + parameter;
@@ -438,7 +438,7 @@ vector<string> CbmLitTrackingQa::GlobalTrackVariants()
   if (fDet.GetDet(ECbmModuleId::kTrd)) detectors.push_back("Trd");
   if (fDet.GetDet(ECbmModuleId::kTof)) detectors.push_back("Tof");
   string name("");
-  for (Int_t i = 0; i < detectors.size(); i++) {
+  for (UInt_t i = 0; i < detectors.size(); i++) {
     name += detectors[i];
     trackVariants.insert(name);
   }
@@ -451,7 +451,7 @@ vector<string> CbmLitTrackingQa::GlobalTrackVariants()
     if (fDet.GetDet(ECbmModuleId::kTrd)) detectors.push_back("Trd");
     if (fDet.GetDet(ECbmModuleId::kTof)) detectors.push_back("Tof");
     name = "";
-    for (Int_t i = 0; i < detectors.size(); i++) {
+    for (UInt_t i = 0; i < detectors.size(); i++) {
       name += detectors[i];
       trackVariants.insert(name);
     }
@@ -471,7 +471,7 @@ vector<string> CbmLitTrackingQa::PionSuppressionVariants()
   if (fDet.GetDet(ECbmModuleId::kTrd)) detectors.push_back("Trd");
   if (fDet.GetDet(ECbmModuleId::kTof)) detectors.push_back("Tof");
   string name("");
-  for (Int_t i = 0; i < detectors.size(); i++) {
+  for (UInt_t i = 0; i < detectors.size(); i++) {
     name += detectors[i];
     variants.insert(name);
   }
@@ -483,7 +483,7 @@ vector<string> CbmLitTrackingQa::PionSuppressionVariants()
     if (fDet.GetDet(ECbmModuleId::kTrd)) detectors.push_back("Trd");
     if (fDet.GetDet(ECbmModuleId::kTof)) detectors.push_back("Tof");
     name = "";
-    for (Int_t i = 0; i < detectors.size(); i++) {
+    for (UInt_t i = 0; i < detectors.size(); i++) {
       name += detectors[i];
       variants.insert(name);
     }
@@ -502,7 +502,7 @@ string CbmLitTrackingQa::LocalEfficiencyNormalization(const string& detName)
   if (fDet.GetDet(ECbmModuleId::kTrd)) detectors.push_back("Trd");
   if (fDet.GetDet(ECbmModuleId::kTof)) detectors.push_back("Tof");
   string name("");
-  for (Int_t i = 0; i < detectors.size(); i++) {
+  for (UInt_t i = 0; i < detectors.size(); i++) {
     name += detectors[i];
     if (detectors[i] == detName) break;
   }
@@ -582,7 +582,7 @@ void CbmLitTrackingQa::CreateHistograms()
 
   // Global efficiency histograms
   vector<string> histoNames = CreateGlobalTrackingHistogramNames();
-  for (Int_t iHist = 0; iHist < histoNames.size(); iHist++) {
+  for (UInt_t iHist = 0; iHist < histoNames.size(); iHist++) {
     string name = histoNames[iHist];
     string opt  = (name.find("Rich") == string::npos) ? "track" : "ring";
     // Tracking efficiency
@@ -609,7 +609,7 @@ void CbmLitTrackingQa::CreateHistograms()
 
   // Create histograms for pion suppression calculation
   vector<string> psVariants = PionSuppressionVariants();
-  for (Int_t iHist = 0; iHist < psVariants.size(); iHist++) {
+  for (UInt_t iHist = 0; iHist < psVariants.size(); iHist++) {
     string name = "hps_" + psVariants[iHist];
     CreateH1PionSuppression(name, "p", "P [GeV/c]", fPRangeBins, fPRangeMin, fPRangeMax);
     CreateH1PionSuppression(name, "p", "P [GeV/c]", fPRangeBins, fPRangeMin, fPRangeMax);
@@ -689,8 +689,7 @@ void CbmLitTrackingQa::CreateHistograms()
 void CbmLitTrackingQa::ProcessGlobalTracks()
 {
   // Clear all maps for MC to reco matching
-  map<string, multimap<pair<Int_t, Int_t>, Int_t>>::iterator it;
-  for (it = fMcToRecoMap.begin(); it != fMcToRecoMap.end(); it++) {
+  for (auto it = fMcToRecoMap.begin(); it != fMcToRecoMap.end(); it++) {
     multimap<pair<Int_t, Int_t>, Int_t>& mcRecoMap = (*it).second;
     mcRecoMap.clear();
     //(*it).second.clear();
@@ -723,7 +722,7 @@ void CbmLitTrackingQa::ProcessGlobalTracks()
     if (isRichOk) rtDistance = CbmRichUtil::GetRingTrackDistance(iTrack);
 
     // check the quality of track segments
-    const CbmTrackMatchNew* stsTrackMatch;
+    const CbmTrackMatchNew* stsTrackMatch = nullptr;
     if (isStsOk) {
       stsTrackMatch = static_cast<const CbmTrackMatchNew*>(fStsMatches->At(stsId));
       isStsOk       = stsTrackMatch->GetTrueOverAllHitsRatio() >= fQuota;
@@ -745,7 +744,7 @@ void CbmLitTrackingQa::ProcessGlobalTracks()
         ProcessMvd(stsId);
       }
     }
-    const CbmTrackMatchNew* trdTrackMatch;
+    const CbmTrackMatchNew* trdTrackMatch = nullptr;
     if (isTrdOk) {
       trdTrackMatch = static_cast<const CbmTrackMatchNew*>(fTrdMatches->At(trdId));
       Int_t nofHits = trdTrackMatch->GetNofHits();
@@ -775,7 +774,7 @@ void CbmLitTrackingQa::ProcessGlobalTracks()
         isMuchOk = false;
       }
     }
-    const CbmTrackMatchNew* richRingMatch;
+    const CbmTrackMatchNew* richRingMatch = nullptr;
     if (isRichOk) {
       richRingMatch = static_cast<const CbmTrackMatchNew*>(fRichRingMatches->At(richId));
       Int_t nofHits = richRingMatch->GetNofHits();
@@ -826,8 +825,7 @@ void CbmLitTrackingQa::ProcessGlobalTracks()
       richMCId = {richRingMatch->GetMatchedLink().GetEntry(), richRingMatch->GetMatchedLink().GetIndex()};
     }
 
-    map<string, multimap<pair<Int_t, Int_t>, Int_t>>::iterator it;
-    for (it = fMcToRecoMap.begin(); it != fMcToRecoMap.end(); it++) {
+    for (auto it = fMcToRecoMap.begin(); it != fMcToRecoMap.end(); it++) {
       string name                                    = (*it).first;
       multimap<pair<Int_t, Int_t>, Int_t>& mcRecoMap = (*it).second;
       Bool_t sts  = (name.find("Sts") != string::npos) ? isStsOk && stsMCId.second != -1 : true;
@@ -918,8 +916,8 @@ void CbmLitTrackingQa::ProcessMcTracks(Int_t iEvent)
   vector<TH1*> effHistos = fHM->H1Vector("(hte|hpe)_.*_Eff_.*");
   Int_t nofEffHistos     = effHistos.size();
 
-  Int_t nofMcTracks       = fMCTracks->Size(0, iEvent);
-  Int_t nofExistsMcTracks = 0;
+  Int_t nofMcTracks = fMCTracks->Size(0, iEvent);
+  //Int_t nofExistsMcTracks = 0;
   for (Int_t iMCTrack = 0; iMCTrack < nofMcTracks; ++iMCTrack) {
     const CbmMCTrack* mcTrack = static_cast<const CbmMCTrack*>(fMCTracks->Get(0, iEvent, iMCTrack));
 
@@ -1006,12 +1004,12 @@ void CbmLitTrackingQa::ProcessMcTracks(Int_t iEvent)
 
       vector<Double_t> par = list_of(0);
       if (parName == "Np") {
-        vector<Double_t> tmp = list_of((effName == "Sts")    ? nofPointsSts
-                                       : (effName == "Trd")  ? nofPointsTrd
-                                       : (effName == "Much") ? nofPointsMuch
-                                       : (effName == "Tof")  ? nofPointsTof
-                                                             : 0);
-        par                  = tmp;
+        vector<Double_t> tmp9 = list_of((effName == "Sts")    ? nofPointsSts
+                                        : (effName == "Trd")  ? nofPointsTrd
+                                        : (effName == "Much") ? nofPointsMuch
+                                        : (effName == "Tof")  ? nofPointsTof
+                                                              : 0);
+        par                   = tmp9;
       }
       else {
         par = parMap[parName];
diff --git a/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaReport.cxx b/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaReport.cxx
index f2c455e989e5c78e80572f791cf167251826e3f3..7dbe072fb7f0b2cd5cf9cddaf92d0f67e876924d 100644
--- a/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaReport.cxx
+++ b/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaReport.cxx
@@ -307,8 +307,7 @@ void CbmLitTrackingQaReport::DrawEfficiencyHistos()
 
   // Draw ghost RICH rings vs position on photodetector plane
   if (HM()->Exists("hng_NofGhosts_Rich_RingXcYc")) {
-    TCanvas* canvas =
-      CreateCanvas("tracking_qa_hng_NofGhosts_Rich_RingXcYc", "tracking_qa_hng_NofGhosts_Rich_RingXcYc", 800, 800);
+    CreateCanvas("tracking_qa_hng_NofGhosts_Rich_RingXcYc", "tracking_qa_hng_NofGhosts_Rich_RingXcYc", 800, 800);
     Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
     HM()->H2("hng_NofGhosts_Rich_RingXcYc")->Scale(1. / nofEvents);
     DrawH2(HM()->H2("hng_NofGhosts_Rich_RingXcYc"));
@@ -328,7 +327,7 @@ void CbmLitTrackingQaReport::DrawEfficiency(const string& canvasName, const stri
   Int_t nofHistos = histos.size();
   vector<string> labels(nofHistos);
   vector<Double_t> efficiencies(nofHistos);
-  for (UInt_t iHist = 0; iHist < nofHistos; iHist++) {
+  for (Int_t iHist = 0; iHist < nofHistos; iHist++) {
     string name         = histos[iHist]->GetName();
     efficiencies[iHist] = CalcEfficiency(HM()->H1(FindAndReplace(name, "_Eff_", "_Rec_")),
                                          HM()->H1(FindAndReplace(name, "_Eff_", "_Acc_")), 100.);
@@ -352,7 +351,7 @@ void CbmLitTrackingQaReport::DrawPionSuppression(const string& canvasName, const
   Int_t nofHistos = histos.size();
   vector<string> labels(nofHistos);
   vector<Double_t> ps(nofHistos);
-  for (UInt_t iHist = 0; iHist < nofHistos; iHist++) {
+  for (Int_t iHist = 0; iHist < nofHistos; iHist++) {
     string name   = histos[iHist]->GetName();
     ps[iHist]     = CalcEfficiency(HM()->H1(FindAndReplace(name, "_PionSup_", "_RecPions_")),
                                HM()->H1(FindAndReplace(name, "_PionSup_", "_Rec_")), 1.);
@@ -370,7 +369,7 @@ void CbmLitTrackingQaReport::DrawMeanEfficiencyLines(const vector<TH1*>& histos,
   Double_t minX   = histos[0]->GetXaxis()->GetXmin();
   Double_t maxX   = histos[0]->GetXaxis()->GetXmax();
   Int_t nofHistos = histos.size();
-  for (UInt_t iHist = 0; iHist < nofHistos; iHist++) {
+  for (Int_t iHist = 0; iHist < nofHistos; iHist++) {
     TLine* line = new TLine(minX, efficiencies[iHist], maxX, efficiencies[iHist]);
     line->SetLineWidth(1);
     line->SetLineColor(histos[iHist]->GetLineColor());
@@ -390,7 +389,7 @@ void CbmLitTrackingQaReport::DrawAccAndRec(const string& canvasName, const strin
   Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
   Int_t nofHistos = histos.size();
   vector<string> labels(nofHistos);
-  for (UInt_t iHist = 0; iHist < nofHistos; iHist++) {
+  for (Int_t iHist = 0; iHist < nofHistos; iHist++) {
     TH1* hist = histos[iHist];
     hist->Scale(1. / nofEvents);
     string name          = hist->GetName();
@@ -428,7 +427,7 @@ void CbmLitTrackingQaReport::DrawYPt(const string& canvasName, const string& eff
   TH2* effHist = HM()->H2(effHistName);
 
   if (drawOnlyEfficiency) {
-    TCanvas* canvas = CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 800);
+    CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 800);
     //canvas->SetGrid();
     DrawH2(effHist);
   }
diff --git a/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaStudyReport.cxx b/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaStudyReport.cxx
index 51ded60891280a8670b2ece1fface52ce7f52207..d555f6ad8c6273c0cc4e7d7e950434618207b1f8 100644
--- a/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaStudyReport.cxx
+++ b/reco/littrack/cbm/qa/tracking/CbmLitTrackingQaStudyReport.cxx
@@ -98,7 +98,7 @@ string CbmLitTrackingQaStudyReport::PrintTable(const string& tableName, const st
     histos[i] = HM(i)->H1Vector(pattern);
   }
   string str = R()->TableBegin(tableName, list_of(string("")).range(GetStudyNames()));
-  for (Int_t iHist = 0; iHist < histos[0].size(); iHist++) {
+  for (UInt_t iHist = 0; iHist < histos[0].size(); iHist++) {
     string cellName = rowNameFormatter(histos[0][iHist]->GetName());
     vector<string> cells(nofStudies);
     for (Int_t i = 0; i < nofStudies; i++) {
@@ -120,7 +120,7 @@ string CbmLitTrackingQaStudyReport::PrintEfficiencyTable(const string& tableName
   }
   string str = R()->TableBegin(tableName, list_of(string("")).range(GetStudyNames()));
 
-  for (Int_t iHist = 0; iHist != histos[0].size(); iHist++) {
+  for (UInt_t iHist = 0; iHist != histos[0].size(); iHist++) {
     vector<string> split = Split(histos[0][iHist]->GetName(), '_');
     string cellName      = split[1] + "(" + split[2] + "):" + split[3];
     vector<string> cells(nofStudies);
@@ -184,7 +184,7 @@ void CbmLitTrackingQaStudyReport::DrawEfficiency(const string& canvasName, const
   vector<string> labels(nofStudies);
   vector<TH1*> histos(nofStudies);
   vector<Double_t> efficiencies(nofStudies);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     CbmHistManager* hm   = HM()[iStudy];
     histos[iStudy]       = hm->H1(histName);
     efficiencies[iStudy] = CalcEfficiency(hm->H1(FindAndReplace(histName, "_Eff_", "_Rec_")),
@@ -205,7 +205,7 @@ void CbmLitTrackingQaStudyReport::DrawAccAndRec(const string& canvasName, const
   Int_t nofStudies = HM().size();
   vector<string> labels(nofStudies);
   vector<TH1*> histos(nofStudies);
-  for (UInt_t iStudy = 0; iStudy < nofStudies; iStudy++) {
+  for (Int_t iStudy = 0; iStudy < nofStudies; iStudy++) {
     CbmHistManager* hm = HM()[iStudy];
     Int_t nofEvents    = hm->H1("hen_EventNo_TrackingQa")->GetEntries();
     histos[iStudy]     = hm->H1(histName);
@@ -234,7 +234,7 @@ void CbmLitTrackingQaStudyReport::DrawMeanEfficiencyLines(const vector<TH1*>& hi
   Double_t minX   = histos[0]->GetXaxis()->GetXmin();
   Double_t maxX   = histos[0]->GetXaxis()->GetXmax();
   Int_t nofHistos = histos.size();
-  for (UInt_t iHist = 0; iHist < nofHistos; iHist++) {
+  for (Int_t iHist = 0; iHist < nofHistos; iHist++) {
     TLine* line = new TLine(minX, efficiencies[iHist], maxX, efficiencies[iHist]);
     line->SetLineWidth(1);
     line->SetLineColor(histos[iHist]->GetLineColor());
diff --git a/sim/detectors/much/CbmMuch.cxx b/sim/detectors/much/CbmMuch.cxx
index ff06093121671da1652e02e7b6fdb14749d85db0..74e8287dbc910a51c66025ea87cfcb8e4925ee23 100644
--- a/sim/detectors/much/CbmMuch.cxx
+++ b/sim/detectors/much/CbmMuch.cxx
@@ -160,10 +160,10 @@ Bool_t CbmMuch::ProcessHits(FairVolume* vol)
       printf(" Module: %i", CbmMuchAddress::GetModuleIndex(fDetectorId));
       printf(" Vol %i \n", fVolumeID);
     }
-    Int_t iStation = CbmMuchAddress::GetStationIndex(fDetectorId);
     gMC->TrackPosition(fPosOut);
     gMC->TrackMomentum(fMomOut);
     /*
+    Int_t iStation = CbmMuchAddress::GetStationIndex(fDetectorId);
     assert(iStation >= 0 && iStation < fPar->GetNStations());
     CbmMuchStation* station = (CbmMuchStation*) fPar->GetStations()->At(iStation);
     //cout<<" track # "<<fTrackID<<"   Rmin "<<station->GetRmin()<<"   Rmax  "<<station->GetRmax()<<" in perp "<<fPosIn.Perp()<<" out perp "<<fPosOut.Perp()<<"  eloss "<<fELoss<<endl;