CMS 3D CMS Logo

L1RCTLookupTables.h
Go to the documentation of this file.
1 #ifndef L1RCTLookupTables_h
2 #define L1RCTLookupTables_h
3 
4 class L1RCTParameters;
5 struct L1RCTChannelMask;
7 class L1CaloEcalScale;
8 class L1CaloHcalScale;
9 class L1CaloEtScale;
10 
12 public:
13  // constructor
14 
17 
18  // this needs to be refreshed every event -- constructor inits to zero
19  // to indicate that it cannot be used -- if this set function is
20  // called, lookup after that call will use it.
22  // ditto for channel mask
23  void setChannelMask(const L1RCTChannelMask *channelMask) { channelMask_ = channelMask; }
24  void setNoisyChannelMask(const L1RCTNoisyChannelMask *channelMask) { noisyChannelMask_ = channelMask; }
25 
26  // ditto for hcal TPG scale
27  void setHcalScale(const L1CaloHcalScale *hcalScale) { hcalScale_ = hcalScale; }
28  // ditto for caloEtScale
30  // ditto for ecal TPG Scale
31  void setEcalScale(const L1CaloEcalScale *ecalScale) { ecalScale_ = ecalScale; }
32 
33  const L1RCTParameters *rctParameters() const { return rctParameters_; }
34 
35  unsigned int lookup(unsigned short ecalInput,
36  unsigned short hcalInput,
37  unsigned short fgbit,
38  unsigned short crtNo,
39  unsigned short crdNo,
40  unsigned short twrNo) const;
41 
42  unsigned int lookup(unsigned short hfInput, unsigned short crtNo, unsigned short crdNo, unsigned short twrNo) const;
43 
44  unsigned int emRank(unsigned short energy) const;
45  unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const;
46  unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const;
47  bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const;
48  bool activityBit(float ecal, float hcal) const;
49 
50 private:
51  // helper functions
52 
53  float convertEcal(unsigned short ecal, unsigned short iAbsEta, short sign) const;
54  float convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const;
55  unsigned long convertToInteger(float et, float lsb, int precision) const;
56 
63 };
64 #endif
bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const
#define nullptr
const L1RCTChannelMask * channelMask_
unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const
unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const
unsigned long convertToInteger(float et, float lsb, int precision) const
const L1RCTNoisyChannelMask * noisyChannelMask_
void setHcalScale(const L1CaloHcalScale *hcalScale)
float convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const
unsigned int emRank(unsigned short energy) const
const L1CaloEcalScale * ecalScale_
void setL1CaloEtScale(const L1CaloEtScale *etScale)
const L1RCTParameters * rctParameters_
bool activityBit(float ecal, float hcal) const
const L1RCTParameters * rctParameters() const
void setEcalScale(const L1CaloEcalScale *ecalScale)
void setRCTParameters(const L1RCTParameters *rctParameters)
void setNoisyChannelMask(const L1RCTNoisyChannelMask *channelMask)
float convertEcal(unsigned short ecal, unsigned short iAbsEta, short sign) const
const L1CaloHcalScale * hcalScale_
const L1CaloEtScale * etScale_
void setChannelMask(const L1RCTChannelMask *channelMask)
unsigned int lookup(unsigned short ecalInput, unsigned short hcalInput, unsigned short fgbit, unsigned short crtNo, unsigned short crdNo, unsigned short twrNo) const