ATLAS Offline Software
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 
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;
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 
35 {
36 }
37 
38 CPMTobRoI::CPMTobRoI(int crate, int cpm, int chip, int location, int type,
39  int energy, int isol)
40 {
44  m_roiWord |= (cpm & s_cpmMask) << s_cpmBit;
47  m_roiWord |= (isol & s_isolMask) << s_isolBit;
49 }
50 
52 {
53 }
54 
55 // Set RoI word with ID check
56 
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
LVL1::CPMTobRoI::cpm
int cpm() const
Return CPM number (1-14)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:82
LVL1::CPMTobRoI::type
int type() const
Return type em/tau (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:97
LVL1::CPMTobRoI::energy
int energy() const
Return energy.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:102
LVL1::CPMTobRoI::CPMTobRoI
CPMTobRoI()
Definition: CPMTobRoI.cxx:30
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CPMTobRoI::s_cpmBit
static const int s_cpmBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:57
LVL1::CPMTobRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:63
LVL1::CPMTobRoI::s_crateMask
static const int s_crateMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:64
LVL1::CPMTobRoI::~CPMTobRoI
~CPMTobRoI()
Definition: CPMTobRoI.cxx:51
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CPMTobRoI::s_locationMask
static const int s_locationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:67
LVL1::CPMTobRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:112
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
calibdata.valid
list valid
Definition: calibdata.py:45
LVL1::CPMTobRoI::s_isolBit
static const int s_isolBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:60
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
LVL1::CPMTobRoI::s_crateBit
static const int s_crateBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:56
python.sizes.location
string location
Definition: sizes.py:11
LVL1::CPMTobRoI::s_locationBit
static const int s_locationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:59
LVL1::CPMTobRoI::s_typeMask
static const int s_typeMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:70
CPMTobRoI.h
LVL1::CPMTobRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:77
LVL1::CPMTobRoI::chip
int chip() const
Return CP chip number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:87
LVL1::CPMTobRoI::s_isolMask
static const int s_isolMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:68
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::s_chipMask
static const int s_chipMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:66
LVL1::CPMTobRoI::m_roiWord
uint32_t m_roiWord
RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:73
LVL1::CPMTobRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:61
LVL1::CPMTobRoI::location
int location() const
Return location (RoI local coords) (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:92
LVL1::CPMTobRoI::s_chipBit
static const int s_chipBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:58
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::CPMTobRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:69
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