ATLAS Offline Software
Loading...
Searching...
No Matches
eFEXCompression.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4/***************************************************************************
5 eFEXCompression.h - description
6 -------------------
7 begin : 07-02-2019
8 email : Alan.Watson@cern.ch antonio.jacques.costa@cern.ch
9 ***************************************************************************/
10
11
12 #ifndef eFEXCompression_H
13 #define eFEXCompression_H
14
15#include <array>
16#include <atomic>
17
18namespace LVL1 {
19
36
37public:
39 static unsigned int compress(int Et);
41 static int expand(unsigned int code);
43 static unsigned int threshold(unsigned int code, int threshold = -800);
45 static bool noiseCut(unsigned int code, int layer, bool ignoreDisable = false);
47 static int decode(int EtVal, int layer, bool ignoreDisable = false);
48
49 static std::atomic<bool> s_disableNoiseCuts;
50
51private:
53 static const int s_maxET = 144800;
55 static const unsigned int s_nRanges = 4;
57 static const int s_steps[s_nRanges];
59 static const int s_minET[s_nRanges];
61 static const int s_minCode[s_nRanges];
63 static const int s_NoData = 0;
65 static const unsigned int s_LArUnderflow = 1;
67 static const unsigned int s_LArOverflow = 1020;
69 static const unsigned int s_LArReserved = 1021;
71 static const unsigned int s_LArInvalid = 1022;
73 static const unsigned int s_LArSaturated = 1023;
75 static const unsigned int s_LArMaxCode = 1023;
77 static const unsigned int s_eFEXstep = 25;
79 static const unsigned int s_eFEXOverflow = 0xffff;
81 static const int s_error = -999;
83 static const unsigned int m_noisecutPS = 64; // corresponds to 800 MeV
84 static const unsigned int m_noisecutL1 = 48; // 400 MeV
85 static const unsigned int m_noisecutL2 = 48;
86 static const unsigned int m_noisecutL3 = 48;
87 static const unsigned int m_noisecutHad = 48; // should only be applied for HEC
88};
89
90
91}//end of ns
92
93#endif
LAr supercell data are received by the eFEX in a 10-bit multi-linear encoded form.
static const unsigned int m_noisecutPS
Noise Cuts per layer.
static const unsigned int s_LArMaxCode
Maximum code value.
static const int s_steps[s_nRanges]
Step sizes in each range, MeV.
static const unsigned int s_nRanges
Number of ranges.
static const unsigned int s_LArReserved
Reserved code value.
static const int s_maxET
Maximum ET value that can be encoded.
static const unsigned int m_noisecutL2
static const unsigned int s_LArSaturated
LAr saturated code.
static const unsigned int s_eFEXOverflow
L1Calo saturated/overflow.
static const unsigned int s_LArUnderflow
LAr underflow code.
static const int s_minCode[s_nRanges]
Minimum code value in each range.
static const int s_NoData
Indicates no data present.
static unsigned int threshold(unsigned int code, int threshold=-800)
Apply threshold to compressed data.
static const unsigned int s_LArOverflow
LAr overflow code.
static const int s_minET[s_nRanges]
Minimum ET values in each range, MeV.
static const unsigned int m_noisecutL1
static std::atomic< bool > s_disableNoiseCuts
static bool noiseCut(unsigned int code, int layer, bool ignoreDisable=false)
Apply supercell noise cut.
static int decode(int EtVal, int layer, bool ignoreDisable=false)
Full sequence.
static int expand(unsigned int code)
Uncompress data.
static const unsigned int s_LArInvalid
Invalid code value.
static const unsigned int m_noisecutHad
static const int s_error
Error return value.
static const unsigned int m_noisecutL3
static const unsigned int s_eFEXstep
L1Calo ET digit step.
static unsigned int compress(int Et)
Compress data.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...