ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloEvent
src
CPMTobRoI.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigT1CaloEvent/CPMTobRoI.h
"
6
7
namespace
LVL1
{
8
9
// Static constants
10
11
const
unsigned
int
CPMTobRoI::s_wordIdVal
;
12
13
const
int
CPMTobRoI::s_wordIdBit
;
14
const
int
CPMTobRoI::s_crateBit
;
15
const
int
CPMTobRoI::s_cpmBit
;
16
const
int
CPMTobRoI::s_chipBit
;
17
const
int
CPMTobRoI::s_locationBit
;
18
const
int
CPMTobRoI::s_isolBit
;
19
const
int
CPMTobRoI::s_energyBit
;
20
21
const
int
CPMTobRoI::s_wordIdMask
;
22
const
int
CPMTobRoI::s_crateMask
;
23
const
int
CPMTobRoI::s_cpmMask
;
24
const
int
CPMTobRoI::s_chipMask
;
25
const
int
CPMTobRoI::s_locationMask
;
26
const
int
CPMTobRoI::s_isolMask
;
27
const
int
CPMTobRoI::s_energyMask
;
28
const
int
CPMTobRoI::s_typeMask
;
29
30
CPMTobRoI::CPMTobRoI
() :
m_roiWord
(0)
31
{
32
}
33
34
CPMTobRoI::CPMTobRoI
(uint32_t
roiWord
) :
m_roiWord
(
roiWord
)
35
{
36
}
37
38
CPMTobRoI::CPMTobRoI
(
int
crate
,
int
cpm
,
int
chip
,
int
location
,
int
type
,
39
int
energy
,
int
isol)
40
{
41
m_roiWord
=
s_wordIdVal
<<
s_wordIdBit
;
42
m_roiWord
|= (
type
&
s_typeMask
) <<
s_wordIdBit
;
43
m_roiWord
|= (
crate
&
s_crateMask
) <<
s_crateBit
;
44
m_roiWord
|= (
cpm
&
s_cpmMask
) <<
s_cpmBit
;
45
m_roiWord
|= (
chip
&
s_chipMask
) <<
s_chipBit
;
46
m_roiWord
|= (
location
&
s_locationMask
) <<
s_locationBit
;
47
m_roiWord
|= (isol &
s_isolMask
) <<
s_isolBit
;
48
m_roiWord
|= (
energy
&
s_energyMask
) <<
s_energyBit
;
49
}
50
51
CPMTobRoI::~CPMTobRoI
()
52
{
53
}
54
55
// Set RoI word with ID check
56
57
bool
CPMTobRoI::setRoiWord
(uint32_t
roiWord
)
58
{
59
int
wordId = (
roiWord
>>
s_wordIdBit
) &
s_wordIdMask
;
60
bool
valid = ((wordId ==
s_wordIdVal
) ||
61
(wordId == (
s_wordIdVal
|
s_typeMask
)));
62
if
(valid)
m_roiWord
=
roiWord
;
63
return
valid;
64
}
65
66
}
// end namespace
CPMTobRoI.h
LVL1::CPMTobRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:112
LVL1::CPMTobRoI::s_isolBit
static const int s_isolBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:60
LVL1::CPMTobRoI::energy
int energy() const
Return energy.
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:102
LVL1::CPMTobRoI::chip
int chip() const
Return CP chip number (0-7).
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:87
LVL1::CPMTobRoI::s_cpmBit
static const int s_cpmBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:57
LVL1::CPMTobRoI::m_roiWord
uint32_t m_roiWord
RoI word.
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:73
LVL1::CPMTobRoI::s_chipMask
static const int s_chipMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:66
LVL1::CPMTobRoI::location
int location() const
Return location (RoI local coords) (0-7).
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:92
LVL1::CPMTobRoI::type
int type() const
Return type em/tau (0/1).
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:97
LVL1::CPMTobRoI::s_chipBit
static const int s_chipBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:58
LVL1::CPMTobRoI::s_typeMask
static const int s_typeMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:70
LVL1::CPMTobRoI::crate
int crate() const
Return crate number (0-1).
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:77
LVL1::CPMTobRoI::s_wordIdBit
static const int s_wordIdBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:55
LVL1::CPMTobRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition
CPMTobRoI.cxx:57
LVL1::CPMTobRoI::CPMTobRoI
CPMTobRoI()
Definition
CPMTobRoI.cxx:30
LVL1::CPMTobRoI::s_wordIdMask
static const int s_wordIdMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:63
LVL1::CPMTobRoI::s_energyBit
static const int s_energyBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:61
LVL1::CPMTobRoI::s_crateBit
static const int s_crateBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:56
LVL1::CPMTobRoI::~CPMTobRoI
~CPMTobRoI()
Definition
CPMTobRoI.cxx:51
LVL1::CPMTobRoI::s_isolMask
static const int s_isolMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:68
LVL1::CPMTobRoI::s_locationBit
static const int s_locationBit
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:59
LVL1::CPMTobRoI::cpm
int cpm() const
Return CPM number (1-14).
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:82
LVL1::CPMTobRoI::s_crateMask
static const int s_crateMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:64
LVL1::CPMTobRoI::s_cpmMask
static const int s_cpmMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:65
LVL1::CPMTobRoI::s_wordIdVal
static const unsigned int s_wordIdVal
RoI word ID.
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:53
LVL1::CPMTobRoI::s_energyMask
static const int s_energyMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:69
LVL1::CPMTobRoI::s_locationMask
static const int s_locationMask
Definition
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:67
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
Generated on
for ATLAS Offline Software by
1.17.0