ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
JetSelect.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
// JetSelect.cxx
5
// TopoCore
6
// Created by Veronica Sorin on 14/8/14.
7
// algorithm to create abbreviated jet lists
8
//
9
#include "
L1TopoAlgorithms/JetSelect.h
"
10
#include "
L1TopoEvent/TOBArray.h
"
11
#include "
L1TopoEvent/JetTOBArray.h
"
12
#include "
L1TopoEvent/GenericTOB.h
"
13
#include <algorithm>
14
15
REGISTER_ALG_TCS
(JetSelect)
16
17
18
// constructor
19
TCS
::
JetSelect
::
JetSelect
(
const
std::
string
&
name
) :
20
SortingAlg
(
name
)
21
{
22
defineParameter(
"InputWidth"
, 64 );
// for FW
23
defineParameter(
"InputWidth1stStage"
, 16 );
// for FW
24
defineParameter(
"OutputWidth"
, 10 );
25
defineParameter(
"JetSize"
, 2 );
26
defineParameter(
"MinET"
, 0 );
27
defineParameter(
"MinEta"
, 0 );
28
defineParameter(
"MaxEta"
, 31);
29
defineParameter(
"DoEtaCut"
, 1);
30
m_jetsize = JetTOB::JS1;
31
}
32
33
34
TCS::JetSelect::~JetSelect
()
35
{}
36
37
TCS::StatusCode
38
TCS::JetSelect::initialize
() {
39
m_numberOfJets = parameter(
"OutputWidth"
).value();
40
m_et = parameter(
"MinET"
).value();
41
m_jsize = parameter(
"JetSize"
).value();
42
m_minEta = parameter(
"MinEta"
).value();
43
m_maxEta = parameter(
"MaxEta"
).value();
44
m_doEtaCut = parameter(
"DoEtaCut"
).value();
45
return
TCS::StatusCode::SUCCESS
;
46
}
47
48
49
50
51
TCS::StatusCode
52
TCS::JetSelect::sort
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
53
const
JetTOBArray
&
jets
=
dynamic_cast<
const
JetTOBArray
&
>
(
input
);
54
// because fw seems to have a differnt notation, for now 2 means JS1 8x8
55
m_jetsize = m_jsize==2?
JetTOB::JS1
:
JetTOB::JS2
;
56
57
// fill output array with GenericTOBs builds from jets
58
for
(
JetTOBArray::const_iterator
cl
=
jets
.begin();
cl
!=
jets
.end(); ++
cl
) {
59
unsigned
int
Et = m_jsize==2?
parType_t
((*cl)->Et1()):
parType_t
((*cl)->Et2());
60
if
( Et <= m_et )
continue
;
// ET cut
61
if
(m_doEtaCut && (
parType_t
(std::abs((*cl)->
eta
())) < m_minEta))
continue
;
62
if
(m_doEtaCut && (
parType_t
(std::abs((*cl)->
eta
())) > m_maxEta))
continue
;
63
64
output
.push_back(
GenericTOB
(**
cl
, m_jetsize) );
65
}
66
67
68
// keep only max number of jets
69
int
par
= m_numberOfJets ;
70
unsigned
int
maxNumberOfJets = std::clamp(
par
, 0, std::abs(
par
));
71
if
(maxNumberOfJets>0) {
72
73
if
(
output
.size()> maxNumberOfJets) {setOverflow(
true
);}
74
75
while
(
output
.size()> maxNumberOfJets ) {
76
output
.pop_back();
77
}
78
}
79
return
TCS::StatusCode::SUCCESS
;
80
}
81
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< JetTOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
eta
Scalar eta() const
pseudorapidity method
Definition:
AmgMatrixBasePlugin.h:79
TCS::JetTOB::JS2
@ JS2
Definition:
JetTOB.h:21
TCS::JetTOB::JS1
@ JS1
Definition:
JetTOB.h:21
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:562
TCS::JetSelect
Definition:
JetSelect.h:20
TCS::JetSelect::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition:
JetSelect.cxx:52
TCS::JetSelect::~JetSelect
virtual ~JetSelect()
Definition:
JetSelect.cxx:34
TCS::JetSelect::initialize
virtual TCS::StatusCode initialize()
Definition:
JetSelect.cxx:38
JetTOBArray.h
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
JetSelect.h
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:195
createCoolChannelIdFile.par
par
Definition:
createCoolChannelIdFile.py:29
TCS::SortingAlg
Definition:
SortingAlg.h:18
GenericTOB.h
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
TCS::JetTOBArray
Definition:
JetTOBArray.h:21
defineDB.jets
list jets
Definition:
JetTagCalibration/share/defineDB.py:24
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition:
dq_make_web_display.py:26
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
Generated on Thu Jul 4 2024 21:18:57 for ATLAS Offline Software by
1.8.18