ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1Result
src
EMTauRoI.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
TrigT1Result/EMTauRoI.h
"
7
#include "
TrigT1Interfaces/BitOp.h
"
8
#include "
TrigT1Interfaces/TrigT1CaloDefs.h
"
9
#include "
TrigT1Interfaces/RoIFormatUpdater.h
"
10
11
using namespace
LVL1
;
12
using namespace
std
;
13
14
namespace
ROIB
{
15
16
EMTauRoI::EMTauRoI
( uint32_t RoIWord )
17
:
m_roIWord
( RoIWord )
18
{
19
}
20
21
EMTauRoI::EMTauRoI
()
22
:
m_roIWord
( 0 )
23
{
24
}
25
26
void
EMTauRoI::update
() {
27
// Obsolete a long time ago.
28
m_roIWord
=
RoIFormatUpdater::UpdateEMTauRoI
(
m_roIWord
) ;
29
return
;
30
}
31
32
uint32_t
EMTauRoI::roIWord
()
const
{
33
return
m_roIWord
;
34
}
35
38
unsigned
int
EMTauRoI::roIType
()
const
{
39
if
(
m_roIWord
!= 0 ) {
40
unsigned
int
type
=
BitOp::getValue
( &
m_roIWord
, 0xc0000000 );
41
if
(
type
==
TrigT1CaloDefs::EMTauRoIWord
) {
42
return
TrigT1CaloDefs::CpRoIWordType
;
43
}
44
else
{
45
unsigned
int
temp2 =
BitOp::getValue
( &
m_roIWord
, 0xf0000000 );
46
if
(temp2 ==
TrigT1CaloDefs::EMRoIWord
) {
47
return
TrigT1CaloDefs::EMRoIWordType
;
48
}
49
else
if
(temp2 ==
TrigT1CaloDefs::TauRoIWord
) {
50
return
TrigT1CaloDefs::TauRoIWordType
;
51
}
52
}
53
}
54
return
TrigT1CaloDefs::RoIWordTypeError
;
55
}
56
58
unsigned
int
EMTauRoI::electronicsID
()
const
{
59
if
(
roIType
() ==
TrigT1CaloDefs::CpRoIWordType
)
60
return
BitOp::getValue
( &
m_roIWord
, 0x3ffc0000 );
61
else
if
(
roIType
() ==
TrigT1CaloDefs::EMRoIWordType
||
roIType
() ==
TrigT1CaloDefs::TauRoIWordType
)
62
return
BitOp::getValue
( &
m_roIWord
, 0x0fff0000 );
63
else
64
return
9999;
65
}
66
68
vector< unsigned int >
EMTauRoI::thresholds
()
const
{
69
70
std::vector<unsigned int> returnVec;
71
if
(
roIType
() !=
TrigT1CaloDefs::CpRoIWordType
)
72
returnVec.push_back( 9999 );
73
else
{
74
for
(
unsigned
int
i = 0;i <
TrigT1CaloDefs::numOfCPThresholds
;i++ )
75
returnVec.push_back(
static_cast<
unsigned
int
>
(
BitOp::isSet
( &
m_roIWord
, i ) ) );
76
}
77
return
returnVec;
78
}
79
81
unsigned
int
EMTauRoI::et
()
const
{
82
83
if
(
roIType
() ==
TrigT1CaloDefs::EMRoIWordType
||
roIType
() ==
TrigT1CaloDefs::TauRoIWordType
)
84
return
BitOp::getValue
( &
m_roIWord
, 0x000000ff );
85
86
return
0;
87
}
88
90
unsigned
int
EMTauRoI::isolation
()
const
{
91
92
if
(
roIType
() ==
TrigT1CaloDefs::EMRoIWordType
||
roIType
() ==
TrigT1CaloDefs::TauRoIWordType
)
93
return
BitOp::getValue
( &
m_roIWord
, 0x00001f00 );
94
95
return
0;
96
}
97
98
}
// namespace ROIB
BitOp.h
EMTauRoI.h
RoIFormatUpdater.h
TrigT1CaloDefs.h
BitOp::getValue
static unsigned int getValue(const unsigned int *uintValue, const unsigned int mask)
get the value in the input word represented by a bit pattern given as a bitmask
Definition
BitOp.cxx:47
BitOp::isSet
static bool isSet(const unsigned int *uintValue, int bit)
Check if a the given bit in the given unsigned int or int value is set.
Definition
BitOp.h:47
LVL1::RoIFormatUpdater::UpdateEMTauRoI
static unsigned int UpdateEMTauRoI(unsigned int RoIWord)
Method to update EM/Tau RoI word.
Definition
RoIFormatUpdater.cxx:22
LVL1::TrigT1CaloDefs::numOfCPThresholds
static const unsigned int numOfCPThresholds
Definition
TrigT1CaloDefs.h:125
LVL1::TrigT1CaloDefs::EMTauRoIWord
@ EMTauRoIWord
Definition
TrigT1CaloDefs.h:185
LVL1::TrigT1CaloDefs::TauRoIWord
@ TauRoIWord
Definition
TrigT1CaloDefs.h:187
LVL1::TrigT1CaloDefs::EMRoIWord
@ EMRoIWord
Definition
TrigT1CaloDefs.h:186
LVL1::TrigT1CaloDefs::CpRoIWordType
@ CpRoIWordType
Definition
TrigT1CaloDefs.h:167
LVL1::TrigT1CaloDefs::RoIWordTypeError
@ RoIWordTypeError
Definition
TrigT1CaloDefs.h:175
LVL1::TrigT1CaloDefs::EMRoIWordType
@ EMRoIWordType
Definition
TrigT1CaloDefs.h:173
LVL1::TrigT1CaloDefs::TauRoIWordType
@ TauRoIWordType
Definition
TrigT1CaloDefs.h:174
ROIB::EMTauRoI::et
unsigned int et() const
Return cluster ET for Run 2 RoI.
Definition
EMTauRoI.cxx:81
ROIB::EMTauRoI::electronicsID
unsigned int electronicsID() const
Return bitmask containing coordinate information (crate, module, chip, ocation).
Definition
EMTauRoI.cxx:58
ROIB::EMTauRoI::isolation
unsigned int isolation() const
Return isolation flags for Run 2 RoI.
Definition
EMTauRoI.cxx:90
ROIB::EMTauRoI::m_roIWord
uint32_t m_roIWord
Definition
EMTauRoI.h:48
ROIB::EMTauRoI::EMTauRoI
EMTauRoI()
Definition
EMTauRoI.cxx:21
ROIB::EMTauRoI::roIWord
uint32_t roIWord() const
Definition
EMTauRoI.cxx:32
ROIB::EMTauRoI::roIType
unsigned int roIType() const
Return RoI type.
Definition
EMTauRoI.cxx:38
ROIB::EMTauRoI::thresholds
std::vector< unsigned int > thresholds() const
Return vector of thresholds passed for Run 1 RoI.
Definition
EMTauRoI.cxx:68
ROIB::EMTauRoI::update
void update()
Definition
EMTauRoI.cxx:26
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
ROIB
Namespace of the LVL1 RoIB simulation.
Definition
ILvl1ResultAccessTool.h:19
std
STL namespace.
type
Generated on
for ATLAS Offline Software by
1.17.0