ATLAS Offline Software
Loading...
Searching...
No Matches
MuonInsideOutRecoTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUON_MUONINSIDEOUTRECOTOOL_H
6#define MUON_MUONINSIDEOUTRECOTOOL_H
7
8#include <string>
9#include <vector>
10
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/ToolHandle.h"
30
31namespace Muon {
32 struct MuonCandidate;
34} // namespace Muon
35
36namespace Trk {
37 class Track;
39} // namespace Trk
40
41static const InterfaceID IID_MuonInsideOutRecoTool("MuonCombined::MuonInsideOutRecoTool", 1, 0);
42
43namespace MuonCombined {
44
46 public:
48 MuonInsideOutRecoTool(const std::string& type, const std::string& name, const IInterface* parent);
49 virtual ~MuonInsideOutRecoTool() = default;
50 virtual StatusCode initialize() override;
51
53 static const InterfaceID& interfaceID() { return IID_MuonInsideOutRecoTool; }
54
56 virtual void extendWithPRDs(const InDetCandidateCollection& inDetCandidates, InDetCandidateToTagMap* tagMap,
58 TrackCollection* meTracks, Trk::SegmentCollection* segments, const EventContext& ctx) const override;
59
61 virtual void extend(const InDetCandidateCollection& inDetCandidates, InDetCandidateToTagMap* tagMap, TrackCollection* combTracks,
62 TrackCollection* meTracks, Trk::SegmentCollection* segments, const EventContext& ctx) const override;
63
65 std::pair<std::unique_ptr<const Muon::MuonCandidate>, std::unique_ptr<Trk::Track>> findBestCandidate(
66 const EventContext& ctx, const xAOD::TrackParticle& indetTrackParticle,
67 const std::vector<Muon::MuonLayerRecoData>& allLayers) const;
68
69 private:
71 void handleCandidate(const InDetCandidate& inDetCandidate, InDetCandidateToTagMap* tagMap,
73 Trk::SegmentCollection* segColl, std::vector<std::shared_ptr<const Muon::MuonSegment>> segments, const EventContext& ctx) const;
74
76 void addTag(const EventContext& ctx, const InDetCandidate& indetCandidate, InDetCandidateToTagMap* tagMap,
77 const Muon::MuonCandidate& candidate, std::unique_ptr<Trk::Track>& selectedTrack, TrackCollection* combTracks,
78 TrackCollection* meTracks, Trk::SegmentCollection* segments) const;
79
81 bool getLayerData(const Muon::MuonLayerSurface& surf, Muon::MuonLayerPrepRawData& layerPrepRawData,
83
85 template <class COL>
88 std::vector<const Muon::MuonPrepDataCollection<COL>*>& output) const;
89
90 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
91 ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
92 "Handle to the service providing the IMuonEDMHelperSvc interface"};
93 PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "MuonEDMPrinterTool", ""};
94 ToolHandle<Muon::IMuonLayerSegmentFinderTool> m_segmentFinder{this, "MuonLayerSegmentFinderTool",
95 "Muon::MuonLayerSegmentFinderTool/MuonLayerSegmentFinderTool"};
96 ToolHandle<Muon::IMuonLayerSegmentMatchingTool> m_segmentMatchingTool{
97 this, "MuonLayerSegmentMatchingTool", "Muon::MuonLayerSegmentMatchingTool/MuonLayerSegmentMatchingTool"};
98 ToolHandle<Muon::IMuonLayerAmbiguitySolverTool> m_ambiguityResolver{
99 this, "MuonLayerAmbiguitySolverTool", "Muon::MuonLayerAmbiguitySolverTool/MuonLayerAmbiguitySolverTool"};
100 ToolHandle<Muon::IMuonCandidateTrackBuilderTool> m_candidateTrackBuilder{
101 this, "MuonCandidateTrackBuilderTool", "Muon::MuonCandidateTrackBuilderTool/MuonCandidateTrackBuilderTool"};
102 ToolHandle<Rec::ICombinedMuonTrackBuilder> m_trackFitter{this, "MuonTrackBuilder",
103 "Rec::CombinedMuonTrackBuilder/CombinedMuonTrackBuilder"};
104 ToolHandle<Trk::ITrackAmbiguityProcessorTool> m_trackAmbiguityResolver{this, "TrackAmbiguityProcessor",
105 "Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"};
106 ToolHandle<Muon::MuonLayerHashProviderTool> m_layerHashProvider{this, "MuonLayerHashProviderTool",
107 "Muon::MuonLayerHashProviderTool"};
108 ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool{this, "TrackSummaryTool", "MuonTrackSummaryTool"};
109 ToolHandle<Muon::IMuonRecoValidationTool> m_recoValidationTool{this, "MuonRecoValidationTool", ""};
110
111 Gaudi::Property<double> m_idTrackMinPt{this, "IDTrackMinPt", 2500};
112 Gaudi::Property<bool> m_ignoreSiAssocated{this, "IgnoreSiAssociatedCandidates", true};
113
114 // vertex container key
115 SG::ReadHandleKey<xAOD::VertexContainer> m_vertexKey{this, "VertexContainer", "PrimaryVertices", "vertex container key"};
116
117 SG::ReadHandleKey<Trk::SegmentCollection> m_inputSegments{this, "InputSegments", "", "Input Segment Collection"};
118 };
119} // namespace MuonCombined
120
121#endif
DataVector< MuonCombined::InDetCandidate > InDetCandidateCollection
This typedef represents a collection of InDetCandidate objects.
static const InterfaceID IID_MuonInsideOutRecoTool("MuonCombined::MuonInsideOutRecoTool", 1, 0)
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
interface for tools buildingmuons from ID candidates
virtual ~MuonInsideOutRecoTool()=default
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
virtual void extendWithPRDs(const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, IMuonCombinedInDetExtensionTool::MuonPrdData prdData, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
IMuonCombinedInDetExtensionTool interface: extend ID candidate with PRDs for segment-finding.
std::pair< std::unique_ptr< const Muon::MuonCandidate >, std::unique_ptr< Trk::Track > > findBestCandidate(const EventContext &ctx, const xAOD::TrackParticle &indetTrackParticle, const std::vector< Muon::MuonLayerRecoData > &allLayers) const
find the best candidate for a given set of segments
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_trackAmbiguityResolver
virtual StatusCode initialize() override
ToolHandle< Muon::MuonLayerHashProviderTool > m_layerHashProvider
virtual void extend(const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
IMuonCombinedInDetExtensionTool interface: deprecated.
ToolHandle< Muon::IMuonLayerSegmentMatchingTool > m_segmentMatchingTool
SG::ReadHandleKey< Trk::SegmentCollection > m_inputSegments
ToolHandle< Muon::IMuonCandidateTrackBuilderTool > m_candidateTrackBuilder
ToolHandle< Muon::IMuonRecoValidationTool > m_recoValidationTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
ToolHandle< Muon::IMuonLayerAmbiguitySolverTool > m_ambiguityResolver
static const InterfaceID & interfaceID()
access to tool interface
ToolHandle< Rec::ICombinedMuonTrackBuilder > m_trackFitter
ToolHandle< Muon::IMuonLayerSegmentFinderTool > m_segmentFinder
void addTag(const EventContext &ctx, const InDetCandidate &indetCandidate, InDetCandidateToTagMap *tagMap, const Muon::MuonCandidate &candidate, std::unique_ptr< Trk::Track > &selectedTrack, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments) const
add muon candidate to indet candidate
bool getLayerDataTech(Muon::MuonStationIndex::TechnologyIndex technology, const Muon::MuonLayerSurface &surf, const Muon::MuonPrepDataContainerT< COL > *input, std::vector< const Muon::MuonPrepDataCollection< COL > * > &output) const
access data in layer for a given technology
MuonInsideOutRecoTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
bool getLayerData(const Muon::MuonLayerSurface &surf, Muon::MuonLayerPrepRawData &layerPrepRawData, IMuonCombinedInDetExtensionTool::MuonPrdData prdData) const
access data in layer
void handleCandidate(const InDetCandidate &inDetCandidate, InDetCandidateToTagMap *tagMap, const IMuonCombinedInDetExtensionTool::MuonPrdData &prdData, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segColl, std::vector< std::shared_ptr< const Muon::MuonSegment > > segments, const EventContext &ctx) const
handle a single candidate
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Template to hold collections of MuonPrepRawData objects.
Property holding a SG store/key/clid from which a ReadHandle is made.
Interface for condensing Trk::Track properties and associated hits to a (non-fittable) foot print,...
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
TechnologyIndex
enum to classify the different layers in the muon spectrometer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonPrepDataContainer< MuonPrepDataCollection< PrdType > > MuonPrepDataContainerT
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< Trk::Segment > SegmentCollection
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Struct to hold all PrepRawData collections in a given layer.