ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
jEmNoSort.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
// jEmNoSort.cxx
5
// TopoCore
6
// Algorithm to generate ALL lists of jEm TOBs
7
8
#include "
L1TopoAlgorithms/jEmNoSort.h
"
9
#include "
L1TopoEvent/TOBArray.h
"
10
#include "
L1TopoEvent/jEmTOBArray.h
"
11
#include "
L1TopoEvent/GenericTOB.h
"
12
#include <algorithm>
13
14
REGISTER_ALG_TCS
(jEmNoSort)
15
16
17
// constructor
18
TCS
::
jEmNoSort
::
jEmNoSort
(
const
std
::
string
&
name
) :
19
SortingAlg
(
name
)
20
{
21
defineParameter
(
"InputWidth"
, 64 );
// for FW
22
defineParameter
(
"OutputWidth"
, 64 );
23
defineParameter
(
"IsoMin"
, 0 );
24
defineParameter
(
"Frac1Min"
, 0 );
25
defineParameter
(
"Frac2Min"
, 0 );
26
}
27
28
29
TCS::jEmNoSort::~jEmNoSort
()
30
{}
31
32
TCS::StatusCode
33
TCS::jEmNoSort::initialize
() {
34
m_numberOfjEms
=
parameter
(
"OutputWidth"
).value();
35
m_iso
=
parameter
(
"IsoMin"
).value();
36
m_frac1
=
parameter
(
"Frac1Cut"
).value();
37
m_frac2
=
parameter
(
"Frac2Cut"
).value();
38
return
TCS::StatusCode::SUCCESS
;
39
}
40
41
42
43
44
TCS::StatusCode
45
TCS::jEmNoSort::sort
(
const
InputTOBArray
& input,
TOBArray
& output) {
46
const
jEmTOBArray
& jets =
dynamic_cast<
const
jEmTOBArray
&
>
(input);
47
48
// fill output array with GenericTOBs builds from jets
49
for
(
jEmTOBArray::const_iterator
jet
= jets.begin();
jet
!= jets.end(); ++
jet
) {
50
// Isolation cuts
51
if
( !
isocut
(
m_iso
, (*jet)-> isolation()) )
continue
;
52
if
( !
isocut
(
m_frac1
, (*jet)-> frac1()) )
continue
;
53
if
( !
isocut
(
m_frac2
, (*jet)-> frac2()) )
continue
;
54
55
output.push_back(
GenericTOB
(**
jet
) );
56
}
57
58
59
// keep only max number of jets
60
int
par =
m_numberOfjEms
;
61
unsigned
int
maxNumberOfjEms = std::clamp(par, 0, std::abs(par));
62
if
(maxNumberOfjEms>0) {
63
while
( output.size()> maxNumberOfjEms ) {
64
output.pop_back();
65
}
66
}
67
return
TCS::StatusCode::SUCCESS
;
68
}
69
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition
AlgFactory.h:62
GenericTOB.h
TOBArray.h
TCS::ConfigurableAlg::name
const std::string & name() const
Definition
ConfigurableAlg.h:49
TCS::ConfigurableAlg::parameter
const Parameter & parameter(std::string_view parameterName) const
Definition
ConfigurableAlg.cxx:245
TCS::ConfigurableAlg::isocut
bool isocut(const std::string &threshold, const unsigned int bit) const
Definition
ConfigurableAlg.cxx:487
TCS::ConfigurableAlg::defineParameter
void defineParameter(std::string_view name, TCS::parType_t value)
Definition
ConfigurableAlg.cxx:203
TCS::DataArrayImpl< jEmTOB >::const_iterator
data_t::const_iterator const_iterator
Definition
DataArrayImpl.h:18
TCS::GenericTOB
Definition
GenericTOB.h:35
TCS::InputTOBArray
Definition
InputTOBArray.h:15
TCS::SortingAlg::SortingAlg
SortingAlg(const std::string &name)
Definition
SortingAlg.h:21
TCS::StatusCode
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::TOBArray
Definition
TOBArray.h:24
TCS::jEmNoSort::~jEmNoSort
virtual ~jEmNoSort()
Definition
jEmNoSort.cxx:29
TCS::jEmNoSort::m_numberOfjEms
parType_t m_numberOfjEms
Definition
jEmNoSort.h:32
TCS::jEmNoSort::m_frac2
parType_t m_frac2
Definition
jEmNoSort.h:35
TCS::jEmNoSort::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output) override final
Definition
jEmNoSort.cxx:45
TCS::jEmNoSort::m_frac1
parType_t m_frac1
Definition
jEmNoSort.h:34
TCS::jEmNoSort::jEmNoSort
jEmNoSort(const std::string &name)
Definition
jEmNoSort.cxx:18
TCS::jEmNoSort::initialize
virtual TCS::StatusCode initialize() override
Definition
jEmNoSort.cxx:33
TCS::jEmNoSort::m_iso
parType_t m_iso
Definition
jEmNoSort.h:33
TCS::jEmTOBArray
Definition
jEmTOBArray.h:19
jEmNoSort.h
jEmTOBArray.h
const
TCS
Definition
AnomalyDetectionBDT.h:18
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0