ATLAS Offline Software
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
TCS::TauMatching::~TauMatching
virtual ~TauMatching()
Definition:
TauMatching.cxx:30
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::DataArrayImpl< cTauTOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:560
TCS::cTauTOBArray
Definition:
L1Topo/L1TopoEvent/L1TopoEvent/cTauTOBArray.h:14
TCS::DataArrayImpl::end
iterator end()
Definition:
DataArrayImpl.h:43
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TOBArray.h
PowhegPythia8EvtGen_H2a4X_ctauY.ctau
int ctau
Definition:
PowhegPythia8EvtGen_H2a4X_ctauY.py:28
TCS::TOBArray
Definition:
TOBArray.h:24
TCS::TauMatching::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition:
TauMatching.cxx:44
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:228
createCoolChannelIdFile.par
par
Definition:
createCoolChannelIdFile.py:29
TCS::SortingAlg
Definition:
SortingAlg.h:18
TCS::TauMatching::initialize
virtual TCS::StatusCode initialize()
Definition:
TauMatching.cxx:33
GenericTOB.h
TCS::DataArrayImpl::begin
iterator begin()
Definition:
DataArrayImpl.h:40
TauMatching.h
TCS::TauMatching
Definition:
TauMatching.h:18
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
TCS::ETAU
@ ETAU
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:22
TCS::JTAU
@ JTAU
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:13
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
cTauTOBArray.h
Generated on Sun Dec 22 2024 21:18:56 for ATLAS Offline Software by
1.8.18