diff --git a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.cxx b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.cxx index 9fbdb6a674ff7d6ea9feea1110a392beccbec560..dea12741bf2966f547e5c77355d81f17ea205d76 100644 --- a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.cxx +++ b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.cxx @@ -1,13 +1,9 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: MuonSegmentCnvAlg.cxx 298140 2013-11-19 11:32:49Z emoyse $ - -// Gaudi/Athena include(s): -#include "AthenaKernel/errorcheck.h" +#include "MuonSegmentCnvAlg.h" -// EDM include(s): #include "xAODMuon/MuonSegmentAuxContainer.h" #include "xAODMuon/MuonSegmentContainer.h" #include "TrkSegment/SegmentCollection.h" @@ -15,19 +11,10 @@ #include "MuonSegment/MuonSegment.h" #include "AthLinks/ElementLink.h" -// Local include(s): -#include "MuonSegmentCnvAlg.h" - namespace xAODMaker { - MuonSegmentCnvAlg::MuonSegmentCnvAlg( const std::string& name, - ISvcLocator* svcLoc ) - : AthAlgorithm( name, svcLoc ), - m_muonSegmentConverterTool("Muon::MuonSegmentConverterTool/MuonSegmentConverterTool") - { - - declareProperty( "SegmentContainerName", m_muonSegmentLocation = "MuonSegments" ); - declareProperty( "xAODContainerName", m_xaodContainerName = "MuonSegments" ); + MuonSegmentCnvAlg::MuonSegmentCnvAlg(const std::string& name, ISvcLocator* svcLoc) : + AthAlgorithm(name, svcLoc) { } StatusCode MuonSegmentCnvAlg::initialize() { @@ -44,7 +31,7 @@ namespace xAODMaker { StatusCode MuonSegmentCnvAlg::execute() { // Retrieve the AOD particles: - const Trk::SegmentCollection* segments = 0; + const Trk::SegmentCollection* segments = nullptr; SG::ReadHandle<Trk::SegmentCollection> h_segments(m_muonSegmentLocation); if(h_segments.isValid()) { segments = h_segments.cptr(); diff --git a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h index 31f24d898549aa6bb46db23e915af68314952955..ed64557d5427f86fba0719898f608ed8953fc11e 100644 --- a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h +++ b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h @@ -1,26 +1,15 @@ -// Dear emacs, this is -*- c++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: MuonSegmentCnvAlg.h 297747 2013-10-28 15:14:24Z krasznaa $ #ifndef XAODMUONCNV_MUONSEGMENTCNVALG_H #define XAODMUONCNV_MUONSEGMENTCNVALG_H -// System include(s): -#include <string> - -// Athena/Gaudi include(s): #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" -// xAOD include #include "xAODMuonCnv/IMuonSegmentConverterTool.h" -namespace Analysis { - class Muon; -} - +#include <string> namespace xAODMaker { @@ -46,10 +35,11 @@ namespace xAODMaker { virtual StatusCode execute(); private: - SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation; //!< Location/Key for Muon::MuonSegment - SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_xaodContainerName; //!< Location/Key for xAOD::MuonSegment + // the following segments do NOT contain MuGirl segments + SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation{this,"SegmentContainerName","MuonSegments"}; + SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_xaodContainerName{this,"xAODContainerName","MuonSegments"}; - ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool; + ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool{this,"MuonSegmentConverterTool","Muon::MuonSegmentConverterTool/MuonSegmentConverterTool"}; }; // class MuonSegmentCnvAlg } // namespace xAODMaker diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx index b2b734de11abbd25bd0fb8d4c63bdc0441ddec58..a60cf5964e3feaab83990499c435cce438f0239b 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.cxx @@ -4,7 +4,6 @@ #include "MuonSegmentFinderAlg.h" -#include "CscSegmentMakers/ICscSegmentFinder.h" #include "MuonPattern/MuonPatternChamberIntersect.h" #include "MuonPattern/MuonPatternCombination.h" #include "MuonPattern/MuonPatternCombinationCollection.h" @@ -17,21 +16,13 @@ #include "MuonSegment/MuonSegment.h" #include "MuonSegment/MuonSegmentCombination.h" #include "MuonSegment/MuonSegmentCombinationCollection.h" -#include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinder.h" #include "TrkParameters/TrackParameters.h" using HepGeom::Transform3D; -MuonSegmentFinderAlg::MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator) - : AthReentrantAlgorithm(name, pSvcLocator) -{ - declareProperty("PrintSummary", m_printSummary = false); - // - declareProperty("doTGCClust", m_doTGCClust = false); - declareProperty("doRPCClust", m_doRPCClust = false); - declareProperty("doClusterTruth", m_doClusterTruth = false); -} -MuonSegmentFinderAlg::~MuonSegmentFinderAlg() {} +MuonSegmentFinderAlg::MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) { +} StatusCode MuonSegmentFinderAlg::initialize() diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h index 8c3c08c430b317b7d539688045bc42fb0896e88f..84636576470240530033a3a3d661cc245ca0ecd0 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h @@ -20,24 +20,19 @@ #include "MuonRecToolInterfaces/IMuonTruthSummaryTool.h" #include "MuonSegment/MuonSegmentCombinationCollection.h" #include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinderTool.h" +#include "MuonSegmentMakerToolInterfaces/IMuonClusterSegmentFinder.h" #include "MuonSegmentMakerToolInterfaces/IMuonPatternCalibration.h" #include "MuonSegmentMakerToolInterfaces/IMuonPatternSegmentMaker.h" #include "MuonSegmentMakerToolInterfaces/IMuonSegmentOverlapRemovalTool.h" #include "TrkSegment/SegmentCollection.h" #include "TrkTruthData/PRD_MultiTruthCollection.h" - -namespace Muon { -class IMuonClusterSegmentFinder; -} - -class MsgStream; -class ICscSegmentFinder; +#include "CscSegmentMakers/ICscSegmentFinder.h" class MuonSegmentFinderAlg : public AthReentrantAlgorithm { public: MuonSegmentFinderAlg(const std::string& name, ISvcLocator* pSvcLocator); - virtual ~MuonSegmentFinderAlg(); + virtual ~MuonSegmentFinderAlg()=default; virtual StatusCode initialize() override; virtual StatusCode execute(const EventContext& ctx) const override; @@ -166,15 +161,12 @@ class MuonSegmentFinderAlg : public AthReentrantAlgorithm { const std::vector<const Muon::TgcPrepDataCollection*> tgcCols, const EventContext& ctx) const; void createSegmentsFromClusters(const Muon::MuonPatternCombination* patt, Trk::SegmentCollection* segments) const; - bool m_printSummary; + Gaudi::Property<bool> m_printSummary{this,"PrintSummary",false}; + Gaudi::Property<bool> m_doTGCClust{this,"doTGCClust",false,"selection flags for cluster based segment finding"}; + Gaudi::Property<bool> m_doRPCClust{this,"doRPCClust",false,"selection flags for cluster based segment finding"}; + Gaudi::Property<bool> m_doClusterTruth{this,"doClusterTruth",false,"selection flags for cluster based segment finding"}; - /** selection flags for cluster based segment finding */ - bool m_doTGCClust; - bool m_doRPCClust; - bool m_doClusterTruth; }; #endif -/* LocalWords: ifndef - */ diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx index 971dc6536cde0d60d934ffa9205e4abb64dff852..eb697421b58247e14bba75a9a4206a6a4383c910 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx @@ -1,14 +1,12 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MuonCombinedAlg.h" MuonCombinedAlg::MuonCombinedAlg(const std::string& name, ISvcLocator* pSvcLocator): - AthAlgorithm(name,pSvcLocator) -{} - -MuonCombinedAlg::~MuonCombinedAlg(){} + AthAlgorithm(name,pSvcLocator) { +} StatusCode MuonCombinedAlg::initialize() { @@ -68,7 +66,3 @@ StatusCode MuonCombinedAlg::execute() return StatusCode::SUCCESS; } -StatusCode MuonCombinedAlg::finalize() -{ - return StatusCode::SUCCESS; -} diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h index aa2e6a6068771d73f0d9d532555148715a278e09..febb7a2a7e220d53e0276d82407a9369c7c0f123 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h +++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h @@ -28,11 +28,10 @@ class MuonCombinedAlg : public AthAlgorithm public: MuonCombinedAlg(const std::string& name, ISvcLocator* pSvcLocator); - ~MuonCombinedAlg(); + ~MuonCombinedAlg()=default; StatusCode initialize(); StatusCode execute(); - StatusCode finalize(); private: diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx index 36d8095c5900d21136461da32c09016e12a27bdb..0ec6d2cfec82b384ee2529e826d58d3c652e41e9 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx @@ -9,14 +9,8 @@ using namespace MuonCombined; -MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator) - : AthReentrantAlgorithm(name, pSvcLocator), m_doSiliconForwardMuons(false) -{ - declareProperty("TrackParticleLocation", m_indetTrackParticleLocation = {"InDetTrackParticles"}); - declareProperty("ForwardParticleLocation", m_indetForwardTrackParticleLocation = "InDetForwardTrackParticles"); - declareProperty("InDetCandidateLocation", m_candidateCollectionName = "InDetCandidates"); - declareProperty("DoSiliconAssocForwardMuons", m_doSiliconForwardMuons = false); - declareProperty("ExtensionPtThreshold", m_extThreshold = 2500); +MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) { } StatusCode @@ -27,9 +21,7 @@ MuonCombinedInDetCandidateAlg::initialize() ATH_CHECK(m_indetTrackParticleLocation.initialize()); ATH_CHECK(m_indetForwardTrackParticleLocation.initialize(m_doSiliconForwardMuons)); ATH_CHECK(m_candidateCollectionName.initialize()); - ATH_CHECK(m_forwardTrackSelector.retrieve(DisableTool{!m_doSiliconForwardMuons})); - return StatusCode::SUCCESS; } diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h index 72fdb360099783cb6f2e221098b6244adf70549b..a6632c8c3940a82c27240510a14a792616548e66 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h +++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h @@ -25,13 +25,10 @@ class MuonCombinedInDetCandidateAlg : public AthReentrantAlgorithm { StatusCode execute(const EventContext& ctx) const; private: - bool m_doSiliconForwardMuons; - float m_extThreshold; - - SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> m_indetTrackParticleLocation; - SG::ReadHandleKey<xAOD::TrackParticleContainer> m_indetForwardTrackParticleLocation; - SG::WriteHandleKey<InDetCandidateCollection> m_candidateCollectionName; + SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> m_indetTrackParticleLocation{this,"TrackParticleLocation",{"InDetTrackParticles"}}; + SG::ReadHandleKey<xAOD::TrackParticleContainer> m_indetForwardTrackParticleLocation{this,"ForwardParticleLocation","InDetForwardTrackParticles"}; + SG::WriteHandleKey<InDetCandidateCollection> m_candidateCollectionName{this,"InDetCandidateLocation","InDetCandidates"}; ToolHandle<Trk::ITrackSelectorTool> m_trackSelector{ this, "TrackSelector", "InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedTrackSelectorTool", "Track selector tool"}; @@ -56,6 +53,10 @@ class MuonCombinedInDetCandidateAlg : public AthReentrantAlgorithm { void printTrackParticleInfo(const xAOD::TrackParticle* const tp, const std::string& what) const; int getCount(const xAOD::TrackParticle& tp, xAOD::SummaryType type) const; + + Gaudi::Property<bool> m_doSiliconForwardMuons {this,"DoSiliconAssocForwardMuons",false}; + + Gaudi::Property<float> m_extThreshold {this,"ExtensionPtThreshold",2500}; }; diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx index c898fd39e4121fef1fb43b0cf7505bbfed6dedb1..d46617606f7a6b8046b387543a10e86670185807 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx @@ -6,8 +6,8 @@ #include "MuonCombinedEvent/MuonCandidateCollection.h" -MuonCombinedInDetExtensionAlg::MuonCombinedInDetExtensionAlg(const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm(name, pSvcLocator) { +MuonCombinedInDetExtensionAlg::MuonCombinedInDetExtensionAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthAlgorithm(name, pSvcLocator) { } StatusCode diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx index 1a57abd5fe549da3ead938f9f3148275f687c339..f7f25b794378c50b6a0ed1266954670ae2478be8 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedMuonCandidateAlg.cxx @@ -4,9 +4,8 @@ #include "MuonCombinedMuonCandidateAlg.h" -MuonCombinedMuonCandidateAlg::MuonCombinedMuonCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm(name, pSvcLocator) -{ +MuonCombinedMuonCandidateAlg::MuonCombinedMuonCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthAlgorithm(name, pSvcLocator) { } StatusCode