ATLAS Offline Software
MuonLRTOverlapRemovalTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LRTMUONANALYSISTOOLS_MuonLRTOverlapRemovalTool_H
6 #define LRTMUONANALYSISTOOLS_MuonLRTOverlapRemovalTool_H
7 
10 #include <string>
11 #include <map>
12 
14 #include "xAODMuon/MuonContainer.h"
15 #include "xAODMuon/Muon.h"
16 
17 #include <AsgTools/ToolHandle.h>
18 #include <AsgTools/AsgTool.h>
20 
21 namespace CP {
22 
25 
26  public:
27 
29 
30 
32  MuonLRTOverlapRemovalTool(const std::string& name);
33  virtual ~MuonLRTOverlapRemovalTool() = default;
35  virtual StatusCode initialize();
36 
40  virtual std::pair<bool, bool> resolveOverlap( const xAOD::Muon* promptMuon,
41  const xAOD::Muon* lrtMuon) const;
42 
46  virtual std::tuple<int, int> checkOverlapForDecor(const xAOD::Muon* promptMuon,
47  const xAOD::Muon* lrtMuon) const;
48 
55  virtual void checkOverlap(const xAOD::MuonContainer & promptCollection,
56  const xAOD::MuonContainer & lrtCollection,
57  std::vector<bool>& promptMuonsSelectedToKeep,
58  std::vector<bool>& lrtMuonsSelectedToKeep ) const;
59 
62  virtual bool hasOverlap(const xAOD::Muon* promptMuon,
63  const xAOD::Muon* lrtMuon) const;
64 
66  virtual float getIDMEdEta(const xAOD::Muon* muon) const;
67 
68  private:
70  Gaudi::Property<int> m_strategy{this, "overlapStrategy", CP::IMuonLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default, 1 = write all muons and decorate with overlap type)"};
72  Gaudi::Property<bool> m_useRun3WP{this, "UseRun3WP", false, "Switch to toggle the run 2 & run 3 geometry for the muon ID working points used in the prompt-LRT overlap resolution. Set to true for run 3 and false for run 2."};
74  ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool{this, "MuonSelectionTool", "", "tool to determine the working point of the muons"};
75 
76  };
77 
78 } // end namespace CP
79 #endif // LRTMUONANALYSISTOOLS_MuonLRTOverlapRemovalTool_H
CP::IMuonLRTOverlapRemovalTool::defaultStrategy
@ defaultStrategy
Definition: IMuonLRTOverlapRemovalTool.h:38
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
CP::MuonLRTOverlapRemovalTool::checkOverlapForDecor
virtual std::tuple< int, int > checkOverlapForDecor(const xAOD::Muon *promptMuon, const xAOD::Muon *lrtMuon) const
checks for overlap between a pair of muons, one from the prompt and one from the LRT pass.
Definition: MuonLRTOverlapRemovalTool.cxx:176
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
CP::IMuonLRTOverlapRemovalTool
Definition: IMuonLRTOverlapRemovalTool.h:25
CP::MuonLRTOverlapRemovalTool
Class-algorithm for muon particle collection merging.
Definition: MuonLRTOverlapRemovalTool.h:24
Muon.h
CP::MuonLRTOverlapRemovalTool::m_strategy
Gaudi::Property< int > m_strategy
This allows to configure the OR strategy in the future, if more than one is supported by MCP.
Definition: MuonLRTOverlapRemovalTool.h:70
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::MuonLRTOverlapRemovalTool::resolveOverlap
virtual std::pair< bool, bool > resolveOverlap(const xAOD::Muon *promptMuon, const xAOD::Muon *lrtMuon) const
resolve the overlap between a pair of muons, one from the prompt and one from the LRT pass.
Definition: MuonLRTOverlapRemovalTool.cxx:135
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
IMuonSelectionTool.h
CP::MuonLRTOverlapRemovalTool::hasOverlap
virtual bool hasOverlap(const xAOD::Muon *promptMuon, const xAOD::Muon *lrtMuon) const
checks the overlap between a pair of muons, one from the prompt and one from the LRT pass.
Definition: MuonLRTOverlapRemovalTool.cxx:115
CP::MuonLRTOverlapRemovalTool::m_muonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
This is the muon selection tool. No particular configuration required, the loosest WP is used as a ti...
Definition: MuonLRTOverlapRemovalTool.h:74
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
IMuonLRTOverlapRemovalTool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CP::MuonLRTOverlapRemovalTool::MuonLRTOverlapRemovalTool
MuonLRTOverlapRemovalTool(const std::string &name)
Standard Algotithm methods:
Definition: MuonLRTOverlapRemovalTool.cxx:15
CP::MuonLRTOverlapRemovalTool::~MuonLRTOverlapRemovalTool
virtual ~MuonLRTOverlapRemovalTool()=default
MuonContainer.h
TrackParticle.h
CP::MuonLRTOverlapRemovalTool::getIDMEdEta
virtual float getIDMEdEta(const xAOD::Muon *muon) const
checks the eta difference between the ID and ME track particles which is used for the final overlap r...
Definition: MuonLRTOverlapRemovalTool.cxx:194
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CP::MuonLRTOverlapRemovalTool::m_useRun3WP
Gaudi::Property< bool > m_useRun3WP
This allows to configure the geometry used for the muon selection tool (run 2 or run 3).
Definition: MuonLRTOverlapRemovalTool.h:72
CP::MuonLRTOverlapRemovalTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: MuonLRTOverlapRemovalTool.cxx:25
ToolHandle.h
AsgTool.h
CP::MuonLRTOverlapRemovalTool::checkOverlap
virtual void checkOverlap(const xAOD::MuonContainer &promptCollection, const xAOD::MuonContainer &lrtCollection, std::vector< bool > &promptMuonsSelectedToKeep, std::vector< bool > &lrtMuonsSelectedToKeep) const
check the overlap between the prompt and LRT muon collections.
Definition: MuonLRTOverlapRemovalTool.cxx:42