test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
15  // constructor
16 
18 
19  // this needs to be refreshed every event -- constructor inits to zero
20  // to indicate that it cannot be used -- if this set function is
21  // called, lookup after that call will use it.
23  {
25  }
26  // ditto for channel mask
27  void setChannelMask(const L1RCTChannelMask* channelMask)
28  {
29  channelMask_ = channelMask;
30  }
31  void setNoisyChannelMask(const L1RCTNoisyChannelMask* channelMask)
32  {
33  noisyChannelMask_ = channelMask;
34  }
35 
36  // ditto for hcal TPG scale
37  void setHcalScale(const L1CaloHcalScale* hcalScale)
38  {
39  hcalScale_ = hcalScale;
40  }
41  // ditto for caloEtScale
42  void setL1CaloEtScale(const L1CaloEtScale* etScale)
43  {
44  etScale_ = etScale;
45  }
46  // ditto for ecal TPG Scale
47  void setEcalScale(const L1CaloEcalScale* ecalScale)
48  {
49  ecalScale_ = ecalScale;
50  }
51 
52  const L1RCTParameters* rctParameters() const {return rctParameters_;}
53 
54  unsigned int lookup(unsigned short ecalInput,
55  unsigned short hcalInput,
56  unsigned short fgbit,
57  unsigned short crtNo,
58  unsigned short crdNo,
59  unsigned short twrNo
60  ) const;
61 
62  unsigned int lookup(unsigned short hfInput,
63  unsigned short crtNo,
64  unsigned short crdNo,
65  unsigned short twrNo
66  ) const;
67 
68  unsigned int emRank(unsigned short energy) const;
69  unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const;
70  unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const;
71  bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const;
72  bool activityBit(float ecal, float hcal) const;
73 
74  private:
75 
76  // helper functions
77 
78  float convertEcal(unsigned short ecal, unsigned short iAbsEta, short sign) const;
79  float convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const;
80  unsigned long convertToInteger(float et, float lsb, int precision) const;
81 
88 
89 };
90 #endif
bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const
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