ATLAS Offline Software
MuonLayerAmbiguitySolverTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUON_MUONLAYERAMBIGUITYSOLVERTOOL_H
6 #define MUON_MUONLAYERAMBIGUITYSOLVERTOOL_H
7 
8 #include <vector>
9 
11 #include "GaudiKernel/ToolHandle.h"
20 
21 namespace Muon {
22  struct MuonCandidate;
23 
25  public:
27  MuonLayerAmbiguitySolverTool(const std::string& type, const std::string& name, const IInterface* parent);
28  virtual ~MuonLayerAmbiguitySolverTool() = default;
29  virtual StatusCode initialize() override;
30 
32  virtual void resolveOverlaps(const EventContext& ctx, const std::vector<Muon::MuonLayerRecoData>& allLayers,
33  std::vector<MuonCandidate>& resolvedCandidates) const override;
34 
35  private:
36  void buildLayerVec(const EventContext& ctx, const std::vector<MuonLayerRecoData>& allLayers,
37  std::vector<std::vector<MuonLayerIntersection> >& muonLayerDataHashVec) const;
38 
39  bool getNextSeed(const std::vector<std::vector<MuonLayerIntersection> >& muonLayerDataHashVec,
40  std::set<const MuonSegment*>& usedSegments, std::vector<MuonStationIndex::StIndex>& inverseSeedLayerOrder,
41  MuonLayerIntersection& layerIntersection) const;
42 
43  bool extendCandidatesWithLayers(const EventContext& ctx, std::vector<MuonCandidate>& candidates,
44  const std::vector<std::vector<MuonLayerIntersection> >& muonLayerRecoDataHashVec,
45  const std::vector<MuonStationIndex::StIndex>& inverseSeedLayerOrder) const;
46 
47  void resolveSmallLargeOverlaps(const EventContext& ctx, std::vector<MuonLayerIntersection>& existingLayerIntersections,
48  std::vector<MuonLayerIntersection>& newLayerIntersections) const;
49 
50  bool match(const EventContext& ctx, const MuonCandidate& candidate, const MuonLayerIntersection& layerIntersection) const;
51 
52  ToolHandle<IMuonSegmentSelectionTool> m_segmentSelector{this, "MuonSegmentSelectionTool",
53  "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"};
54  ToolHandle<IMuonSegmentMatchingTool> m_segmentMatchingTool{this, "MuonSegmentMatchingTool",
55  "Muon::MuonSegmentMatchingTool/MuonSegmentMatchingToolTight"};
56  ToolHandle<IMuonSegmentTrackBuilder> m_muonTrackBuilder{this, "MuonSegmentTrackBuilder",
57  "Muon::MooTrackBuilder/MooMuonTrackBuilder"};
58  PublicToolHandle<MuonEDMPrinterTool> m_printer{this, "MuonEDMPrinterTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
59 
60  Gaudi::Property<unsigned int> m_maxSeeds{this, "MaxSeeds", 30, "maximum number of seeds to be tried"};
61  Gaudi::Property<int> m_seedQualityThreshold{this, "SeedQualityThreshold", 2, "seed quality threshold"};
62  Gaudi::Property<int> m_minSegmentQuality{this, "MinimumSegmentQuality", 1, "minimum quality for a segment to be considered"};
63  };
64 } // namespace Muon
65 
66 #endif
Muon::MuonCandidate
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonLayerEvent/MuonLayerEvent/MuonCandidate.h:14
IMuonLayerAmbiguitySolverTool.h
Muon::MuonLayerAmbiguitySolverTool::m_segmentMatchingTool
ToolHandle< IMuonSegmentMatchingTool > m_segmentMatchingTool
Definition: MuonLayerAmbiguitySolverTool.h:54
Muon::MuonLayerAmbiguitySolverTool::m_minSegmentQuality
Gaudi::Property< int > m_minSegmentQuality
Definition: MuonLayerAmbiguitySolverTool.h:62
IMuonSegmentMatchingTool.h
Muon::MuonLayerAmbiguitySolverTool::MuonLayerAmbiguitySolverTool
MuonLayerAmbiguitySolverTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
Definition: MuonLayerAmbiguitySolverTool.cxx:13
MuonEDMPrinterTool.h
Muon::MuonLayerAmbiguitySolverTool::m_segmentSelector
ToolHandle< IMuonSegmentSelectionTool > m_segmentSelector
Definition: MuonLayerAmbiguitySolverTool.h:52
Muon::MuonLayerAmbiguitySolverTool::~MuonLayerAmbiguitySolverTool
virtual ~MuonLayerAmbiguitySolverTool()=default
drawFromPickle.candidates
candidates
Definition: drawFromPickle.py:271
Muon::MuonLayerAmbiguitySolverTool::resolveSmallLargeOverlaps
void resolveSmallLargeOverlaps(const EventContext &ctx, std::vector< MuonLayerIntersection > &existingLayerIntersections, std::vector< MuonLayerIntersection > &newLayerIntersections) const
Definition: MuonLayerAmbiguitySolverTool.cxx:211
Muon::MuonLayerAmbiguitySolverTool
Definition: MuonLayerAmbiguitySolverTool.h:24
Muon::MuonLayerAmbiguitySolverTool::m_maxSeeds
Gaudi::Property< unsigned int > m_maxSeeds
Definition: MuonLayerAmbiguitySolverTool.h:60
Muon::MuonLayerAmbiguitySolverTool::getNextSeed
bool getNextSeed(const std::vector< std::vector< MuonLayerIntersection > > &muonLayerDataHashVec, std::set< const MuonSegment * > &usedSegments, std::vector< MuonStationIndex::StIndex > &inverseSeedLayerOrder, MuonLayerIntersection &layerIntersection) const
Definition: MuonLayerAmbiguitySolverTool.cxx:138
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
IMuonSegmentSelectionTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Muon::MuonLayerAmbiguitySolverTool::match
bool match(const EventContext &ctx, const MuonCandidate &candidate, const MuonLayerIntersection &layerIntersection) const
Definition: MuonLayerAmbiguitySolverTool.cxx:129
Muon::MuonLayerAmbiguitySolverTool::extendCandidatesWithLayers
bool extendCandidatesWithLayers(const EventContext &ctx, std::vector< MuonCandidate > &candidates, const std::vector< std::vector< MuonLayerIntersection > > &muonLayerRecoDataHashVec, const std::vector< MuonStationIndex::StIndex > &inverseSeedLayerOrder) const
Definition: MuonLayerAmbiguitySolverTool.cxx:77
Muon::MuonLayerAmbiguitySolverTool::initialize
virtual StatusCode initialize() override
Definition: MuonLayerAmbiguitySolverTool.cxx:18
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Muon::MuonLayerAmbiguitySolverTool::resolveOverlaps
virtual void resolveOverlaps(const EventContext &ctx, const std::vector< Muon::MuonLayerRecoData > &allLayers, std::vector< MuonCandidate > &resolvedCandidates) const override
IMuonLayerAmbiguitySolverTool interface: find.
Definition: MuonLayerAmbiguitySolverTool.cxx:27
Muon::MuonLayerAmbiguitySolverTool::buildLayerVec
void buildLayerVec(const EventContext &ctx, const std::vector< MuonLayerRecoData > &allLayers, std::vector< std::vector< MuonLayerIntersection > > &muonLayerDataHashVec) const
Definition: MuonLayerAmbiguitySolverTool.cxx:167
Muon::IMuonLayerAmbiguitySolverTool
Interface for tools calculating hit count summaries for track.
Definition: IMuonLayerAmbiguitySolverTool.h:19
IMuonSegmentTrackBuilder.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCandidate.h
Muon::MuonLayerAmbiguitySolverTool::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuonLayerAmbiguitySolverTool.h:58
MuonStationIndex.h
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MuonLayerAmbiguitySolverTool::m_muonTrackBuilder
ToolHandle< IMuonSegmentTrackBuilder > m_muonTrackBuilder
Definition: MuonLayerAmbiguitySolverTool.h:56
MuonLayerRecoData.h
Muon::MuonLayerIntersection
Definition: MuonLayerIntersection.h:13
Muon::MuonLayerAmbiguitySolverTool::m_seedQualityThreshold
Gaudi::Property< int > m_seedQualityThreshold
Definition: MuonLayerAmbiguitySolverTool.h:61