Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
PhysicsAnalysis
MuonID
MuonSelectorTools
src
MuonQualityUpdaterAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonQualityUpdaterAlg.h
"
6
7
#include "
xAODCore/ShallowCopy.h
"
8
#include "
xAODMuon/Muon.h
"
9
#include "
xAODMuon/MuonAuxContainer.h
"
10
#include "
xAODMuon/MuonContainer.h
"
11
12
namespace
CP
{
13
14
MuonQualityUpdaterAlg::MuonQualityUpdaterAlg
(
const
std::string&
name
, ISvcLocator* svcloc) :
15
AthAlgorithm
(
name
, svcloc), m_tool(
"CP::MuonSelectionTool"
)
/*public tool*/
{
16
declareProperty
(
"Input"
,
m_input_muons
=
""
);
17
declareProperty
(
"Output"
,
m_output_muons
=
""
);
18
declareProperty
(
"Tool"
,
m_tool
);
19
}
20
21
StatusCode
MuonQualityUpdaterAlg::initialize
() {
22
if
(
m_input_muons
==
""
) {
23
ATH_MSG_ERROR
(
"You must specify an input muon collection"
);
24
return
StatusCode::FAILURE;
25
}
26
CHECK
(
m_tool
.retrieve());
27
28
return
StatusCode::SUCCESS;
29
}
30
31
StatusCode
MuonQualityUpdaterAlg::execute
() {
32
// fetch input collection
33
const
xAOD::MuonContainer
* muons = 0;
34
CHECK
(
evtStore
()->
retrieve
(muons,
m_input_muons
));
35
36
// create a shallow copy container for the outputs
37
auto
OutMuons =
xAOD::shallowCopyContainer
(*muons);
38
CHECK
(
evtStore
()->record(OutMuons.first,
m_output_muons
));
39
CHECK
(
evtStore
()->record(OutMuons.second,
m_output_muons
+
"Aux."
));
40
41
for
(
xAOD::Muon
*
muon
: *(OutMuons.first)) {
42
m_tool
->setQuality(*
muon
);
43
m_tool
->setPassesIDCuts(*
muon
);
44
// m_tool->setPassesLowPtEfficiencyCuts(*muon);
45
}
46
47
return
StatusCode::SUCCESS;
48
}
49
50
}
// namespace CP
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition:
PyKernel.py:110
ShallowCopy.h
CP::MuonQualityUpdaterAlg::m_input_muons
std::string m_input_muons
Definition:
MuonQualityUpdaterAlg.h:22
xAOD::muon
@ muon
Definition:
TrackingPrimitives.h:196
CP::MuonQualityUpdaterAlg::initialize
virtual StatusCode initialize()
Definition:
MuonQualityUpdaterAlg.cxx:21
Muon.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
CP
Select isolated Photons, Electrons and Muons.
Definition:
Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
xAOD::Muon_v1
Class describing a Muon.
Definition:
Muon_v1.h:38
CP::MuonQualityUpdaterAlg::execute
virtual StatusCode execute()
Definition:
MuonQualityUpdaterAlg.cxx:31
MuonAuxContainer.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition:
AthCommonDataStore.h:85
CP::MuonQualityUpdaterAlg::MuonQualityUpdaterAlg
MuonQualityUpdaterAlg(const std::string &name, ISvcLocator *svcloc)
Definition:
MuonQualityUpdaterAlg.cxx:14
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition:
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
CP::MuonQualityUpdaterAlg::m_output_muons
std::string m_output_muons
Definition:
MuonQualityUpdaterAlg.h:23
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
CP::MuonQualityUpdaterAlg::m_tool
ToolHandle< CP::IMuonSelectionTool > m_tool
Definition:
MuonQualityUpdaterAlg.h:24
AthAlgorithm
Definition:
AthAlgorithm.h:47
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
xAOD::shallowCopyContainer
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Definition:
ShallowCopy.h:110
MuonContainer.h
MuonQualityUpdaterAlg.h
Generated on Wed Mar 26 2025 21:15:40 for ATLAS Offline Software by
1.8.18