CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CaloTPGTranscoderULUT.h
Go to the documentation of this file.
1 #ifndef CALOTPGTRANSCODERULUT_H
2 #define CALOTPGTRANSCODERULUT_H 1
3 
4 #include <memory>
5 #include <vector>
6 #include <set>
10 
17 
19 public:
20  CaloTPGTranscoderULUT(const std::string& compressionFile = "", const std::string& decompressionFile = "");
21  ~CaloTPGTranscoderULUT() override;
23  unsigned int sample,
24  int fineGrain) const override;
26  unsigned int sample,
27  bool fineGrain) const override;
28 
31  const EcalTrigTowerDetId& eid,
33  unsigned int& et,
34  bool& egVecto,
35  bool& activity) const override;
36  void rctJetUncompress(const HcalTrigTowerDetId& hid,
38  const EcalTrigTowerDetId& eid,
40  unsigned int& et) const override;
41  double hcaletValue(const int& ieta, const int& iphi, const int& version, const int& compressedValue) const override;
42  double hcaletValue(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc) const override;
43  virtual bool HTvalid(const int ieta, const int iphi, const int version) const;
44  virtual const std::vector<unsigned int> getCompressionLUT(const HcalTrigTowerDetId& id) const;
45  virtual void setup(HcalLutMetadata const&,
46  HcalTrigTowerGeometry const&,
47  int nctScaleShift,
48  int rctScaleShift,
49  double lsbQIE8,
50  double lsbQIE11,
51  bool allLinear);
52  virtual int getOutputLUTId(const HcalTrigTowerDetId& id) const;
53  virtual int getOutputLUTId(const int ieta, const int iphi, const int version) const;
54 
55 private:
56  // Constant
57  static const int NOUTLUTS = 4176;
58 
59  // Two possible linearization scales
60  static const unsigned int REDUCE10BIT = 1024;
61  static const unsigned int REDUCE11BIT = 2048;
62 
63  // Map different QIE to the right linearization
64  static const unsigned int QIE8_OUTPUT_LUT_SIZE = REDUCE10BIT;
65  static const unsigned int QIE10_OUTPUT_LUT_SIZE = REDUCE11BIT;
66  static const unsigned int QIE11_OUTPUT_LUT_SIZE = REDUCE11BIT;
67  static const unsigned int OUTPUT_LUT_SIZE =
69  static const unsigned int TPGMAX = 256;
70 
71  // Typedef
72  typedef uint8_t LUT;
73  typedef std::array<float, TPGMAX> RCTdecompression;
74 
76  static const bool newHFphi = true;
77 
78  // Member functions
79  unsigned int getOutputLUTSize(const HcalTrigTowerDetId& id) const;
80  bool isOnlyQIE11(const HcalTrigTowerDetId& id) const;
81  void loadHCALCompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&); //Analytical compression tables
82 
83  // Member Variables
84  bool allLinear_ = false;
85  double nominal_gain_;
86  double lsb_factor_;
87  double rct_factor_;
88  double nct_factor_;
89  double lin8_factor_;
90  double lin11_factor_;
93  std::vector<int> ietal;
94  std::vector<int> ietah;
95  std::vector<int> ZS;
96  std::vector<int> LUTfactor;
97 
98  std::vector<std::vector<LUT>> outputLUT_;
99  std::vector<RCTdecompression> hcaluncomp_;
100 
101  std::set<HcalDetId> plan1_towers_;
102 };
103 #endif
CaloTPGTranscoder
Definition: CaloTPGTranscoder.h:24
CaloTPGTranscoderULUT::QIE10_OUTPUT_LUT_SIZE
static const unsigned int QIE10_OUTPUT_LUT_SIZE
Definition: CaloTPGTranscoderULUT.h:65
CaloTPGTranscoderULUT::LUTfactor
std::vector< int > LUTfactor
Definition: CaloTPGTranscoderULUT.h:96
CaloTPGTranscoderULUT::REDUCE10BIT
static const unsigned int REDUCE10BIT
Definition: CaloTPGTranscoderULUT.h:60
CaloTPGTranscoderULUT::TPGMAX
static const unsigned int TPGMAX
Definition: CaloTPGTranscoderULUT.h:69
CaloTPGTranscoderULUT::newHFphi
static const bool newHFphi
Definition: CaloTPGTranscoderULUT.h:76
CaloTPGTranscoderULUT::plan1_towers_
std::set< HcalDetId > plan1_towers_
Definition: CaloTPGTranscoderULUT.h:101
CaloTPGTranscoderULUT::nct_factor_
double nct_factor_
Definition: CaloTPGTranscoderULUT.h:88
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
HcalTriggerPrimitiveSample
Definition: HcalTriggerPrimitiveSample.h:11
CaloTPGTranscoderULUT::getCompressionLUT
virtual const std::vector< unsigned int > getCompressionLUT(const HcalTrigTowerDetId &id) const
Definition: CaloTPGTranscoderULUT.cc:282
HcalTopology
Definition: HcalTopology.h:26
CaloTPGTranscoderULUT::hcalCompress
HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, int fineGrain) const override
Compression from linear samples+fine grain in the HTR.
Definition: CaloTPGTranscoderULUT.cc:136
CaloTPGTranscoderULUT::hcaluncomp_
std::vector< RCTdecompression > hcaluncomp_
Definition: CaloTPGTranscoderULUT.h:99
CaloTPGTranscoderULUT::lsb_factor_
double lsb_factor_
Definition: CaloTPGTranscoderULUT.h:86
CaloTPGTranscoderULUT::RCTdecompression
std::array< float, TPGMAX > RCTdecompression
Definition: CaloTPGTranscoderULUT.h:73
HcalLutMetadata.h
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
CaloTPGTranscoder.h
CaloTPGTranscoderULUT::nominal_gain_
double nominal_gain_
Definition: CaloTPGTranscoderULUT.h:85
CaloTPGTranscoderULUT::allLinear_
bool allLinear_
Definition: CaloTPGTranscoderULUT.h:84
CaloTPGTranscoderULUT::ietal
std::vector< int > ietal
Definition: CaloTPGTranscoderULUT.h:93
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
CaloTPGTranscoderULUT::decompressionFile_
const std::string decompressionFile_
Definition: CaloTPGTranscoderULUT.h:92
CaloTPGTranscoderULUT::outputLUT_
std::vector< std::vector< LUT > > outputLUT_
Definition: CaloTPGTranscoderULUT.h:98
CaloTPGTranscoderULUT::HTvalid
virtual bool HTvalid(const int ieta, const int iphi, const int version) const
Definition: CaloTPGTranscoderULUT.cc:198
CaloTPGTranscoderULUT::lin11_factor_
double lin11_factor_
Definition: CaloTPGTranscoderULUT.h:90
CaloTPGTranscoderULUT::CaloTPGTranscoderULUT
CaloTPGTranscoderULUT(const std::string &compressionFile="", const std::string &decompressionFile="")
Definition: CaloTPGTranscoderULUT.cc:19
CaloTPGTranscoderULUT::REDUCE11BIT
static const unsigned int REDUCE11BIT
Definition: CaloTPGTranscoderULUT.h:61
CaloTPGTranscoderULUT::setup
virtual void setup(HcalLutMetadata const &, HcalTrigTowerGeometry const &, int nctScaleShift, int rctScaleShift, double lsbQIE8, double lsbQIE11, bool allLinear)
Definition: CaloTPGTranscoderULUT.cc:289
CaloTPGTranscoderULUT::LUT
uint8_t LUT
Definition: CaloTPGTranscoderULUT.h:72
CaloTPGTranscoderULUT::ietah
std::vector< int > ietah
Definition: CaloTPGTranscoderULUT.h:94
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloTPGTranscoderULUT::getOutputLUTId
virtual int getOutputLUTId(const HcalTrigTowerDetId &id) const
Definition: CaloTPGTranscoderULUT.cc:207
CaloTPGTranscoderULUT::NOUTLUTS
static const int NOUTLUTS
Definition: CaloTPGTranscoderULUT.h:57
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloTPGTranscoderULUT::OUTPUT_LUT_SIZE
static const unsigned int OUTPUT_LUT_SIZE
Definition: CaloTPGTranscoderULUT.h:67
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
CaloTPGTranscoderULUT::loadHCALCompress
void loadHCALCompress(HcalLutMetadata const &, HcalTrigTowerGeometry const &)
Definition: CaloTPGTranscoderULUT.cc:32
CaloTPGTranscoderULUT::rct_factor_
double rct_factor_
Definition: CaloTPGTranscoderULUT.h:87
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
CaloTPGTranscoderULUT::QIE8_OUTPUT_LUT_SIZE
static const unsigned int QIE8_OUTPUT_LUT_SIZE
Definition: CaloTPGTranscoderULUT.h:64
HcalTrigTowerGeometry
Definition: HcalTrigTowerGeometry.h:10
CaloTPGTranscoderULUT::QIE11_OUTPUT_LUT_SIZE
static const unsigned int QIE11_OUTPUT_LUT_SIZE
Definition: CaloTPGTranscoderULUT.h:66
HcalTopology.h
CaloTPGTranscoderULUT::ecalCompress
EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const override
Compression from linear samples+fine grain in the ECAL.
Definition: CaloTPGTranscoderULUT.cc:175
CaloTPGTranscoderULUT::rctEGammaUncompress
void rctEGammaUncompress(const HcalTrigTowerDetId &hid, const HcalTriggerPrimitiveSample &hc, const EcalTrigTowerDetId &eid, const EcalTriggerPrimitiveSample &ec, unsigned int &et, bool &egVecto, bool &activity) const override
Uncompression for the Electron/Photon path in the RCT.
Definition: CaloTPGTranscoderULUT.cc:181
HcalLutMetadata
Definition: HcalLutMetadata.h:15
CaloTPGTranscoderULUT::compressionFile_
const std::string compressionFile_
Definition: CaloTPGTranscoderULUT.h:91
CaloTPGTranscoderULUT::rctJetUncompress
void rctJetUncompress(const HcalTrigTowerDetId &hid, const HcalTriggerPrimitiveSample &hc, const EcalTrigTowerDetId &eid, const EcalTriggerPrimitiveSample &ec, unsigned int &et) const override
Uncompression for the JET path in the RCT.
Definition: CaloTPGTranscoderULUT.cc:190
EcalTriggerPrimitiveSample
Definition: EcalTriggerPrimitiveSample.h:12
CaloTPGTranscoderULUT::getOutputLUTSize
unsigned int getOutputLUTSize(const HcalTrigTowerDetId &id) const
Definition: CaloTPGTranscoderULUT.cc:223
CaloTPGTranscoderULUT::theTopology
const HcalTopology * theTopology
Definition: CaloTPGTranscoderULUT.h:75
CaloTPGTranscoderULUT::hcaletValue
double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const override
Definition: CaloTPGTranscoderULUT.cc:151
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
CaloTPGTranscoderULUT
Definition: CaloTPGTranscoderULUT.h:18
CaloTPGTranscoderULUT::~CaloTPGTranscoderULUT
~CaloTPGTranscoderULUT() override
Definition: CaloTPGTranscoderULUT.cc:30
CaloTPGTranscoderULUT::ZS
std::vector< int > ZS
Definition: CaloTPGTranscoderULUT.h:95
CaloTPGTranscoderULUT::isOnlyQIE11
bool isOnlyQIE11(const HcalTrigTowerDetId &id) const
Definition: CaloTPGTranscoderULUT.cc:261
CaloTPGTranscoderULUT::lin8_factor_
double lin8_factor_
Definition: CaloTPGTranscoderULUT.h:89
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14