ATLAS Offline Software
MuonCombinedTool.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 MUONCOMBINEDBASETOOLS_MUONCOMBINEDTOOL_H
6 #define MUONCOMBINEDBASETOOLS_MUONCOMBINEDTOOL_H
7 
10 #include "GaudiKernel/ToolHandle.h"
19 
21 namespace MuonCombined {
22 
23  class MuonCombinedTool : public AthAlgTool, virtual public IMuonCombinedTool {
24  public:
25  MuonCombinedTool(const std::string& type, const std::string& name, const IInterface* parent);
26  virtual ~MuonCombinedTool() = default;
27 
28  virtual StatusCode initialize() override;
29 
30  virtual void combine(const MuonCandidateCollection& muonCandidates, const InDetCandidateCollection& inDetCandidates,
31  std::vector<InDetCandidateToTagMap*> tagMaps, TrackCollection* combinedTracks, TrackCollection* METracks,
32  const EventContext& ctx) const override;
33 
34  private:
35  void associate(const MuonCandidate& muonCandidate, const InDetCandidateCollection& inDetCandidates,
36  std::vector<const InDetCandidate*>& associatedIdCandidates) const;
37 
38  void fill_debugging(const MuonCandidateCollection& muonCandidates, const InDetCandidateCollection& inDetCandidates) const;
39 
41  bool pass_prematching(const MuonCandidate& muonCandidate, const InDetCandidate& idCandidate) const;
42  // helpers, managers, tools
43  PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
44  ToolHandleArray<MuonCombined::IMuonCombinedTagTool> m_muonCombinedTagTools{this, "MuonCombinedTagTools", {}};
45  ToolHandle<MuonCombinedDebuggerTool> m_muonCombDebugger{this, "MuonCombinedDebuggerTool",
46  "MuonCombined::MuonCombinedDebuggerTool/MuonCombinedDebuggerTool"};
47 
49  PublicToolHandle<Muon::IMuonAlignmentUncertTool> m_alignUncertTool{this, "AlignmentUncertTool", ""};
50 
51  Gaudi::Property<float> m_deltaEtaPreSelection{this, "DeltaEtaPreSelection", 0.5};
52  Gaudi::Property<float> m_deltaPhiPreSelection{this, "DeltaPhiPreSelection", 1};
53  Gaudi::Property<float> m_ptBalance{this, "PtBalancePreSelection", -1.};
54 
55  Gaudi::Property<bool> m_runMuonCombinedDebugger{this, "RunMuonCombinedDebugger", false};
56  };
57 
58 } // namespace MuonCombined
59 
60 #endif
MuonCombined::MuonCombinedTool::~MuonCombinedTool
virtual ~MuonCombinedTool()=default
MuonCombined::IMuonCombinedTool
interface for tools building combined muons from ID and Muon candidates
Definition: IMuonCombinedTool.h:23
MuonCombined::MuonCombinedTool::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonCombinedTool.h:43
MuonEDMPrinterTool.h
MuonCombined::MuonCombinedTool::pass_prematching
bool pass_prematching(const MuonCandidate &muonCandidate, const InDetCandidate &idCandidate) const
Definition: MuonCombinedTool.cxx:87
MuonCombined::MuonCombinedTool::combine
virtual void combine(const MuonCandidateCollection &muonCandidates, const InDetCandidateCollection &inDetCandidates, std::vector< InDetCandidateToTagMap * > tagMaps, TrackCollection *combinedTracks, TrackCollection *METracks, const EventContext &ctx) const override
IMuonCombinedTool interface: build combined muons from ID and MS candidates.
Definition: MuonCombinedTool.cxx:46
MuonCombined::InDetCandidate
Definition: InDetCandidate.h:18
MuonCombined::MuonCombinedTool::fill_debugging
void fill_debugging(const MuonCandidateCollection &muonCandidates, const InDetCandidateCollection &inDetCandidates) const
Definition: MuonCombinedTool.cxx:27
MuonCombined::MuonCombinedTool::MuonCombinedTool
MuonCombinedTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuonCombinedTool.cxx:23
MuonCombined::MuonCombinedTool::initialize
virtual StatusCode initialize() override
Definition: MuonCombinedTool.cxx:33
MuonCombined::MuonCombinedTool::m_deltaPhiPreSelection
Gaudi::Property< float > m_deltaPhiPreSelection
Definition: MuonCombinedTool.h:52
MuonCombined::MuonCombinedTool::m_muonCombDebugger
ToolHandle< MuonCombinedDebuggerTool > m_muonCombDebugger
Definition: MuonCombinedTool.h:45
MuonCombined::MuonCombinedTool::m_muonCombinedTagTools
ToolHandleArray< MuonCombined::IMuonCombinedTagTool > m_muonCombinedTagTools
Definition: MuonCombinedTool.h:44
IMuonCombinedTagTool.h
MuonCombined::MuonCandidate
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:25
ATLAS_CHECK_FILE_THREAD_SAFETY
ATLAS_CHECK_FILE_THREAD_SAFETY
Definition: MuonCombinedTool.h:20
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
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
MuonCandidateCollection.h
MuonCombinedDebuggerTool.h
InDetCandidateToTagMap.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MuonCombined::MuonCombinedTool::m_ptBalance
Gaudi::Property< float > m_ptBalance
Definition: MuonCombinedTool.h:53
MuonCombined::MuonCombinedTool::associate
void associate(const MuonCandidate &muonCandidate, const InDetCandidateCollection &inDetCandidates, std::vector< const InDetCandidate * > &associatedIdCandidates) const
Definition: MuonCombinedTool.cxx:79
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
IMuonCombinedTool.h
MuonCombined::MuonCombinedTool::m_alignUncertTool
PublicToolHandle< Muon::IMuonAlignmentUncertTool > m_alignUncertTool
Use this tool to retrieve the last and first measurments of the ID and MS, respectively.
Definition: MuonCombinedTool.h:49
IMuonAlignmentUncertTool.h
InDetCandidateCollection.h
MuonCombined::MuonCombinedTool::m_deltaEtaPreSelection
Gaudi::Property< float > m_deltaEtaPreSelection
Definition: MuonCombinedTool.h:51
MuonCombined::MuonCombinedTool::m_runMuonCombinedDebugger
Gaudi::Property< bool > m_runMuonCombinedDebugger
Definition: MuonCombinedTool.h:55
AthAlgTool
Definition: AthAlgTool.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
MuonCombined::MuonCombinedTool
Definition: MuonCombinedTool.h:23