ATLAS Offline Software
Static Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
LVL1::eFEXCompression Class Reference

LAr supercell data are received by the eFEX in a 10-bit multi-linear encoded form. More...

#include <eFEXCompression.h>

Collaboration diagram for LVL1::eFEXCompression:

Static Public Member Functions

static unsigned int compress (int Et)
 Compress data. More...
 
static int expand (unsigned int code)
 Uncompress data. More...
 
static unsigned int threshold (unsigned int code, int threshold=-800)
 Apply threshold to compressed data. More...
 
static bool noiseCut (unsigned int code, int layer, bool ignoreDisable=false)
 Apply supercell noise cut. More...
 
static int decode (int EtVal, int layer, bool ignoreDisable=false)
 Full sequence. More...
 

Static Public Attributes

static std::atomic< bool > s_disableNoiseCuts = false
 

Static Private Attributes

static const int s_maxET = 144800
 Maximum ET value that can be encoded. More...
 
static const unsigned int s_nRanges = 4
 Number of ranges. More...
 
static const int s_steps [s_nRanges] = {25, 50, 100, 400}
 Step sizes in each range, MeV. More...
 
static const int s_minET [s_nRanges] = {-750, 5600, 18400, 44000}
 Minimum ET values in each range, MeV. More...
 
static const int s_minCode [s_nRanges] = {2, 256, 512, 768}
 Minimum code value in each range. More...
 
static const int s_NoData = 0
 Indicates no data present. More...
 
static const unsigned int s_LArUnderflow = 1
 LAr underflow code. More...
 
static const unsigned int s_LArOverflow = 1020
 LAr overflow code. More...
 
static const unsigned int s_LArReserved = 1021
 Reserved code value. More...
 
static const unsigned int s_LArInvalid = 1022
 Invalid code value. More...
 
static const unsigned int s_LArSaturated = 1023
 LAr saturated code. More...
 
static const unsigned int s_LArMaxCode = 1023
 Maximum code value. More...
 
static const unsigned int s_eFEXstep = 25
 L1Calo ET digit step. More...
 
static const unsigned int s_eFEXOverflow = 0xffff
 L1Calo saturated/overflow. More...
 
static const int s_error = -999
 Error return value. More...
 
static const unsigned int m_noisecutPS = 64
 Noise Cuts per layer. More...
 
static const unsigned int m_noisecutL1 = 48
 
static const unsigned int m_noisecutL2 = 48
 
static const unsigned int m_noisecutL3 = 48
 
static const unsigned int m_noisecutHad = 48
 

Detailed Description

LAr supercell data are received by the eFEX in a 10-bit multi-linear encoded form.

This simple utility class contains 3 functions:

Definition at line 40 of file eFEXCompression.h.

Member Function Documentation

◆ compress()

unsigned int LVL1::eFEXCompression::compress ( int  Et)
static

Compress data.

Definition at line 25 of file eFEXCompression.cxx.

29  {
30  if (Et < s_minET[i]) break;
31  range = i;
32  }
33 
34  // Calculate code
35  unsigned int code = 0;
36 
37  if (range < 0) {
38  // Below minimum value
40  }
41  else {
42  // Lies inside one of the value ranges
43  int steps = (Et - s_minET[range])/s_steps[range];
45  }
46 
47  return code;
48 }
49 
50 int eFEXCompression::expand(unsigned int code) {
51 
52  // Deal with special codes first:
53  if (code == s_NoData) return 0;

◆ decode()

int LVL1::eFEXCompression::decode ( int  EtVal,
int  layer,
bool  ignoreDisable = false 
)
static

Full sequence.

Check if noise cut is passed

Expand the ET value

Convert to eFEX digit scale: 25 MeV

Definition at line 118 of file eFEXCompression.cxx.

120  {
121  code = tcode;
122  }
123 
125  int Et = eFEXCompression::expand(code);
126 
128  return Et/s_eFEXstep;
129 }
130 
131 } // end of namespace bracket

◆ expand()

int LVL1::eFEXCompression::expand ( unsigned int  code)
static

Uncompress data.

Now expand code into an ET value. Start by finding what range the code is in

Now expand the value

Definition at line 55 of file eFEXCompression.cxx.

61  {
62  if (code < (unsigned int)s_minCode[i+1]) break;
63  range++;
64  }
66  int Et = s_minET[range] + (code-s_minCode[range])*s_steps[range];
67 
68  return Et;
69 }
70 
71 bool eFEXCompression::noiseCut(unsigned int code, int layer, bool ignoreDisable) {
72  // Check if noise cut is passed - one cut per layer
73  bool pass=true;
74 

◆ noiseCut()

bool LVL1::eFEXCompression::noiseCut ( unsigned int  code,
int  layer,
bool  ignoreDisable = false 
)
static

Apply supercell noise cut.

Definition at line 76 of file eFEXCompression.cxx.

77  {
78  case 0:
79  if(code<m_noisecutPS){ pass = false; }
80  break;
81  case 1:
82  if(code<m_noisecutL1){ pass = false; }
83  break;
84  case 2:
85  if(code<m_noisecutL2){ pass = false; }
86  break;
87  case 3:
88  if(code<m_noisecutL3){ pass = false; }
89  break;
90  case 4:
91  if(code<m_noisecutHad){ pass = false; }
92  break;
93  default:
94  pass = false;
95  break;
96  }
97 
98  return pass;
99 }
100 
101 
102 unsigned int eFEXCompression::threshold(unsigned int code, int threshold) {
103 

◆ threshold()

unsigned int LVL1::eFEXCompression::threshold ( unsigned int  code,
int  threshold = -800 
)
static

Apply threshold to compressed data.

Convert threshold into a compressed code

Zero code if < threshold

Definition at line 107 of file eFEXCompression.cxx.

113  {
114 
115  // Calculate code
116  unsigned int tcode = eFEXCompression::compress(EtVal);

Member Data Documentation

◆ m_noisecutHad

const unsigned int LVL1::eFEXCompression::m_noisecutHad = 48
staticprivate

Definition at line 97 of file eFEXCompression.h.

◆ m_noisecutL1

const unsigned int LVL1::eFEXCompression::m_noisecutL1 = 48
staticprivate

Definition at line 94 of file eFEXCompression.h.

◆ m_noisecutL2

const unsigned int LVL1::eFEXCompression::m_noisecutL2 = 48
staticprivate

Definition at line 95 of file eFEXCompression.h.

◆ m_noisecutL3

const unsigned int LVL1::eFEXCompression::m_noisecutL3 = 48
staticprivate

Definition at line 96 of file eFEXCompression.h.

◆ m_noisecutPS

const unsigned int LVL1::eFEXCompression::m_noisecutPS = 64
staticprivate

Noise Cuts per layer.

Definition at line 93 of file eFEXCompression.h.

◆ s_disableNoiseCuts

std::atomic< bool > LVL1::eFEXCompression::s_disableNoiseCuts = false
static

Definition at line 59 of file eFEXCompression.h.

◆ s_eFEXOverflow

const unsigned int LVL1::eFEXCompression::s_eFEXOverflow = 0xffff
staticprivate

L1Calo saturated/overflow.

Definition at line 89 of file eFEXCompression.h.

◆ s_eFEXstep

const unsigned int LVL1::eFEXCompression::s_eFEXstep = 25
staticprivate

L1Calo ET digit step.

Definition at line 87 of file eFEXCompression.h.

◆ s_error

const int LVL1::eFEXCompression::s_error = -999
staticprivate

Error return value.

Definition at line 91 of file eFEXCompression.h.

◆ s_LArInvalid

const unsigned int LVL1::eFEXCompression::s_LArInvalid = 1022
staticprivate

Invalid code value.

Definition at line 81 of file eFEXCompression.h.

◆ s_LArMaxCode

const unsigned int LVL1::eFEXCompression::s_LArMaxCode = 1023
staticprivate

Maximum code value.

Definition at line 85 of file eFEXCompression.h.

◆ s_LArOverflow

const unsigned int LVL1::eFEXCompression::s_LArOverflow = 1020
staticprivate

LAr overflow code.

Definition at line 77 of file eFEXCompression.h.

◆ s_LArReserved

const unsigned int LVL1::eFEXCompression::s_LArReserved = 1021
staticprivate

Reserved code value.

Definition at line 79 of file eFEXCompression.h.

◆ s_LArSaturated

const unsigned int LVL1::eFEXCompression::s_LArSaturated = 1023
staticprivate

LAr saturated code.

Definition at line 83 of file eFEXCompression.h.

◆ s_LArUnderflow

const unsigned int LVL1::eFEXCompression::s_LArUnderflow = 1
staticprivate

LAr underflow code.

Definition at line 75 of file eFEXCompression.h.

◆ s_maxET

const int LVL1::eFEXCompression::s_maxET = 144800
staticprivate

Maximum ET value that can be encoded.

Definition at line 63 of file eFEXCompression.h.

◆ s_minCode

const int LVL1::eFEXCompression::s_minCode = {2, 256, 512, 768}
staticprivate

Minimum code value in each range.

Definition at line 71 of file eFEXCompression.h.

◆ s_minET

const int LVL1::eFEXCompression::s_minET = {-750, 5600, 18400, 44000}
staticprivate

Minimum ET values in each range, MeV.

Definition at line 69 of file eFEXCompression.h.

◆ s_NoData

const int LVL1::eFEXCompression::s_NoData = 0
staticprivate

Indicates no data present.

Definition at line 73 of file eFEXCompression.h.

◆ s_nRanges

const unsigned int LVL1::eFEXCompression::s_nRanges = 4
staticprivate

Number of ranges.

Definition at line 65 of file eFEXCompression.h.

◆ s_steps

const int LVL1::eFEXCompression::s_steps = {25, 50, 100, 400}
staticprivate

Step sizes in each range, MeV.

Definition at line 67 of file eFEXCompression.h.


The documentation for this class was generated from the following files:
LVL1::eFEXCompression::m_noisecutHad
static const unsigned int m_noisecutHad
Definition: eFEXCompression.h:97
LVL1::eFEXCompression::compress
static unsigned int compress(int Et)
Compress data.
Definition: eFEXCompression.cxx:25
LVL1::eFEXCompression::s_eFEXstep
static const unsigned int s_eFEXstep
L1Calo ET digit step.
Definition: eFEXCompression.h:87
LVL1::eFEXCompression::expand
static int expand(unsigned int code)
Uncompress data.
Definition: eFEXCompression.cxx:55
LVL1::eFEXCompression::m_noisecutL2
static const unsigned int m_noisecutL2
Definition: eFEXCompression.h:95
LVL1::eFEXCompression::noiseCut
static bool noiseCut(unsigned int code, int layer, bool ignoreDisable=false)
Apply supercell noise cut.
Definition: eFEXCompression.cxx:76
LVL1::eFEXCompression::s_minET
static const int s_minET[s_nRanges]
Minimum ET values in each range, MeV.
Definition: eFEXCompression.h:69
histSizes.code
code
Definition: histSizes.py:129
beamspotman.steps
int steps
Definition: beamspotman.py:505
LVL1::eFEXCompression::threshold
static unsigned int threshold(unsigned int code, int threshold=-800)
Apply threshold to compressed data.
Definition: eFEXCompression.cxx:107
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1::eFEXCompression::m_noisecutL3
static const unsigned int m_noisecutL3
Definition: eFEXCompression.h:96
LVL1::eFEXCompression::s_NoData
static const int s_NoData
Indicates no data present.
Definition: eFEXCompression.h:73
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1::eFEXCompression::m_noisecutL1
static const unsigned int m_noisecutL1
Definition: eFEXCompression.h:94
LVL1::eFEXCompression::s_LArUnderflow
static const unsigned int s_LArUnderflow
LAr underflow code.
Definition: eFEXCompression.h:75
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
LVL1::eFEXCompression::s_steps
static const int s_steps[s_nRanges]
Step sizes in each range, MeV.
Definition: eFEXCompression.h:67
threshold
Definition: chainparser.cxx:74
LVL1::eFEXCompression::m_noisecutPS
static const unsigned int m_noisecutPS
Noise Cuts per layer.
Definition: eFEXCompression.h:93
LVL1::eFEXCompression::s_minCode
static const int s_minCode[s_nRanges]
Minimum code value in each range.
Definition: eFEXCompression.h:71