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 <vector>
6 
7 // 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(const edm::EventSetup& es, Mode) const;
39  virtual int getOutputLUTId(const int ieta, const int iphi) const;
40  void printDecompression() const;
41 
42  private:
43  // Typedef
44  typedef unsigned int LUT;
45  typedef std::vector<double> RCTdecompression;
46 
47  // Constant
48  // TODO prefix k
49  static const int NOUTLUTS = 4176;
50  static const unsigned int OUTPUT_LUT_SIZE = 1024;
51  static const int TPGMAX = 256;
52  static const bool newHFphi = true;
53 
54  // Member functions
55  void loadHCALCompress(void) const; //Analytical compression tables
56  void loadHCALCompress(const std::string& filename) const; //Compression tables from file
57  void loadHCALUncompress(void) const; //Analytical decompression
58  void loadHCALUncompress(const std::string& filename) const; //Decompression tables from file
59  //int getLutGranularity(const DetId& id) const;
60  //int getLutThreshold(const DetId& id) const;
61 
62  // Member Variables
63  mutable bool isLoaded_;
64  mutable double nominal_gain_;
65  mutable double rctlsb_factor_;
68  std::vector<int> ietal;
69  std::vector<int> ietah;
70  std::vector<int> ZS;
71  std::vector<int> LUTfactor;
72 
73  mutable LUT *outputLUT_[NOUTLUTS];
74  mutable std::vector<RCTdecompression> hcaluncomp_;
77 };
78 #endif
std::vector< int > ietah
std::vector< int > LUTfactor
std::vector< RCTdecompression > hcaluncomp_
edm::ESHandle< HcalLutMetadata > lutMetadata_
std::vector< int > ietal
virtual void setup(const edm::EventSetup &es, Mode) const
Obtain any needed objects from the EventSetup. Note that any member variables which are changed must ...
CaloTPGTranscoderULUT(const std::string &compressionFile="", const std::string &decompressionFile="")
virtual std::vector< unsigned char > getCompressionLUT(HcalTrigTowerDetId id) const
edm::ESHandle< HcalTrigTowerGeometry > theTrigTowerGeometry
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
std::vector< double > RCTdecompression
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
void loadHCALCompress(void) 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
void loadHCALUncompress(void) const
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const
Compression from linear samples+fine grain in the HTR.