ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
JetNoSortMatch.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
// JetNoSortMatch.cxx
5
// TopoCore
6
// Created by Veronica Sorin on 14/8/14.
7
// Algorithm to generate ALL lists of JETs TOBs with cuts on etwide and narrow
8
//
9
#include "
L1TopoAlgorithms/JetNoSortMatch.h
"
10
#include "
L1TopoEvent/TOBArray.h
"
11
#include "
L1TopoEvent/JetTOBArray.h
"
12
#include "
L1TopoEvent/GenericTOB.h
"
13
#include <algorithm>
14
15
REGISTER_ALG_TCS
(JetNoSortMatch)
16
17
18
// constructor
19
TCS
::
JetNoSortMatch
::
JetNoSortMatch
(
const
std
::
string
&
name
) :
20
SortingAlg
(
name
)
21
{
22
defineParameter
(
"InputWidth"
, 64 );
// for FW
23
defineParameter
(
"OutputWidth"
, 64 );
24
defineParameter
(
"JetSize"
, 2 );
25
defineParameter
(
"MinET1"
,0);
26
defineParameter
(
"MinET2"
,0);
27
m_jetsize
=
JetTOB::JS1
;
28
}
29
30
31
TCS::JetNoSortMatch::~JetNoSortMatch
()
32
{}
33
34
TCS::StatusCode
35
TCS::JetNoSortMatch::initialize
() {
36
m_numberOfJets
=
parameter
(
"OutputWidth"
).value();
37
m_jsize
=
parameter
(
"JetSize"
).value();
38
p_MinET1
=
parameter
(
"MinET1"
).value();
39
p_MinET2
=
parameter
(
"MinET2"
).value();
40
41
TRG_MSG_INFO
(
"MinET1 : "
<<
p_MinET1
);
42
TRG_MSG_INFO
(
"MinET2 : "
<<
p_MinET2
);
43
return
TCS::StatusCode::SUCCESS
;
44
}
45
46
47
48
49
TCS::StatusCode
50
TCS::JetNoSortMatch::sort
(
const
InputTOBArray
& input,
TOBArray
& output) {
51
const
JetTOBArray
& jets =
dynamic_cast<
const
JetTOBArray
&
>
(input);
52
// because fw seems to have a differnt notation, for now 2 means JS1 8x8
53
m_jetsize
=
m_jsize
==2?
JetTOB::JS1
:
JetTOB::JS2
;
54
55
// fill output array with GenericTOBs builds from jets
56
for
(
JetTOBArray::const_iterator
cl = jets.begin(); cl!= jets.end(); ++cl ) {
57
58
if
(
parType_t
((*cl)-> Et2()) <=
p_MinET1
)
continue
;
// E_T cut on 4x4, ET1 relates with FW ordering, Et2 is Etsmall
59
if
(
parType_t
((*cl)-> Et1()) <=
p_MinET2
)
continue
;
// E_T cut on 8x8 , ET2 relates with FW ordering, Et1 is Etlarge
60
61
output.push_back(
GenericTOB
(**cl,
m_jetsize
) );
62
}
63
64
65
// keep only max number of jets
66
int
par =
m_numberOfJets
;
67
unsigned
int
maxNumberOfJets = std::clamp(par, 0, std::abs(par));
68
if
(maxNumberOfJets>0) {
69
while
( output.size()> maxNumberOfJets ) {
70
output.pop_back();
71
}
72
}
73
return
TCS::StatusCode::SUCCESS
;
74
}
75
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition
AlgFactory.h:62
GenericTOB.h
JetNoSortMatch.h
JetTOBArray.h
TOBArray.h
TRG_MSG_INFO
#define TRG_MSG_INFO(x)
Definition
Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStreamMacros.h:27
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< JetTOB >::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::JetNoSortMatch::~JetNoSortMatch
virtual ~JetNoSortMatch()
Definition
JetNoSortMatch.cxx:31
TCS::JetNoSortMatch::m_jsize
parType_t m_jsize
Definition
JetNoSortMatch.h:34
TCS::JetNoSortMatch::m_jetsize
JetTOB::JetSize m_jetsize
Definition
JetNoSortMatch.h:41
TCS::JetNoSortMatch::p_MinET1
parType_t p_MinET1
Definition
JetNoSortMatch.h:35
TCS::JetNoSortMatch::p_MinET2
parType_t p_MinET2
Definition
JetNoSortMatch.h:36
TCS::JetNoSortMatch::initialize
virtual TCS::StatusCode initialize()
Definition
JetNoSortMatch.cxx:35
TCS::JetNoSortMatch::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition
JetNoSortMatch.cxx:50
TCS::JetNoSortMatch::m_numberOfJets
parType_t m_numberOfJets
Definition
JetNoSortMatch.h:33
TCS::JetNoSortMatch::JetNoSortMatch
JetNoSortMatch(const std::string &name)
Definition
JetNoSortMatch.cxx:19
TCS::JetTOBArray
Definition
JetTOBArray.h:21
TCS::JetTOB::JS1
@ JS1
Definition
JetTOB.h:21
TCS::JetTOB::JS2
@ JS2
Definition
JetTOB.h:21
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
const
TCS
Definition
AnomalyDetectionBDT.h:16
TCS::parType_t
uint32_t parType_t
Definition
Parameter.h:22
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.14.0