ATLAS Offline Software
MuonLRTMergingAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef ASG_ANALYSIS_ALGORITHMS__MUON_LRT_MERGING_ALGORITHM__H
10 #define ASG_ANALYSIS_ALGORITHMS__MUON_LRT_MERGING_ALGORITHM__H
11 
13 #include <xAODMuon/MuonContainer.h>
17 #include <AsgTools/ToolHandle.h>
18 
24 
25 namespace CP
26 {
28 
29  class MuonLRTMergingAlg final : public EL::AnaAlgorithm
30  {
32  public:
33  MuonLRTMergingAlg (const std::string& name,
34  ISvcLocator* pSvcLocator);
35  StatusCode initialize () override;
36  StatusCode execute () override;
37 
38  private:
39 
41 
42 
45 
46  SG::ReadHandleKey<xAOD::MuonContainer> m_promptMuonLocation{this, "PromptMuonLocation","Muons", "Prompt muons to merge"};
47  SG::ReadHandleKey<xAOD::MuonContainer> m_lrtMuonLocation{this, "LRTMuonLocation","MuonsLRT", "LRT muons to merge"};
48  SG::WriteHandleKey<xAOD::MuonContainer> m_outMuonLocation{this, "OutputMuonLocation", "StdWithLRTMuons", "name of the muon container to write"};
50  Gaudi::Property<bool> m_createViewCollection{this, "CreateViewCollection", true};
52  ToolHandle<CP::IMuonLRTOverlapRemovalTool> m_overlapRemovalTool{this, "overlapRemovalTool", "", "tool to determine overlaps between regular and LRT muons"};
53 
56  Gaudi::Property<int> m_ORstrategy{this, "overlapStrategy", CP::IMuonLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default, 1 = write all muons and decorate with overlap type)"};
57  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."};
58 
60 
61 
65  const std::vector<bool> & muonIsGood,
66  ConstDataVector<xAOD::MuonContainer>* outputCol) const;
67 
70  const std::vector<bool> & muonIsGood,
71  xAOD::MuonContainer* outputCol) const;
72 
73 
74  };
75 }
76 
77 #endif
WriteHandle.h
Handle class for recording to StoreGate.
CP::IMuonLRTOverlapRemovalTool::defaultStrategy
@ defaultStrategy
Definition: IMuonLRTOverlapRemovalTool.h:38
PropertyWrapper.h
CP::MuonLRTMergingAlg::m_overlapRemovalTool
ToolHandle< CP::IMuonLRTOverlapRemovalTool > m_overlapRemovalTool
Definition: MuonLRTMergingAlg.h:52
CurrentContext.h
CP::MuonLRTMergingAlg::m_lrtMuonLocation
SG::ReadHandleKey< xAOD::MuonContainer > m_lrtMuonLocation
Vector of muon collections to be merged.
Definition: MuonLRTMergingAlg.h:47
CP::MuonLRTMergingAlg::m_ORstrategy
Gaudi::Property< int > m_ORstrategy
allows to pass an overlap removal strategy to the underlying removal tool, without manually configuri...
Definition: MuonLRTMergingAlg.h:56
CP::MuonLRTMergingAlg::m_outMuonLocation
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation
Vector of muon collections to be merged.
Definition: MuonLRTMergingAlg.h:48
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CP::MuonLRTMergingAlg
this wraps the MCP LRT collection merger in a CP algorithm
Definition: MuonLRTMergingAlg.h:30
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::MuonLRTMergingAlg::initialize
StatusCode initialize() override
Definition: MuonLRTMergingAlg.cxx:26
MuonAuxContainer.h
AnaAlgorithm.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
CP::MuonLRTMergingAlg::MuonLRTMergingAlg
MuonLRTMergingAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
Definition: MuonLRTMergingAlg.cxx:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CP::MuonLRTMergingAlg::execute
StatusCode execute() override
Definition: MuonLRTMergingAlg.cxx:50
IMuonLRTOverlapRemovalTool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ReadHandle.h
Handle class for reading from StoreGate.
MuonContainer.h
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
CP::MuonLRTMergingAlg::mergeMuon
StatusCode mergeMuon(const xAOD::MuonContainer &muonCol, const std::vector< bool > &muonIsGood, ConstDataVector< xAOD::MuonContainer > *outputCol) const
Private methods:
Definition: MuonLRTMergingAlg.cxx:114
CP::MuonLRTMergingAlg::m_useRun3WP
Gaudi::Property< bool > m_useRun3WP
Definition: MuonLRTMergingAlg.h:57
CP::MuonLRTMergingAlg::m_promptMuonLocation
SG::ReadHandleKey< xAOD::MuonContainer > m_promptMuonLocation
Private data:
Definition: MuonLRTMergingAlg.h:46
ToolHandle.h
CP::MuonLRTMergingAlg::m_createViewCollection
Gaudi::Property< bool > m_createViewCollection
Combined muon collection.
Definition: MuonLRTMergingAlg.h:51