ATLAS Offline Software
JEMRoI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace LVL1 {
8 
9 // Static constants
10 
11 const unsigned int JEMRoI::s_wordIdVal;
12 
13 const int JEMRoI::s_wordIdBit;
14 const int JEMRoI::s_crateBit;
15 const int JEMRoI::s_jemBit;
16 const int JEMRoI::s_frameBit;
17 const int JEMRoI::s_locationBit;
18 const int JEMRoI::s_forwardBit;
19 const int JEMRoI::s_parityBit;
20 const int JEMRoI::s_saturationBit;
21 const int JEMRoI::s_forwardHitsBit;
22 const int JEMRoI::s_mainHitsBit;
23 
24 const int JEMRoI::s_wordIdMask;
25 const int JEMRoI::s_crateMask;
26 const int JEMRoI::s_jemMask;
27 const int JEMRoI::s_frameMask;
28 const int JEMRoI::s_locationMask;
29 const int JEMRoI::s_forwardMask;
30 const int JEMRoI::s_parityMask;
31 const int JEMRoI::s_saturationMask;
33 const int JEMRoI::s_mainHitsMask;
34 
35 JEMRoI::JEMRoI() : m_roiWord(0)
36 {
37 }
38 
40 {
41 }
42 
43 JEMRoI::JEMRoI(int crate, int jem, int frame, int location, int forward,
44  int hits, int error)
45 {
48  m_roiWord |= (jem & s_jemMask) << s_jemBit;
52  m_roiWord |= ((error>>1) & s_parityMask) << s_parityBit;
56 }
57 
59 {
60 }
61 
62 // Return Jet hit map (8 bits Main or 4 bits Forward)
63 
64 int JEMRoI::hits() const
65 {
66  int hits = 0;
69  return hits;
70 }
71 
72 // Set RoI word with ID check
73 
75 {
76  int wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
77  bool valid = (wordId == s_wordIdVal);
78  if (valid) m_roiWord = roiWord;
79  return valid;
80 }
81 
82 } // end namespace
LVL1::JEMRoI::s_forwardMask
static const int s_forwardMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:71
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::JEMRoI::s_parityBit
static const int s_parityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:61
LVL1::JEMRoI::m_roiWord
uint32_t m_roiWord
RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:83
LVL1::JEMRoI::s_mainHitsMask
static const int s_mainHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:75
LVL1::JEMRoI::location
int location() const
Return location (RoI local coords) (0-3)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:102
LVL1::JEMRoI::forward
int forward() const
Return forward jet flag (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:107
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::JEMRoI::s_forwardHitsBit
static const int s_forwardHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:63
LVL1::JEMRoI::s_locationBit
static const int s_locationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:59
calibdata.valid
list valid
Definition: calibdata.py:45
LVL1::JEMRoI::s_wordIdVal
static const unsigned int s_wordIdVal
RoI word ID.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:53
LVL1::JEMRoI::JEMRoI
JEMRoI()
Definition: JEMRoI.cxx:35
LVL1::JEMRoI::hits
int hits() const
Return Jet hit map (8 bits Main or 4 bits Forward)
Definition: JEMRoI.cxx:64
python.sizes.location
string location
Definition: sizes.py:11
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
LVL1::JEMRoI::s_mainHitsBit
static const int s_mainHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:64
LVL1::JEMRoI::s_forwardHitsMask
static const int s_forwardHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:74
LVL1::JEMRoI::s_forwardBit
static const int s_forwardBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:60
LVL1::JEMRoI::s_locationMask
static const int s_locationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:70
LVL1::JEMRoI::s_frameBit
static const int s_frameBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:58
LVL1::JEMRoI::s_frameMask
static const int s_frameMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:69
LVL1::JEMRoI::s_crateMask
static const int s_crateMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:67
LVL1::JEMRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:87
LVL1::JEMRoI::s_crateBit
static const int s_crateBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:56
LVL1::JEMRoI::s_saturationMask
static const int s_saturationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:73
LVL1::JEMRoI::s_jemMask
static const int s_jemMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:68
JEMRoI.h
LVL1::JEMRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:66
LVL1::JEMRoI::s_parityMask
static const int s_parityMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:72
LVL1::JEMRoI::~JEMRoI
~JEMRoI()
Definition: JEMRoI.cxx:58
LVL1::JEMRoI::jem
int jem() const
Return JEM number (0-15)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:92
LVL1::JEMRoI::s_saturationBit
static const int s_saturationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:62
LVL1::JEMRoI::s_jemBit
static const int s_jemBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:57
error
Definition: IImpactPoint3dEstimator.h:70
LVL1::JEMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: JEMRoI.cxx:74
LVL1::JEMRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:117
LVL1::JEMRoI::frame
int frame() const
Return RoI frame number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:97
LVL1::JEMRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:55