Go to the documentation of this file.00001 #ifndef L1RCTLookupTables_h
00002 #define L1RCTLookupTables_h
00003
00004 class L1RCTParameters;
00005 struct L1RCTChannelMask;
00006 struct L1RCTNoisyChannelMask;
00007 class L1CaloEcalScale;
00008 class L1CaloHcalScale;
00009 class L1CaloEtScale;
00010
00011 class L1RCTLookupTables {
00012
00013 public:
00014
00015
00016
00017 L1RCTLookupTables() : rctParameters_(0), channelMask_(0), ecalScale_(0), hcalScale_(0), etScale_(0) {}
00018
00019
00020
00021
00022 void setRCTParameters(const L1RCTParameters* rctParameters)
00023 {
00024 rctParameters_ = rctParameters;
00025 }
00026
00027 void setChannelMask(const L1RCTChannelMask* channelMask)
00028 {
00029 channelMask_ = channelMask;
00030 }
00031 void setNoisyChannelMask(const L1RCTNoisyChannelMask* channelMask)
00032 {
00033 noisyChannelMask_ = channelMask;
00034 }
00035
00036
00037 void setHcalScale(const L1CaloHcalScale* hcalScale)
00038 {
00039 hcalScale_ = hcalScale;
00040 }
00041
00042 void setL1CaloEtScale(const L1CaloEtScale* etScale)
00043 {
00044 etScale_ = etScale;
00045 }
00046
00047 void setEcalScale(const L1CaloEcalScale* ecalScale)
00048 {
00049 ecalScale_ = ecalScale;
00050 }
00051
00052 const L1RCTParameters* rctParameters() const {return rctParameters_;}
00053
00054 unsigned int lookup(unsigned short ecalInput,
00055 unsigned short hcalInput,
00056 unsigned short fgbit,
00057 unsigned short crtNo,
00058 unsigned short crdNo,
00059 unsigned short twrNo
00060 ) const;
00061
00062 unsigned int lookup(unsigned short hfInput,
00063 unsigned short crtNo,
00064 unsigned short crdNo,
00065 unsigned short twrNo
00066 ) const;
00067
00068 unsigned int emRank(unsigned short energy) const;
00069 unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const;
00070 unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const;
00071 bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const;
00072 bool activityBit(float ecal, float hcal) const;
00073
00074 private:
00075
00076
00077
00078 float convertEcal(unsigned short ecal, unsigned short iAbsEta, short sign) const;
00079 float convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const;
00080 unsigned long convertToInteger(float et, float lsb, int precision) const;
00081
00082 const L1RCTParameters* rctParameters_;
00083 const L1RCTChannelMask* channelMask_;
00084 const L1RCTNoisyChannelMask* noisyChannelMask_;
00085 const L1CaloEcalScale* ecalScale_;
00086 const L1CaloHcalScale* hcalScale_;
00087 const L1CaloEtScale* etScale_;
00088
00089 };
00090 #endif