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>
7 
8 // tmp
10 
11 
18 
20 public:
21  CaloTPGTranscoderULUT(const std::string& compressionFile="",
22  const std::string& decompressionFile="");
23  virtual ~CaloTPGTranscoderULUT();
24  virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const;
25  virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const;
26 
28  const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec,
29  unsigned int& et, bool& egVecto, bool& activity) const;
30  virtual void rctJetUncompress(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc,
31  const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec,
32  unsigned int& et) const;
33  virtual double hcaletValue(const int& ieta, const int& compressedValue) const;
34  virtual double hcaletValue(const int& ieta, const int& iphi, const int& compressedValue) const;
35  virtual double hcaletValue(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc) const;
36  virtual bool HTvalid(const int ieta, const int iphi) const;
37  virtual std::vector<unsigned char> getCompressionLUT(HcalTrigTowerDetId id) const;
38  virtual void setup(HcalLutMetadata const&, HcalTrigTowerGeometry const&);
39  virtual int getOutputLUTId(const int ieta, const int iphi) const;
40 
41  private:
42  // Typedef
43  typedef unsigned int LUT;
44  typedef std::vector<double> RCTdecompression;
45 
46  // Constant
47  // TODO prefix k
48  static const int NOUTLUTS = 4176;
49  static const unsigned int OUTPUT_LUT_SIZE = 1024;
50  static const int TPGMAX = 256;
51  static const bool newHFphi = true;
52 
53  // Member functions
54  void loadHCALCompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Analytical compression tables
55  void loadHCALCompress(const std::string& filename, HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Compression tables from file
56  void loadHCALUncompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Analytical decompression
57  void loadHCALUncompress(const std::string& filename, HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Decompression tables from file
58  //int getLutGranularity(const DetId& id) const;
59  //int getLutThreshold(const DetId& id) const;
60 
61  // Member Variables
62  double nominal_gain_;
66  std::vector<int> ietal;
67  std::vector<int> ietah;
68  std::vector<int> ZS;
69  std::vector<int> LUTfactor;
70 
72  std::vector<RCTdecompression> hcaluncomp_;
73 };
74 #endif
std::vector< int > ietah
std::vector< int > LUTfactor
std::vector< RCTdecompression > hcaluncomp_
std::vector< int > ietal
CaloTPGTranscoderULUT(const std::string &compressionFile="", const std::string &decompressionFile="")
virtual std::vector< unsigned char > getCompressionLUT(HcalTrigTowerDetId id) const
void loadHCALUncompress(HcalLutMetadata const &, HcalTrigTowerGeometry const &)
virtual void rctJetUncompress(const HcalTrigTowerDetId &hid, const HcalTriggerPrimitiveSample &hc, const EcalTrigTowerDetId &eid, const EcalTriggerPrimitiveSample &ec, unsigned int &et) const
Uncompression for the JET path in the RCT.
static const unsigned int OUTPUT_LUT_SIZE
virtual void rctEGammaUncompress(const HcalTrigTowerDetId &hid, const HcalTriggerPrimitiveSample &hc, const EcalTrigTowerDetId &eid, const EcalTriggerPrimitiveSample &ec, unsigned int &et, bool &egVecto, bool &activity) const
Uncompression for the Electron/Photon path in the RCT.
virtual bool HTvalid(const int ieta, const int iphi) const
void loadHCALCompress(HcalLutMetadata const &, HcalTrigTowerGeometry const &)
std::vector< double > RCTdecompression
virtual void setup(HcalLutMetadata const &, HcalTrigTowerGeometry const &)
virtual double hcaletValue(const int &ieta, const int &compressedValue) const
tuple filename
Definition: lut2db_cfg.py:20
susybsm::HSCParticleCollection hc
Definition: classes.h:25
virtual int getOutputLUTId(const int ieta, const int iphi) const
virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const
Compression from linear samples+fine grain in the ECAL.
static const bool newHFphi
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const
Compression from linear samples+fine grain in the HTR.