ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
jTauNoSort.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
// jTauNoSort.cxx
5
// TopoCore
6
// Algorithm to generate ALL lists of jTau TOBs
7
8
#include "
L1TopoAlgorithms/jTauNoSort.h
"
9
#include "
L1TopoEvent/TOBArray.h
"
10
#include "
L1TopoEvent/jTauTOBArray.h
"
11
#include "
L1TopoEvent/GenericTOB.h
"
12
#include <algorithm>
13
14
REGISTER_ALG_TCS
(jTauNoSort)
15
16
// constructor
17
TCS
::
jTauNoSort
::
jTauNoSort
(
const
std::
string
&
name
) :
SortingAlg
(
name
) {
18
defineParameter(
"InputWidth"
, 120);
// for fw
19
defineParameter(
"OutputWidth"
, 120);
20
defineParameter(
"Isolation"
, 1024);
21
defineParameter(
"passIsolation"
,
false
);
22
}
23
24
25
// destructor
26
TCS::jTauNoSort::~jTauNoSort
() {}
27
28
TCS::StatusCode
29
TCS::jTauNoSort::initialize
() {
30
m_numberOfjTaus = parameter(
"OutputWidth"
).value();
31
m_iso = parameter(
"Isolation"
).value();
32
m_passIsolation = parameter(
"passIsolation"
).value();
33
34
return
TCS::StatusCode::SUCCESS
;
35
}
36
37
TCS::StatusCode
38
TCS::jTauNoSort::sort
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
39
40
const
jTauTOBArray
&
clusters
=
dynamic_cast<
const
jTauTOBArray
&
>
(
input
);
41
42
// fill output array with GenericTOB built from clusters
43
for
(
jTauTOBArray::const_iterator
jtau =
clusters
.begin(); jtau!=
clusters
.end(); ++jtau ) {
44
45
// Isolation cut
46
if
(!checkIsolation(*jtau))
continue
;
47
48
const
GenericTOB
gtob(**jtau);
49
output
.push_back( gtob );
50
}
51
52
53
// keep only max number of clusters
54
int
par
= m_numberOfjTaus ;
55
unsigned
int
maxNumberOfjTaus = std::clamp(
par
, 0, std::abs(
par
));
56
if
(maxNumberOfjTaus>0) {
57
while
(
output
.size()> maxNumberOfjTaus ) {
58
output
.pop_back();
59
}
60
}
61
return
TCS::StatusCode::SUCCESS
;
62
}
63
64
65
bool
66
TCS::jTauNoSort::checkIsolation
(
const
TCS::jTauTOB
* jtau)
const
{
67
if
(m_passIsolation)
return
true
;
68
return
jtau->
EtIso
()*1024 < jtau->
Et
()*m_iso;
69
}
70
TCS::jTauTOBArray
Definition:
jTauTOBArray.h:19
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::DataArrayImpl< jTauTOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
TCS::jTauTOB::EtIso
unsigned int EtIso() const
Definition:
jTauTOB.h:40
TCS::jTauTOB::Et
unsigned int Et() const
Definition:
jTauTOB.h:32
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:560
TCS::jTauNoSort
Definition:
jTauNoSort.h:18
TCS::jTauNoSort::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output) override final
Definition:
jTauNoSort.cxx:38
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TCS::jTauTOB
Definition:
jTauTOB.h:16
TOBArray.h
TCS::TOBArray
Definition:
TOBArray.h:24
TCS::jTauNoSort::initialize
virtual TCS::StatusCode initialize() override
Definition:
jTauNoSort.cxx:29
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
TCS::jTauNoSort::checkIsolation
bool checkIsolation(const TCS::jTauTOB *jtau) const
Definition:
jTauNoSort.cxx:66
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
createCoolChannelIdFile.par
par
Definition:
createCoolChannelIdFile.py:29
TCS::SortingAlg
Definition:
SortingAlg.h:18
TCS::jTauNoSort::~jTauNoSort
virtual ~jTauNoSort()
Definition:
jTauNoSort.cxx:26
GenericTOB.h
jTauNoSort.h
RunTileMonitoring.clusters
clusters
Definition:
RunTileMonitoring.py:133
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
jTauTOBArray.h
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
Generated on Sun Dec 22 2024 21:12:49 for ATLAS Offline Software by
1.8.18