ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
TauMatching.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
// TauMatching.cxx
5
// TopoCore
6
// Algorithm to select the abbreviated list of cTaus , no order is applied
7
//
8
#include "
L1TopoAlgorithms/TauMatching.h
"
9
#include "
L1TopoEvent/TOBArray.h
"
10
#include "
L1TopoEvent/cTauTOBArray.h
"
11
#include "
L1TopoEvent/GenericTOB.h
"
12
#include <algorithm>
13
14
REGISTER_ALG_TCS
(TauMatching)
15
16
// constructor
17
TCS
::
TauMatching
::
TauMatching
(
const
std
::
string
&
name
) :
SortingAlg
(
name
) {
18
defineParameter
(
"InputWidth"
, 120 );
// for fw
19
defineParameter
(
"InputWidth1stStage"
, 30 );
// for fw
20
defineParameter
(
"OutputWidth"
, 6 );
21
defineParameter
(
"MinET"
, 0 );
22
defineParameter
(
"RCore"
, 0);
23
defineParameter
(
"RHad"
, 0);
24
defineParameter
(
"MinEta"
, 0 );
25
defineParameter
(
"MaxEta"
, 63);
26
}
27
28
29
// destructor
30
TCS::TauMatching::~TauMatching
() {}
31
32
TCS::StatusCode
33
TCS::TauMatching::initialize
() {
34
m_numberOfcTaus
=
parameter
(
"OutputWidth"
).value();
35
m_et
=
parameter
(
"MinET"
).value();
36
m_rCore
=
parameter
(
"RCore"
).value();
37
m_rHad
=
parameter
(
"RHad"
).value();
38
m_minEta
=
parameter
(
"MinEta"
).value();
39
m_maxEta
=
parameter
(
"MaxEta"
).value();
40
return
TCS::StatusCode::SUCCESS
;
41
}
42
43
TCS::StatusCode
44
TCS::TauMatching::sort
(
const
InputTOBArray
& input,
TOBArray
& output) {
45
46
const
cTauTOBArray
& ctaus =
dynamic_cast<
const
cTauTOBArray
&
>
(input);
47
48
// fill output array with GenericTOB buildt from ctaus
49
for
(
cTauTOBArray::const_iterator
ctau = ctaus.
begin
(); ctau!= ctaus.
end
(); ++ctau ) {
50
const
GenericTOB
gtob(**ctau);
51
52
if
((*ctau)->tobType() ==
TCS::ETAU
)
53
{std::cout <<
"I am eTau"
<< std::endl;}
//Do something with eTau
54
if
((*ctau)->tobType() ==
TCS::JTAU
)
55
{std::cout <<
"I am jTau"
<< std::endl;}
//Do something with jTau
56
57
//Currently do nothing!
58
continue
;
59
60
output.push_back( gtob );
61
}
62
63
64
// keep only max number of ctaus
65
int
par =
m_numberOfcTaus
;
66
unsigned
int
maxNumberOfcTaus = std::clamp(par, 0, std::abs(par));
67
if
(maxNumberOfcTaus>0) {
68
while
( output.size()> maxNumberOfcTaus ) {
69
output.pop_back();
70
}
71
}
72
return
TCS::StatusCode::SUCCESS
;
73
}
74
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition
AlgFactory.h:62
GenericTOB.h
TOBArray.h
TauMatching.h
cTauTOBArray.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::begin
iterator begin()
Definition
DataArrayImpl.h:40
TCS::DataArrayImpl< cTauTOB >::const_iterator
data_t::const_iterator const_iterator
Definition
DataArrayImpl.h:18
TCS::DataArrayImpl::end
iterator end()
Definition
DataArrayImpl.h:43
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::TauMatching::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition
TauMatching.cxx:44
TCS::TauMatching::m_numberOfcTaus
parType_t m_numberOfcTaus
Definition
TauMatching.h:31
TCS::TauMatching::m_maxEta
parType_t m_maxEta
Definition
TauMatching.h:33
TCS::TauMatching::m_minEta
parType_t m_minEta
Definition
TauMatching.h:32
TCS::TauMatching::initialize
virtual TCS::StatusCode initialize()
Definition
TauMatching.cxx:33
TCS::TauMatching::TauMatching
TauMatching(const std::string &name)
Definition
TauMatching.cxx:17
TCS::TauMatching::m_rCore
parType_t m_rCore
Definition
TauMatching.h:35
TCS::TauMatching::m_et
parType_t m_et
Definition
TauMatching.h:34
TCS::TauMatching::~TauMatching
virtual ~TauMatching()
Definition
TauMatching.cxx:30
TCS::TauMatching::m_rHad
parType_t m_rHad
Definition
TauMatching.h:36
TCS::cTauTOBArray
Definition
cTauTOBArray.h:14
const
TCS
Definition
AnomalyDetectionBDT.h:16
TCS::ETAU
@ ETAU
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:22
TCS::JTAU
@ JTAU
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:13
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.14.0