From 6d180f202ff152080db52f7547bc2f0e2766f77b Mon Sep 17 00:00:00 2001
From: Gabriel Facini <facini.gabriel@gmail.com>
Date: Fri, 6 Nov 2020 16:39:57 +0100
Subject: [PATCH] No Free Pass Tracks passing a selection designed to identify
 photon conversions were given a shortcut through the ambi for a small
 efficiency gain. This had the unwanted side-effect of allowing electron brem
 tracks (mostly in the forward direction) to have incorrect hits and overshare
 IBL hits lowering the EM LH identification rate.

Simple fix - remove short cut
Impact on digest - 3 tracks over 3 events
---
 .../src/InDetDenseEnvAmbiTrackSelectionTool.cxx  | 16 ----------------
 Tools/PROCTools/data/master_q221_AOD_digest.ref  |  4 ++--
 Tools/PROCTools/data/master_q431_AOD_digest.ref  |  2 +-
 3 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx
index 6b028612f05..8f9cad9c2f5 100644
--- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx
@@ -174,20 +174,6 @@ std::tuple<Trk::Track*,bool> InDet::InDetDenseEnvAmbiTrackSelectionTool::getClea
   ATH_MSG_DEBUG ("totalUniqueSiHits " << trackHitDetails.totalUniqueSiHits());
   ATH_MSG_DEBUG ("score " << score );
 
-  //------------------------------------------------------------------------------------//
-  // if have passed the conversion selection, send to the track to the final collection
-  // before checking basic cuts
-  if( trackHitDetails.m_passConversionSel ) {
-    ATH_MSG_DEBUG ("track m_passConversionSel, so accept it as is");
-    //  Change pixel hits property for shared hits as this track will be 
-    //  accepted into the final track colection
-    if (!trackHitDetails.m_isPatternTrack){
-      setPixelClusterSplitInformation( tsosDetails, splitProbContainer );
-    }
-    return std::make_tuple(static_cast<Trk::Track *>(nullptr),true); // keep input track
-  }
-  //------------------------------------------------------------------------------------//
-
 
   //------------------------------------------------------------------------------------//
   //
@@ -970,8 +956,6 @@ void InDet::InDetDenseEnvAmbiTrackSelectionTool::decideWhichHitsToKeep(const Trk
     trackHitDetails.m_passConversionSel = performConversionCheck(ptrTrack, 
         prd_to_track_map, trackHitDetails, tsosDetails, ent);
   }
-  // if pass conversion selection, don't mess with it further
-  if( trackHitDetails.m_passConversionSel ) { return; }
   //------------------------------------------------------------------//
 
   
diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
index c1777b60863..698c9ce2d4e 100644
--- a/Tools/PROCTools/data/master_q221_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -4,8 +4,8 @@
       284500    87473022          38          30           4           0           4           1           3           3           2           1
       284500    87473032          30          33           4           1          10           4           6           5           2           3
       284500    87473037          62          38           7           0          12           2          10           6           4           2
-      284500    87473040         107          98          10           1          17           1          16          10           5           5
-      284500    87473051         140         113          11           1          16           1          15          23          16           7
+      284500    87473040         107          97          10           1          17           1          16          10           5           5
+      284500    87473051         140         112          11           1          16           1          15          23          16           7
       284500    87473063          62          76           5           2           7           1           6           6           4           2
       284500    87473068          25          34           1           1           0           0           0           0           0           0
       284500    87473075          60          87           6           0           5           0           5           7           6           1
diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref
index 00a87ae6b07..5c2599d5395 100644
--- a/Tools/PROCTools/data/master_q431_AOD_digest.ref
+++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref
@@ -21,6 +21,6 @@
       330470  1183769939         348         351          10           3
       330470  1183773832         307         201           6           0
       330470  1183775209          57           0           0           0
-      330470  1183787124         431         362           9           2
+      330470  1183787124         431         361           9           2
       330470  1183787946         321         313           5           1
       330470  1183795329         458         335          18           0
-- 
GitLab