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
DerivationFramework
DerivationFrameworkSUSY
src
PdgConditional.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
PdgConditional.h
"
6
#include <cmath>
//for std::abs
7
8
9
namespace
DerivationFramework
{
10
PdgConditional::PdgConditional
():m_condition(0){
11
//nop
12
}
13
PdgConditional::PdgConditional
(
int
equalInt):m_condition(equalInt){
14
//nop
15
}
16
PdgConditional::PdgConditional
(
unsigned
equalInt):m_condition(equalInt){
17
//nop
18
}
19
20
PdgConditional::PdgConditional
(std::function<
bool
(
int
)>
b
):m_condition(
b
){
21
//nop
22
}
23
24
bool
25
PdgConditional::operator==
(
int
v
)
const
{
26
//compare with the held integer
27
if
(std::holds_alternative<int>(
m_condition
)){
28
auto
rawValue = std::get<0>(
m_condition
);
29
return
v
== rawValue;
30
}
31
//use abs(value) if the held integer is unsigned
32
if
(std::holds_alternative<unsigned>(
m_condition
)){
33
auto
rawValue = std::get<1>(
m_condition
);
34
return
unsigned
(std::abs(
v
)) == rawValue;
35
}
36
//otherwise use user-defined binary predicate
37
return
std::get<2>(
m_condition
)(
v
);
38
}
39
40
}
DerivationFramework::PdgConditional::operator==
bool operator==(int v) const
Definition:
PdgConditional.cxx:25
xAOD::unsigned
unsigned
Definition:
RingSetConf_v1.cxx:662
PdgConditional.h
DerivationFramework
THE reconstruction tool.
Definition:
ParticleSortingAlg.h:24
plotBeamSpotMon.b
b
Definition:
plotBeamSpotMon.py:77
python.PyAthena.v
v
Definition:
PyAthena.py:154
DerivationFramework::PdgConditional::m_condition
const std::variant< int, unsigned, std::function< bool(int)> > m_condition
Definition:
PdgConditional.h:30
DerivationFramework::PdgConditional::PdgConditional
PdgConditional()
Definition:
PdgConditional.cxx:10
Generated on Wed Apr 9 2025 21:16:33 for ATLAS Offline Software by
1.8.18