diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/MuonPrepRawDataProviderTools/MuonPrepRawDataCollectionProviderTool.h b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/MuonPrepRawDataProviderTools/MuonPrepRawDataCollectionProviderTool.h deleted file mode 100644 index 1c090974557625002fe48dd053ac01fdff4b1d5d..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/MuonPrepRawDataProviderTools/MuonPrepRawDataCollectionProviderTool.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef MUON_MUONPREPRAWDATACOLLECTIONPROVIDERTOOL_H -#define MUON_MUONPREPRAWDATACOLLECTIONPROVIDERTOOL_H - -#include <vector> -#include <typeinfo> - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/ToolHandle.h" - -#include "MuonIdHelpers/IMuonIdHelperSvc.h" -#include "MuonLayerHashProviderTool.h" - -#include "MuonLayerEvent/MuonLayerPrepRawData.h" -#include "MuonPrepRawData/MuonPrepDataContainer.h" - -static const InterfaceID IID_MuonPrepRawDataCollectionProviderTool("Muon::MuonPrepRawDataCollectionProviderTool",1,0); - -namespace Muon { - - class MuonPrepRawDataCollectionProviderTool : public AthAlgTool { - public: - - /** Default AlgTool functions */ - MuonPrepRawDataCollectionProviderTool(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~MuonPrepRawDataCollectionProviderTool() {}; - StatusCode initialize(); - - /** @brief access to tool interface */ - static const InterfaceID& interfaceID() { return IID_MuonPrepRawDataCollectionProviderTool; } - - /** access data in layer */ - bool getLayerData( int sector, MuonStationIndex::DetectorRegionIndex regionIndex, MuonStationIndex::LayerIndex layerIndex, MuonLayerPrepRawData& layerPrepRawData ) const; - - /** access data in layer for a given technology */ - template<class COL> - bool getLayerData( int sector, MuonStationIndex::TechnologyIndex technology, MuonStationIndex::DetectorRegionIndex regionIndex, - MuonStationIndex::LayerIndex layerIndex, std::vector<const COL*>& output ) const { - - // get technologies in the given layer - unsigned int sectorLayerHash = MuonStationIndex::sectorLayerHash( regionIndex, layerIndex ); - - // get hashes - const MuonLayerHashProviderTool::HashVec& hashes = m_layerHashProvider->getHashes( sector, technology, sectorLayerHash ); - - // skip empty inputs - if( hashes.empty() ) return true; - - // access PRD container - typedef MuonPrepDataContainer< COL > ContainerType; - const ContainerType* container = 0; - std::string location = m_locations[technology]; - if( !evtStore()->contains<ContainerType>(location) ) { - ATH_MSG_DEBUG("Cannot find container " << typeid(container).name() << " at " << location << " technology index " << technology); - return true; - } - if (evtStore()->retrieve(container,location).isFailure()) { - ATH_MSG_WARNING("Cannot retrieve container " << typeid(container).name() << " at " << location); - return false; - } - - // loop over hashes - for( MuonLayerHashProviderTool::HashVec::const_iterator it=hashes.begin();it!=hashes.end();++it ){ - - // skip if not found - auto col = container->indexFindPtr(*it); - if( col == nullptr ) { - continue; - } - ATH_MSG_VERBOSE(" adding " << m_idHelperSvc->toStringChamber(col->identify()) << " size " << col->size()); - output.push_back(col); - } - return true; - } - - private: - - ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; - ToolHandle<MuonLayerHashProviderTool> m_layerHashProvider{this,"MuonLayerHashProviderTool","Muon::MuonLayerHashProviderTool/MuonLayerHashProviderTool"}; - - /** storegate keys of PRDs*/ - std::vector< std::string > m_locations; - }; -} - - - -#endif - diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPrepRawDataCollectionProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPrepRawDataCollectionProviderTool.cxx deleted file mode 100644 index 9ffca6888a27fab589573dd1a037044f1d67a0e1..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPrepRawDataCollectionProviderTool.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -#include "MuonPrepRawDataProviderTools/MuonPrepRawDataCollectionProviderTool.h" -#include "MuonIdHelpers/MuonStationIndexHelpers.h" - -namespace Muon { - - MuonPrepRawDataCollectionProviderTool::MuonPrepRawDataCollectionProviderTool(const std::string& type, const std::string& name, const IInterface* parent): - AthAlgTool(type,name,parent) { - declareInterface<MuonPrepRawDataCollectionProviderTool>(this); - m_locations.resize(MuonStationIndex::TechnologyIndexMax); - m_locations[MuonStationIndex::MDT] = "MDT_DriftCircles"; - m_locations[MuonStationIndex::RPC] = "RPC_Measurements"; - m_locations[MuonStationIndex::TGC] = "TGC_Measurements"; - m_locations[MuonStationIndex::CSCI] = "CSC_Clusters"; - m_locations[MuonStationIndex::STGC] = "sTGC_Clusters"; - m_locations[MuonStationIndex::MM] = "MM_Clusters"; - for( const auto& entry : m_locations ){ - ATH_MSG_DEBUG(" location " << entry); - } - } - - StatusCode MuonPrepRawDataCollectionProviderTool::initialize() { - - ATH_CHECK(m_idHelperSvc.retrieve()); - ATH_CHECK(m_layerHashProvider.retrieve()); - - return StatusCode::SUCCESS; - } - - bool MuonPrepRawDataCollectionProviderTool::getLayerData( int sector, MuonStationIndex::DetectorRegionIndex regionIndex, - MuonStationIndex::LayerIndex layerIndex, MuonLayerPrepRawData& layerPrepRawData ) const { - - // get technologies in the given layer - MuonStationIndex::StIndex stIndex = MuonStationIndex::toStationIndex( regionIndex, layerIndex ); - std::vector<MuonStationIndex::TechnologyIndex> technologiesInStation = MuonStationIndexHelpers::technologiesInStation( stIndex ); - std::string techString; - for( auto tech : technologiesInStation ) techString += " " + MuonStationIndex::technologyName(tech); - ATH_MSG_DEBUG("getLayerData: sector " << sector << " " << MuonStationIndex::regionName(regionIndex) << " " << MuonStationIndex::layerName(layerIndex) - << " technologies " << techString); - - bool success = true; - // loop over technologies and get data - for( std::vector<MuonStationIndex::TechnologyIndex>::iterator it=technologiesInStation.begin();it!=technologiesInStation.end();++it ){ - - // get collections, keep track of failures - if( *it == MuonStationIndex::MDT ) success = !getLayerData<MdtPrepDataCollection>(sector,*it,regionIndex,layerIndex,layerPrepRawData.mdts) ? false : success; - else if( *it == MuonStationIndex::RPC ) success = !getLayerData<RpcPrepDataCollection>(sector,*it,regionIndex,layerIndex,layerPrepRawData.rpcs) ? false : success; - else if( *it == MuonStationIndex::TGC ) success = !getLayerData<TgcPrepDataCollection>(sector,*it,regionIndex,layerIndex,layerPrepRawData.tgcs) ? false : success; - else if( *it == MuonStationIndex::CSCI ) success = !getLayerData<CscPrepDataCollection>(sector,*it,regionIndex,layerIndex,layerPrepRawData.cscs) ? false : success; - else if( *it == MuonStationIndex::STGC ) success = !getLayerData<sTgcPrepDataCollection>(sector,*it,regionIndex,layerIndex,layerPrepRawData.stgcs) ? false : success; - else if( *it == MuonStationIndex::MM ) success = !getLayerData<MMPrepDataCollection>(sector,*it,regionIndex,layerIndex,layerPrepRawData.mms) ? false : success; - } - - if( msgLvl(MSG::DEBUG) ){ - msg(MSG::DEBUG) << " Got data: sector " << sector << " " << MuonStationIndex::regionName(regionIndex) - << " " << MuonStationIndex::layerName(layerIndex); - if( !layerPrepRawData.mdts.empty() ) msg(MSG::DEBUG) << " MDTs " << layerPrepRawData.mdts.size(); - if( !layerPrepRawData.rpcs.empty() ) msg(MSG::DEBUG) << " RPCs " << layerPrepRawData.rpcs.size(); - if( !layerPrepRawData.tgcs.empty() ) msg(MSG::DEBUG) << " TGCs " << layerPrepRawData.tgcs.size(); - if( !layerPrepRawData.cscs.empty() ) msg(MSG::DEBUG) << " CSCs " << layerPrepRawData.cscs.size(); - if( !layerPrepRawData.stgcs.empty() ) msg(MSG::DEBUG) << " STGCs " << layerPrepRawData.stgcs.size(); - if( !layerPrepRawData.mms.empty() ) msg(MSG::DEBUG) << " MMs " << layerPrepRawData.mms.size(); - msg(MSG::DEBUG) << endmsg; - } - return success; - } - - -} - diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/components/MuonPrepRawDataProviderTools_entries.cxx b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/components/MuonPrepRawDataProviderTools_entries.cxx index 41eaa9fdd9e54def3c58d2f18195fec8a2c65010..e162393f873d69b29dc04f542e7c67f3c4fb8170 100644 --- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/components/MuonPrepRawDataProviderTools_entries.cxx +++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/components/MuonPrepRawDataProviderTools_entries.cxx @@ -1,10 +1,8 @@ +/* + Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +*/ #include "MuonPrepRawDataProviderTools/MuonLayerHashProviderTool.h" -#include "MuonPrepRawDataProviderTools/MuonPrepRawDataCollectionProviderTool.h" #include "../MuonPRDSelectionTool.h" -using namespace Muon; - -DECLARE_COMPONENT( MuonLayerHashProviderTool ) -DECLARE_COMPONENT( MuonPrepRawDataCollectionProviderTool ) -DECLARE_COMPONENT( MuonPRDSelectionTool ) - +DECLARE_COMPONENT( Muon::MuonPRDSelectionTool ) +DECLARE_COMPONENT( Muon::MuonLayerHashProviderTool ) \ No newline at end of file diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx index 33731c614bbb344810abf89214102e5b9ac6bee4..acfb1581935afe73b245a6a945c50634d25e3907 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonLayerSegmentMakerTools/src/MuonLayerSegmentFinderTool.cxx @@ -7,7 +7,6 @@ #include "EventPrimitives/EventPrimitivesHelpers.h" #include "FourMomUtils/xAODP4Helpers.h" #include "MuonLayerHough/MuonLayerHough.h" -#include "MuonPrepRawDataProviderTools/MuonPrepRawDataCollectionProviderTool.h" #include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h" #include "MuonRIO_OnTrack/MuonClusterOnTrack.h" #include "MuonSegment/MuonSegment.h"