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 
13 public:
14  // constructor
15 
19 
20  // this needs to be refreshed every event -- constructor inits to zero
21  // to indicate that it cannot be used -- if this set function is
22  // called, lookup after that call will use it.
25  }
26  // ditto for channel mask
27  void setChannelMask(const L1RCTChannelMask *channelMask) {
28  channelMask_ = channelMask;
29  }
30  void setNoisyChannelMask(const L1RCTNoisyChannelMask *channelMask) {
31  noisyChannelMask_ = channelMask;
32  }
33 
34  // ditto for hcal TPG scale
35  void setHcalScale(const L1CaloHcalScale *hcalScale) {
36  hcalScale_ = hcalScale;
37  }
38  // ditto for caloEtScale
40  // ditto for ecal TPG Scale
41  void setEcalScale(const L1CaloEcalScale *ecalScale) {
42  ecalScale_ = ecalScale;
43  }
44 
45  const L1RCTParameters *rctParameters() const { return rctParameters_; }
46 
47  unsigned int lookup(unsigned short ecalInput, unsigned short hcalInput,
48  unsigned short fgbit, unsigned short crtNo,
49  unsigned short crdNo, unsigned short twrNo) const;
50 
51  unsigned int lookup(unsigned short hfInput, unsigned short crtNo,
52  unsigned short crdNo, unsigned short twrNo) const;
53 
54  unsigned int emRank(unsigned short energy) const;
55  unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const;
56  unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const;
57  bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const;
58  bool activityBit(float ecal, float hcal) const;
59 
60 private:
61  // helper functions
62 
63  float convertEcal(unsigned short ecal, unsigned short iAbsEta,
64  short sign) const;
65  float convertHcal(unsigned short hcal, unsigned short iAbsEta,
66  short sign) const;
67  unsigned long convertToInteger(float et, float lsb, int precision) const;
68 
75 };
76 #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)
et
define resolution functions of each parameter
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