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
Trigger
TrigAnalysis
TrigObjectMatching
TrigObjectMatching
DistanceFunctor.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DISTANCE_FUNCTOR_H
6
#define DISTANCE_FUNCTOR_H
7
8
#include <math.h>
9
10
template
<
typename
T,
typename
U>
11
class
DistanceFunctor
{
12
13
public
:
14
float
operator()
(
const
T
*
t
,
const
U *
u
)
const
{
15
return
calculateDistance
(
t
,
u
);
16
}
17
18
float
distance
(
const
T
*
t
,
const
U *
u
)
const
{
19
return
(*
this
)(
t
,
u
);
20
}
21
22
virtual
~DistanceFunctor
() {;}
23
24
private
:
25
virtual
float
calculateDistance
(
const
T
*
t
,
const
U *
u
)
const
= 0;
26
27
};
// end class DistanceFunctor
28
29
template
<
typename
T,
typename
U>
30
class
DeltaRDistanceFunctor
:
virtual
public
DistanceFunctor
<T, U> {
31
32
public
:
33
34
virtual
~DeltaRDistanceFunctor
() {;}
35
36
static
float
deltaR
(
const
T
*
t
,
const
U *
u
) {
37
38
if
(!
t
|| !
u
)
39
return
-1.;
40
41
float
phiDiff =
t
->phi() -
u
->phi();
42
while
(phiDiff < -
M_PI
) phiDiff += 2. *
M_PI
;
43
while
(phiDiff >=
M_PI
) phiDiff -= 2. *
M_PI
;
44
float
etaDiff =
t
->eta() -
u
->eta();
45
return
sqrt(phiDiff * phiDiff + etaDiff * etaDiff);
46
47
}
48
49
private
:
50
51
virtual
float
calculateDistance
(
const
T
*
t
,
const
U *
u
)
const
{
52
return
DeltaRDistanceFunctor<T,U>::deltaR
(
t
,
u
);
53
}
54
55
};
// end class DeltaRDistanceFunctor
56
57
#endif
DistanceFunctor::calculateDistance
virtual float calculateDistance(const T *t, const U *u) const =0
M_PI
#define M_PI
Definition:
ActiveFraction.h:11
DeltaRDistanceFunctor
Definition:
DistanceFunctor.h:30
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
Trk::u
@ u
Enums for curvilinear frames.
Definition:
ParamDefs.h:77
DeltaRDistanceFunctor::calculateDistance
virtual float calculateDistance(const T *t, const U *u) const
Definition:
DistanceFunctor.h:51
DeltaRDistanceFunctor::deltaR
static float deltaR(const T *t, const U *u)
Definition:
DistanceFunctor.h:36
DistanceFunctor::~DistanceFunctor
virtual ~DistanceFunctor()
Definition:
DistanceFunctor.h:22
DistanceFunctor::operator()
float operator()(const T *t, const U *u) const
Definition:
DistanceFunctor.h:14
DistanceFunctor
Definition:
DistanceFunctor.h:11
DistanceFunctor::distance
float distance(const T *t, const U *u) const
Definition:
DistanceFunctor.h:18
DeltaRDistanceFunctor::~DeltaRDistanceFunctor
virtual ~DeltaRDistanceFunctor()
Definition:
DistanceFunctor.h:34
TSU::T
unsigned long long T
Definition:
L1TopoDataTypes.h:35
Generated on Mon Mar 31 2025 21:09:42 for ATLAS Offline Software by
1.8.18