From 13efe1e1d3d87dc36f4ba991c1d2a0a5ba64c796 Mon Sep 17 00:00:00 2001
From: Michel De Cian <michel.de.cian@cern.ch>
Date: Mon, 12 Mar 2018 15:26:14 +0100
Subject: [PATCH 1/2] Add PT cut to PrFitFwdParams

---
 Pr/PrFitParams/src/PrFitFwdParams.cpp | 4 +++-
 Pr/PrFitParams/src/PrFitFwdParams.h   | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Pr/PrFitParams/src/PrFitFwdParams.cpp b/Pr/PrFitParams/src/PrFitFwdParams.cpp
index e782cc62d33..f7c3ef3d5e5 100755
--- a/Pr/PrFitParams/src/PrFitFwdParams.cpp
+++ b/Pr/PrFitParams/src/PrFitFwdParams.cpp
@@ -54,6 +54,7 @@ PrFitFwdParams::PrFitFwdParams( const std::string& name,
   declareProperty( "NtupleName2"          , m_tupleName2    );
 
   declareProperty( "MinMomentum"          , m_minMomentum   );
+  declareProperty( "MinPT"                , m_minPT         );
   declareProperty( "MaxZVertex"           , m_maxZVertex    );
   declareProperty( "ZVelo"                , m_zVelo         );
   declareProperty( "ZMagnet"              , m_zMag          );
@@ -178,8 +179,9 @@ StatusCode PrFitFwdParams::execute() {
     if ( 10000. > zDecay ) continue;
 
     // == Momentum cut
-    momentum = myMCPart->momentum().R();
+    momentum = myMCPart->p();
     if ( m_minMomentum > momentum ) continue;
+    if ( m_minPT > myMCPart->pt() ) continue;
     if ( 11 == abs( myMCPart->particleID().pid() ) ) { continue; } // no electrons
 
     if ( 0 > myMCPart->particleID().threeCharge() ) {
diff --git a/Pr/PrFitParams/src/PrFitFwdParams.h b/Pr/PrFitParams/src/PrFitFwdParams.h
index 0ee55abe807..069424f83ad 100755
--- a/Pr/PrFitParams/src/PrFitFwdParams.h
+++ b/Pr/PrFitParams/src/PrFitFwdParams.h
@@ -38,6 +38,7 @@ private:
   // Parameters to control the algorithm, accessible by jobOptions
 
   double m_minMomentum;               ///< Momentum cut to consider tracks
+  double m_minPT;                     ///< Transverse momentum cut to consider tracks
   double m_maxZVertex;                ///< Maximum Z vertex.
   double m_zVelo;                     ///< Z where initial track is defined
   double m_zMag;                      ///< Z of the field center
-- 
GitLab


From 93b26de146e9144a708d749868baaaef6045e6e8 Mon Sep 17 00:00:00 2001
From: Michel De Cian <michel.de.cian@cern.ch>
Date: Mon, 12 Mar 2018 15:30:03 +0100
Subject: [PATCH 2/2] Add default value for PT cut

---
 Pr/PrFitParams/src/PrFitFwdParams.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Pr/PrFitParams/src/PrFitFwdParams.cpp b/Pr/PrFitParams/src/PrFitFwdParams.cpp
index f7c3ef3d5e5..6bedfa6da4f 100755
--- a/Pr/PrFitParams/src/PrFitFwdParams.cpp
+++ b/Pr/PrFitParams/src/PrFitFwdParams.cpp
@@ -39,6 +39,7 @@ PrFitFwdParams::PrFitFwdParams( const std::string& name,
                             ISvcLocator* pSvcLocator)
   : GaudiTupleAlg ( name , pSvcLocator )
   , m_minMomentum         (   2.0 * Gaudi::Units::GeV )
+  , m_minPT               (   0.0 * Gaudi::Units::GeV )
   , m_maxZVertex          (  500. * Gaudi::Units::mm )
   , m_zVelo               ( 1190. * Gaudi::Units::mm )
   , m_zMag                ( 5500. * Gaudi::Units::mm )
-- 
GitLab