ATLAS Offline Software
Loading...
Searching...
No Matches
JetGhostMuonAssociationAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7//
8// includes
9//
10
13
14//
15// method implementations
16//
17
18namespace CP
19{
20 JetGhostMuonAssociationAlg ::
21 JetGhostMuonAssociationAlg (const std::string& name,
22 ISvcLocator* pSvcLocator)
23 : AnaAlgorithm (name, pSvcLocator)
24 {
25 }
26
27
28 StatusCode JetGhostMuonAssociationAlg ::
29 initialize ()
30 {
33 ANA_CHECK (m_systematicsList.initialize());
34 return StatusCode::SUCCESS;
35 }
36
37
38 StatusCode JetGhostMuonAssociationAlg ::
39 execute ()
40 {
41 for (const auto& sys : m_systematicsList.systematicsVector())
42 {
43 xAOD::JetContainer *jets = nullptr;
44 ANA_CHECK (m_jetHandle.getCopy (jets, sys));
45
46 // associate the ghost muons to the jets (needed by MET muon-jet OR later)
47 const xAOD::MuonContainer* muons = nullptr;
48 ANA_CHECK (m_muonHandle.retrieve (muons, sys));
49 met::addGhostMuonsToJets(*muons, *jets);
50 }
51
52 return StatusCode::SUCCESS;
53 }
54}
#define ANA_CHECK(EXP)
check whether the given expression was successful
SysCopyHandle< xAOD::JetContainer > m_jetHandle
the jet collection we run on
SysReadHandle< xAOD::MuonContainer > m_muonHandle
SysListHandle m_systematicsList
the systematics list we run
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Select isolated Photons, Electrons and Muons.
void addGhostMuonsToJets(const xAOD::MuonContainer &muons, xAOD::JetContainer &jets)
JetContainer_v1 JetContainer
Definition of the current "jet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".