ATLAS Offline Software
CmxEnergySubBlock.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGT1CALOBYTESTREAM_CMXENERGYSUBBLOCK_H
6 #define TRIGT1CALOBYTESTREAM_CMXENERGYSUBBLOCK_H
7 
8 #include <stdint.h>
9 #include <vector>
10 
11 #include "CmxSubBlock.h"
12 
13 namespace LVL1BS {
14 
24 
25  public:
31 
34 
36  // cppcheck-suppress duplInheritedMember
37  void clear();
38 
40  unsigned int energy(int slice, int jem, EnergyType eType) const;
42  int error(int slice, int jem, EnergyType eType) const;
44  unsigned int energy(int slice, SourceType source, SumType sType,
45  EnergyType eType) const;
47  int error(int slice, SourceType source, SumType sType,
48  EnergyType eType) const;
50  unsigned int hits(int slice, HitsType hType, SumType sType) const;
51 
53  void setSubsums(int slice, int jem,
54  unsigned int ex, unsigned int ey, unsigned int et,
55  int exError, int eyError, int etError);
57  void setSubsums(int slice, SourceType source, SumType sType,
58  unsigned int ex, unsigned int ey, unsigned int et,
59  int exError, int eyError, int etError);
61  void setEtHits(int slice, HitsType hType, SumType sType, unsigned int map);
62 
64  bool pack();
66  bool unpack();
67 
68  private:
70  static const int s_wordLength = 32;
71  // Energy subsums bit positions and masks
72  static const int s_overflowBit = 15;
73  static const int s_errorBit = 16;
74  static const int s_etHitsBit = 16;
75  static const int s_energyTypeJemBit = 23;
76  static const int s_jemBit = 25;
77  static const int s_energyTypeBit = 24;
78  static const int s_sumTypeBit = 26;
79  static const int s_sourceBit = 27;
80  static const int s_wordIdBit = 29;
81  static const int s_maxJems = 16;
82  static const int s_maxSums = 66;
83  static const uint32_t s_energyJemMask = 0x3fff;
84  static const uint32_t s_energySumMask = 0x7fff;
85  static const uint32_t s_errorMask = 0x1;
86  static const uint32_t s_overflowMask = 0x1;
87  static const uint32_t s_etHitsMask = 0xff;
88  static const uint32_t s_jemMask = 0xf;
89  static const uint32_t s_energyTypeMask = 0x3;
90  static const uint32_t s_sumTypeMask = 0x1;
91  static const uint32_t s_sourceMask = 0x3;
92  static const uint32_t s_wordIdMask = 0x7;
93  // Neutral format
94  static const int s_jemSumBits = 14;
95  static const int s_jemPaddingBits = 9;
96  static const int s_sumBitsEtCrate = 14;
97  static const int s_sumBitsEtSys = 15;
98  static const int s_sumBitsExEy = 15;
99  static const int s_bunchCrossingBits = 12;
100  static const int s_etHitMapsBits = 8;
101  static const int s_paddingBits = 43;
102 
103  int index(int slice, int pos) const;
104  void resize();
105 
107  bool packNeutral();
109  bool packUncompressed();
111  bool unpackNeutral();
113  bool unpackUncompressed();
114 
116  std::vector<uint32_t> m_sumsData;
117 
118 };
119 
120 } // end namespace
121 
122 #endif
LVL1BS::CmxEnergySubBlock::s_errorMask
static const uint32_t s_errorMask
Definition: CmxEnergySubBlock.h:85
LVL1BS::CmxEnergySubBlock::STANDARD
@ STANDARD
Definition: CmxEnergySubBlock.h:30
LVL1BS::CmxEnergySubBlock::s_sourceBit
static const int s_sourceBit
Definition: CmxEnergySubBlock.h:79
LVL1BS::CmxEnergySubBlock::s_energySumMask
static const uint32_t s_energySumMask
Definition: CmxEnergySubBlock.h:84
et
Extra patterns decribing particle interation process.
LVL1BS::CmxEnergySubBlock::setEtHits
void setEtHits(int slice, HitsType hType, SumType sType, unsigned int map)
Store hits map for given hits type and sum type.
Definition: CmxEnergySubBlock.cxx:226
LVL1BS::CmxEnergySubBlock::s_bunchCrossingBits
static const int s_bunchCrossingBits
Definition: CmxEnergySubBlock.h:99
LVL1BS::CmxEnergySubBlock::s_sumBitsExEy
static const int s_sumBitsExEy
Definition: CmxEnergySubBlock.h:98
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::CmxEnergySubBlock::s_sumTypeBit
static const int s_sumTypeBit
Definition: CmxEnergySubBlock.h:78
LVL1BS::CmxEnergySubBlock::s_wordIdBit
static const int s_wordIdBit
Definition: CmxEnergySubBlock.h:80
LVL1BS::CmxEnergySubBlock::m_sumsData
std::vector< uint32_t > m_sumsData
Energy subsums data.
Definition: CmxEnergySubBlock.h:116
LVL1BS::CmxEnergySubBlock::SourceType
SourceType
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxEnergySubBlock::ENERGY_ET
@ ENERGY_ET
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::unpackUncompressed
bool unpackUncompressed()
Unpack uncompressed data.
Definition: CmxEnergySubBlock.cxx:562
LVL1BS::CmxEnergySubBlock::WordIdType
WordIdType
Definition: CmxEnergySubBlock.h:26
LVL1BS::CmxEnergySubBlock::CRATE_SYSTEM_ID
@ CRATE_SYSTEM_ID
Definition: CmxEnergySubBlock.h:26
LVL1BS::CmxEnergySubBlock::MAX_SOURCE_TYPE
@ MAX_SOURCE_TYPE
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxSubBlock
Sub-Block class for CMX data post LS1.
Definition: CmxSubBlock.h:22
LVL1BS::CmxEnergySubBlock::s_jemSumBits
static const int s_jemSumBits
Definition: CmxEnergySubBlock.h:94
LVL1BS::CmxEnergySubBlock::SUM_ET
@ SUM_ET
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::pack
bool pack()
Pack data.
Definition: CmxEnergySubBlock.cxx:245
LVL1BS::L1CaloSubBlock::slice
int slice() const
Definition: L1CaloSubBlock.h:258
LVL1BS::CmxEnergySubBlock::s_sumBitsEtSys
static const int s_sumBitsEtSys
Definition: CmxEnergySubBlock.h:97
LVL1BS::CmxEnergySubBlock::s_sumBitsEtCrate
static const int s_sumBitsEtCrate
Definition: CmxEnergySubBlock.h:96
LVL1BS::CmxEnergySubBlock::clear
void clear()
Clear all data.
Definition: CmxEnergySubBlock.cxx:57
LVL1BS::CmxEnergySubBlock::MISSING_ET
@ MISSING_ET
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::s_overflowBit
static const int s_overflowBit
Definition: CmxEnergySubBlock.h:72
checkCorrelInHIST.hType
def hType(hist, verbose=False)
Definition: checkCorrelInHIST.py:126
LVL1BS::CmxEnergySubBlock::resize
void resize()
Definition: CmxEnergySubBlock.cxx:303
LVL1BS::CmxEnergySubBlock::HitsType
HitsType
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::unpack
bool unpack()
Unpack data.
Definition: CmxEnergySubBlock.cxx:267
LVL1BS::CmxEnergySubBlock::EnergyType
EnergyType
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::s_energyJemMask
static const uint32_t s_energyJemMask
Definition: CmxEnergySubBlock.h:83
LVL1BS::CmxEnergySubBlock::s_etHitMapsBits
static const int s_etHitMapsBits
Definition: CmxEnergySubBlock.h:100
LVL1BS::CmxEnergySubBlock::CmxEnergySubBlock
CmxEnergySubBlock()
Definition: CmxEnergySubBlock.cxx:47
LVL1BS::CmxEnergySubBlock::s_energyTypeMask
static const uint32_t s_energyTypeMask
Definition: CmxEnergySubBlock.h:89
LVL1BS::CmxEnergySubBlock::s_jemPaddingBits
static const int s_jemPaddingBits
Definition: CmxEnergySubBlock.h:95
CmxSubBlock.h
LVL1BS::CmxEnergySubBlock::setSubsums
void setSubsums(int slice, int jem, unsigned int ex, unsigned int ey, unsigned int et, int exError, int eyError, int etError)
Store energy subsums and errors for given JEM.
Definition: CmxEnergySubBlock.cxx:142
LVL1BS::CmxEnergySubBlock::s_etHitsMask
static const uint32_t s_etHitsMask
Definition: CmxEnergySubBlock.h:87
LVL1BS::CmxEnergySubBlock::s_sourceMask
static const uint32_t s_sourceMask
Definition: CmxEnergySubBlock.h:91
LVL1BS::CmxEnergySubBlock::s_etHitsBit
static const int s_etHitsBit
Definition: CmxEnergySubBlock.h:74
LVL1BS::CmxEnergySubBlock::s_wordLength
static const int s_wordLength
Data word length.
Definition: CmxEnergySubBlock.h:70
LVL1BS::CmxEnergySubBlock::MODULE_ID
@ MODULE_ID
Definition: CmxEnergySubBlock.h:26
LVL1BS::CmxEnergySubBlock::s_sumTypeMask
static const uint32_t s_sumTypeMask
Definition: CmxEnergySubBlock.h:90
LVL1BS::CmxEnergySubBlock::~CmxEnergySubBlock
~CmxEnergySubBlock()
Definition: CmxEnergySubBlock.cxx:51
LVL1BS::CmxEnergySubBlock::s_maxSums
static const int s_maxSums
Definition: CmxEnergySubBlock.h:82
LVL1BS::CmxEnergySubBlock::packNeutral
bool packNeutral()
Pack neutral data.
Definition: CmxEnergySubBlock.cxx:314
LVL1BS::CmxEnergySubBlock::s_errorBit
static const int s_errorBit
Definition: CmxEnergySubBlock.h:73
LVL1BS::CmxEnergySubBlock::s_maxJems
static const int s_maxJems
Definition: CmxEnergySubBlock.h:81
LVL1BS::CmxEnergySubBlock::s_jemBit
static const int s_jemBit
Definition: CmxEnergySubBlock.h:76
LVL1BS::CmxEnergySubBlock::REMOTE
@ REMOTE
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxEnergySubBlock::s_overflowMask
static const uint32_t s_overflowMask
Definition: CmxEnergySubBlock.h:86
LVL1BS::CmxEnergySubBlock::MAX_ENERGY_TYPE
@ MAX_ENERGY_TYPE
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::ENERGY_EX
@ ENERGY_EX
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::s_wordIdMask
static const uint32_t s_wordIdMask
Definition: CmxEnergySubBlock.h:92
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::CmxEnergySubBlock::s_energyTypeBit
static const int s_energyTypeBit
Definition: CmxEnergySubBlock.h:77
LVL1BS::CmxEnergySubBlock::unpackNeutral
bool unpackNeutral()
Unpack neutral data.
Definition: CmxEnergySubBlock.cxx:433
LVL1BS::CmxEnergySubBlock::RESTRICTED_WEIGHTED
@ RESTRICTED_WEIGHTED
Definition: CmxEnergySubBlock.h:30
LVL1BS::CmxEnergySubBlock::index
int index(int slice, int pos) const
Definition: CmxEnergySubBlock.cxx:294
LVL1BS::CmxEnergySubBlock::SumType
SumType
Definition: CmxEnergySubBlock.h:30
LVL1BS::CmxEnergySubBlock::ENERGY_EY
@ ENERGY_EY
Definition: CmxEnergySubBlock.h:27
LVL1BS::CmxEnergySubBlock::MISSING_ET_SIG
@ MISSING_ET_SIG
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock::s_energyTypeJemBit
static const int s_energyTypeJemBit
Definition: CmxEnergySubBlock.h:75
LVL1BS
Definition: ZdcModifySlices.h:10
LVL1BS::CmxEnergySubBlock::energy
unsigned int energy(int slice, int jem, EnergyType eType) const
Return energy subsum for given JEM and energy type.
Definition: CmxEnergySubBlock.cxx:65
LVL1BS::CmxEnergySubBlock::MAX_SUM_TYPE
@ MAX_SUM_TYPE
Definition: CmxEnergySubBlock.h:30
LVL1BS::CmxEnergySubBlock::hits
unsigned int hits(int slice, HitsType hType, SumType sType) const
Return hits map for given hits type and sum type.
Definition: CmxEnergySubBlock.cxx:127
LVL1BS::CmxEnergySubBlock::s_jemMask
static const uint32_t s_jemMask
Definition: CmxEnergySubBlock.h:88
copySelective.source
string source
Definition: copySelective.py:32
LVL1BS::CmxEnergySubBlock::MAX_HITS_TYPE
@ MAX_HITS_TYPE
Definition: CmxEnergySubBlock.h:28
LVL1BS::CmxEnergySubBlock
Sub-Block class for CMX-Energy data post LS1.
Definition: CmxEnergySubBlock.h:23
LVL1BS::CmxEnergySubBlock::LOCAL
@ LOCAL
Definition: CmxEnergySubBlock.h:29
LVL1BS::CmxEnergySubBlock::error
int error(int slice, int jem, EnergyType eType) const
Return energy subsum error for given JEM and energy type.
Definition: CmxEnergySubBlock.cxx:79
LVL1BS::CmxEnergySubBlock::s_paddingBits
static const int s_paddingBits
Definition: CmxEnergySubBlock.h:101
LVL1BS::CmxEnergySubBlock::packUncompressed
bool packUncompressed()
Pack uncompressed data.
Definition: CmxEnergySubBlock.cxx:421
LVL1BS::CmxEnergySubBlock::TOTAL
@ TOTAL
Definition: CmxEnergySubBlock.h:29