From 275b71b91d4c46aa44ff73213b388f6e7e16f6c8 Mon Sep 17 00:00:00 2001
From: Christos Anastopoulos <christos.anastopoulos@cern.ch>
Date: Tue, 11 Dec 2018 17:24:59 +0000
Subject: [PATCH] Move InDetTrackSelectionTool from using TAccept to using
 AcceptInfo+AcceptData

Former-commit-id: 0a174dcf03eecadfb60b55e3b11773149be9676e
---
 .../PixelMonitoring/src/Track.cxx             |  4 +-
 .../src/InDetAdaptiveMultiPriVxFinderTool.cxx | 20 ++++-----
 .../src/InDetAdaptivePriVxFinderTool.cxx      |  6 +--
 .../src/InDetIterativePriVxFinderTool.cxx     | 18 ++++----
 .../src/InDetMultiPriVxFinderTool.cxx         | 18 ++++----
 .../src/InDetPriVxFinderTool.cxx              |  8 ++--
 .../InDetTrackSelectionTool/CMakeLists.txt    |  5 ++-
 .../IInDetTrackSelectionTool.h                | 16 ++++---
 .../InDetTrackSelectionTool.h                 | 13 +++---
 .../Root/InDetTrackSelectionTool.cxx          | 45 +++++++++----------
 .../src/ToolTester.cxx                        | 18 ++++----
 .../InDetPhysValMonitoringTool.h              |  9 ++--
 .../src/InDetPhysValMonitoringTool.cxx        | 10 ++---
 .../Root/JetTrackSelectionTool.cxx            |  4 +-
 .../METReconstruction/Root/METAssociator.cxx  |  5 +--
 .../MET/METUtilities/Root/METMaker.cxx        |  3 +-
 .../MET/METUtilities/Root/METRebuilder.cxx    |  8 +++-
 .../eflowRec/src/PFTrackSelector.cxx          |  2 +-
 .../src/GaussianDensityTestAlg.cxx            | 10 ++---
 .../src/ImagingSeedTuningAlg.cxx              |  8 ++--
 20 files changed, 112 insertions(+), 118 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx
index 92b6a3e91ec..384fc24ad10 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -153,7 +153,7 @@ StatusCode PixelMainMon::fillTrackMon(void) {
       track = m_holeSearchTool->getTrackWithHoles(*track0);
     }
     int nPixelHits = 0;
-    bool passJOTrkTightCut = m_trackSelTool->accept(*track0);
+    bool passJOTrkTightCut = static_cast<bool>(m_trackSelTool->accept(*track0));
     bool pass1hole1GeVptTightCut = (passJOTrkTightCut && (measPerigee->pT() / 1000.0 > 1.0));  // misshit ratios
     bool pass1hole5GeVptTightCut = (passJOTrkTightCut && (measPerigee->pT() / 1000.0 > 5.0));  // eff vs lumi
 
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
index b6bd675f634..a020683f493 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptiveMultiPriVxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
  */
 
 /***************************************************************************
@@ -162,13 +162,13 @@ namespace InDet
 
     typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool selectionPassed;
     for (TrackDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
       if (m_useBeamConstraint) {
-        selectionPassed = m_trkFilter->accept(**itr, &beamposition);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &beamposition));
       } else {
         Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = m_trkFilter->accept(**itr, &null); // TODO: change trkFilter?
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null)); // TODO: change trkFilter?
       }
       if (selectionPassed) {
         ElementLink<TrackCollection> link;
@@ -213,13 +213,13 @@ namespace InDet
 
     typedef DataVector<Trk::TrackParticleBase>::const_iterator TrackParticleDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool  selectionPassed;
     for (TrackParticleDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
       if (m_useBeamConstraint) {
-        selectionPassed = m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition));
       } else {
         Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = m_trkFilter->accept(*((*itr)->originalTrack()), &null); // TODO: change trkFilter?
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &null)); // TODO: change trkFilter?
       }
 
       if (selectionPassed) {
@@ -260,10 +260,10 @@ namespace InDet
 
     typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool selectionPassed;
     for (TrackParticleDataVecIter itr = (*trackParticles).begin(); itr != (*trackParticles).end(); itr++) {
       if (m_useBeamConstraint) {
-        selectionPassed = m_trkFilter->accept(**itr, &beamposition);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &beamposition));
       } else {
         xAOD::Vertex null;
         null.makePrivateStore();
@@ -271,7 +271,7 @@ namespace InDet
         AmgSymMatrix(3) vertexError;
         vertexError.setZero();
         null.setCovariancePosition(vertexError);
-        selectionPassed = m_trkFilter->accept(**itr, &null);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
       }
 
       if (selectionPassed) {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
index a5a7a2a3773..58ca183dee1 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetAdaptivePriVxFinderTool.cxx
@@ -133,7 +133,7 @@ namespace InDet
     std::vector<const Trk::TrackParameters*> origParameters;
     origParameters.clear();
     for (TrackCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      if (m_trkFilter->accept(**itr, &beamposition) == false) continue;
+      if (static_cast<bool>(m_trkFilter->accept(**itr, &beamposition)) == false) continue;
       origParameters.push_back((*itr)->perigeeParameters());
     }
     if (msgLvl(MSG::DEBUG)) msg() << "Of " << trackTES->size() << " tracks " << origParameters.size() <<
@@ -193,7 +193,7 @@ namespace InDet
     // if (msgLvl(MSG::VERBOSE)) msg() << "TrackParticleBaseContainer @ " << trackTES << endmsg;
     // if (msgLvl(MSG::VERBOSE)) msg() << "Size of the container: " << size << endmsg;
     for (Trk::TrackParticleBaseCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
-      if (m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition) == false) continue;
+      if (static_cast<bool> (m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition)) == false) continue;
       origParameters.push_back(&(*itr)->definingParameters());
       // std::cout << "originalPerigee at " << & ( *itr )->definingParameters() << std::endl;
     }
@@ -254,7 +254,7 @@ namespace InDet
 
     typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
     for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
-      if (m_trkFilter->accept(**itr, &beamposition) == false) continue;
+      if (static_cast<bool>(m_trkFilter->accept(**itr, &beamposition)) == false) continue;
       origParameters.push_back(&(*itr)->perigeeParameters());
       ATH_MSG_DEBUG("originalPerigee at " << &(*itr)->perigeeParameters());
     }
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
index 9136c2c67d3..3e38b32849d 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetIterativePriVxFinderTool.cxx
@@ -171,18 +171,18 @@ InDetIterativePriVxFinderTool::findVertex(const TrackCollection* trackTES)
 
   typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
 
-  Root::TAccept selectionPassed;
+  bool selectionPassed;
   for (TrackDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
 
     if (m_useBeamConstraint && beamSpot != nullptr) 
     {
       Trk::RecVertex beamPosition { beamSpot->beamVtx() };
-      selectionPassed=m_trkFilter->accept(**itr, &beamPosition);
+      selectionPassed=static_cast<bool>(m_trkFilter->accept(**itr, &beamPosition));
     }
     else
     {
       Trk::Vertex null(Amg::Vector3D(0,0,0));
-      selectionPassed=m_trkFilter->accept(**itr, &null);
+      selectionPassed=static_cast<bool>(m_trkFilter->accept(**itr, &null));
       }
       if (selectionPassed) {
         ElementLink<TrackCollection> link;
@@ -215,14 +215,14 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
 
     typedef DataVector<Trk::TrackParticleBase>::const_iterator TrackParticleDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool selectionPassed;
     for (TrackParticleDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
       if (m_useBeamConstraint && beamSpot != nullptr) {
         Trk::RecVertex beamPosition { beamSpot->beamVtx() };
-        selectionPassed = m_trkFilter->accept(*((*itr)->originalTrack()), &beamPosition);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamPosition));
       } else {
         Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = m_trkFilter->accept(*((*itr)->originalTrack()), &null);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &null));
       }
 
       if (selectionPassed) {
@@ -254,7 +254,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
 
     typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool selectionPassed;
     for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
 
       if (m_useBeamConstraint && beamSpot != nullptr) 
@@ -263,7 +263,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
         beamPosition.makePrivateStore();
         beamPosition.setPosition( beamSpot->beamVtx().position());
         beamPosition.setCovariancePosition( beamSpot->beamVtx().covariancePosition() );
-        selectionPassed=m_trkFilter->accept(**itr, &beamPosition);
+        selectionPassed=static_cast<bool>(m_trkFilter->accept(**itr, &beamPosition));
       }
       else
       {
@@ -274,7 +274,7 @@ InDetIterativePriVxFinderTool::findVertex(const Trk::TrackParticleBaseCollection
         AmgSymMatrix(3) vertexError;
         vertexError.setZero();
         null.setCovariancePosition(vertexError);
-        selectionPassed = m_trkFilter->accept(**itr, &null);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
       }
 
       if (selectionPassed) {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
index d9ad7b03ce0..62d549095d2 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetMultiPriVxFinderTool.cxx
@@ -153,7 +153,7 @@ namespace InDet
 
     typedef DataVector<Trk::Track>::const_iterator TrackDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool selectionPassed{false};
     for (TrackDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
       if (m_useBeamConstraint) {
         // TODO: change trkFilter to allow for this replacement
@@ -164,10 +164,10 @@ namespace InDet
            beamposition.setCovariancePosition(m_iBeamCondSvc->beamVtx().covariancePosition());
          */
         Trk::RecVertex beamposition(m_iBeamCondSvc->beamVtx());
-        selectionPassed = m_trkFilter->accept(**itr, &beamposition);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &beamposition));
       } else {
         Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = m_trkFilter->accept(**itr, &null);
+        selectionPassed = static_cast<bool> (m_trkFilter->accept(**itr, &null));
       }
       if (selectionPassed) {
         ElementLink<TrackCollection> link;
@@ -194,7 +194,7 @@ namespace InDet
 
     typedef DataVector<Trk::TrackParticleBase>::const_iterator TrackParticleDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool  selectionPassed{false};
     for (TrackParticleDataVecIter itr = (*trackTES).begin(); itr != (*trackTES).end(); itr++) {
       if (m_useBeamConstraint) {
         // TODO: change trkFilter to allow for this replacement
@@ -205,10 +205,10 @@ namespace InDet
            beamposition.setCovariancePosition(m_iBeamCondSvc->beamVtx().covariancePosition());
          */
         Trk::RecVertex beamposition(m_iBeamCondSvc->beamVtx());
-        selectionPassed = m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition));
       } else {
         Trk::Vertex null(Amg::Vector3D(0, 0, 0));
-        selectionPassed = m_trkFilter->accept(*((*itr)->originalTrack()), &null);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(*((*itr)->originalTrack()), &null));
       }
 
       if (selectionPassed) {
@@ -236,14 +236,14 @@ namespace InDet
 
     typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
 
-    Root::TAccept selectionPassed;
+    bool selectionPassed{false};
     for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
       if (m_useBeamConstraint) {
         xAOD::Vertex beamposition;
         beamposition.makePrivateStore();
         beamposition.setPosition(m_iBeamCondSvc->beamVtx().position());
         beamposition.setCovariancePosition(m_iBeamCondSvc->beamVtx().covariancePosition());
-        selectionPassed = m_trkFilter->accept(**itr, &beamposition);
+        selectionPassed = static_cast<bool> (m_trkFilter->accept(**itr, &beamposition));
       } else {
         xAOD::Vertex null;
         null.makePrivateStore();
@@ -251,7 +251,7 @@ namespace InDet
         AmgSymMatrix(3) vertexError;
         vertexError.setZero();
         null.setCovariancePosition(vertexError);
-        selectionPassed = m_trkFilter->accept(**itr, &null);
+        selectionPassed = static_cast<bool>(m_trkFilter->accept(**itr, &null));
       }
 
       if (selectionPassed) {
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
index afbdafacc81..0f2347fb466 100755
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/src/InDetPriVxFinderTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
  */
 
 /***************************************************************************
@@ -166,7 +166,7 @@ namespace InDet
     for (TrackCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
       // if it should not look for multiple vertices it needs to do the track cuts here
       if (!m_enableMultipleVertices) {
-        if (m_trkFilter->accept(**itr, &beamposition) == false) continue;
+        if (!m_trkFilter->accept(**itr, &beamposition)) continue;
       }
       origTracks.push_back(*itr);
     }//end of loop over available tracks with pre-selection
@@ -281,7 +281,7 @@ namespace InDet
     for (Trk::TrackParticleBaseCollection::const_iterator itr = trackTES->begin(); itr != trackTES->end(); itr++) {
       // if it should not look for multiple vertices it needs to do the track cuts here
       if (!m_enableMultipleVertices) {
-        if (m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition) == false) continue;
+        if (!m_trkFilter->accept(*((*itr)->originalTrack()), &beamposition)) continue;
       }
       origTrackParticles.push_back(*itr);
     }//endo of loop over all available trajectories
@@ -403,7 +403,7 @@ namespace InDet
     typedef DataVector<xAOD::TrackParticle>::const_iterator TrackParticleDataVecIter;
     for (TrackParticleDataVecIter itr = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
       if (!m_enableMultipleVertices) {
-        if (m_trkFilter->accept(**itr, &beamposition) == false) continue;
+        if (!m_trkFilter->accept(**itr, &beamposition)) continue;
       }
       origTPs.push_back(*itr);
       origParameters.push_back(&(*itr)->perigeeParameters());
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/CMakeLists.txt
index 322c093c630..021f0d86ab7 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/CMakeLists.txt
@@ -12,6 +12,7 @@ if( XAOD_STANDALONE )
       Control/AthToolSupport/AsgTools
       Event/xAOD/xAODTracking
       PhysicsAnalysis/AnalysisCommon/PATCore
+      PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
       PRIVATE
       Control/xAODRootAccess )
 elseif( XAOD_ANALYSIS )
@@ -20,6 +21,7 @@ elseif( XAOD_ANALYSIS )
       Control/AthToolSupport/AsgTools
       Event/xAOD/xAODTracking
       PhysicsAnalysis/AnalysisCommon/PATCore
+      PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
       GaudiKernel
       PRIVATE
       Control/AthenaBaseComps )
@@ -30,6 +32,7 @@ else()
       Event/xAOD/xAODTracking
       GaudiKernel
       PhysicsAnalysis/AnalysisCommon/PATCore
+      PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
       Tracking/TrkEvent/TrkParameters
       Tracking/TrkExtrapolation/TrkExInterfaces
       Tracking/TrkTools/TrkToolInterfaces
@@ -57,7 +60,7 @@ endif()
 atlas_add_library( InDetTrackSelectionToolLib
    InDetTrackSelectionTool/*.h Root/*.h Root/*.cxx
    PUBLIC_HEADERS InDetTrackSelectionTool
-   LINK_LIBRARIES PATCoreLib xAODTracking ${extra_libs} )
+   LINK_LIBRARIES PATCoreLib AsgAnalysisInterfaces xAODTracking ${extra_libs} )
 
 if( NOT XAOD_STANDALONE )
    set( extra_libs )
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/IInDetTrackSelectionTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/IInDetTrackSelectionTool.h
index 0cfa23d24d9..aa8495fe395 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/IInDetTrackSelectionTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/IInDetTrackSelectionTool.h
@@ -8,7 +8,9 @@
 #define INDETTRACKSELECTIONTOOL_IINDETTRACKSELECTIONTOOL_H
 
 // Framework include(s):
-#include "PATCore/IAsgSelectionTool.h"
+#include "AsgAnalysisInterfaces/ISelectionTool.h"
+#include "PATCore/AcceptData.h"
+#include "PATCore/AcceptInfo.h"
 
 // EDM include(s):
 #include "xAODTracking/TrackParticle.h"
@@ -49,8 +51,8 @@ namespace InDet {
   /// @author Michael Clark <michael.ryan.clark@cern.ch>
   /// 
   ///
-  class IInDetTrackSelectionTool : public virtual ::IAsgSelectionTool {
-    
+  class IInDetTrackSelectionTool : public virtual CP::ISelectionTool
+{ 
     /// Declare the interface that the class provides
     ASG_TOOL_INTERFACE( InDet::IInDetTrackSelectionTool )
 
@@ -61,17 +63,17 @@ namespace InDet {
     virtual StatusCode finalize() = 0;
 
     /// Get an object describing the "selection steps" of the tool
-    virtual const Root::TAccept& getTAccept() const = 0;
+    virtual const asg::AcceptInfo& getAcceptInfo() const = 0;
 
     /// Get the decision using a generic IParticle pointer
-    virtual const Root::TAccept& accept( const xAOD::IParticle* p ) const = 0;
+    virtual  asg::AcceptData accept( const xAOD::IParticle* p ) const = 0;
 
     /// Decide whether the track in question is a "good track" or not
-    virtual const Root::TAccept& accept( const xAOD::TrackParticle& track,
+    virtual  asg::AcceptData accept( const xAOD::TrackParticle& track,
 					 const xAOD::Vertex* vertex = 0 ) const = 0;
 
 #ifndef XAOD_ANALYSIS
-    virtual const Root::TAccept& accept( const Trk::Track& track,
+    virtual  asg::AcceptData accept( const Trk::Track& track,
 					 const Trk::Vertex* vertex = 0 ) const = 0;
 #endif
 
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/InDetTrackSelectionTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/InDetTrackSelectionTool.h
index 545d4700086..94c7327f055 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/InDetTrackSelectionTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/InDetTrackSelectionTool/InDetTrackSelectionTool.h
@@ -9,7 +9,6 @@
 
 // Local include(s):
 #include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
-
 // Framework include(s):
 #include "AsgTools/AsgTool.h"
 #ifndef XAOD_ANALYSIS
@@ -38,7 +37,7 @@ namespace InDet {
 
     /// Create a proper constructor for Athena
     ASG_TOOL_CLASS2( InDetTrackSelectionTool,
-		     IAsgSelectionTool,
+		     CP::ISelectionTool,
 		     InDet::IInDetTrackSelectionTool )
     
   public:
@@ -63,10 +62,10 @@ namespace InDet {
     /// @{
     
     /// Get an object describing the "selection steps" of the tool
-    virtual const Root::TAccept& getTAccept() const override;
+    virtual const asg::AcceptInfo& getAcceptInfo() const override;
     
     /// Get the decision using a generic IParticle pointer
-    virtual const Root::TAccept& accept( const xAOD::IParticle* ) const override;
+    virtual  asg::AcceptData accept( const xAOD::IParticle* ) const override;
     
     /// @}
     
@@ -74,11 +73,11 @@ namespace InDet {
     /// @{
     
     /// Get the decision for a specific track object
-    virtual const Root::TAccept& accept( const xAOD::TrackParticle& track,
+    virtual  asg::AcceptData accept( const xAOD::TrackParticle& track,
 					 const xAOD::Vertex* vertex = nullptr ) const override;
 
 #ifndef XAOD_ANALYSIS
-    virtual const Root::TAccept& accept( const Trk::Track& track,
+    virtual  asg::AcceptData accept( const Trk::Track& track,
 					 const Trk::Vertex* vertex = nullptr ) const override;
 #endif
     
@@ -174,7 +173,7 @@ namespace InDet {
     std::vector< Int_t > m_vecMinNSctHitsAbovePt; //!< the minimum SCT hits above each pt level
 
     /// Object used to store the last decision
-    mutable Root::TAccept m_accept; //!< Object that stores detailed selection information
+    asg::AcceptInfo m_acceptInfo; //!< Object that stores detailed selection information
 
     // to set to a pre-defined cut level in Athena, we need to save the cut level
     // as a string so we can do a soft set in initialize()
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx
index 7d21f0f5984..492427c6612 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackSelectionTool.cxx
@@ -33,7 +33,7 @@ namespace {
 
 InDet::InDetTrackSelectionTool::InDetTrackSelectionTool(const std::string& name, const std::string& cutLevel)
   : asg::AsgTool(name)
-  , m_accept( "InDetTrackSelection" )
+  , m_acceptInfo( "InDetTrackSelection" )
   , m_cutLevel(cutLevel)
 #ifndef XAOD_ANALYSIS
   , m_trackSumTool("Trk::TrackSummaryTool/TrackSummaryTool", this)
@@ -660,7 +660,7 @@ StatusCode InDet::InDetTrackSelectionTool::initialize() {
     }
     const std::string& cutFamilyName = cutFamily.first;
     m_numTracksPassedCuts.push_back(0);
-    if (m_accept.addCut( cutFamilyName, "Selection of tracks according to " + cutFamilyName ) < 0) {
+    if (m_acceptInfo.addCut( cutFamilyName, "Selection of tracks according to " + cutFamilyName ) < 0) {
       ATH_MSG_ERROR( "Failed to add cut family " << cutFamilyName << " because the TAccept object is full." );
       return StatusCode::FAILURE;
     }
@@ -685,7 +685,7 @@ StatusCode InDet::InDetTrackSelectionTool::finalize()
   ATH_MSG_INFO( m_numTracksPassed << " / " << m_numTracksProcessed << " = "
 		<< m_numTracksPassed*100./m_numTracksProcessed << "% passed all cuts." );
   for (const auto& cutFamily : m_trackCuts) {
-    ULong64_t numPassed = m_numTracksPassedCuts.at(m_accept.getCutPosition(cutFamily.first));
+    ULong64_t numPassed = m_numTracksPassedCuts.at(m_acceptInfo.getCutPosition(cutFamily.first));
     ATH_MSG_INFO( numPassed << " = " << numPassed*100./m_numTracksProcessed << "% passed "
 		  << cutFamily.first << " cut." );
   }
@@ -697,9 +697,9 @@ StatusCode InDet::InDetTrackSelectionTool::finalize()
 /// the last accept(...) call. The TAccept object itself is expensive to copy,
 /// and so should be accessed by const reference.
 /// 
-const Root::TAccept& InDet::InDetTrackSelectionTool::getTAccept() const
+const asg::AcceptInfo& InDet::InDetTrackSelectionTool::getAcceptInfo() const
 {  
-  return m_accept;
+  return m_acceptInfo;
 }
 
 
@@ -713,16 +713,15 @@ const Root::TAccept& InDet::InDetTrackSelectionTool::getTAccept() const
 ///          will be cast as such and funnelled into the corresponding function. If it
 ///          is of some different type, then the particle will not pass.
 /// 
-const Root::TAccept&
+asg::AcceptData
 InDet::InDetTrackSelectionTool::accept( const xAOD::IParticle* p ) const
 {
-  // Reset the result:
-  m_accept.clear();
-    
+  
+  asg::AcceptData acceptData(&m_acceptInfo); 
   // Check if this is a track:
   if( p->type() != xAOD::Type::TrackParticle ) {
     ATH_MSG_ERROR( "accept(...) Function received a non-track" );
-    return m_accept;
+    return acceptData;
   }
     
   // Cast it to a track (we have already checked its type so we do not have to dynamic_cast):
@@ -751,14 +750,14 @@ InDet::InDetTrackSelectionTool::accept( const xAOD::IParticle* p ) const
 ///            this does not affect d0 cuts. If a vertex is not provided then the z0
 ///            cuts are performed with respect to the beamspot. More information can
 ///            be found at the InDetTrackingDC14 TWiki.
-/// @returns A Root::TAccept object that can be treated as a boolean for a simple
+/// @returns A asg::AcceptData object that can be treated as a boolean for a simple
 ///          pass/fail. It does store more detailed information about which cuts
 ///          passed and which failed, by organizing the results into cut families.
 ///          For example, TAccept::getCutResult("Z0SinTheta") will be true if the
 ///          track passed cuts on Z0*Sin(theta), its uncertainty, and its
 ///          significance.
 /// 
-const Root::TAccept& InDet::InDetTrackSelectionTool::accept( const xAOD::TrackParticle& trk,
+asg::AcceptData InDet::InDetTrackSelectionTool::accept( const xAOD::TrackParticle& trk,
 							     const xAOD::Vertex* vtx ) const
 {
   if (!m_isInitialized) {
@@ -768,9 +767,8 @@ const Root::TAccept& InDet::InDetTrackSelectionTool::accept( const xAOD::TrackPa
     }
   }
 
-  // Reset the result:
-  m_accept.clear();
 
+  asg::AcceptData acceptData(&m_acceptInfo); 
   bool passAll = true;
   // access all the track properties we will need
   for ( auto& accessor : m_trackAccessors ) {
@@ -793,7 +791,7 @@ const Root::TAccept& InDet::InDetTrackSelectionTool::accept( const xAOD::TrackPa
 	break;
       }
     }
-    m_accept.setCutResult( cutFamilyIndex, pass );
+    acceptData.setCutResult( cutFamilyIndex, pass );
     if (pass) m_numTracksPassedCuts.at(cutFamilyIndex)++; // number of tracks that pass each cut family
     cutFamilyIndex++;
   }
@@ -801,7 +799,7 @@ const Root::TAccept& InDet::InDetTrackSelectionTool::accept( const xAOD::TrackPa
   if (passAll) m_numTracksPassed++;
   m_numTracksProcessed++;
   
-  return m_accept;
+  return acceptData;
 }
 
 #ifndef XAOD_ANALYSIS
@@ -812,19 +810,18 @@ const Root::TAccept& InDet::InDetTrackSelectionTool::accept( const xAOD::TrackPa
 /// functionality to the user as the xAOD version above, but of course it
 /// does need to access track information differently.
 /// 
-const Root::TAccept&
+asg::AcceptData
 InDet::InDetTrackSelectionTool::accept( const Trk::Track& track,
 					const Trk::Vertex* vertex ) const
 {
   if (!m_isInitialized) ATH_MSG_WARNING( "Tool is not initialized! Calling accept() will not be very helpful." );
 
-  m_accept.clear();
-
+  asg::AcceptData acceptData(&m_acceptInfo);
   const Trk::TrackParameters* perigee = track.perigeeParameters();
 
   if ( perigee == nullptr || !perigee->covariance() ) {
     ATH_MSG_WARNING( "Track preselection: Zero pointer to parameterbase* received (most likely a track without perigee). This track will not pass any cuts." );
-    return m_accept;
+    return acceptData;
   }
 
   std::unique_ptr<const Trk::TrackParameters> paramsAtVertex;
@@ -840,7 +837,7 @@ InDet::InDetTrackSelectionTool::accept( const Trk::Track& track,
     ATH_MSG_INFO( "Track preselection: cannot make a measured perigee. This track will not pass any cuts." );
     if (!m_initTrkTools)
       ATH_MSG_INFO( "The user should set \"UseTrkTrackTools\" to true if they want the extrapolation tool to try to get a perigee." );
-    return m_accept;
+    return acceptData;
   }
 
   const Trk::TrackSummary* summary = track.trackSummary();
@@ -856,7 +853,7 @@ InDet::InDetTrackSelectionTool::accept( const Trk::Track& track,
     ATH_MSG_INFO( "Track preselection: cannot get a track summary. This track will not pass any cuts." );
     if (!m_initTrkTools)
       ATH_MSG_INFO( "The Trk::Track tools were not set to be initialized. The user should set the property \"UseTrkTrackTools\" to true if they wish to use the summary tool." );
-    return m_accept;
+    return acceptData;
   }
 
   bool passAll = true;
@@ -877,7 +874,7 @@ InDet::InDetTrackSelectionTool::accept( const Trk::Track& track,
 	break;
       }
     }
-    m_accept.setCutResult( cutFamilyIndex, pass );
+    acceptData.setCutResult( cutFamilyIndex, pass );
     if (pass)
       m_numTracksPassedCuts.at(cutFamilyIndex)++; // increment the number of tracks that passed this cut family
     cutFamilyIndex++;
@@ -887,7 +884,7 @@ InDet::InDetTrackSelectionTool::accept( const Trk::Track& track,
     m_numTracksPassed++;
   m_numTracksProcessed++;
 
-  return m_accept;
+  return acceptData;
 }
 
 #endif // XAOD_ANALYSIS
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx
index f3d6389d0b4..47abf1be458 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx
@@ -9,7 +9,8 @@
 #include "xAODTracking/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "xAODTracking/TrackParticleAuxContainer.h"
-
+#include "PATCore/AcceptInfo.h"
+#include "PATCore/AcceptData.h"
 #ifndef XAOD_ANALYSIS
 #include "TrkTrack/Track.h"
 #include "TrkTrackSummary/TrackSummary.h"
@@ -62,12 +63,6 @@ StatusCode InDet::ToolTester::execute_r(const EventContext &ctx) const {
     return StatusCode::FAILURE;
   }
 
-  // we will be copying TAccepts to see if the cuts are consistent for each version of accept().
-  // this is not how the tool should be used outside of testing, as it is expensive to copy
-  // the TAccepts.
-  Root::TAccept acceptxAOD;
-  Root::TAccept acceptTrk;
-
   Int_t numberOfGoodTracks = 0;
 
   // Loop over them:
@@ -88,12 +83,15 @@ StatusCode InDet::ToolTester::execute_r(const EventContext &ctx) const {
     // Select "good" tracks:
     if( ! m_selTool->accept( *track , foundVertex ) ) continue;
     numberOfGoodTracks++;
-    acceptxAOD = m_selTool->accept( *track, foundVertex );
+    asg::AcceptData acceptxAOD = m_selTool->accept( *track, foundVertex );
+    ATH_MSG_VERBOSE( " TrackParticle AcceptData to bool " << static_cast<bool>(acceptxAOD));
+
 #ifndef XAOD_ANALYSIS // if we are in full athena we have access to Trk::Tracks
      if (track->track()) {
        Trk::Track trkTrack = *(track->track());
-       acceptTrk = m_selTool->accept( trkTrack, nullptr );
-       assert( acceptxAOD == acceptTrk );
+       asg::AcceptData acceptTrk = m_selTool->accept( trkTrack, nullptr );   
+       ATH_MSG_VERBOSE( " Trk::Track AcceptData to bool " << static_cast<bool>(acceptTrk));
+       assert( static_cast<bool>(acceptxAOD) == static_cast<bool>(acceptTrk) );
      }
 #endif // XAOD_ANALYSIS
 
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h
index a29dbe65f5d..abc2eba05a1 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/InDetPhysValMonitoringTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef INDETPHYSVALMONITORING_INDETPHYSVALMONITORINGTOOL_H
@@ -46,9 +46,6 @@
 //fwd declaration
 class IInDetPhysValDecoratorTool;
 class InDetRttPlots;
-namespace Root {
-  class TAccept;
-}
 namespace IDPVM{
   class CachedGetAssocTruth;
 }
@@ -75,8 +72,8 @@ private:
 	///prevent default construction
 	InDetPhysValMonitoringTool();
   // Private utility methods
-  void fillTrackCutFlow(Root::TAccept& accept);
-  void fillCutFlow(Root::TAccept& accept, std::vector<std::string> & names, std::vector<int> & cutFlow);
+  void fillTrackCutFlow(const asg::AcceptData& accept);
+  void fillCutFlow(const asg::AcceptData& accept, std::vector<std::string> & names, std::vector<int> & cutFlow);
   // Get truth particles into a vector, possibly using the pileup from the event
 	const std::vector<const xAOD::TruthParticle *> getTruthParticles();
 	//
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
index 9a001e4ac12..3fe33cb877a 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -29,7 +29,6 @@
 #include "xAODTruth/TruthPileupEventAuxContainer.h"
 
 #include "TrkTrack/TrackCollection.h"
-#include "PATCore/TAccept.h"
 //
 #include <algorithm>
 #include <limits>
@@ -617,8 +616,7 @@ InDetPhysValMonitoringTool::fillHistograms() {
   if (m_useTrackSelection) {
     for (const auto& thisTrack: *ptracks) { // Inner loop over all track particle
       if (m_useTrackSelection) {
-        Root::TAccept trackAccept = m_trackSelectionTool->accept(*thisTrack, pvtx);
-        fillTrackCutFlow(trackAccept);
+        fillTrackCutFlow(m_trackSelectionTool->accept(*thisTrack, pvtx));
       }
     }
   }
@@ -764,13 +762,13 @@ InDetPhysValMonitoringTool::getTruthParticles() {
 }
 
 void
-InDetPhysValMonitoringTool::fillTrackCutFlow(Root::TAccept& accept) {
+InDetPhysValMonitoringTool::fillTrackCutFlow(const asg::AcceptData& accept) {
   fillCutFlow(accept, m_trackCutflowNames, m_trackCutflow);
   return;
 }
 
 void
-InDetPhysValMonitoringTool::fillCutFlow(Root::TAccept& accept, std::vector<std::string>& names,
+InDetPhysValMonitoringTool::fillCutFlow(const asg::AcceptData& accept, std::vector<std::string>& names,
                                         std::vector<int>& cutFlow) {
   // initialise cutflows
   if (cutFlow.empty()) {
diff --git a/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx b/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx
index a11926cc908..9136e9dc147 100644
--- a/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx
+++ b/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "JetRecTools/JetTrackSelectionTool.h"
@@ -57,7 +57,7 @@ int JetTrackSelectionTool::execute() const {
 }
 
 int JetTrackSelectionTool::keep(const xAOD::TrackParticle& trk) const {
-  return m_hidselector->accept(trk, 0);
+  return static_cast<bool>(m_hidselector->accept(trk, 0));
 }
 
 template<class T>
diff --git a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
index dec4f790b71..045ebb38405 100644
--- a/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
+++ b/Reconstruction/MET/METReconstruction/Root/METAssociator.cxx
@@ -343,9 +343,8 @@ namespace met {
   {
 
     if (!vx) return false;//in events with no pv, we will just reject all tracks, and therefore build only the calo MET
-    const Root::TAccept& accept = m_trkseltool->accept( *trk, vx );
-    return accept;
-  }
+    return static_cast<bool>  (m_trkseltool->accept( *trk, vx ));
+ }
 
 
   bool METAssociator::isGoodEoverP(const xAOD::TrackParticle* trk) const
diff --git a/Reconstruction/MET/METUtilities/Root/METMaker.cxx b/Reconstruction/MET/METUtilities/Root/METMaker.cxx
index 95e0b859c8c..c61c349d874 100644
--- a/Reconstruction/MET/METUtilities/Root/METMaker.cxx
+++ b/Reconstruction/MET/METUtilities/Root/METMaker.cxx
@@ -1103,8 +1103,7 @@ namespace met {
   ////////////////
   bool METMaker::acceptTrack(const xAOD::TrackParticle* trk, const xAOD::Vertex* vx) const
   {
-    const Root::TAccept& accept = m_trkseltool->accept( *trk, vx );
-    return accept;
+    return static_cast<bool>(m_trkseltool->accept( *trk, vx ));
   }
 
   const xAOD::Vertex* METMaker::getPV() const {
diff --git a/Reconstruction/MET/METUtilities/Root/METRebuilder.cxx b/Reconstruction/MET/METUtilities/Root/METRebuilder.cxx
index cb2d94d432d..95f7866b4aa 100644
--- a/Reconstruction/MET/METUtilities/Root/METRebuilder.cxx
+++ b/Reconstruction/MET/METUtilities/Root/METRebuilder.cxx
@@ -728,8 +728,12 @@ namespace met {
 
     // if(trk->d0()>m_trk_d0Max) return false;
     // if(fabs(trk->z0()+trk->vz() - pv->z()) > m_trk_z0Max) return false;
-    if(m_trk_doPVsel && pv) {return m_trkseltool->accept( *trk, pv );}
-    else              {return m_trkseltool->accept( trk );}
+    if(m_trk_doPVsel && pv) {
+      return static_cast<bool>(m_trkseltool->accept( *trk, pv ));
+    }
+    else  {
+      return static_cast<bool>(m_trkseltool->accept( trk ));
+    }
   }
 
   void METRebuilder::associateTracks(const xAOD::IParticle* obj) {
diff --git a/Reconstruction/eflowRec/src/PFTrackSelector.cxx b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
index c923cf3d386..de1b5595b35 100644
--- a/Reconstruction/eflowRec/src/PFTrackSelector.cxx
+++ b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
@@ -92,7 +92,7 @@ bool PFTrackSelector::selectTrack(const xAOD::TrackParticle& track) {
 	if (foundVertex) break;
       }
     }
-    return m_trackSelectorTool->accept(track, foundVertex);
+    return static_cast<bool>(m_trackSelectorTool->accept(track, foundVertex));
   }
   else return false;
 }
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianDensityTestAlg.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianDensityTestAlg.cxx
index b3f54ef968e..6af77dd7484 100644
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianDensityTestAlg.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianDensityTestAlg.cxx
@@ -1,7 +1,5 @@
-///////////////////////// -*- C++ -*- /////////////////////////////
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // GaussianDensityTestAlg.cxx 
@@ -137,7 +135,7 @@ void GaussianDensityTestAlg::analyzeTracks(const std::vector<Trk::ITrackLink*>&
 void GaussianDensityTestAlg::selectTracks(const xAOD::TrackParticleContainer* trackParticles, 
 					std::vector<Trk::ITrackLink*>& trackVector)
 {
-  Root::TAccept selectionPassed;
+  bool selectionPassed{false};
   const InDet::BeamSpotData* beamspot = nullptr;
   if(m_useBeamConstraint){
      SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey };
@@ -149,7 +147,7 @@ void GaussianDensityTestAlg::selectTracks(const xAOD::TrackParticleContainer* tr
       beamposition.makePrivateStore();
       beamposition.setPosition(beamspot->beamVtx().position());
       beamposition.setCovariancePosition(beamspot->beamVtx().covariancePosition());
-      selectionPassed=m_trackFilter->accept(**itr,&beamposition);
+      selectionPassed=static_cast<bool>(m_trackFilter->accept(**itr,&beamposition));
     }
     else
     {
@@ -159,7 +157,7 @@ void GaussianDensityTestAlg::selectTracks(const xAOD::TrackParticleContainer* tr
       AmgSymMatrix(3) vertexError;
       vertexError.setZero();
       null.setCovariancePosition(vertexError);
-      selectionPassed=m_trackFilter->accept(**itr,&null);
+      selectionPassed=static_cast<bool>(m_trackFilter->accept(**itr,&null));
     }
     if (selectionPassed)
     {
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/ImagingSeedTuningAlg.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/ImagingSeedTuningAlg.cxx
index b6f362d7ac1..2e2eb74dba8 100644
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/ImagingSeedTuningAlg.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/ImagingSeedTuningAlg.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // ImagingSeedTuningAlg.cxx 
@@ -468,14 +468,14 @@ void ImagingSeedTuningAlg::analyzeTracks(const std::vector<Trk::ITrackLink*>& tr
 void ImagingSeedTuningAlg::selectTracks(const xAOD::TrackParticleContainer* trackParticles, 
 					std::vector<Trk::ITrackLink*>& trackVector)
 {
-  Root::TAccept selectionPassed;
+  bool selectionPassed{false};
   for (auto itr  = trackParticles->begin(); itr != trackParticles->end(); ++itr) {
     if (m_useBeamConstraint) {
       xAOD::Vertex beamposition;
       beamposition.makePrivateStore();
       beamposition.setPosition(m_iBeamCondSvc->beamVtx().position());
       beamposition.setCovariancePosition(m_iBeamCondSvc->beamVtx().covariancePosition());
-      selectionPassed=m_trackFilter->accept(**itr,&beamposition);
+      selectionPassed=static_cast<bool> (m_trackFilter->accept(**itr,&beamposition));
     }
     else
     {
@@ -485,7 +485,7 @@ void ImagingSeedTuningAlg::selectTracks(const xAOD::TrackParticleContainer* trac
       AmgSymMatrix(3) vertexError;
       vertexError.setZero();
       null.setCovariancePosition(vertexError);
-      selectionPassed=m_trackFilter->accept(**itr,&null);
+      selectionPassed=static_cast<bool>(m_trackFilter->accept(**itr,&null));
     }
     if (selectionPassed)
     {
-- 
GitLab