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
Reconstruction
Jet
JetRec
Root
JetSorter.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetRec/JetSorter.h
"
6
8
// Comparison functions
9
bool
ptCompare
(
const
xAOD::Jet
*
j1
,
const
xAOD::Jet
*
j2
){
return
j1
->pt() >
j2
->pt() ;}
10
11
// A global map for comparison functions
12
using
compFunc
=
bool
(*)(
const
xAOD::Jet
*,
const
xAOD::Jet
*);
13
const
std::map<std::string, compFunc>
g_compFuncMap
= {
14
{
"ByPtDown"
,
ptCompare
}
15
};
16
17
JetSorter::JetSorter
(
const
std::string&
n
) :
18
asg
::AsgTool(
n
)
19
,m_sortType(
"ByPtDown"
)
20
{
21
declareProperty
(
"SortingType"
,
m_sortType
);
22
}
23
24
StatusCode
JetSorter::modify
(
xAOD::JetContainer
&
jets
)
const
{
25
ATH_MSG_DEBUG
(
" Sorting : "
<<
m_sortType
<<
" "
<<
jets
.size() );
26
// leave early if empty otherwise sort() throws an exception.
27
if
(
jets
.empty() )
return
StatusCode::SUCCESS;
28
29
const
auto
itr =
g_compFuncMap
.find(
m_sortType
);
30
if
(itr ==
g_compFuncMap
.end()) {
31
ATH_MSG_ERROR
(
"Unsupported SortingType "
<<
m_sortType
);
32
return
StatusCode::FAILURE;
33
}
34
jets
.sort( *itr->second );
35
return
StatusCode::SUCCESS;
36
}
ptCompare
bool ptCompare(const xAOD::Jet *j1, const xAOD::Jet *j2)
Definition:
JetSorter.cxx:9
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
compFunc
bool(*)(const xAOD::Jet *, const xAOD::Jet *) compFunc
Definition:
JetSorter.cxx:12
asg
Definition:
DataHandleTestTool.h:28
defineDB.jets
jets
Definition:
JetTagCalibration/share/defineDB.py:24
JetSorter::modify
virtual StatusCode modify(xAOD::JetContainer &jets) const
Method to modify a jet collection.
Definition:
JetSorter.cxx:24
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
doubleTestComp.j1
j1
Definition:
doubleTestComp.py:21
beamspotman.n
n
Definition:
beamspotman.py:731
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
g_compFuncMap
const std::map< std::string, compFunc > g_compFuncMap
Definition:
JetSorter.cxx:13
JetSorter::m_sortType
std::string m_sortType
Definition:
JetSorter.h:32
JetSorter.h
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
xAOD::Jet_v1
Class describing a jet.
Definition:
Jet_v1.h:57
JetSorter::JetSorter
JetSorter(const std::string &t)
Definition:
JetSorter.cxx:17
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition:
TrigDecision_v1.cxx:60
doubleTestComp.j2
j2
Definition:
doubleTestComp.py:22
Generated on Fri Apr 18 2025 21:13:06 for ATLAS Offline Software by
1.8.18