From 12992a1fa382f37bcf8c38cfac1fd015ffc80ede Mon Sep 17 00:00:00 2001
From: Will Leight <wleight@cern.ch>
Date: Tue, 16 Apr 2019 14:48:35 +0200
Subject: [PATCH] Add track counting for cases other than MS tracks

Missed this in the previous edits.
---
 .../MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx
index ee1af8358e4..f2662d837e0 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx
@@ -280,7 +280,10 @@ bool MuonTrackPerformanceAlg::handleTracks() {
 	else ATH_MSG_WARNING("no track particle of type "<<m_trackType<<" for muon with author "<<muon->author()<<" and pT "<<muon->pt());
 	continue;
       }
-      if(tp->track()) allTracks->push_back(new Trk::Track(*tp->track()));
+      if(tp->track()){
+	m_ntracks++;
+	allTracks->push_back(new Trk::Track(*tp->track()));
+      }
       else ATH_MSG_WARNING("no track for this trackParticle, skipping");
     }
     ATH_MSG_DEBUG("got "<<allTracks->size()<<" tracks");
-- 
GitLab