ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
gLJetSelect.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
// gLJetSelect.cxx
5
// TopoCore
6
// algorithm to create abbreviated gLJet lists
7
//
8
#include "
L1TopoAlgorithms/gLJetSelect.h
"
9
#include "
L1TopoEvent/TOBArray.h
"
10
#include "
L1TopoEvent/gLJetTOBArray.h
"
11
#include "
L1TopoEvent/GenericTOB.h
"
12
#include <algorithm>
13
14
REGISTER_ALG_TCS
(gLJetSelect)
15
16
17
// constructor
18
TCS
::
gLJetSelect
::
gLJetSelect
(
const
std::
string
&
name
) :
19
SortingAlg
(
name
)
20
{
21
defineParameter(
"InputWidth"
, 64 );
// for FW
22
defineParameter(
"InputWidth1stStage"
, 16 );
// for FW
23
defineParameter(
"OutputWidth"
, 10 );
24
defineParameter(
"MinET"
, 0 );
25
defineParameter(
"MinEta"
, 0 );
26
defineParameter(
"MaxEta"
, 196 );
27
}
28
29
30
TCS::gLJetSelect::~gLJetSelect
()
31
{}
32
33
TCS::StatusCode
34
TCS::gLJetSelect::initialize
() {
35
m_numberOfgLJets = parameter(
"OutputWidth"
).value();
36
m_et = parameter(
"MinET"
).value();
37
m_minEta = parameter(
"MinEta"
).value();
38
m_maxEta = parameter(
"MaxEta"
).value();
39
return
TCS::StatusCode::SUCCESS
;
40
}
41
42
43
44
45
TCS::StatusCode
46
TCS::gLJetSelect::sort
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
47
48
const
gLJetTOBArray
&
jets
=
dynamic_cast<
const
gLJetTOBArray
&
>
(
input
);
49
50
// fill output array with GenericTOBs builds from jets
51
for
(
gLJetTOBArray::const_iterator
jet
=
jets
.begin();
jet
!=
jets
.end(); ++
jet
) {
52
unsigned
int
Et =
parType_t
((*jet)->Et());
53
if
( Et <= m_et )
continue
;
// ET cut
54
if
(
parType_t
(std::abs((*jet)->
eta
())) < m_minEta)
continue
;
55
if
(
parType_t
(std::abs((*jet)->
eta
())) > m_maxEta)
continue
;
56
57
output
.push_back(
GenericTOB
(**
jet
) );
58
}
59
60
// keep only max number of jets
61
int
par
= m_numberOfgLJets ;
62
unsigned
int
maxNumberOfJets = std::clamp(
par
, 0, std::abs(
par
));
63
if
(maxNumberOfJets>0) {
64
65
if
(
output
.size()> maxNumberOfJets) {setOverflow(
true
);}
66
67
while
(
output
.size()> maxNumberOfJets ) {
68
output
.pop_back();
69
}
70
}
71
return
TCS::StatusCode::SUCCESS
;
72
}
73
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::parType_t
uint32_t parType_t
Definition:
Parameter.h:22
TCS::DataArrayImpl< gLJetTOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
eta
Scalar eta() const
pseudorapidity method
Definition:
AmgMatrixBasePlugin.h:79
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:562
gLJetTOBArray.h
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TOBArray.h
TCS::TOBArray
Definition:
TOBArray.h:24
merge.output
output
Definition:
merge.py:17
TCS::GenericTOB
Definition:
GenericTOB.h:35
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition:
AlgFactory.h:62
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:192
createCoolChannelIdFile.par
par
Definition:
createCoolChannelIdFile.py:29
TCS::SortingAlg
Definition:
SortingAlg.h:18
GenericTOB.h
gLJetSelect.h
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
defineDB.jets
list jets
Definition:
JetTagCalibration/share/defineDB.py:24
TCS::gLJetTOBArray
Definition:
gLJetTOBArray.h:19
TCS::gLJetSelect
Definition:
gLJetSelect.h:18
TCS::gLJetSelect::~gLJetSelect
virtual ~gLJetSelect()
Definition:
gLJetSelect.cxx:30
TCS::gLJetSelect::initialize
virtual TCS::StatusCode initialize() override
Definition:
gLJetSelect.cxx:34
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
TCS::gLJetSelect::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output) override final
Definition:
gLJetSelect.cxx:46
Generated on Sun Jun 30 2024 21:16:29 for ATLAS Offline Software by
1.8.18