From 52f8eeb347bbd82388c956fba3db4fcd78d00a4b Mon Sep 17 00:00:00 2001
From: Vardan Tadevosyan <tadevosn@jlab.org>
Date: Mon, 4 Aug 2014 20:43:12 -0400
Subject: [PATCH] Make counting of calorimeter tracks consistent with Engine.

Increment fNtracks++ each time a cluster matches a spectrometer
track. Only best matches were counted before. Move fNtracks++ from
THcShower::CoarceProcess to THcShower:MatchCluster.
---
 src/THcShower.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/THcShower.cxx b/src/THcShower.cxx
index 7bef4d4..a001241 100644
--- a/src/THcShower.cxx
+++ b/src/THcShower.cxx
@@ -740,7 +740,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
 
     Int_t mclust = MatchCluster(theTrack, ClusterList, Xtr, Ytr);
 
-    if (mclust >= 0) fNtracks++;  // number of shower tracks
+    //    if (mclust >= 0) fNtracks++;  // number of shower tracks (This is not consistent with engine!)
 
     // Do this for the 1-st track only for now.
     //
@@ -907,7 +907,7 @@ Int_t THcShower::MatchCluster(THaTrack* Track,
       Double_t dx = TMath::Abs( (*cluster).clX() - XTrFront );
 
       if (dx <= (0.5*BlockThick[0] + fSlop)) {
-
+	fNtracks++;  // number of shower tracks (Consistent with engine)
 	if (dx <= deltaX) {
 	  mclust = i;
 	  deltaX = dx;
-- 
GitLab