diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonTrackSegmentMatchingTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonTrackSegmentMatchingTool.h index 334a48da4fdbc6de4de482dde68cca5c8d415027..b18b89b087f66fd22529981df72e0fbbf55bc14c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonTrackSegmentMatchingTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonTrackSegmentMatchingTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ #ifndef MUON_IMUONTRACKSEGMENTMATCHINGTOOL_H @@ -7,6 +7,7 @@ #include "GaudiKernel/IAlgTool.h" +static const InterfaceID IID_IMuonTrackSegmentMatchingTool("Muon::IMuonTrackSegmentMatchingTool",1,0); namespace Trk { class Track; @@ -22,10 +23,7 @@ namespace Muon { { public: /** access to tool interface */ - static const InterfaceID& interfaceID(){ - static const InterfaceID IID_IMuonTrackSegmentMatchingTool("Muon::IMuonTrackSegmentMatchingTool",1,0); - return IID_IMuonTrackSegmentMatchingTool; - } + static const InterfaceID& interfaceID(); /** @brief clean a track, returns a pointer to a new track if successfull. If the input track is does not require cleaning a pointer the the initial track is return in which case the @@ -34,10 +32,14 @@ namespace Muon { The caller should ensure the track gets deleted. */ virtual bool match( const Trk::Track& track, const MuonSegment& segment, bool useTightCuts = false ) const = 0; - virtual ~IMuonTrackSegmentMatchingTool() = default; + virtual void cleanUp() const = 0; }; - + inline const InterfaceID& IMuonTrackSegmentMatchingTool::interfaceID() + { + return IID_IMuonTrackSegmentMatchingTool; + } + } // end of name space #endif diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx index 094a8c5ac6fedd7b16b0194fe56d40501a30096f..dd121418ba0019f9b2123a53b98f93c34257ceb4 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonSegmentRegionRecoveryTool.cxx @@ -1154,6 +1154,7 @@ const Trk::TrackParameters* MuonSegmentRegionRecoveryTool::reachableDetEl( const void MuonSegmentRegionRecoveryTool::cleanUp() const { + m_trackSegmentMatchingTool->cleanUp(); } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.cxx index d7da5f2da3c82a7d53e032a36c32bc1df7ef89f1..0533602e9ede72abfd910baf67901bdfcfd153fb 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.cxx @@ -25,6 +25,13 @@ #include <sstream> namespace { // local funcs +#if 0 +inline double robust_acos(double x) { + if ( x >= 1.0 ) return 0.0; + if ( x <= -1.0 ) return M_PI; + return std::acos(x); +} +#endif // limit angle difference to -pi/2 < x <= pi/2 inline double theta_diff(double x) { @@ -1463,4 +1470,8 @@ namespace Muon { if ( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " Yes!" << endmsg; return true; } + + + void MooCandidateMatchingTool::cleanUp() const { + } } diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.h index 04a721104c713c3ff1575fba8f5cf5edf1334f0f..ace936628b1fa5100afd164e3146a57d5658b45a 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MooCandidateMatchingTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef MOOCANDIDATEMATCHINGTOOL_H @@ -75,7 +75,10 @@ namespace Muon { /** finialize method, method taken from bass-class AlgTool */ virtual StatusCode finalize() override; - + + /** @brief access to tool interface */ + static const InterfaceID& interfaceID() { return IID_MooCandidateMatchingTool; } + /** @brief match two segment entries */ bool match( const MuPatSegment& entry1, const MuPatSegment& entry2, bool useTightCuts = false ) const; @@ -149,6 +152,8 @@ namespace Muon { /** @brief return whether the 2 segments are in neighbouring chambers */ bool areInNeighbouringChambers( const MuPatSegment& seg1, const MuPatSegment& seg2 ) const; + void cleanUp() const override; + private: double m_minimumSideMatchRadius;