24 unsigned short fgbit,
unsigned short crtNo,
25 unsigned short crdNo,
unsigned short twrNo)
const {
31 <<
"L1RCTChannelMask should be set every event" <<
channelMask_;
34 <<
"L1RCTNoisyChannelMask should be set every event" 38 <<
"ECAL compressedET should be less than 0xFF, is " << ecalInput;
41 <<
"HCAL compressedET should be less than 0xFF, is " << hcalInput;
44 <<
"ECAL finegrain should be a single bit, is " << fgbit;
46 unsigned short iAbsEta = (
unsigned short)
abs(iEta);
47 short sign = iEta / iAbsEta;
49 unsigned short phiSide = (iPhi / 4) % 2;
50 if (iAbsEta < 1 || iAbsEta > 28)
51 throw cms::Exception(
"Invalid Data") <<
"1 <= |IEta| <= 28, is " << iAbsEta;
54 unsigned short ecalAfterMask = 0;
55 unsigned short hcalAfterMask = 0;
61 float ecalBeforeMask =
convertEcal(ecalInput, iAbsEta, sign);
66 ecalBeforeMask < noisyChannelMask_->ecalThreshold) ||
73 ecalAfterMask = ecalInput;
79 float hcalBeforeMask =
convertHcal(hcalInput, iAbsEta, sign);
91 hcalAfterMask = hcalInput;
96 unsigned long etIn7Bits;
97 unsigned long etIn9Bits;
99 if ((ecalAfterMask == 0 && hcalAfterMask > 0) &&
110 if ((ecalAfterMask == 0xFF &&
112 (hcalAfterMask == 0xFF &&
116 if ((ecalAfterMask == 0xFF &&
118 (hcalAfterMask == 0xFF &&
123 unsigned long shiftEtIn9Bits = etIn9Bits << 8;
124 unsigned long shiftHE_FGBit =
hOeFGVetoBit(ecal, hcal, fgbit) << 7;
125 unsigned long shiftActivityBit = 0;
137 etIn7Bits + shiftHE_FGBit + shiftEtIn9Bits + shiftActivityBit;
142 unsigned short crtNo,
143 unsigned short crdNo,
144 unsigned short twrNo)
const {
150 <<
"L1RCTChannelMask should be set every event" <<
channelMask_;
153 <<
"HF compressedET should be less than 0xFF, is " <<
hfInput;
155 unsigned short iAbsEta =
abs(iEta);
156 short sign = (iEta / iAbsEta);
157 unsigned short phiSide = twrNo / 4;
158 if (iAbsEta < 29 || iAbsEta > 32)
160 <<
"29 <= |iEta| <= 32, is " << iAbsEta;
167 et < noisyChannelMask_->hfThreshold)) {
178 int ht_bin = ((
int)floor(et) / 5);
212 if (ecal < rctParameters_->eMinForHoECut()) {
254 unsigned short iAbsEta,
short sign)
const {
281 unsigned short iAbsEta,
short sign)
const {
294 unsigned long etBits = (
unsigned long)(et / lsb);
296 if (etBits > maxValue)
bool hOeFGVetoBit(float ecal, float hcal, bool fgbit) const
const std::vector< double > & eGammaHCalScaleFactors() const
const std::vector< double > & jetMETHCalScaleFactors() const
double eMaxForFGCut() const
const std::vector< double > & eGammaECalScaleFactors() const
short calcIEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
double eMinForFGCut() const
bool noiseVetoHEminus() const
const L1RCTChannelMask * channelMask_
unsigned int eGammaETCode(float ecal, float hcal, int iAbsEta) const
unsigned int jetMETETCode(float ecal, float hcal, int iAbsEta) const
double eActivityCut() const
unsigned long convertToInteger(float et, float lsb, int precision) const
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
const L1RCTNoisyChannelMask * noisyChannelMask_
bool noiseVetoHEplus() const
float EGammaTPGSum(const float &ecal, const float &hcal, const unsigned &iAbsEta) const
const std::vector< double > & jetMETECalScaleFactors() const
double et(unsigned short rank, unsigned short eta, short etaSign) const
convert from rank to physically meaningful quantity
double hActivityCut() const
float convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const
double eMinForHoECut() const
Abs< T >::type abs(const T &t)
unsigned int emRank(unsigned short energy) const
const L1CaloEcalScale * ecalScale_
unsigned short calcIPhi(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
const L1RCTParameters * rctParameters_
bool activityBit(float ecal, float hcal) const
et
define resolution functions of each parameter
float convertEcal(unsigned short ecal, unsigned short iAbsEta, short sign) const
double eMaxForHoECut() const
const L1CaloHcalScale * hcalScale_
const L1CaloEtScale * etScale_
unsigned int lookup(unsigned short ecalInput, unsigned short hcalInput, unsigned short fgbit, unsigned short crtNo, unsigned short crdNo, unsigned short twrNo) const
float JetMETTPGSum(const float &ecal, const float &hcal, const unsigned &iAbsEta) const
double hMinForHoECut() const