ATLAS Offline Software
Loading...
Searching...
No Matches
gFEXCompression.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4//***************************************************************************
5// gFEXCompression - Energy encoder/decoder for gFEX
6// -------------------
7// begin : 01 04 2021
8// email : cecilia.tosciri@cern.ch
9//***************************************************************************
10#ifndef gFEXCompression_H
11#define gFEXCompression_H
12
13namespace LVL1 {
14
27
28public:
30 static unsigned int compress(float Energy);
32 static int expand(unsigned int code);
34 static unsigned int threshold(unsigned int code, int threshold = -101200);
36 static unsigned int linearize(unsigned int code, int threshold = 0);
37
38private:
40 static const int s_maxET = 1019200;
42 static const unsigned int s_nRanges = 6;
44 static const int s_steps[s_nRanges];
46 static const int s_minET[s_nRanges];
48 static const int s_minCode[s_nRanges];
50 static const int s_NoData = 0;
52 static const unsigned int s_LArUnderflow = 1;
54 static const unsigned int s_LArOverflow = 4062;
56 static const unsigned int s_LArReserved_min = 4063;
58 static const unsigned int s_LArReserved_max = 4094;
60 static const unsigned int s_LArInvalid = 4095;
62 //static const unsigned int s_LArSaturated = 1023;
64 static const unsigned int s_LArMaxCode = 4095;
66 static const unsigned int s_gFEXstep = 200;
68 static const unsigned int s_gFEXOverflow = 0xffff;
70 static const int s_error = -999;
71};
72
73
74}//end of ns
75
76#endif
std::vector< double > Energy
LAr supercell data are received by the gFEX in a 10-bit multi-linear encoded form.
static const unsigned int s_LArOverflow
LAr overflow code.
static const int s_minET[s_nRanges]
Minimum ET values in each range, MeV.
static unsigned int linearize(unsigned int code, int threshold=0)
Linearize LAr code to eFEX internal format.
static const unsigned int s_LArReserved_max
Reserved code max value.
static const unsigned int s_LArUnderflow
LAr underflow code.
static int expand(unsigned int code)
Uncompress data.
static unsigned int threshold(unsigned int code, int threshold=-101200)
Apply threshold to compressed data.
static const int s_minCode[s_nRanges]
Minimum code value in each range.
static const int s_error
Error return value.
static const unsigned int s_LArMaxCode
LAr saturated code.
static const int s_maxET
Maximum ET value that can be encoded.
static const int s_steps[s_nRanges]
Step sizes in each range, MeV.
static const int s_NoData
Indicates no data present.
static const unsigned int s_gFEXOverflow
L1Calo saturated/overflow.
static unsigned int compress(float Energy)
Compress data.
static const unsigned int s_gFEXstep
L1Calo ET digit step.
static const unsigned int s_nRanges
Number of ranges.
static const unsigned int s_LArInvalid
Invalid code value.
static const unsigned int s_LArReserved_min
Reserved code min value.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...