ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
jLJetNoSort.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
// jLJetNoSort.cxx
5
// TopoCore
6
// Algorithm to generate ALL lists of jLJet TOBs
7
8
#include "
L1TopoAlgorithms/jLJetNoSort.h
"
9
#include "
L1TopoEvent/TOBArray.h
"
10
#include "
L1TopoEvent/jLJetTOBArray.h
"
11
#include "
L1TopoEvent/GenericTOB.h
"
12
#include <algorithm>
13
14
REGISTER_ALG_TCS
(jLJetNoSort)
15
16
17
// constructor
18
TCS
::
jLJetNoSort
::
jLJetNoSort
(
const
std
::
string
&
name
) :
19
SortingAlg
(
name
)
20
{
21
defineParameter
(
"InputWidth"
, 64 );
// for FW
22
defineParameter
(
"OutputWidth"
, 64 );
23
}
24
25
26
TCS::jLJetNoSort::~jLJetNoSort
()
27
{}
28
29
TCS::StatusCode
30
TCS::jLJetNoSort::initialize
() {
31
m_numberOfjLJets
=
parameter
(
"OutputWidth"
).value();
32
return
TCS::StatusCode::SUCCESS
;
33
}
34
35
36
37
38
TCS::StatusCode
39
TCS::jLJetNoSort::sort
(
const
InputTOBArray
& input,
TOBArray
& output) {
40
const
jLJetTOBArray
& jets =
dynamic_cast<
const
jLJetTOBArray
&
>
(input);
41
42
// fill output array with GenericTOBs builds from jets
43
for
(
jLJetTOBArray::const_iterator
jet
= jets.begin();
jet
!= jets.end(); ++
jet
) {
44
output.push_back(
GenericTOB
(**
jet
) );
45
}
46
47
48
// keep only max number of jets
49
int
par =
m_numberOfjLJets
;
50
unsigned
int
maxNumberOfjLJets = std::clamp(par, 0, std::abs(par));
51
if
(maxNumberOfjLJets>0) {
52
while
( output.size()> maxNumberOfjLJets ) {
53
output.pop_back();
54
}
55
}
56
return
TCS::StatusCode::SUCCESS
;
57
}
58
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition
AlgFactory.h:62
GenericTOB.h
TOBArray.h
TCS::ConfigurableAlg::parameter
const Parameter & parameter(const std::string ¶meterName) const
Definition
ConfigurableAlg.cxx:243
TCS::ConfigurableAlg::name
const std::string & name() const
Definition
ConfigurableAlg.h:48
TCS::ConfigurableAlg::defineParameter
void defineParameter(const std::string &name, TCS::parType_t value)
Definition
ConfigurableAlg.cxx:201
TCS::DataArrayImpl< jLJetTOB >::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::jLJetNoSort::initialize
virtual TCS::StatusCode initialize() override
Definition
jLJetNoSort.cxx:30
TCS::jLJetNoSort::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output) override final
Definition
jLJetNoSort.cxx:39
TCS::jLJetNoSort::jLJetNoSort
jLJetNoSort(const std::string &name)
Definition
jLJetNoSort.cxx:18
TCS::jLJetNoSort::m_numberOfjLJets
parType_t m_numberOfjLJets
Definition
jLJetNoSort.h:32
TCS::jLJetNoSort::~jLJetNoSort
virtual ~jLJetNoSort()
Definition
jLJetNoSort.cxx:26
TCS::jLJetTOBArray
Definition
jLJetTOBArray.h:19
jLJetNoSort.h
jLJetTOBArray.h
const
TCS
Definition
AnomalyDetectionBDT.h:16
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.14.0