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;
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& iphi, const int& version, const int& compressedValue) const;
33  virtual double hcaletValue(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc) const;
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  // Typedef
42  typedef unsigned int LUT;
43  typedef std::vector<double> RCTdecompression;
44 
46  // Constant
47  static const int NOUTLUTS = 4176;
48  static const unsigned int OUTPUT_LUT_SIZE = 1024;
49  static const unsigned int TPGMAX = 256;
50  static const bool newHFphi = true;
51 
52  // Member functions
53  void loadHCALCompress(HcalLutMetadata const&, HcalTrigTowerGeometry const&) ; //Analytical compression tables
54 
55  // Member Variables
56  double nominal_gain_;
57  double lsb_factor_;
58  double rct_factor_;
59  double nct_factor_;
62  std::vector<int> ietal;
63  std::vector<int> ietah;
64  std::vector<int> ZS;
65  std::vector<int> LUTfactor;
66 
67  unsigned int size;
68  std::vector<std::vector<LUT> > outputLUT_;
69  std::vector<RCTdecompression> hcaluncomp_;
70 };
71 #endif
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const
std::vector< int > ietah
std::vector< int > LUTfactor
std::vector< RCTdecompression > hcaluncomp_
std::vector< std::vector< LUT > > outputLUT_
virtual bool HTvalid(const int ieta, const int iphi, const int version) const
std::vector< int > ietal
CaloTPGTranscoderULUT(const std::string &compressionFile="", const std::string &decompressionFile="")
virtual const std::vector< unsigned int > & getCompressionLUT(const HcalTrigTowerDetId &id) 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.
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
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.
void loadHCALCompress(HcalLutMetadata const &, HcalTrigTowerGeometry const &)
std::vector< double > RCTdecompression
virtual void setup(HcalLutMetadata const &, HcalTrigTowerGeometry const &, int, int)
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