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 
16  : rctParameters_(nullptr), channelMask_(nullptr), ecalScale_(nullptr), hcalScale_(nullptr), etScale_(nullptr) {}
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
L1CaloHcalScale
Definition: L1CaloHcalScale.h:28
L1CaloEcalScale
Definition: L1CaloEcalScale.h:28
L1RCTLookupTables::eGammaETCode
unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const
Definition: L1RCTLookupTables.cc:276
L1RCTLookupTables::activityBit
bool activityBit(float ecal, float hcal) const
Definition: L1RCTLookupTables.cc:198
L1RCTLookupTables::lookup
unsigned int lookup(unsigned short ecalInput, unsigned short hcalInput, unsigned short fgbit, unsigned short crtNo, unsigned short crdNo, unsigned short twrNo) const
Definition: L1RCTLookupTables.cc:22
hcal
Definition: ConfigurationDatabase.cc:13
L1RCTLookupTables::hOeFGVetoBit
bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const
Definition: L1RCTLookupTables.cc:178
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
L1RCTChannelMask
Definition: L1RCTChannelMask.h:7
hgcalVFEProducer_cfi.lsb
lsb
Definition: hgcalVFEProducer_cfi.py:80
L1RCTLookupTables::channelMask_
const L1RCTChannelMask * channelMask_
Definition: L1RCTLookupTables.h:58
L1RCTLookupTables::noisyChannelMask_
const L1RCTNoisyChannelMask * noisyChannelMask_
Definition: L1RCTLookupTables.h:59
L1RCTNoisyChannelMask
Definition: L1RCTNoisyChannelMask.h:7
L1RCTLookupTables::setHcalScale
void setHcalScale(const L1CaloHcalScale *hcalScale)
Definition: L1RCTLookupTables.h:27
MonitorHcalDiJetsAlCaReco_cfi.hfInput
hfInput
Definition: MonitorHcalDiJetsAlCaReco_cfi.py:11
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
L1RCTLookupTables
Definition: L1RCTLookupTables.h:11
common_cff.precision
precision
Definition: common_cff.py:44
L1RCTLookupTables::convertEcal
float convertEcal(unsigned short ecal, unsigned short iAbsEta, short sign) const
Definition: L1RCTLookupTables.cc:230
L1RCTLookupTables::jetMETETCode
unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const
Definition: L1RCTLookupTables.cc:283
L1RCTLookupTables::ecalScale_
const L1CaloEcalScale * ecalScale_
Definition: L1RCTLookupTables.h:60
L1RCTLookupTables::L1RCTLookupTables
L1RCTLookupTables()
Definition: L1RCTLookupTables.h:15
L1CaloEtScale
Definition: L1CaloEtScale.h:29
L1RCTLookupTables::setL1CaloEtScale
void setL1CaloEtScale(const L1CaloEtScale *etScale)
Definition: L1RCTLookupTables.h:29
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1RCTLookupTables::rctParameters
const L1RCTParameters * rctParameters() const
Definition: L1RCTLookupTables.h:33
L1RCTLookupTables::rctParameters_
const L1RCTParameters * rctParameters_
Definition: L1RCTLookupTables.h:57
L1RCTLookupTables::setNoisyChannelMask
void setNoisyChannelMask(const L1RCTNoisyChannelMask *channelMask)
Definition: L1RCTLookupTables.h:24
L1RCTLookupTables::setEcalScale
void setEcalScale(const L1CaloEcalScale *ecalScale)
Definition: L1RCTLookupTables.h:31
L1RCTLookupTables::convertToInteger
unsigned long convertToInteger(float et, float lsb, int precision) const
Definition: L1RCTLookupTables.cc:267
L1RCTLookupTables::setRCTParameters
void setRCTParameters(const L1RCTParameters *rctParameters)
Definition: L1RCTLookupTables.h:21
L1RCTParameters
Definition: L1RCTParameters.h:27
bsc_activity_cfg.ecal
ecal
Definition: bsc_activity_cfg.py:25
L1RCTLookupTables::hcalScale_
const L1CaloHcalScale * hcalScale_
Definition: L1RCTLookupTables.h:61
L1RCTLookupTables::etScale_
const L1CaloEtScale * etScale_
Definition: L1RCTLookupTables.h:62
L1RCTLookupTables::setChannelMask
void setChannelMask(const L1RCTChannelMask *channelMask)
Definition: L1RCTLookupTables.h:23
L1RCTLookupTables::convertHcal
float convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const
Definition: L1RCTLookupTables.cc:256
L1RCTLookupTables::emRank
unsigned int emRank(unsigned short energy) const
Definition: L1RCTLookupTables.cc:220
photonValidator_cfi.etScale
etScale
Definition: photonValidator_cfi.py:47