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
Algorithms
AsgAnalysisAlgorithms
Root
AsgMassSelectionTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include <
AsgAnalysisAlgorithms/AsgMassSelectionTool.h
>
7
8
#include <
xAODBase/IParticle.h
>
9
10
namespace
CP
11
{
12
13
StatusCode
AsgMassSelectionTool ::
14
initialize
()
15
{
16
if
(
m_minM
< 0 || !std::isfinite (
m_minM
))
17
{
18
ATH_MSG_ERROR
(
"invalid value of minM: "
<<
m_minM
);
19
return
StatusCode::FAILURE;
20
}
21
if
(
m_maxM
< 0 || !std::isfinite (
m_maxM
))
22
{
23
ATH_MSG_ERROR
(
"invalid value of maxM: "
<<
m_maxM
);
24
return
StatusCode::FAILURE;
25
}
26
27
if
(
m_minM
> 0) {
28
ATH_MSG_DEBUG
(
"Performing m >= "
<<
m_minM
<<
" MeV selection"
);
29
m_minMassCutIndex
=
m_accept
.
addCut
(
"minM"
,
"minimum mass cut"
);
30
}
31
if
(
m_maxM
> 0) {
32
ATH_MSG_DEBUG
(
"Performing m < "
<<
m_maxM
<<
" MeV selection"
);
33
m_maxMassCutIndex
=
m_accept
.
addCut
(
"maxM"
,
"maximum mass cut"
);
34
}
35
36
return
StatusCode::SUCCESS;
37
}
38
39
40
const
asg::AcceptInfo
&
AsgMassSelectionTool ::
41
getAcceptInfo
()
const
42
{
43
return
m_accept
;
44
}
45
46
47
asg::AcceptData
AsgMassSelectionTool ::
48
accept
(
const
xAOD::IParticle
*particle)
const
49
{
50
asg::AcceptData
accept
(&
m_accept
);
51
52
// Perform the mass cuts.
53
if
(
m_minMassCutIndex
>= 0 ||
m_maxMassCutIndex
>= 0)
54
{
55
float
m
= particle->m();
56
57
if
(
m_minMassCutIndex
>= 0) {
58
if
(!std::isfinite(
m
))
59
{
60
ANA_MSG_WARNING
(
"invalid mass value, setting object to fail mass-cut: "
<<
m
);
61
accept
.
setCutResult
(
m_minMassCutIndex
,
false
);
62
}
else
63
{
64
accept
.
setCutResult
(
m_minMassCutIndex
,
m
>=
m_minM
);
65
}
66
}
67
if
(
m_maxMassCutIndex
>= 0) {
68
accept
.
setCutResult
(
m_maxMassCutIndex
,
m
<
m_maxM
);
69
}
70
}
71
72
return
accept
;
73
}
74
}
75
python.SystemOfUnits.m
int m
Definition:
SystemOfUnits.py:91
IParticle.h
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition:
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
CP::AsgMassSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *particle) const override
The main accept method: the actual cuts are applied here.
Definition:
AsgMassSelectionTool.cxx:48
CP
Select isolated Photons, Electrons and Muons.
Definition:
Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
CP::AsgMassSelectionTool::m_accept
asg::AcceptInfo m_accept
the asg::AcceptInfo we are using
Definition:
AsgMassSelectionTool.h:63
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
asg::AcceptInfo
Definition:
AcceptInfo.h:28
CP::AsgMassSelectionTool::m_maxM
Gaudi::Property< float > m_maxM
Definition:
AsgMassSelectionTool.h:54
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
ANA_MSG_WARNING
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:292
AsgMassSelectionTool.h
CP::AsgMassSelectionTool::m_minM
Gaudi::Property< float > m_minM
Definition:
AsgMassSelectionTool.h:53
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition:
AcceptData.h:134
CP::AsgMassSelectionTool::m_minMassCutIndex
int m_minMassCutIndex
Index for the minimum pT selection.
Definition:
AsgMassSelectionTool.h:57
asg::AcceptData
Definition:
AcceptData.h:30
CP::AsgMassSelectionTool::m_maxMassCutIndex
int m_maxMassCutIndex
Index for the maximum pT selection.
Definition:
AsgMassSelectionTool.h:59
CP::AsgMassSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Declare the interface ID for this pure-virtual interface class to the Athena framework.
Definition:
AsgMassSelectionTool.cxx:41
CP::AsgMassSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition:
AsgMassSelectionTool.cxx:14
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition:
AcceptInfo.h:53
Generated on Wed Mar 26 2025 21:07:18 for ATLAS Offline Software by
1.8.18