ATLAS Offline Software
CPMRoI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace LVL1 {
8 
9 // Static constants
10 
11 const int CPMRoI::s_wordIdVal;
12 
13 const int CPMRoI::s_wordIdBit;
14 const int CPMRoI::s_crateBit;
15 const int CPMRoI::s_cpmBit;
16 const int CPMRoI::s_chipBit;
17 const int CPMRoI::s_locationBit;
18 const int CPMRoI::s_parityBit;
19 const int CPMRoI::s_saturationBit;
20 const int CPMRoI::s_hitsBit;
21 
22 const int CPMRoI::s_wordIdMask;
23 const int CPMRoI::s_crateMask;
24 const int CPMRoI::s_cpmMask;
25 const int CPMRoI::s_chipMask;
26 const int CPMRoI::s_locationMask;
27 const int CPMRoI::s_parityMask;
28 const int CPMRoI::s_saturationMask;
29 const int CPMRoI::s_hitsMask;
30 
31 CPMRoI::CPMRoI() : m_roiWord(0)
32 {
33 }
34 
36 {
37 }
38 
39 CPMRoI::CPMRoI(int crate, int cpm, int chip, int location, int hits, int error)
40 {
43  m_roiWord |= (cpm & s_cpmMask) << s_cpmBit;
46  m_roiWord |= ((error>>1) & s_parityMask) << s_parityBit;
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  if (valid) m_roiWord = roiWord;
62  return valid;
63 }
64 
65 } // end namespace
LVL1::CPMRoI::~CPMRoI
~CPMRoI()
Definition: CPMRoI.cxx:51
LVL1::CPMRoI::s_parityBit
static const int s_parityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:58
LVL1::CPMRoI::s_chipMask
static const int s_chipMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:65
LVL1::CPMRoI::location
int location() const
Return location (RoI local coords) (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:96
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
LVL1::CPMRoI::chip
int chip() const
Return CP chip number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:91
LVL1::CPMRoI::s_crateBit
static const int s_crateBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:54
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CPMRoI::s_parityMask
static const int s_parityMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:67
LVL1::CPMRoI::s_cpmMask
static const int s_cpmMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:64
LVL1::CPMRoI::CPMRoI
CPMRoI()
Definition: CPMRoI.cxx:31
LVL1::CPMRoI::hits
int hits() const
Return hit thresholds map.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:101
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CPMRoI::s_wordIdVal
static const int s_wordIdVal
RoI word ID.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:51
LVL1::CPMRoI::s_crateMask
static const int s_crateMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:63
LVL1::CPMRoI::m_roiWord
uint32_t m_roiWord
RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:77
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
calibdata.valid
list valid
Definition: calibdata.py:45
LVL1::CPMRoI::s_cpmBit
static const int s_cpmBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:55
LVL1::CPMRoI::cpm
int cpm() const
Return CPM number (1-14)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:86
LVL1::CPMRoI::s_saturationMask
static const int s_saturationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:68
LVL1::CPMRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:111
CPMRoI.h
LVL1::CPMRoI::s_hitsMask
static const int s_hitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:69
LVL1::CPMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CPMRoI.cxx:57
LVL1::CPMRoI::s_locationMask
static const int s_locationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:66
LVL1::CPMRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:62
LVL1::CPMRoI::s_locationBit
static const int s_locationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:57
LVL1::CPMRoI::s_saturationBit
static const int s_saturationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:59
LVL1::CPMRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:53
LVL1::CPMRoI::s_hitsBit
static const int s_hitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:60
error
Definition: IImpactPoint3dEstimator.h:70
LVL1::CPMRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:81
LVL1::CPMRoI::s_chipBit
static const int s_chipBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:56