diff --git a/Calo/CaloTools/src/CaloCosmicsTool.cpp b/Calo/CaloTools/src/CaloCosmicsTool.cpp
index d1558daa0b686f091786ce53b357f3cf242d4fc3..5a78cd8b47acb3ae97795c7682a47d1c29b68cd4 100644
--- a/Calo/CaloTools/src/CaloCosmicsTool.cpp
+++ b/Calo/CaloTools/src/CaloCosmicsTool.cpp
@@ -67,7 +67,6 @@ StatusCode CaloCosmicsTool::initialize() {
   for ( std::vector<std::string>::iterator iseq = m_seq.begin(); iseq != m_seq.end(); ++iseq ) {
     m_slots.push_back( *iseq );
   }
-  int k = 0;
   for ( std::map<std::string, std::vector<std::string>>::iterator iasy = m_asy.begin(); m_asy.end() != iasy; iasy++ ) {
     std::vector<std::string> asy = ( *iasy ).second;
     if ( asy.size() != 2 ) {
@@ -96,7 +95,6 @@ StatusCode CaloCosmicsTool::initialize() {
       }
       if ( !isReg ) m_slots.push_back( *islot );
     }
-    k++;
   }
   if ( msgLevel( MSG::DEBUG ) ) debug() << "Requested time slots : " << m_slots << endmsg;
 
diff --git a/Calo/CaloTools/src/GammaPi0SeparationTool.cpp b/Calo/CaloTools/src/GammaPi0SeparationTool.cpp
index 5a44cb1beea6dfb8ffa5b311bff241dc8419930d..8ee809a203ea3f0d5eb078b588737c65de76a78e 100644
--- a/Calo/CaloTools/src/GammaPi0SeparationTool.cpp
+++ b/Calo/CaloTools/src/GammaPi0SeparationTool.cpp
@@ -168,7 +168,6 @@ bool GammaPi0SeparationTool::ClusterVariables( const LHCb::CaloHypo* hypo, doubl
 
   double r4      = 0.;
   area           = -1;
-  int    ncells  = 0;
   double secondE = 0.;
 
   const auto& entries = cluster->entries();
@@ -202,7 +201,6 @@ bool GammaPi0SeparationTool::ClusterVariables( const LHCb::CaloHypo* hypo, doubl
     if ( entries.size() <= 1 || rr < 1.e-10 ) { rr = 0; } // to avoid huge unphysical value due to machine precision
     r4 += weight * rr * rr;
 
-    ncells++;
   } // loop cluster cells
 
   if ( etot > 0. ) {
diff --git a/Muon/MuonID/src/component/MuonIDAlg.cpp b/Muon/MuonID/src/component/MuonIDAlg.cpp
index 7c558f3754121d467beb6a93abf6db2d10a1976f..9a1d01e9d4ab249a3d6056e3b73f1a9564f959ce 100644
--- a/Muon/MuonID/src/component/MuonIDAlg.cpp
+++ b/Muon/MuonID/src/component/MuonIDAlg.cpp
@@ -2025,7 +2025,6 @@ StatusCode MuonIDAlg::get_closest( LHCb::MuonPID* pMuid, double* closest_x, doub
   //=============================================================================
 
   double foiXDim, foiYDim;
-  int    nhits = 0;
 
   for ( int ista = 0; ista < 5; ista++ ) { // No M1 case: 5 here is OK, these arrays have dimension 5 JHL 12/Oct./2013
     closest_x[ista]      = -1;
@@ -2061,8 +2060,6 @@ StatusCode MuonIDAlg::get_closest( LHCb::MuonPID* pMuid, double* closest_x, doub
         Fdist[station] = ( ( ( x - m_trackX[station] ) / dx ) * ( ( x - m_trackX[station] ) / dx ) ) +
                          ( ( ( y - m_trackY[station] ) / dy ) * ( ( y - m_trackY[station] ) / dy ) );
 
-        nhits++;
-
         if ( Fdist[station] < small_dist[station] ) {
 
           small_dist[station]     = Fdist[station];
diff --git a/Muon/MuonInterfaces/src/Lib/MuonTrack.cpp b/Muon/MuonInterfaces/src/Lib/MuonTrack.cpp
index ca093bd54da06535f9cc515232ac204eca3fabc4..bd1df76c5f0d3634a2555e103621bc7c361453bd 100644
--- a/Muon/MuonInterfaces/src/Lib/MuonTrack.cpp
+++ b/Muon/MuonInterfaces/src/Lib/MuonTrack.cpp
@@ -244,7 +244,6 @@ double MuonTrack::sz() const {
 
 // attach Xtalk hits (by Silvia Pozzi)
 StatusCode MuonTrack::AddXTalk( const std::vector<MuonHit>& trackhits, float cut, int m_skipStation ) {
-  int nXTalk = 0;
 
   StatusCode sc = linFit();
   if ( !sc ) return StatusCode::FAILURE;
@@ -276,7 +275,6 @@ StatusCode MuonTrack::AddXTalk( const std::vector<MuonHit>& trackhits, float cut
         */
         if ( std::find( tt_hits.begin(), tt_hits.end(), &*ihT ) == tt_hits.end() ) { // avoid to fill double
           tt_hits.push_back( &*ihT );
-          nXTalk++;
         }
       }
     } else {
@@ -285,10 +283,7 @@ StatusCode MuonTrack::AddXTalk( const std::vector<MuonHit>& trackhits, float cut
           const MuonHit* hit = tk->second;
           if ( hit->station() == ihT->station() && hit->hitID() != ihT->hitID() ) {
             // avoid to fill double
-            if ( std::find( tt_hits.begin(), tt_hits.end(), &*ihT ) == tt_hits.end() ) {
-              tt_hits.push_back( &*ihT );
-              nXTalk++;
-            }
+            if ( std::find( tt_hits.begin(), tt_hits.end(), &*ihT ) == tt_hits.end() ) { tt_hits.push_back( &*ihT ); }
           }
         } // end loop over the track hits
       }   // if (deltaX < ... && deltaY<...)
diff --git a/Muon/MuonPIDChecker/src/MuonPIDChecker.cpp b/Muon/MuonPIDChecker/src/MuonPIDChecker.cpp
index e8120d5728db4bd990ca1b09c0223f7023cd1c68..a9a289d893871414cca392b40496842ad4af616e 100755
--- a/Muon/MuonPIDChecker/src/MuonPIDChecker.cpp
+++ b/Muon/MuonPIDChecker/src/MuonPIDChecker.cpp
@@ -486,12 +486,10 @@ void MuonPIDChecker::getMuonTrackInfo( const LHCb::Track& track, const LHCb::Tra
 
     // Get Track ancestors
     const LHCb::Track*                trParent  = NULL;
-    int                               nmothers  = 0;
     const SmartRefVector<LHCb::Track> Trmothers = ( *imuTrack )->ancestors();
     for ( SmartRefVector<LHCb::Track>::const_iterator imother = Trmothers.begin(); imother != Trmothers.end();
           imother++ ) {
       trParent = *imother;
-      nmothers++;
     }
     if ( trParent == NULL ) {
       Warning( "getMuonTrackInfo:: failed to get Muon Track ancestor", StatusCode::SUCCESS, 0 ).ignore();
diff --git a/Muon/MuonTrackAlign/src/AlignMuonStationRec.h b/Muon/MuonTrackAlign/src/AlignMuonStationRec.h
index 0efa833b72bdfa98bcf19467f970720dcc627e0c..c3b404d9c7d097276a3f08437f58b44701f389b9 100644
--- a/Muon/MuonTrackAlign/src/AlignMuonStationRec.h
+++ b/Muon/MuonTrackAlign/src/AlignMuonStationRec.h
@@ -60,7 +60,6 @@ public:
     if ( regionBefore == 3 ) toll = 10;
     double deltaYmin = 9999.;
     double deltaXmin = 9999.;
-    int    counter   = 0;
 
     AlignMuonPoint* candidate = NULL;
     for ( int region = 0; region < 4; region++ ) {
@@ -82,7 +81,6 @@ public:
               deltaXmin = x - itP->x();
               deltaYmin = deltaY;
               candidate = &( *itP );
-              counter++;
             } else if ( fabs( deltaY ) < fabs( ( fabs( deltaYmin ) + toll ) ) ) {
               // if(fabs(x-itP->x())<fabs(deltaXmin)-toll){
 
@@ -90,14 +88,12 @@ public:
                 deltaXmin = x - itP->x();
                 deltaYmin = deltaY;
                 candidate = ( &( *itP ) );
-                counter++;
               } else if ( fabs( fabs( deltaXmin ) - fabs( deltaX ) ) < 0.1 ) {
                 // choose on random
                 if ( ( *m_flatDistribution )() > 0.5 ) {
                   deltaXmin = x - itP->x();
                   deltaYmin = deltaY;
                   candidate = ( &( *itP ) );
-                  counter++;
                 }
               }
             }
@@ -107,7 +103,6 @@ public:
     }
 
     if ( candidate != nullptr ) {
-      int Pcounter = 0;
 
       Vec_candidate.push_back( *candidate );
       //     return;   // Uncomment if you don't want to add neighbour pads to the track
@@ -128,7 +123,6 @@ public:
                             pad_y[( itP )->tile().station()][( itP )->tile().region()] ) /
                           2. ) *
                             1.1 ) {
-            Pcounter++;
             Vec_candidate.push_back( ( *itP ) );
           }
         }
diff --git a/Rich/RichParticleSearch/src/RichParticleSearchMain.cpp b/Rich/RichParticleSearch/src/RichParticleSearchMain.cpp
index 40f0bd7c12d3adaff0f292711c2c257f6b3fe642..f34b52e129eece27a4bb7287d8e8beafec00a734 100644
--- a/Rich/RichParticleSearch/src/RichParticleSearchMain.cpp
+++ b/Rich/RichParticleSearch/src/RichParticleSearchMain.cpp
@@ -255,10 +255,9 @@ StatusCode RichParticleSearchMain::execute() {
 
       // Loop over photons to make photon Cut of maximum number of photons per track etc
       // ============================================================================================//
-      int                 PhotonCounter           = 0;
-      int                 TruePhotonCounter       = 0;
-      int                 TrueParentAndRadCounter = 0;
-      double              thetaRecSum             = 0.0;
+      int                 PhotonCounter     = 0;
+      int                 TruePhotonCounter = 0;
+      double              thetaRecSum       = 0.0;
       std::vector<double> CKTheta;
       std::vector<double> trackMass;
 
@@ -269,7 +268,6 @@ StatusCode RichParticleSearchMain::execute() {
         LHCb::RichRecPhoton* photon2 = *iPhot2;
 
         const LHCb::RichGeomPhoton& gPhoton2 = photon2->geomPhoton();
-        const LHCb::RichRecPixel*   pixel    = photon2->richRecPixel();
         // Get the local coords of the photon detection point (correted for radiator type)
 
         const double thetaRec2 = gPhoton2.CherenkovTheta();
@@ -283,15 +281,9 @@ StatusCode RichParticleSearchMain::execute() {
         // Check that photon is from track using truth information
         bool trueParent( false );
         if ( m_useMCTruth ) { trueParent = ( NULL != m_richRecMCTruth->trueCherenkovPhoton( photon2 ) ); }
-        // Check that CK is from given radiator
-        bool trueRadiator( false );
-        if ( m_useMCTruth ) { trueRadiator = ( NULL != m_richRecMCTruth->trueCherenkovRadiation( pixel, rad ) ); }
 
         // Only true if radiation is from true parent (track)
-        if ( trueParent ) {
-          TruePhotonCounter++;
-          if ( trueRadiator ) { TrueParentAndRadCounter++; }
-        }
+        if ( trueParent ) { TruePhotonCounter++; }
 
         if ( PhotonCounter > m_maxPhotons ) { break; } // END photon cut
       }                                                // end photon counter loop
@@ -415,7 +407,6 @@ StatusCode RichParticleSearchMain::execute() {
                 TrackTuple->column( "MCParticleType", MCtype ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
                 TrackTuple->column( "TruePhotonsPerTrack", TruePhotonCounter )
                     .ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
-                // TrackTuple->column( "TruePhotonsPerTrackTrueRad",TrueParentAndRadCounter);
               }
 
               if ( m_useMuonInfo ) { // If use Muon information
diff --git a/Rich/RichRecTemplateRings/src/MCTruth/RichMCTruthAcquireAlg.cpp b/Rich/RichRecTemplateRings/src/MCTruth/RichMCTruthAcquireAlg.cpp
index 63de48ed30c125b5c0020b5f48fcb75a438aa578..4ddeba8aaf74a3b0ddacd7df641cd2f9cdbb1c45 100644
--- a/Rich/RichRecTemplateRings/src/MCTruth/RichMCTruthAcquireAlg.cpp
+++ b/Rich/RichRecTemplateRings/src/MCTruth/RichMCTruthAcquireAlg.cpp
@@ -322,7 +322,6 @@ StatusCode RichMCTruthAcquireAlg::AcquireMCTruthInfo() {
   } // end loop over hits
 
   // loop over track segments
-  int aNumtk    = -1;
   int aNumMaxTk = (int)richSegments()->size();
   int n0s       = 0;
   int n1s       = 0;
@@ -391,7 +390,6 @@ StatusCode RichMCTruthAcquireAlg::AcquireMCTruthInfo() {
       double                        tkMomz = tkSeg.bestMomentum().z();
       const Rich::RadiatorType      rad    = tkSeg.radiator(); // which radiator
       if ( tkMomz > 0.0 ) {                                    // avoid tracks going backwards
-        aNumtk++;
         const LHCb::MCParticle* mcpart = m_richRecMCTruth->mcParticle( segment );
         double                  aBeta  = -100;
         double                  aGamma = -100;
@@ -417,7 +415,6 @@ StatusCode RichMCTruthAcquireAlg::AcquireMCTruthInfo() {
           //  if(rad ==  Rich::Aerogel  ) {
           //
           //             info()<<"rad mom expected true radius for various hypo elm pion muon kaon proton "
-          //                <<rad<<"   "<<aNumtk<<"   "<<pow((tkSeg.bestMomentum().Mag2()),0.5)<<"  "<<aTkPid<<"  "
           //       << segment->averageCKRadiusLocal(Rich::Electron)<<"   "
           //      <<segment->averageCKRadiusLocal(Rich::Pion)<<"   "
           //      <<segment->averageCKRadiusLocal(Rich::Muon)<<"   "
@@ -478,7 +475,6 @@ StatusCode RichMCTruthAcquireAlg::AcquireMCTruthInfo() {
           }
           rus1.push_back( aRingInfoR1g[0] );
           n1ht.push_back( aRingInfoR1g[1] );
-          // info()<<"Rich1Gas tracknum  Truerad truenumhit sumrad "<<aNumtk<<"  "<<n1s-1<<"  "<<aRingInfoR1g<<endmsg;
 
         } else if ( rad == Rich::Rich2Gas ) {
           n2s++;
@@ -493,7 +489,6 @@ StatusCode RichMCTruthAcquireAlg::AcquireMCTruthInfo() {
           rus2.push_back( aRingInfoR2g[0] );
           n2ht.push_back( aRingInfoR2g[1] );
           // info()<<"Rich2Gas track num  Truerad truenumhit sumrad "
-          //      << iSeg - richSegments()->begin() <<"  " <<aNumtk<<"   "<<(n2s-1)<<"   "<<aRingInfoR2g<<endmsg;
         }
       }
     }
diff --git a/Rich/RichRecTemplateRings/src/Utility/RichRingRecTransformTool.cpp b/Rich/RichRecTemplateRings/src/Utility/RichRingRecTransformTool.cpp
index 815f05a16caed7c20de2896278cb9dc9c0751634..e5ab6dbf4467adb0dd37884e23c36fd7e7cb5eae 100644
--- a/Rich/RichRecTemplateRings/src/Utility/RichRingRecTransformTool.cpp
+++ b/Rich/RichRecTemplateRings/src/Utility/RichRingRecTransformTool.cpp
@@ -300,7 +300,6 @@ VI RichRingRecTransformTool::getMeanPeakPolarInvA( VVD aPolVec, double aThrValue
     double aSum        = 0;
     double aWeightSumX = 0.0;
     double aWeightSumY = 0.0;
-    int    BinSum      = 0;
     //  int aNumSum=0;
     int aMeanBinx = 0;
     int aMeanBiny = 0;
@@ -311,7 +310,6 @@ VI RichRingRecTransformTool::getMeanPeakPolarInvA( VVD aPolVec, double aThrValue
           aSum += fabs( aPola[ioi] );
           aWeightSumX += fabs( aPola[ioi] ) * ixx;
           aWeightSumY += fabs( aPola[ioi] ) * iyy;
-          if ( aPola[ioi] != 0.0 ) BinSum++;
           aPola[ioi] = 0.0;
         }
       }
diff --git a/Tf/PatAlgorithms/src/FastForwardTool.cpp b/Tf/PatAlgorithms/src/FastForwardTool.cpp
index cf0229ff523fefcb1651e81a7bb4fcfa1234f10e..06c11db16535327cdf607b285989351412289838 100644
--- a/Tf/PatAlgorithms/src/FastForwardTool.cpp
+++ b/Tf/PatAlgorithms/src/FastForwardTool.cpp
@@ -387,13 +387,11 @@ StatusCode FastForwardTool::tracksFromTrack( const LHCb::Track& seed, std::vecto
     std::stable_sort( goodCandidates.begin(), goodCandidates.end(), sortQuality() );
     // loop over all candidates
     std::vector<PatFwdTrackCandidate>::iterator iall;
-    int                                         cand_count = 0;
     for ( iall = goodCandidates.begin(); goodCandidates.end() != iall; ++iall ) {
       if ( goodCandidates.size() == 1 ) {
         ( *iall ).setCand1stQuality( ( *iall ).quality() );
         ( *iall ).setCand2ndQuality( 0. );
       }
-      ++cand_count;
       if ( goodCandidates.size() > 1 ) {
         ( *iall ).setCand1stQuality( ( *iall ).quality() );
         std::vector<PatFwdTrackCandidate>::iterator iallb;
diff --git a/Tf/TfTools/src/component/OTHitCreator.cpp b/Tf/TfTools/src/component/OTHitCreator.cpp
index a31a98945e4d82e7389bb9a3c52b98b2a0d889ce..9855c44b4dec3d6cb5caed4dede1d02c47d780a6 100644
--- a/Tf/TfTools/src/component/OTHitCreator.cpp
+++ b/Tf/TfTools/src/component/OTHitCreator.cpp
@@ -142,7 +142,6 @@ namespace Tf {
     };
 
     OTDetector::OTDetector( const OTHitCreator& parent, const DeOTDetector& otdet ) : m_parent( &parent ) {
-      size_t nummodules( 0 );
       for ( const auto& station : otdet.stations() )
         for ( const auto& layer : station->layers() )
           for ( const auto& quadrant : layer->quarters() )
@@ -156,7 +155,6 @@ namespace Tf {
               }
               aregion->insert( OTModule::moduleIndexInRegion( module->elementID() ),
                                new HitCreatorGeom::OTModule( *module, m_parent->getRtRelation() ) );
-              ++nummodules;
             }
       for ( const auto& reg : regions() )
         for ( auto& mod : reg->modules() ) m_modules.push_back( mod );
diff --git a/Tf/TsaAlgorithms/src/ITGenericTracking.cpp b/Tf/TsaAlgorithms/src/ITGenericTracking.cpp
index 71a9bf7991f728e69a14a25257c932786c3135ba..93a0a67783dc37171bf6e7e6619c1a383bab75e6 100755
--- a/Tf/TsaAlgorithms/src/ITGenericTracking.cpp
+++ b/Tf/TsaAlgorithms/src/ITGenericTracking.cpp
@@ -344,7 +344,6 @@ void ITGenericTracking::selectY( const std::vector<yInfo>& hits, CandidateHits&
 
   // select the y hits. Count hits in a window around each pairs of hits
   // take pair that has highest number of hits in the window as being the correct line
-  unsigned int nCand = 0u;
   for ( auto iter1 = hits.begin(); iter1 != hits.end(); ++iter1 ) {
     if ( !allowedFirstStation( iter1->first ) ) continue;
     auto iter2 = iter1;
@@ -386,7 +385,6 @@ void ITGenericTracking::selectY( const std::vector<yInfo>& hits, CandidateHits&
       bool confirmed;
       m_confirm2 == false ? confirmed = true : confirmed = hasT2;
       if ( nWindow > m_minYHits && confirmed ) {
-        ++nCand;
         std::vector<yInfo> selected;
         // loop again and collect hits
         for ( auto iter4 = hits.begin(); iter4 != hits.end(); ++iter4 ) {
diff --git a/Tf/TsaAlgorithms/src/TsaITStereoSearch.cpp b/Tf/TsaAlgorithms/src/TsaITStereoSearch.cpp
index 848b0372cd7522fa15ef8f6d5e81ae0dd7f034ba..0aa871045da5edf672151188de3c0b58c0346738 100755
--- a/Tf/TsaAlgorithms/src/TsaITStereoSearch.cpp
+++ b/Tf/TsaAlgorithms/src/TsaITStereoSearch.cpp
@@ -157,13 +157,11 @@ void ITStereoSearch::loadData( std::vector<SeedHit*> hits[6] ) const {
           int box = 2 + sector() - ib;
           // CRJ : Convert Tsa region into a Tf regions
           const TfTsHitNumMap::TfRegions& tfRegions = m_hitNumMap.tfITRegions( box );
-          int                             nHits( 0 ); // debug only
           //          debug() << "IT hits for Tsa : station=" << station+1 << " layer=" << layer << " region=" << box <<
           //          endmsg;
           for ( TfTsHitNumMap::TfRegions::const_iterator iTfR = tfRegions.begin(); iTfR != tfRegions.end(); ++iTfR ) {
             // debug() << " -> Tf : station=" << station << " layer=" << layer << " region=" << *iTfR << endmsg;
             Range iRange = m_hitMan->hits( station, layer, *iTfR );
-            nHits += iRange.size();
             for ( Hits::const_iterator itIter = iRange.begin(); itIter != iRange.end(); ++itIter ) {
               //              debug() << "  -> " << (*itIter)->hit()->lhcbID() << endmsg;
               // if ((*itIter)->isHot() == false) { // CRJ : Need to decide what to do about cleaning
@@ -174,7 +172,6 @@ void ITStereoSearch::loadData( std::vector<SeedHit*> hits[6] ) const {
               //}
             }
           }
-          //          debug() << " -> Found " << nHits << " hits" << endmsg;
         }
       }
       std::stable_sort( hits[lay].begin(), hits[lay].end(), SeedFunctor::increasingX<const SeedHit*>() );
diff --git a/Tf/TsaAlgorithms/src/TsaITXSearch.cpp b/Tf/TsaAlgorithms/src/TsaITXSearch.cpp
index a085d1d0988f0d2582ababe0de0c13477f748eb1..b3a8329b8095937e21ffa5f2cd51c75afc24a1be 100755
--- a/Tf/TsaAlgorithms/src/TsaITXSearch.cpp
+++ b/Tf/TsaAlgorithms/src/TsaITXSearch.cpp
@@ -242,12 +242,10 @@ void ITXSearch::loadData( std::vector<SeedHit*> hits[6] ) const {
         int box = 2 + sector() - ib;
         // CRJ : Convert Tsa region into a Tf regions
         const TfTsHitNumMap::TfRegions& tfRegions = m_hitNumMap.tfITRegions( box );
-        int                             nHits( 0 ); // debug only
 
         for ( TfTsHitNumMap::TfRegions::const_iterator iTfR = tfRegions.begin(); iTfR != tfRegions.end(); ++iTfR ) {
           // debug() << " -> Tf : station=" << station << " layer=" << layer << " region=" << *iTfR << endmsg;
           Range iRange = m_hitMan->hits( station, layer, *iTfR );
-          nHits += iRange.size();
           for ( Hits::const_iterator itIter = iRange.begin(); itIter != iRange.end(); ++itIter ) {
 
             // if ((*itIter)->isHot() == false) { // CRJ : Need to decide what to do about cleaning
diff --git a/Tf/TsaAlgorithms/src/TsaOTStereoSearch.cpp b/Tf/TsaAlgorithms/src/TsaOTStereoSearch.cpp
index 9acff292faec0e3d7fa8ee76f872d9ac353739f5..6a269182a4e1bdcfa28710f51f082e638d6fb97c 100755
--- a/Tf/TsaAlgorithms/src/TsaOTStereoSearch.cpp
+++ b/Tf/TsaAlgorithms/src/TsaOTStereoSearch.cpp
@@ -198,12 +198,10 @@ void OTStereoSearch::loadData( std::vector<SeedHit*> hits[6] ) const {
       int lay = 2 * station;
       if ( layer > 1 ) ++lay;
       const TfTsHitNumMap::TfRegions& tfRegions = m_hitNumMap.tfOTRegions( sector() - 2 );
-      int                             nHits( 0 ); // debug only
 
       for ( TfTsHitNumMap::TfRegions::const_iterator iTfR = tfRegions.begin(); iTfR != tfRegions.end(); ++iTfR ) {
         // debug() << " -> Tf : station=" << station << " layer=" << layer << " region=" << *iTfR << endmsg;
         Range oRange = m_hitMan->hits( station, layer, *iTfR );
-        nHits += oRange.size();
         for ( Hits::const_iterator otIter = oRange.begin(); otIter != oRange.end(); ++otIter ) {
 
           // no hit cleaning as yet
diff --git a/Tf/TsaAlgorithms/src/TsaOTXSearch.cpp b/Tf/TsaAlgorithms/src/TsaOTXSearch.cpp
index a538d191375fe9abe4732e153af112a83fdac8b5..508ddb913d9cac33061be7e3e240ea4c8abb6366 100755
--- a/Tf/TsaAlgorithms/src/TsaOTXSearch.cpp
+++ b/Tf/TsaAlgorithms/src/TsaOTXSearch.cpp
@@ -279,12 +279,10 @@ void OTXSearch::loadData( std::vector<SeedHit*> hits[6] ) const {
       int lay = 2 * station;
       if ( layer > 0 ) ++lay;
       const TfTsHitNumMap::TfRegions& tfRegions = m_hitNumMap.tfOTRegions( sector() - 2 );
-      int                             nHits( 0 ); // debug only
 
       for ( TfTsHitNumMap::TfRegions::const_iterator iTfR = tfRegions.begin(); iTfR != tfRegions.end(); ++iTfR ) {
         // debug() << " -> Tf : station=" << station << " layer=" << layer << " region=" << *iTfR << endmsg;
         Range oRange = m_hitMan->hits( station, layer, *iTfR );
-        nHits += oRange.size();
         for ( Hits::const_iterator otIter = oRange.begin(); otIter != oRange.end(); ++otIter ) {
 
           // no cleaning as yet
diff --git a/Tf/TsaAlgorithms/src/TsaSeed.cpp b/Tf/TsaAlgorithms/src/TsaSeed.cpp
index 6ff6b40453189070dba0dbcce9d7a59b9c3b0b3a..630e6c4bb048ab680df04dc6eaeaf5d55d719584 100755
--- a/Tf/TsaAlgorithms/src/TsaSeed.cpp
+++ b/Tf/TsaAlgorithms/src/TsaSeed.cpp
@@ -145,12 +145,10 @@ StatusCode Seed::execute() {
       //  if (tr->info(LHCb::Track::PatQuality, -1.) < 4.0) continue;
       //}
 
-      int nHits = 0;
       for ( std::vector<LHCb::LHCbID>::const_iterator itId = tr->lhcbIDs().begin(); tr->lhcbIDs().end() != itId;
             ++itId ) {
         for ( Hits::const_iterator itIter = allhits.begin(); itIter != allhits.end(); ++itIter ) {
           if ( ( *itIter )->hit()->lhcbID() == ( *itId ) ) {
-            nHits++;
             ( *itIter )->hit()->setStatus( Tf::HitBase::UsedByPatForward, false );
             break;
           }
diff --git a/Tr/PatChecker/src/CheatedPrimaryVertices.cpp b/Tr/PatChecker/src/CheatedPrimaryVertices.cpp
index 340a34356a8df9039426af5c200cfb90fabfb612..812a867c11887fe6ff12db315a943175369b1c7f 100755
--- a/Tr/PatChecker/src/CheatedPrimaryVertices.cpp
+++ b/Tr/PatChecker/src/CheatedPrimaryVertices.cpp
@@ -67,11 +67,9 @@ StatusCode CheatedPrimaryVertices::execute() {
   m_outputVertices = new LHCb::RecVertices();
   put( m_outputVertices, m_outputVerticesName );
   // MC particles assigned to hasVelo tracks
-  int                                  nrTracks = 0;
   SmartRefVector<LHCb::Track>          hasVeloTracks;
   std::vector<const LHCb::MCParticle*> mcParts;
   for ( LHCb::Track::Container::const_iterator itr = m_inputTracks->begin(); m_inputTracks->end() != itr; itr++ ) {
-    nrTracks++;
     const LHCb::Track* trk = *itr;
     if ( trk->hasVelo() ) {
       hasVeloTracks.push_back( trk );
@@ -82,9 +80,7 @@ StatusCode CheatedPrimaryVertices::execute() {
   // Visible MC PV's
   LHCb::MCVertices*                  mcVertices = get<LHCb::MCVertices>( LHCb::MCVertexLocation::Default );
   std::vector<const LHCb::MCVertex*> vtcsMCPV;
-  int                                nrMCPVs = 0;
   for ( LHCb::MCVertices::const_iterator itMCV = mcVertices->begin(); mcVertices->end() != itMCV; itMCV++ ) {
-    nrMCPVs++;
     const LHCb::MCParticle* motherPart = ( *itMCV )->mother();
     if ( 0 == motherPart ) {
       if ( ( *itMCV )->type() == LHCb::MCVertex::ppCollision ) {
diff --git a/Tr/PatPV/src/TrackBeamLineVertexFinder.cpp b/Tr/PatPV/src/TrackBeamLineVertexFinder.cpp
index 8a6d1c9338b50d14e075f80c6bcd165d42c15eac..c8bb9eb6f250d425345e8fe4be0550a7df41ae3d 100644
--- a/Tr/PatPV/src/TrackBeamLineVertexFinder.cpp
+++ b/Tr/PatPV/src/TrackBeamLineVertexFinder.cpp
@@ -664,7 +664,6 @@ TrackBeamLineVertexFinderOutput TrackBeamLineVertexFinder::operator()( const LHC
   recvertexcontainer.reserve( vertices.size() );
   std::vector<bool> unusedtrackflags( Ntrk, true );
   const auto        maxVertexRho2 = sqr( m_maxVertexRho.value() );
-  uint32_t          used_tracks{0};
   for ( const auto& vertex : vertices ) {
     const auto beamlinedx   = vertex.position.x() - beamline.x();
     const auto beamlinedy   = vertex.position.y() - beamline.y();
@@ -678,7 +677,6 @@ TrackBeamLineVertexFinderOutput TrackBeamLineVertexFinder::operator()( const LHC
       for ( const auto& dau : vertex.tracks ) {
         recvertex->addToTracks( tracks[dau.first], dau.second );
         unusedtrackflags[dau.first] = false;
-        ++used_tracks;
       }
       recvertexcontainer.insert( recvertex );
     }
diff --git a/Tr/TrackFitter/src/TrackMasterFitter.cpp b/Tr/TrackFitter/src/TrackMasterFitter.cpp
index 6c1b14d0e62974b2b296df4f314cccb92857fcd5..8e7db1ae543bb6ea07ffe91c2e2a2f55730ea433 100644
--- a/Tr/TrackFitter/src/TrackMasterFitter.cpp
+++ b/Tr/TrackFitter/src/TrackMasterFitter.cpp
@@ -529,12 +529,10 @@ LHCb::Node* TrackMasterFitter::outlierRemoved( Track& track ) const {
   using NodeWithChi2     = std::pair<const FitNode*, double>;
   std::vector<NodeWithChi2> nodesWithChi2UL;
   nodesWithChi2UL.reserve( nodes.size() );
-  int numtried( 0 ), numcalled( 0 );
   for ( const auto& node : nodes ) {
     if ( node->hasMeasurement() && node->type() == LHCb::Node::HitOnTrack ) {
       int hittype = hittypemap( node->measurement().type() );
       if ( numHits[hittype] > minNumHits[hittype] ) {
-        ++numtried;
         auto chi2MatchAndHit = totalchi2;
         for ( int dir = 0; dir < 2; ++dir ) {
           const auto* tmpnode = node->prevNode( dir );
@@ -555,7 +553,6 @@ LHCb::Node* TrackMasterFitter::outlierRemoved( Track& track ) const {
   for ( const auto& node : nodesWithChi2UL ) {
     if ( node.second > worstChi2 ) {
       const auto chi2 = node.first->chi2();
-      ++numcalled;
       if ( chi2 > worstChi2 ) {
         worstChi2 = chi2;
         outlier   = const_cast<LHCb::FitNode*>( node.first );
diff --git a/Tr/TrackKernel/src/TrackStateVertex.cpp b/Tr/TrackKernel/src/TrackStateVertex.cpp
index 15b26bc7fc1c02670dcae9418a14c27dacac8070..c21715e623ac7a786f4af2d3c40c2120b35856cc 100644
--- a/Tr/TrackKernel/src/TrackStateVertex.cpp
+++ b/Tr/TrackKernel/src/TrackStateVertex.cpp
@@ -567,7 +567,6 @@ namespace LHCb {
           m_error = NotConvergedAdaptive;
         } else {
           prevtotalchi2 = m_chi2;
-          double sumw( 0 );
           for ( size_t i = 0; i < N; ++i ) {
             // this is one way: these are called 'Huber' weights, at least, if you take the sqroot!
             // double weight = trkchi2s[i] < scaledmaxtrkchi2 ? 1 : scaledmaxtrkchi2 / trkchi2s[i] ;
@@ -576,7 +575,6 @@ namespace LHCb {
             // double weight =  trkchi2s[i] < 2 ? 1
             // : (trkchi2s[i] >= scaledmaxtrkchi2 ? 0 : (1 - trkchi2s[i] /scaledmaxtrkchi2 ) ) ;
             m_tracks[i]->setweight( weight );
-            sumw += weight;
           }
         }
       }
diff --git a/Tr/TrackMonitors/src/STTrackTuple.cpp b/Tr/TrackMonitors/src/STTrackTuple.cpp
index 0623a4fb73e02071d031880b812f17ce7dcb3118..0318c4c2a4484eab6f75ed346fea2285b189ef55 100644
--- a/Tr/TrackMonitors/src/STTrackTuple.cpp
+++ b/Tr/TrackMonitors/src/STTrackTuple.cpp
@@ -885,7 +885,6 @@ LHCb::LHCbID STTrackTuple::findHitId( LHCb::Track* const& aTrack, const LHCb::ST
 // Hit type namespace
 namespace {
   enum HitType { VeloR = 0, VeloPhi, TT = 4, IT, OT, Muon, HitTypeUnknown };
-  const std::string HitTypeName[] = {"VeloR", "VeloPhi", "TT", "IT", "OT", "Muon"};
   // double      HitTypeMaxRes[] = {0.1,0.1,0.5,0.5,2.0,10} ;
 
   inline HitType hittypemap( const LHCb::Measurement& meas ) {
diff --git a/Tr/TrackMonitors/src/TrackITOverlapMonitor.cpp b/Tr/TrackMonitors/src/TrackITOverlapMonitor.cpp
index a89eba86de543218478d70754b6686e281a4ceda..d1c0ceee0f339cd1b80efda2a0503abc7186fb00 100644
--- a/Tr/TrackMonitors/src/TrackITOverlapMonitor.cpp
+++ b/Tr/TrackMonitors/src/TrackITOverlapMonitor.cpp
@@ -219,7 +219,7 @@ StatusCode TrackITOverlapMonitor::execute() {
       LHCb::TrackTraj tracktraj( *track );
 
       // keep some statistics about how many regions the track crosses
-      size_t numtraversedregions( 0 ), numcompatible( 0 );
+      size_t numtraversedregions( 0 );
 
       // loop over all regions
       for ( size_t istation = 0; istation < 3; ++istation )
@@ -292,7 +292,6 @@ StatusCode TrackITOverlapMonitor::execute() {
                         histos->hotresh1->fill( sign * distance );
                         histos->hotdyh1->fill( dy );
                       }
-                      ++numcompatible;
                     }
                   }
                 }
diff --git a/Tr/TrackTools/src/VeloCaloBuilder.cpp b/Tr/TrackTools/src/VeloCaloBuilder.cpp
index a193e0c89982fa3e4b71ca19e81397e20365036e..703d5c4b9c250a8d45e6a85abdbb348d03229a9c 100644
--- a/Tr/TrackTools/src/VeloCaloBuilder.cpp
+++ b/Tr/TrackTools/src/VeloCaloBuilder.cpp
@@ -62,8 +62,6 @@ StatusCode VeloCaloBuilder::execute() {
       // -- if there are no clusters, there's nothing to do
       if ( !cluster ) return StatusCode::SUCCESS;
       LHCb::CaloClusters::const_iterator clusterIter;
-      int                                matches   = 0;
-      int                                nomatches = 0;
       // -- loop over clusters
       for ( clusterIter = cluster->begin(); clusterIter != cluster->end(); ++clusterIter ) {
 
@@ -71,7 +69,6 @@ StatusCode VeloCaloBuilder::execute() {
 
         if ( thecluster->e() < mass ) continue;
         LHCb::Tracks::const_iterator veloIt;
-        int                          locmatches = 0;
         // -- loop over velo tracks
         for ( veloIt = velotracks->begin(); velotracks->end() != veloIt; ++veloIt ) {
           // -- apply IP, z, type cuts
@@ -139,8 +136,6 @@ StatusCode VeloCaloBuilder::execute() {
 
             // -- using upstream instead of velo tracks, a momentum cut can purify the VeloCalo tracks here
             if ( true ) {
-              matches++;
-              locmatches++;
               // -- the final track
               LHCb::Track* aCopy = new LHCb::Track();
               aCopy->addToAncestors( *mytrack );
@@ -188,11 +183,7 @@ StatusCode VeloCaloBuilder::execute() {
               aCopy->setType( LHCb::Track::Types::Long );
               aCopy->setChi2AndDoF( quality * 60, 60 );
               TESpush( caloTracks, aCopy, mytrack, calotrack );
-            } else {
-              nomatches++;
             }
-          } else {
-            nomatches++;
           }
           delete calotrack;
         } // -- looped over velo tracks
diff --git a/Tr/TrackTools/src/VeloExpectation.cpp b/Tr/TrackTools/src/VeloExpectation.cpp
index 60b7910b06dc418553553690daad8d17225afb93..b5f997081746693103c51ebd102c2504542bbcf6 100644
--- a/Tr/TrackTools/src/VeloExpectation.cpp
+++ b/Tr/TrackTools/src/VeloExpectation.cpp
@@ -273,7 +273,7 @@ double VeloExpectation::zBeamLine( const Track& aTrack ) const {
     z = state.z();
   } else {
     const TrackVector& vec = state.stateVector();
-    double             z   = state.z();
+    z                      = state.z();
     // check on division by zero (track parallel to beam line!)
     if ( fabs( vec[2] ) > TrackParameters::lowTolerance || vec[3] > TrackParameters::lowTolerance ) {
       z -= ( vec[0] * vec[2] + vec[1] * vec[3] ) / ( vec[2] * vec[2] + vec[3] * vec[3] );
diff --git a/Tr/TrackUtils/src/TrackContainerCopy.cpp b/Tr/TrackUtils/src/TrackContainerCopy.cpp
index 5c5998bba1e1f6147134f274e822f664a9f1452a..52e9326b4e0f64ad585beb2f316ca35377770186 100644
--- a/Tr/TrackUtils/src/TrackContainerCopy.cpp
+++ b/Tr/TrackUtils/src/TrackContainerCopy.cpp
@@ -68,7 +68,6 @@ StatusCode TrackContainerCopy::finalize() {
 StatusCode TrackContainerCopy::execute() {
 
   Tracks* outCont = getOrCreate<Tracks, Tracks>( m_outputLocation );
-  size_t  naccepted( 0 );
 
   // loop
   for ( const std::string& inputLoc : m_inputLocations ) {
@@ -83,7 +82,6 @@ StatusCode TrackContainerCopy::execute() {
 
         Track* aTrack = track->clone();
         outCont->insert( aTrack );
-        ++naccepted;
       }
     }
   }
@@ -94,13 +92,11 @@ StatusCode TrackContainerCopy::execute() {
          (m_selector.empty() || m_selector->accept(*track)) ) {
       Track* aTrack = track->clone();
       outCont->insert(aTrack);
-      ++naccepted ;
     } // selected
   }
   */
   //   counter("# tracks in")    += inCont->size() ;
   //   counter("# tracks out")   += outCont->size() ;
-  //   counter("# tracks added") += naccepted ;
 
   return StatusCode::SUCCESS;
 }
diff --git a/Velo/VeloRecMonitors/src/VeloCCEScanMonitor.cpp b/Velo/VeloRecMonitors/src/VeloCCEScanMonitor.cpp
index 0c1f80a2cb8e481e70f89af65d9b520cc5a34fd9..5a843813bf896b777a2fe572cf8b56a4b526d45c 100644
--- a/Velo/VeloRecMonitors/src/VeloCCEScanMonitor.cpp
+++ b/Velo/VeloRecMonitors/src/VeloCCEScanMonitor.cpp
@@ -331,7 +331,6 @@ void Velo::VeloCCEScanMonitor::fillCFEtuple( const LHCb::Track& track ) {
     bool                         gap2          = 0;
     bool                         secondCluster = 0;
     if ( SenADCData ) {
-      int counter = 0;
       // Look at ADC of strip 20 away from extrapolation:
       int noiseStrip = chan.strip() - 20;
       if ( noiseStrip > 1 )
@@ -347,7 +346,6 @@ void Velo::VeloCCEScanMonitor::fillCFEtuple( const LHCb::Track& track ) {
       secondCluster = 0;
       for ( std::vector<unsigned int>::const_iterator stripIt = stripIDs.begin(); stripIt != stripIDs.end();
             stripIt++ ) {
-        ++counter;
         if ( sensor->OKStrip( *stripIt ) == 0 ) Stripbad++;
         if ( checkBCList( *stripIt ) == 0 ) StripBCbad++;
         int          currentADC   = SenADCData->stripADC( *stripIt );
diff --git a/Velo/VeloRecMonitors/src/VeloTrackMonitor.cpp b/Velo/VeloRecMonitors/src/VeloTrackMonitor.cpp
index 41864daf779ed913417ae209f9e5d274ee346516..6e587ff8ef05013af6b3ed05f26eb7b78f021177 100755
--- a/Velo/VeloRecMonitors/src/VeloTrackMonitor.cpp
+++ b/Velo/VeloRecMonitors/src/VeloTrackMonitor.cpp
@@ -678,11 +678,8 @@ StatusCode Velo::VeloTrackMonitor::monitorTracks() {
     //--------------------------------
     double pseudoEfficiency_sens = 0;
     double sensnumber;
-    double N_expTot = 0, N_recTot = 0;
 
     for ( auto i = ( sensnmin ); i <= sensnmax; i++ ) {
-      N_expTot += N_exp[i];
-      N_recTot += N_rec[i];
       if ( N_exp[i] >= 1 ) {
         pseudoEfficiency_sens = N_rec[i] / N_exp[i];
         sensnumber            = (double)i;