CMS 3D CMS Logo

CaloTPGTranscoderULUT.h

Go to the documentation of this file.
00001 #ifndef CALOTPGTRANSCODERULUT_H
00002 #define CALOTPGTRANSCODERULUT_H 1
00003 
00004 #include <vector>
00005 #include "CalibFormats/CaloTPG/interface/CaloTPGTranscoder.h"
00006 
00013 class CaloTPGTranscoderULUT : public CaloTPGTranscoder {
00014 public:
00015   CaloTPGTranscoderULUT(const std::string& hcalFile1, const std::string& hcalFile2);
00016   virtual ~CaloTPGTranscoderULUT();
00017   virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const;
00018   virtual EcalTriggerPrimitiveSample ecalCompress(const EcalTrigTowerDetId& id, unsigned int sample, bool fineGrain) const;
00019 
00020   virtual void rctEGammaUncompress(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc,
00021                                    const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec, 
00022                                    unsigned int& et, bool& egVecto, bool& activity) const;
00023   virtual void rctJetUncompress(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc,
00024                                    const EcalTrigTowerDetId& eid, const EcalTriggerPrimitiveSample& ec, 
00025                                    unsigned int& et) const;
00026 
00027   void loadhcalUncompress();
00028   virtual double hcaletValue(const int& ieta, const int& compressedValue) const;
00029   virtual double hcaletValue(const HcalTrigTowerDetId& hid, const HcalTriggerPrimitiveSample& hc) const;
00030 
00031  private:
00032   static const int N_TOWER = 32, noutluts = 4176;
00033   static const unsigned int OUTPUT_LUT_SIZE = 1024;
00034   typedef std::vector<unsigned char> LUTType;
00035   std::vector<LUTType> hcal_;
00036   std::vector<const LUTType*> hcalITower_;
00037   void loadHCAL(const std::string& filename);
00038   void loadhcalUncompress(const std::string& filename);
00039   virtual bool HTvalid(const int ieta, const int iphi) const;
00040   virtual int GetOutputLUTId(const int ieta, const int iphi) const;
00041   std::vector<LUTType> outputluts_;
00042   typedef unsigned char LUT;
00043   LUT *outputLUT[noutluts];  
00044   double hcaluncomp_[33][256] ;
00045 };
00046 #endif

Generated on Tue Jun 9 17:25:12 2009 for CMSSW by  doxygen 1.5.4