ATLAS Offline Software
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 
13 namespace LVL1 {
14 
27 
28 public:
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 
38 private:
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
LVL1::gFEXCompression::s_nRanges
static const unsigned int s_nRanges
Number of ranges.
Definition: gFEXCompression.h:42
LVL1::gFEXCompression::s_minET
static const int s_minET[s_nRanges]
Minimum ET values in each range, MeV.
Definition: gFEXCompression.h:46
LVL1::gFEXCompression::s_maxET
static const int s_maxET
Maximum ET value that can be encoded.
Definition: gFEXCompression.h:40
LVL1::gFEXCompression::s_LArMaxCode
static const unsigned int s_LArMaxCode
LAr saturated code.
Definition: gFEXCompression.h:64
Energy
std::vector< double > Energy
Definition: CalibHitToCaloCell.h:23
LVL1::gFEXCompression::compress
static unsigned int compress(float Energy)
Compress data.
Definition: gFEXCompression.cxx:20
LVL1::gFEXCompression::s_LArUnderflow
static const unsigned int s_LArUnderflow
LAr underflow code.
Definition: gFEXCompression.h:52
LVL1::gFEXCompression::s_LArReserved_min
static const unsigned int s_LArReserved_min
Reserved code min value.
Definition: gFEXCompression.h:56
LVL1::gFEXCompression::linearize
static unsigned int linearize(unsigned int code, int threshold=0)
Linearize LAr code to eFEX internal format.
Definition: gFEXCompression.cxx:83
LVL1::gFEXCompression::s_gFEXOverflow
static const unsigned int s_gFEXOverflow
L1Calo saturated/overflow.
Definition: gFEXCompression.h:68
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::gFEXCompression::s_LArOverflow
static const unsigned int s_LArOverflow
LAr overflow code.
Definition: gFEXCompression.h:54
LVL1::gFEXCompression::s_gFEXstep
static const unsigned int s_gFEXstep
L1Calo ET digit step.
Definition: gFEXCompression.h:66
LVL1::gFEXCompression::expand
static int expand(unsigned int code)
Uncompress data.
Definition: gFEXCompression.cxx:50
LVL1::gFEXCompression::threshold
static unsigned int threshold(unsigned int code, int threshold=-101200)
Apply threshold to compressed data.
Definition: gFEXCompression.cxx:71
LVL1::gFEXCompression::s_error
static const int s_error
Error return value.
Definition: gFEXCompression.h:70
pmontree.code
code
Definition: pmontree.py:443
LVL1::gFEXCompression::s_NoData
static const int s_NoData
Indicates no data present.
Definition: gFEXCompression.h:50
LVL1::gFEXCompression::s_minCode
static const int s_minCode[s_nRanges]
Minimum code value in each range.
Definition: gFEXCompression.h:48
LVL1::gFEXCompression::s_LArInvalid
static const unsigned int s_LArInvalid
Invalid code value.
Definition: gFEXCompression.h:60
threshold
Definition: chainparser.cxx:74
LVL1::gFEXCompression::s_LArReserved_max
static const unsigned int s_LArReserved_max
Reserved code max value.
Definition: gFEXCompression.h:58
LVL1::gFEXCompression
LAr supercell data are received by the gFEX in a 10-bit multi-linear encoded form.
Definition: gFEXCompression.h:26
LVL1::gFEXCompression::s_steps
static const int s_steps[s_nRanges]
Step sizes in each range, MeV.
Definition: gFEXCompression.h:44