ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
METNoSort.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
// METNoSort.cxx
5
// author: Joerg Stelzer
6
// creation: 27/08/14.
7
// modify V Sorin, algorithm to calculate MET and convert in genericTOB
8
9
#include "
L1TopoAlgorithms/METNoSort.h
"
10
#include "
L1TopoCommon/Exception.h
"
11
#include "
L1TopoEvent/TOBArray.h
"
12
#include "
L1TopoEvent/MetTOBArray.h
"
13
#include "
L1TopoEvent/GenericTOB.h
"
14
#include <algorithm>
15
16
REGISTER_ALG_TCS
(METNoSort)
17
18
19
// constructor
20
TCS
::
METNoSort
::
METNoSort
(
const
std::
string
&
name
) :
SortingAlg
(
name
) {
21
22
defineParameter(
"InputWidth"
, 2 );
// for FW
23
defineParameter(
"OutputWidth"
, 2 );
// for FW
24
25
}
26
27
// destructor
28
TCS::METNoSort::~METNoSort
() {}
29
30
31
TCS::StatusCode
32
TCS::METNoSort::initialize
() {
33
return
TCS::StatusCode::SUCCESS
;
34
}
35
36
TCS::StatusCode
37
TCS::METNoSort::sort
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
38
39
if
(
input
.size()!=1) {
40
TCS_EXCEPTION
(
"MET sort alg expects exactly single MET TOB, got "
<<
input
.size());
41
}
42
43
const
MetTOBArray
& mets =
dynamic_cast<
const
MetTOBArray
&
>
(
input
);
44
// int missingET = sqrt(mets[0].Ex()*mets[0].Ex() + mets[0].Ey() * mets[0].Ey());
45
// int metphi = round(10*atan2(mets[0].Ey(),mets[0].Ex()));
46
47
for
(
MetTOBArray::const_iterator
cl
= mets.
begin
();
cl
!= mets.
end
(); ++
cl
) {
48
49
output
.push_back(
GenericTOB
(**
cl
) );
50
}
51
52
// output.push_back( GenericTOB( &mets[0] ));
53
54
55
return
TCS::StatusCode::SUCCESS
;
56
}
57
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::DataArrayImpl< MetTOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
TCS::MetTOBArray
Definition:
MetTOBArray.h:14
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:560
TCS::DataArrayImpl::end
iterator end()
Definition:
DataArrayImpl.h:43
TCS::METNoSort
Definition:
METNoSort.h:19
TCS::METNoSort::~METNoSort
virtual ~METNoSort()
Definition:
METNoSort.cxx:28
METNoSort.h
TCS::METNoSort::initialize
virtual StatusCode initialize()
Definition:
METNoSort.cxx:32
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TOBArray.h
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
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:228
TCS::SortingAlg
Definition:
SortingAlg.h:18
GenericTOB.h
TCS::DataArrayImpl::begin
iterator begin()
Definition:
DataArrayImpl.h:40
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
TCS::METNoSort::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition:
METNoSort.cxx:37
MetTOBArray.h
Exception.h
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 Sun Dec 22 2024 21:14:26 for ATLAS Offline Software by
1.8.18