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, bool fineGrain) const;
24  virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const;
25 
27  const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec,
28  unsigned int& et, bool& egVecto, bool& activity) const;
29  virtual void rctJetUncompress(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc,
30  const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec,
31  unsigned int& et) const;
32  virtual double hcaletValue(const int& ieta, const int& compressedValue) const;
33  virtual double hcaletValue(const int& ieta, const int& iphi, const int& compressedValue) const;
34  virtual double hcaletValue(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc) const;
35  virtual bool HTvalid(const int ieta, const int iphi) const;
36  virtual const std::vector<unsigned int>& getCompressionLUT(const HcalTrigTowerDetId& id) const;
37  virtual void setup(HcalLutMetadata const&, HcalTrigTowerGeometry const&);
38  virtual int getOutputLUTId(const HcalTrigTowerDetId& id) 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 
47  // Constant
48  static const int NOUTLUTS = 4176;
49  static const unsigned int OUTPUT_LUT_SIZE = 1024;
50  static const unsigned int TPGMAX = 256;
51  static const bool newHFphi = true;
52 
53  static constexpr float LSB_HBHE = 0.25f;
54  static constexpr float LSB_HF = 0.5f;
55 
56  // Member functions
57  void loadHCALCompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Analytical compression tables
58 
59  // Member Variables
60  double nominal_gain_;
64  std::vector<int> ietal;
65  std::vector<int> ietah;
66  std::vector<int> ZS;
67  std::vector<int> LUTfactor;
68 
69  std::vector<std::vector<LUT> > outputLUT_;
70  std::vector<RCTdecompression> hcaluncomp_;
71 };
72 #endif
std::vector< int > ietah
std::vector< int > LUTfactor
std::vector< RCTdecompression > hcaluncomp_
std::vector< std::vector< LUT > > outputLUT_
std::vector< int > ietal
CaloTPGTranscoderULUT(const std::string &compressionFile="", const std::string &decompressionFile="")
virtual const std::vector< unsigned int > & getCompressionLUT(const HcalTrigTowerDetId &id) const
#define constexpr
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.
const HcalTopology * theTopology
virtual int getOutputLUTId(const HcalTrigTowerDetId &id) const
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
static const unsigned int TPGMAX
susybsm::HSCParticleCollection hc
Definition: classes.h:25
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.