27 unsigned eicIsolationThreshold,
28 unsigned jscQuietThresholdBarrel,
29 unsigned jscQuietThresholdEndcap,
32 bool noiseVetoHEminus,
34 const std::vector<double>& eGammaECalScaleFactors,
35 const std::vector<double>& eGammaHCalScaleFactors,
36 const std::vector<double>& jetMETECalScaleFactors,
37 const std::vector<double>& jetMETHCalScaleFactors,
38 const std::vector<double>& ecal_calib,
39 const std::vector<double>& hcal_calib,
40 const std::vector<double>& hcal_high_calib,
41 const std::vector<double>& cross_terms,
42 const std::vector<double>& lowHoverE_smear,
43 const std::vector<double>& highHoverE_smear)
44 : eGammaLSB_(eGammaLSB),
45 jetMETLSB_(jetMETLSB),
46 eMinForFGCut_(eMinForFGCut),
47 eMaxForFGCut_(eMaxForFGCut),
49 eMinForHoECut_(eMinForHoECut),
50 eMaxForHoECut_(eMaxForHoECut),
51 hMinForHoECut_(hMinForHoECut),
52 eActivityCut_(eActivityCut),
53 hActivityCut_(hActivityCut),
54 eicIsolationThreshold_(eicIsolationThreshold),
55 jscQuietThresholdBarrel_(jscQuietThresholdBarrel),
56 jscQuietThresholdEndcap_(jscQuietThresholdEndcap),
57 noiseVetoHB_(noiseVetoHB),
58 noiseVetoHEplus_(noiseVetoHEplus),
59 noiseVetoHEminus_(noiseVetoHEminus),
60 useCorrections_(useCorrections),
61 eGammaECalScaleFactors_(eGammaECalScaleFactors),
62 eGammaHCalScaleFactors_(eGammaHCalScaleFactors),
63 jetMETECalScaleFactors_(jetMETECalScaleFactors),
64 jetMETHCalScaleFactors_(jetMETHCalScaleFactors),
65 HoverE_smear_low_(lowHoverE_smear),
66 HoverE_smear_high_(highHoverE_smear) {
72 for (
unsigned i = 0;
i < ecal_calib.size(); ++
i)
74 for (
unsigned i = 0; i < hcal_calib.size(); ++
i)
76 for (
unsigned i = 0; i < hcal_high_calib.size(); ++
i)
78 for (
unsigned i = 0; i < cross_terms.size(); ++
i)
84 unsigned short crate = rct_iphi / 8;
95 unsigned short card = 999;
98 card = ((absIeta - 1) / 8) * 2 + (rct_iphi % 8) / 4;
101 else if ((absIeta >= 25) && (absIeta <= 28)) {
110 unsigned short tower = 999;
111 unsigned short iphi = rct_iphi;
112 unsigned short regionPhi = (iphi % 8) / 4;
117 tower = ((absIeta - 1) % 8) * 4 + (iphi % 4);
120 else if ((absIeta >= 25) && (absIeta <= 28)) {
121 if (regionPhi == 0) {
123 tower = (absIeta - 25) * 4 + (iphi % 4);
125 tower = 28 + iphi % 4 + (25 - absIeta) * 4;
129 else if ((absIeta >= 29) && (absIeta <= 32)) {
132 regionPhi = iphi % 2;
135 tower = (regionPhi)*4 + absIeta - 29;
142 unsigned short absIEta =
calcIAbsEta(iCrate, iCard, iTower);
155 iPhi = (iCrate % 9) * 8 + (iCard % 2) * 4 + (iTower % 4);
156 else if (iCard == 6) {
159 iPhi = (iCrate % 9) * 8 + (iTower % 4);
162 iPhi = (iCrate % 9) * 8 + ((iTower - 16) % 4) + 4;
166 iPhi = (iCrate % 9) * 2 + iTower / 4;
172 unsigned short absIEta;
174 absIEta = (iCard / 2) * 8 + (iTower / 4) + 1;
175 else if (iCard == 6) {
178 absIEta = 25 + iTower / 4;
181 absIEta = 28 - ((iTower - 16) / 4);
185 absIEta = 29 + iTower % 4;
191 if (iAbsEta < 1 || iAbsEta > 28)
192 throw cms::Exception(
"L1RCTParameters invalid function call") <<
"Eta out of range in MET TPGSum: " << iAbsEta;
200 int et_bin = ((int)floor(ecal) / 5);
214 int ht_bin = ((int)floor(hcal) / 5);
224 float result = ecal_c + hcal_c;
242 if (iAbsEta < 1 || iAbsEta > 28)
243 throw cms::Exception(
"L1RCTParameters invalid function call") <<
"Eta out of range in MET TPGSum: " << iAbsEta;
251 int et_bin = ((int)floor(ecal) / 5);
261 int ht_bin = ((int)floor(hcal) / 5);
271 float result = ecal_c + hcal_c;
286 if (index >= 28 && ecal > 120 && hcal > 120)
287 return (ecal + hcal);
293 return (ecal + hcal);
296 double ec = 0.0, hc = 0.0,
c = 0.0;
314 if (h / (e + h) >= 0.05) {
325 s <<
"\nPrinting record L1RCTParametersRcd" << endl;
326 s <<
"\n\"Parameter description\" \n \"Parameter name\" \"Value\" " << endl;
327 s <<
"\ne/gamma least significant bit energy transmitted from receiver cards to EIC cards. \n "
329 s <<
"\nLSB of region Et scale from RCT to GCT (GeV) \n "
331 s <<
"\nminimum ECAL Et for which fine-grain veto is applied (GeV) \n "
333 s <<
"\nmaximum ECAL Et for which fine-grain veto is applied (GeV) \n "
335 s <<
"\nmaximum value of (HCAL Et / ECAL Et) \n "
336 <<
"hOeCut = " <<
hOeCut_ << endl;
337 s <<
"\nminimum ECAL Et for which H/E veto is applied (GeV) \n "
339 s <<
"\nmaximum ECAL Et for which H/E veto is applied (GeV) \n "
341 s <<
"\nminimum HCAL Et for which H/E veto is applied (GeV) \n "
343 s <<
"\nECAL Et threshold above which tau activity bit is set (GeV) \n "
345 s <<
"\nHCAL Et threshold above which tau activity bit is set (GeV) \n "
347 s <<
"\nNeighboring trigger tower energy minimum threshold that marks candidate as non-isolated. (LSB bits) \n "
349 s <<
"\nIf jetMet energy in RCT Barrel Region is below this value, a quiet bit is set. (LSB bits)\n "
351 s <<
"\nIf jetMet energy in RCT Endcap Region is below this value, a quiet bit is set. (LSB bits) \n "
353 s <<
"\nWhen set to TRUE, HCAL energy is ignored if no ECAL energy is present in corresponding trigger tower for RCT "
356 s <<
"\nWhen set to TRUE, HCAL energy is ignored if no ECAL energy is present in corresponding trigger tower for RCT "
359 s <<
"\nWhen set to TRUE, HCAL energy is ignored if no ECAL energy is present in corresponding trigger tower for RCT "
363 auto printScalefactors = [&
s](
const std::vector<double>& sf) {
364 if (sf.size() == 10 * 28) {
365 s <<
"et bin ieta ScaleFactor" << endl;
366 for (
unsigned i = 0;
i < sf.size();
i++)
367 s << setw(6) <<
i / 28 <<
" " << setw(4) <<
i % 28 + 1 <<
" " << sf.at(
i) << endl;
368 }
else if (sf.size() == 10 * 32)
370 s <<
"et bin ieta ScaleFactor" << endl;
371 for (
unsigned i = 0;
i < sf.size();
i++)
372 s << setw(6) <<
i / 32 <<
" " << setw(4) <<
i % 32 + 1 <<
" " << sf.at(
i) << endl;
374 s <<
"ieta ScaleFactor" << endl;
375 for (
unsigned i = 0;
i < sf.size();
i++)
376 s << setw(4) <<
i + 1 <<
" " << sf.at(
i) << endl;
380 s <<
"\n\neta-dependent multiplicative factors for ECAL Et before summation \n "
381 <<
"eGammaECal Scale Factors " << endl;
384 s <<
"\n\neta-dependent multiplicative factors for HCAL Et before summation \n "
385 <<
"eGammaHCal Scale Factors " << endl;
388 s <<
"\n\neta-dependent multiplicative factors for ECAL Et before summation \n "
389 <<
"jetMETECal Scale Factors " << endl;
392 s <<
"\n\neta-dependent multiplicative factors for HCAL Et before summation \n"
393 <<
"jetMETHCal Scale Factors " << endl;
397 s <<
"\n\nUSING calibration variables " << endl;
399 s <<
"\n\nH over E smear low Correction Factors " << endl;
400 s <<
"ieta Correction Factor" << endl;
401 for (
int i = 0;
i < 28;
i++)
404 s <<
"\n\nH over E smear high Correction Factors " << endl;
405 s <<
"ieta Correction Factor" << endl;
406 for (
int i = 0;
i < 28;
i++)
409 s <<
"\n\necal calibrations " << endl;
410 s <<
"ieta CorrFactor1 CorrFactor2 CorrFactor3" << endl;
412 for (
int i = 0;
i < 28;
i++) {
414 for (
int j = 0;
j <
end;
j++)
420 s <<
"\n\nhcal calibrations " << endl;
421 s <<
"ieta CorrFactor1 CorrFactor2 CorrFactor3" << endl;
423 for (
int i = 0;
i < 28;
i++) {
425 for (
int j = 0;
j <
end;
j++)
430 s <<
"\n\nhcal_high calibrations " << endl;
431 s <<
"ieta CorrFactor1 CorrFactor2 CorrFactor3" << endl;
433 for (
int i = 0;
i < 28;
i++) {
435 for (
int j = 0;
j <
end;
j++)
441 s <<
"\n\ncross terms calibrations " << endl;
442 s <<
"ieta CorrFactor1 CorrFactor2 CorrFactor3 CorrFactor4 CorrFactor5 CorrFactor6" << endl;
443 for (
int i = 0;
i < 28;
i++) {
445 for (
int j = 0;
j <
end;
j++)
452 s <<
"\n\nNOT USING calibration variables " << endl;
void print(std::ostream &s) const
std::vector< double > jetMETECalScaleFactors_
const edm::EventSetup & c
short calcIEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
unsigned jscQuietThresholdBarrel_
std::vector< double > eGammaECalScaleFactors_
std::vector< std::vector< double > > cross_terms_
std::vector< std::vector< double > > hcal_high_calib_
std::vector< double > HoverE_smear_low_
float correctedTPGSum(const float &ecal, const float &hcal, const unsigned &index) const
unsigned short calcTower(unsigned short rct_iphi, unsigned short absIeta) const
float EGammaTPGSum(const float &ecal, const float &hcal, const unsigned &iAbsEta) const
unsigned jscQuietThresholdEndcap_
std::vector< double > jetMETHCalScaleFactors_
Abs< T >::type abs(const T &t)
unsigned short calcIAbsEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
std::vector< std::vector< double > > hcal_calib_
unsigned short calcIPhi(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
std::vector< double > HoverE_smear_high_
unsigned short calcCard(unsigned short rct_iphi, unsigned short absIeta) const
std::vector< double > eGammaHCalScaleFactors_
deadvectors[0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::vector< std::vector< double > > ecal_calib_
unsigned eicIsolationThreshold_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Power< A, B >::type pow(const A &a, const B &b)
unsigned short calcCrate(unsigned short rct_iphi, short ieta) const
float JetMETTPGSum(const float &ecal, const float &hcal, const unsigned &iAbsEta) const