test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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>
9 
10 
17 
19 public:
20  CaloTPGTranscoderULUT(const std::string& compressionFile="",
21  const std::string& decompressionFile="");
22  virtual ~CaloTPGTranscoderULUT();
23  virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId& id, unsigned int sample, int fineGrain) const override;
24  virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const override;
25 
28  unsigned int& et, bool& egVecto, bool& activity) const override;
29  virtual void rctJetUncompress(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc,
30  const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec,
31  unsigned int& et) const override;
32  virtual double hcaletValue(const int& ieta, const int& iphi, const int& version, const int& compressedValue) const override;
33  virtual double hcaletValue(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc) const override;
34  virtual bool HTvalid(const int ieta, const int iphi, const int version) const;
35  virtual const std::vector<unsigned int> getCompressionLUT(const HcalTrigTowerDetId& id) const;
36  virtual void setup(HcalLutMetadata const&, HcalTrigTowerGeometry const&, int, int);
37  virtual int getOutputLUTId(const HcalTrigTowerDetId& id) const;
38  virtual int getOutputLUTId(const int ieta, const int iphi, const int version) const;
39 
40  private:
41  // Constant
42  static const int NOUTLUTS = 4176;
43 
44  // Two possible linearization scales
45  static const unsigned int REDUCE10BIT = 1024;
46  static const unsigned int REDUCE11BIT = 2048;
47 
48  // Map different QIE to the right linearization
49  static const unsigned int QIE8_OUTPUT_LUT_SIZE = REDUCE10BIT;
50  static const unsigned int QIE10_OUTPUT_LUT_SIZE = REDUCE10BIT;
51  static const unsigned int QIE11_OUTPUT_LUT_SIZE = REDUCE11BIT;
53  static const unsigned int TPGMAX = 256;
54 
55  // Typedef
56  typedef unsigned int LUT;
57  typedef std::array<double, TPGMAX> RCTdecompression;
58 
60  static const bool newHFphi = true;
61 
62  // Member functions
63  unsigned int getOutputLUTSize(const HcalTrigTowerDetId& id) const;
64  void loadHCALCompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Analytical compression tables
65 
66  // Member Variables
67  double nominal_gain_;
68  double lsb_factor_;
69  double rct_factor_;
70  double nct_factor_;
73  std::vector<int> ietal;
74  std::vector<int> ietah;
75  std::vector<int> ZS;
76  std::vector<int> LUTfactor;
77 
78  std::vector<std::array<LUT, OUTPUT_LUT_SIZE>> outputLUT_;
79  std::vector<RCTdecompression> hcaluncomp_;
80 };
81 #endif
static const unsigned int REDUCE10BIT
std::vector< int > ietah
std::vector< int > LUTfactor
std::vector< RCTdecompression > hcaluncomp_
std::vector< std::array< LUT, OUTPUT_LUT_SIZE > > outputLUT_
static const unsigned int QIE8_OUTPUT_LUT_SIZE
virtual bool HTvalid(const int ieta, const int iphi, const int version) const
std::vector< int > ietal
unsigned int getOutputLUTSize(const HcalTrigTowerDetId &id) const
virtual const std::vector< unsigned int > getCompressionLUT(const HcalTrigTowerDetId &id) const
CaloTPGTranscoderULUT(const std::string &compressionFile="", const std::string &decompressionFile="")
virtual 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.
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, int fineGrain) const override
Compression from linear samples+fine grain in the HTR.
const HcalTopology * theTopology
static const unsigned int QIE10_OUTPUT_LUT_SIZE
virtual int getOutputLUTId(const HcalTrigTowerDetId &id) const
virtual 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.
static const unsigned int OUTPUT_LUT_SIZE
static const unsigned int REDUCE11BIT
void loadHCALCompress(HcalLutMetadata const &, HcalTrigTowerGeometry const &)
virtual void setup(HcalLutMetadata const &, HcalTrigTowerGeometry const &, int, int)
std::array< double, TPGMAX > RCTdecompression
virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const override
Compression from linear samples+fine grain in the ECAL.
static const unsigned int QIE11_OUTPUT_LUT_SIZE
static const unsigned int TPGMAX
susybsm::HSCParticleCollection hc
Definition: classes.h:25
static const bool newHFphi
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const override