ATLAS Offline Software
Loading...
Searching...
No Matches
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
13namespace LVL1BS {
14
22
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
static const uint32_t s_jemMask
unsigned int hits(int slice, HitsType hType, SumType sType) const
Return hits map for given hits type and sum type.
static const uint32_t s_overflowMask
static const uint32_t s_sumTypeMask
static const int s_energyTypeJemBit
static const int s_sumBitsEtCrate
static const uint32_t s_errorMask
static const int s_bunchCrossingBits
static const uint32_t s_energyTypeMask
static const uint32_t s_etHitsMask
static const int s_energyTypeBit
static const int s_jemPaddingBits
static const uint32_t s_energySumMask
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.
static const uint32_t s_sourceMask
void setEtHits(int slice, HitsType hType, SumType sType, unsigned int map)
Store hits map for given hits type and sum type.
bool unpackUncompressed()
Unpack uncompressed data.
static const int s_sumBitsEtSys
bool packUncompressed()
Pack uncompressed data.
bool packNeutral()
Pack neutral data.
static const uint32_t s_energyJemMask
static const int s_wordLength
Data word length.
unsigned int energy(int slice, int jem, EnergyType eType) const
Return energy subsum for given JEM and energy type.
void clear()
Clear all data.
static const uint32_t s_wordIdMask
bool unpackNeutral()
Unpack neutral data.
std::vector< uint32_t > m_sumsData
Energy subsums data.
STL class.
Definition index.py:1
Extra patterns decribing particle interation process.