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
Event
xAOD
xAODInDetMeasurement
Root
Event/xAOD/xAODInDetMeasurement/Root/Utilities.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 "
xAODInDetMeasurement/Utilities.h
"
6
7
namespace
xAOD::xAODInDetMeasurement::Utilities
{
8
9
float
computeTotalCharge
(
const
SG::AuxElement
& cluster) {
10
static
const
SG::AuxElement::Accessor<std::vector<float>
> chargesAcc(
"chargeList"
);
11
assert( chargesAcc.
isAvailable
( cluster ) );
12
return
xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge
( chargesAcc(cluster) );
13
}
14
15
float
computeTotalCharge
(
const
std::vector<float>& charges) {
16
float
totalCharge = 0.f;
17
for
(
auto
&
charge
: charges)
18
totalCharge +=
charge
;
19
return
totalCharge;
20
}
21
22
int
computeTotalToT
(
const
SG::AuxElement
& cluster) {
23
static
const
SG::AuxElement::Accessor< std::vector<int>
> totsAcc(
"totList"
);
24
assert( totsAcc.
isAvailable
( cluster ) );
25
return
xAOD::xAODInDetMeasurement::Utilities::computeTotalToT
( totsAcc(cluster) );
26
}
27
28
int
computeTotalToT
(
const
std::vector<int>& tots) {
29
int
totalToT = 0;
30
for
(
auto
& tot : tots)
31
totalToT += tot;
32
return
totalToT;
33
}
34
35
}
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition:
Control/AthContainers/AthContainers/Accessor.h:68
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition:
AuxElement.h:483
xAOD::xAODInDetMeasurement::Utilities::computeTotalToT
int computeTotalToT(const SG::AuxElement &cluster)
Definition:
Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx:22
xAOD::xAODInDetMeasurement::Utilities
Definition:
Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx:7
xAOD::charge
charge
Definition:
TrigElectron_v1.cxx:85
xAOD::xAODInDetMeasurement::Utilities::computeTotalCharge
float computeTotalCharge(const SG::AuxElement &cluster)
Definition:
Event/xAOD/xAODInDetMeasurement/Root/Utilities.cxx:9
Utilities.h
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Generated on Sun Jan 12 2025 21:22:01 for ATLAS Offline Software by
1.8.18