CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
L1RCTParameters Class Reference

#include <CondFormats/L1TObjects/interface/L1RCTParameters.h>

Public Member Functions

unsigned short calcCard (unsigned short rct_iphi, unsigned short absIeta) const
 
unsigned short calcCrate (unsigned short rct_iphi, short ieta) const
 
unsigned short calcIAbsEta (unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
 
short calcIEta (unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
 
unsigned short calcIPhi (unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
 
unsigned short calcTower (unsigned short rct_iphi, unsigned short absIeta) const
 
double eActivityCut () const
 
const std::vector< double > & eGammaECalScaleFactors () const
 
const std::vector< double > & eGammaHCalScaleFactors () const
 
double eGammaLSB () const
 
float EGammaTPGSum (const float &ecal, const float &hcal, const unsigned &iAbsEta) const
 
unsigned eicIsolationThreshold () const
 
double eMaxForFGCut () const
 
double eMaxForHoECut () const
 
double eMinForFGCut () const
 
double eMinForHoECut () const
 
double hActivityCut () const
 
double hMinForHoECut () const
 
double hOeCut () const
 
const std::vector< double > & jetMETECalScaleFactors () const
 
const std::vector< double > & jetMETHCalScaleFactors () const
 
double jetMETLSB () const
 
float JetMETTPGSum (const float &ecal, const float &hcal, const unsigned &iAbsEta) const
 
unsigned jscQuietThresholdBarrel () const
 
unsigned jscQuietThresholdEndcap () const
 
 L1RCTParameters ()
 
 L1RCTParameters (double eGammaLSB, double jetMETLSB, double eMinForFGCut, double eMaxForFGCut, double hOeCut, double eMinForHoECut, double eMaxForHoECut, double hMinForHoECut, double eActivityCut, double hActivityCut, unsigned eicIsolationThreshold, unsigned jscQuietThresholdBarrel, unsigned jscQuietThresholdEndcap, bool noiseVetoHB, bool noiseVetoHEplus, bool noiseVetoHEminus, bool useLindsey, const std::vector< double > &eGammaECalScaleFactors, const std::vector< double > &eGammaHCalScaleFactors, const std::vector< double > &jetMETECalScaleFactors, const std::vector< double > &jetMETHCalScaleFactors, const std::vector< double > &ecal_calib, const std::vector< double > &hcal_calib, const std::vector< double > &hcal_high_calib, const std::vector< double > &cross_terms, const std::vector< double > &lowHoverE_smear, const std::vector< double > &highHoverE_smear)
 
bool noiseVetoHB () const
 
bool noiseVetoHEminus () const
 
bool noiseVetoHEplus () const
 
void print (std::ostream &s) const
 
 ~L1RCTParameters ()
 

Private Member Functions

float correctedTPGSum (const float &ecal, const float &hcal, const unsigned &index) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< std::vector< double > > cross_terms_
 
double eActivityCut_
 
std::vector< std::vector< double > > ecal_calib_
 
std::vector< double > eGammaECalScaleFactors_
 
std::vector< double > eGammaHCalScaleFactors_
 
double eGammaLSB_
 
unsigned eicIsolationThreshold_
 
double eMaxForFGCut_
 
double eMaxForHoECut_
 
double eMinForFGCut_
 
double eMinForHoECut_
 
double hActivityCut_
 
std::vector< std::vector< double > > hcal_calib_
 
std::vector< std::vector< double > > hcal_high_calib_
 
double hMinForHoECut_
 
double hOeCut_
 
std::vector< double > HoverE_smear_high_
 
std::vector< double > HoverE_smear_low_
 
std::vector< double > jetMETECalScaleFactors_
 
std::vector< double > jetMETHCalScaleFactors_
 
double jetMETLSB_
 
unsigned jscQuietThresholdBarrel_
 
unsigned jscQuietThresholdEndcap_
 
bool noiseVetoHB_
 
bool noiseVetoHEminus_
 
bool noiseVetoHEplus_
 
bool useCorrections_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: Class to contain parameters which define RCT Lookup Tables

Usage: <usage>

Definition at line 27 of file L1RCTParameters.h.

Constructor & Destructor Documentation

◆ L1RCTParameters() [1/2]

L1RCTParameters::L1RCTParameters ( )
inline

Definition at line 30 of file L1RCTParameters.h.

30 {}

◆ L1RCTParameters() [2/2]

L1RCTParameters::L1RCTParameters ( double  eGammaLSB,
double  jetMETLSB,
double  eMinForFGCut,
double  eMaxForFGCut,
double  hOeCut,
double  eMinForHoECut,
double  eMaxForHoECut,
double  hMinForHoECut,
double  eActivityCut,
double  hActivityCut,
unsigned  eicIsolationThreshold,
unsigned  jscQuietThresholdBarrel,
unsigned  jscQuietThresholdEndcap,
bool  noiseVetoHB,
bool  noiseVetoHEplus,
bool  noiseVetoHEminus,
bool  useLindsey,
const std::vector< double > &  eGammaECalScaleFactors,
const std::vector< double > &  eGammaHCalScaleFactors,
const std::vector< double > &  jetMETECalScaleFactors,
const std::vector< double > &  jetMETHCalScaleFactors,
const std::vector< double > &  ecal_calib,
const std::vector< double > &  hcal_calib,
const std::vector< double > &  hcal_high_calib,
const std::vector< double > &  cross_terms,
const std::vector< double > &  lowHoverE_smear,
const std::vector< double > &  highHoverE_smear 
)

Definition at line 17 of file L1RCTParameters.cc.

48  hOeCut_(hOeCut),
60  useCorrections_(useCorrections),
65  HoverE_smear_low_(lowHoverE_smear),
66  HoverE_smear_high_(highHoverE_smear) {
67  ecal_calib_.resize(28);
68  hcal_calib_.resize(28);
69  hcal_high_calib_.resize(28);
70  cross_terms_.resize(28);
71 
72  for (unsigned i = 0; i < ecal_calib.size(); ++i)
73  ecal_calib_[i / 3].push_back(ecal_calib[i]);
74  for (unsigned i = 0; i < hcal_calib.size(); ++i)
75  hcal_calib_[i / 3].push_back(hcal_calib[i]);
76  for (unsigned i = 0; i < hcal_high_calib.size(); ++i)
77  hcal_high_calib_[i / 3].push_back(hcal_high_calib[i]);
78  for (unsigned i = 0; i < cross_terms.size(); ++i)
79  cross_terms_[i / 6].push_back(cross_terms[i]);
80 }

References cross_terms_, ecal_calib_, hcal_calib_, hcal_high_calib_, and mps_fire::i.

◆ ~L1RCTParameters()

L1RCTParameters::~L1RCTParameters ( )
inline

Definition at line 61 of file L1RCTParameters.h.

61 { ; }

Member Function Documentation

◆ calcCard()

unsigned short L1RCTParameters::calcCard ( unsigned short  rct_iphi,
unsigned short  absIeta 
) const

Definition at line 94 of file L1RCTParameters.cc.

94  {
95  unsigned short card = 999;
96  // Note absIeta counts from 1-32 (not 0-31)
97  if (absIeta <= 24) {
98  card = ((absIeta - 1) / 8) * 2 + (rct_iphi % 8) / 4;
99  }
100  // 25 <= absIeta <= 28 (card 6)
101  else if ((absIeta >= 25) && (absIeta <= 28)) {
102  card = 6;
103  } else {
104  }
105  return card;
106 }

Referenced by L1RCT::digiInput().

◆ calcCrate()

unsigned short L1RCTParameters::calcCrate ( unsigned short  rct_iphi,
short  ieta 
) const

Definition at line 83 of file L1RCTParameters.cc.

83  {
84  unsigned short crate = rct_iphi / 8;
85  if (abs(ieta) > 28)
86  crate = rct_iphi / 2;
87  if (ieta > 0) {
88  crate = crate + 9;
89  }
90  return crate;
91 }

References funct::abs(), and LEDCalibrationChannels::ieta.

Referenced by L1RCT::digiInput(), and L1RCTLutWriter::writeRcLutFile().

◆ calcIAbsEta()

unsigned short L1RCTParameters::calcIAbsEta ( unsigned short  iCrate,
unsigned short  iCard,
unsigned short  iTower 
) const

Definition at line 171 of file L1RCTParameters.cc.

171  {
172  unsigned short absIEta;
173  if (iCard < 6)
174  absIEta = (iCard / 2) * 8 + (iTower / 4) + 1; // rm -1 JLL 7Nov07
175  else if (iCard == 6) {
176  // card 6, region 0
177  if (iTower < 16) // 17->16
178  absIEta = 25 + iTower / 4; // rm -1
179  // card 6, region 1
180  else
181  absIEta = 28 - ((iTower - 16) / 4); // 17->16
182  }
183  // HF regions
184  else
185  absIEta = 29 + iTower % 4;
186  return absIEta;
187 }

Referenced by calcIEta().

◆ calcIEta()

short L1RCTParameters::calcIEta ( unsigned short  iCrate,
unsigned short  iCard,
unsigned short  iTower 
) const

Definition at line 141 of file L1RCTParameters.cc.

141  {
142  unsigned short absIEta = calcIAbsEta(iCrate, iCard, iTower);
143  short iEta;
144  if (iCrate < 9)
145  iEta = -absIEta;
146  else
147  iEta = absIEta;
148  return iEta;
149 }

References calcIAbsEta(), and L1TowerCalibrationProducer_cfi::iEta.

Referenced by L1RCTLookupTables::lookup(), and RctInputTextToDigi::produce().

◆ calcIPhi()

unsigned short L1RCTParameters::calcIPhi ( unsigned short  iCrate,
unsigned short  iCard,
unsigned short  iTower 
) const

Definition at line 152 of file L1RCTParameters.cc.

152  {
153  short iPhi;
154  if (iCard < 6)
155  iPhi = (iCrate % 9) * 8 + (iCard % 2) * 4 + (iTower % 4); // rm -1 7Nov07
156  else if (iCard == 6) {
157  // region 0
158  if (iTower < 16) // 17->16
159  iPhi = (iCrate % 9) * 8 + (iTower % 4); // rm -1
160  // region 1
161  else
162  iPhi = (iCrate % 9) * 8 + ((iTower - 16) % 4) + 4; // 17 -> 16
163  }
164  // HF regions
165  else
166  iPhi = (iCrate % 9) * 2 + iTower / 4;
167  return iPhi;
168 }

Referenced by L1RCTLookupTables::lookup(), and RctInputTextToDigi::produce().

◆ calcTower()

unsigned short L1RCTParameters::calcTower ( unsigned short  rct_iphi,
unsigned short  absIeta 
) const

Definition at line 109 of file L1RCTParameters.cc.

109  {
110  unsigned short tower = 999;
111  unsigned short iphi = rct_iphi;
112  unsigned short regionPhi = (iphi % 8) / 4;
113 
114  // Note absIeta counts from 1-32 (not 0-31)
115  if (absIeta <= 24) {
116  // assume iphi between 0 and 71; makes towers from 0-31, mod. 7Nov07
117  tower = ((absIeta - 1) % 8) * 4 + (iphi % 4); // REMOVED +1
118  }
119  // 25 <= absIeta <= 28 (card 6)
120  else if ((absIeta >= 25) && (absIeta <= 28)) {
121  if (regionPhi == 0) {
122  // towers from 0-31, modified 7Nov07 Jessica Leonard
123  tower = (absIeta - 25) * 4 + (iphi % 4); // REMOVED +1
124  } else {
125  tower = 28 + iphi % 4 + (25 - absIeta) * 4; // mod. 7Nov07 JLL
126  }
127  }
128  // absIeta >= 29 (HF regions)
129  else if ((absIeta >= 29) && (absIeta <= 32)) {
130  // SPECIAL DEFINITION OF REGIONPHI FOR HF SINCE HF IPHI IS 0-17
131  // Sept. 19 J. Leonard
132  regionPhi = iphi % 2;
133  // HF MAPPING, just regions now, don't need to worry about towers
134  // just calling it "tower" for convenience
135  tower = (regionPhi)*4 + absIeta - 29;
136  }
137  return tower;
138 }

References LEDCalibrationChannels::iphi, and hgcalTowerProducer_cfi::tower.

Referenced by L1RCT::digiInput(), and L1RCTLutWriter::writeRcLutFile().

◆ correctedTPGSum()

float L1RCTParameters::correctedTPGSum ( const float &  ecal,
const float &  hcal,
const unsigned &  index 
) const
private

Definition at line 285 of file L1RCTParameters.cc.

285  {
286  if (index >= 28 && ecal > 120 && hcal > 120)
287  return (ecal + hcal); // return plain sum if outside of calibration range or index is too high
288 
289  // let's make sure we're asking for items that are there.
290  if (ecal_calib_.at(index).size() != 3 || hcal_calib_.at(index).size() != 3 ||
291  hcal_high_calib_.at(index).size() != 3 || cross_terms_.at(index).size() != 6 ||
292  HoverE_smear_high_.size() <= index || HoverE_smear_low_.size() <= index)
293  return (ecal + hcal);
294 
295  double e = ecal, h = hcal;
296  double ec = 0.0, hc = 0.0, c = 0.0;
297 
298  ec = (ecal_calib_.at(index).at(0) * std::pow(e, 3.) + ecal_calib_.at(index).at(1) * std::pow(e, 2.) +
299  ecal_calib_.at(index).at(2) * e);
300 
301  if (e + h < 23) {
302  hc = (hcal_calib_.at(index).at(0) * std::pow(h, 3.) + hcal_calib_.at(index).at(1) * std::pow(h, 2.) +
303  hcal_calib_.at(index).at(2) * h);
304 
305  c = (cross_terms_.at(index).at(0) * std::pow(e, 2.) * h + cross_terms_.at(index).at(1) * std::pow(h, 2.) * e +
306  cross_terms_.at(index).at(2) * e * h + cross_terms_.at(index).at(3) * std::pow(e, 3.) * h +
307  cross_terms_.at(index).at(4) * std::pow(h, 3.) * e +
308  cross_terms_.at(index).at(5) * std::pow(h, 2.) * std::pow(e, 2.));
309  } else {
310  hc = (hcal_high_calib_.at(index).at(0) * std::pow(h, 3.) + hcal_high_calib_.at(index).at(1) * std::pow(h, 2.) +
311  hcal_high_calib_.at(index).at(2) * h);
312  }
313 
314  if (h / (e + h) >= 0.05) {
315  ec *= HoverE_smear_high_.at(index);
316  hc *= HoverE_smear_high_.at(index);
317  c *= HoverE_smear_high_.at(index);
318  } else {
319  ec *= HoverE_smear_low_.at(index);
320  }
321  return ec + hc + c;
322 }

References c, cross_terms_, MillePedeFileConverter_cfg::e, bsc_activity_cfg::ecal, ecal_calib_, h, hltEgammaHLTExtra_cfi::hcal, hcal_calib_, hcal_high_calib_, HoverE_smear_high_, HoverE_smear_low_, and funct::pow().

Referenced by EGammaTPGSum(), and JetMETTPGSum().

◆ eActivityCut()

double L1RCTParameters::eActivityCut ( ) const
inline

Definition at line 73 of file L1RCTParameters.h.

73 { return eActivityCut_; }

References eActivityCut_.

Referenced by L1RCTLookupTables::activityBit().

◆ eGammaECalScaleFactors()

const std::vector<double>& L1RCTParameters::eGammaECalScaleFactors ( ) const
inline

Definition at line 81 of file L1RCTParameters.h.

81 { return eGammaECalScaleFactors_; }

References eGammaECalScaleFactors_.

Referenced by L1RCTLookupTables::lookup().

◆ eGammaHCalScaleFactors()

const std::vector<double>& L1RCTParameters::eGammaHCalScaleFactors ( ) const
inline

Definition at line 82 of file L1RCTParameters.h.

82 { return eGammaHCalScaleFactors_; }

References eGammaHCalScaleFactors_.

Referenced by L1RCTLookupTables::lookup().

◆ eGammaLSB()

double L1RCTParameters::eGammaLSB ( ) const
inline

Definition at line 65 of file L1RCTParameters.h.

65 { return eGammaLSB_; }

References eGammaLSB_.

Referenced by L1RCTLookupTables::convertEcal(), and L1RCTLookupTables::eGammaETCode().

◆ EGammaTPGSum()

float L1RCTParameters::EGammaTPGSum ( const float &  ecal,
const float &  hcal,
const unsigned &  iAbsEta 
) const

Definition at line 240 of file L1RCTParameters.cc.

240  {
241  // We never deal with HF in this function (EG objects don't use hcal at all, really)
242  if (iAbsEta < 1 || iAbsEta > 28)
243  throw cms::Exception("L1RCTParameters invalid function call") << "Eta out of range in MET TPGSum: " << iAbsEta;
244  float ecal_c = ecal * eGammaECalScaleFactors_.at(iAbsEta - 1);
245  float hcal_c = hcal * eGammaHCalScaleFactors_.at(iAbsEta - 1);
246 
247  // scale factors will either be length 28 for legacy, or 28*(# et bins + 1) where the first set of 28 is an average over the et bins
248  // The first set of 28 provides a legacy fallthrough option
249  // Currently, # et bins is 9
250  if (eGammaECalScaleFactors_.size() == 28 * 10) {
251  int et_bin = ((int)floor(ecal) / 5);
252  // lowest bin (1) is 0-10GeV
253  if (et_bin < 1)
254  et_bin = 1;
255  // highest bin (9) is 45GeV and up
256  if (et_bin > 9)
257  et_bin = 9;
258  ecal_c = ecal * eGammaECalScaleFactors_.at(et_bin * 28 + iAbsEta - 1);
259  }
260  if (eGammaHCalScaleFactors_.size() == 28 * 10) {
261  int ht_bin = ((int)floor(hcal) / 5);
262  // lowest bin (1) is 0-10GeV
263  if (ht_bin < 1)
264  ht_bin = 1;
265  // highest bin (9) is 45GeV and up
266  if (ht_bin > 9)
267  ht_bin = 9;
268  hcal_c = hcal * eGammaHCalScaleFactors_.at(ht_bin * 28 + iAbsEta - 1);
269  }
270 
271  float result = ecal_c + hcal_c;
272 
273  // defunct section (polynomial-parameterized corrections)
274  if (useCorrections_) {
275  if (eGammaHCalScaleFactors_.at(iAbsEta - 1) != 0)
276  hcal_c = hcal;
277 
278  result = correctedTPGSum(ecal_c, hcal_c, iAbsEta - 1);
279  }
280 
281  return result;
282 }

References correctedTPGSum(), eGammaECalScaleFactors_, eGammaHCalScaleFactors_, Exception, createfilelist::int, mps_fire::result, and useCorrections_.

Referenced by L1RCTLookupTables::eGammaETCode().

◆ eicIsolationThreshold()

unsigned L1RCTParameters::eicIsolationThreshold ( ) const
inline

◆ eMaxForFGCut()

double L1RCTParameters::eMaxForFGCut ( ) const
inline

Definition at line 68 of file L1RCTParameters.h.

68 { return eMaxForFGCut_; }

References eMaxForFGCut_.

Referenced by L1RCTLookupTables::hOeFGVetoBit().

◆ eMaxForHoECut()

double L1RCTParameters::eMaxForHoECut ( ) const
inline

Definition at line 71 of file L1RCTParameters.h.

71 { return eMaxForHoECut_; }

References eMaxForHoECut_.

Referenced by L1RCTLookupTables::activityBit(), and L1RCTLookupTables::hOeFGVetoBit().

◆ eMinForFGCut()

double L1RCTParameters::eMinForFGCut ( ) const
inline

Definition at line 67 of file L1RCTParameters.h.

67 { return eMinForFGCut_; }

References eMinForFGCut_.

Referenced by L1RCTLookupTables::hOeFGVetoBit().

◆ eMinForHoECut()

double L1RCTParameters::eMinForHoECut ( ) const
inline

Definition at line 70 of file L1RCTParameters.h.

70 { return eMinForHoECut_; }

References eMinForHoECut_.

Referenced by L1RCTLookupTables::activityBit(), and L1RCTLookupTables::hOeFGVetoBit().

◆ hActivityCut()

double L1RCTParameters::hActivityCut ( ) const
inline

Definition at line 74 of file L1RCTParameters.h.

74 { return hActivityCut_; }

References hActivityCut_.

Referenced by L1RCTLookupTables::activityBit().

◆ hMinForHoECut()

double L1RCTParameters::hMinForHoECut ( ) const
inline

Definition at line 72 of file L1RCTParameters.h.

72 { return hMinForHoECut_; }

References hMinForHoECut_.

Referenced by L1RCTLookupTables::hOeFGVetoBit().

◆ hOeCut()

double L1RCTParameters::hOeCut ( ) const
inline

Definition at line 69 of file L1RCTParameters.h.

69 { return hOeCut_; }

References hOeCut_.

Referenced by L1RCTLookupTables::activityBit(), and L1RCTLookupTables::hOeFGVetoBit().

◆ jetMETECalScaleFactors()

const std::vector<double>& L1RCTParameters::jetMETECalScaleFactors ( ) const
inline

Definition at line 83 of file L1RCTParameters.h.

83 { return jetMETECalScaleFactors_; }

References jetMETECalScaleFactors_.

Referenced by L1RCTLookupTables::lookup().

◆ jetMETHCalScaleFactors()

const std::vector<double>& L1RCTParameters::jetMETHCalScaleFactors ( ) const
inline

Definition at line 84 of file L1RCTParameters.h.

84 { return jetMETHCalScaleFactors_; }

References jetMETHCalScaleFactors_.

Referenced by L1RCTLookupTables::lookup().

◆ jetMETLSB()

double L1RCTParameters::jetMETLSB ( ) const
inline

◆ JetMETTPGSum()

float L1RCTParameters::JetMETTPGSum ( const float &  ecal,
const float &  hcal,
const unsigned &  iAbsEta 
) const

Definition at line 189 of file L1RCTParameters.cc.

189  {
190  // We never deal with HF in this function (see note below)
191  if (iAbsEta < 1 || iAbsEta > 28)
192  throw cms::Exception("L1RCTParameters invalid function call") << "Eta out of range in MET TPGSum: " << iAbsEta;
193  float ecal_c = ecal * jetMETECalScaleFactors_.at(iAbsEta - 1);
194  float hcal_c = hcal * jetMETHCalScaleFactors_.at(iAbsEta - 1);
195 
196  // scale factors will either be length 28 for legacy, or 28*(# et bins + 1) where the first set is an average over the et bins
197  // The first set provides a legacy fallthrough option
198  // Currently, # et bins is 9
199  if (jetMETECalScaleFactors_.size() == 28 * 10) {
200  int et_bin = ((int)floor(ecal) / 5);
201  // lowest bin (1) is 0-10GeV
202  if (et_bin < 1)
203  et_bin = 1;
204  // highest bin (9) is 45GeV and up
205  if (et_bin > 9)
206  et_bin = 9;
207  ecal_c = ecal * jetMETECalScaleFactors_.at(et_bin * 28 + iAbsEta - 1);
208  }
209 
210  // We may be interested in HF jets, in which case, there are four more scale factors
211  // for the 4 HF regions. HOWEVER, we will never expect to see them accessed from
212  // this function. HF scaling is done in L1Trigger/RegionalCaloTrigger/src/L1RCTLookupTables
213  if (jetMETHCalScaleFactors_.size() == 32 * 10) {
214  int ht_bin = ((int)floor(hcal) / 5);
215  // lowest bin (1) is 0-10GeV
216  if (ht_bin < 1)
217  ht_bin = 1;
218  // highest bin (9) is 45GeV and up
219  if (ht_bin > 9)
220  ht_bin = 9;
221  hcal_c = hcal * jetMETHCalScaleFactors_.at(ht_bin * 32 + iAbsEta - 1);
222  }
223 
224  float result = ecal_c + hcal_c;
225 
226  // defunct section (polynomial-parameterized corrections)
227  if (useCorrections_) {
228  if (jetMETHCalScaleFactors_.at(iAbsEta - 1) != 0)
229  hcal_c = hcal;
230 
231  if (jetMETECalScaleFactors_.at(iAbsEta - 1) != 0)
232  ecal_c = ecal * eGammaECalScaleFactors_.at(iAbsEta - 1); // Use eGamma Corrections
233 
234  result = correctedTPGSum(ecal_c, hcal_c, iAbsEta - 1);
235  }
236 
237  return result;
238 }

References correctedTPGSum(), eGammaECalScaleFactors_, Exception, createfilelist::int, jetMETECalScaleFactors_, jetMETHCalScaleFactors_, mps_fire::result, and useCorrections_.

Referenced by L1RCTLookupTables::jetMETETCode().

◆ jscQuietThresholdBarrel()

unsigned L1RCTParameters::jscQuietThresholdBarrel ( ) const
inline

◆ jscQuietThresholdEndcap()

unsigned L1RCTParameters::jscQuietThresholdEndcap ( ) const
inline

◆ noiseVetoHB()

bool L1RCTParameters::noiseVetoHB ( ) const
inline

Definition at line 78 of file L1RCTParameters.h.

78 { return noiseVetoHB_; }

References noiseVetoHB_.

Referenced by L1RCTLookupTables::lookup().

◆ noiseVetoHEminus()

bool L1RCTParameters::noiseVetoHEminus ( ) const
inline

Definition at line 80 of file L1RCTParameters.h.

80 { return noiseVetoHEminus_; }

References noiseVetoHEminus_.

Referenced by L1RCTLookupTables::lookup().

◆ noiseVetoHEplus()

bool L1RCTParameters::noiseVetoHEplus ( ) const
inline

Definition at line 79 of file L1RCTParameters.h.

79 { return noiseVetoHEplus_; }

References noiseVetoHEplus_.

Referenced by L1RCTLookupTables::lookup().

◆ print()

void L1RCTParameters::print ( std::ostream &  s) const

Definition at line 324 of file L1RCTParameters.cc.

324  {
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 "
328  << "eGammaLSB = " << eGammaLSB_ << endl;
329  s << "\nLSB of region Et scale from RCT to GCT (GeV) \n "
330  << "jetMETLSB = " << jetMETLSB_ << endl;
331  s << "\nminimum ECAL Et for which fine-grain veto is applied (GeV) \n "
332  << " eMinForFGCut = " << eMinForFGCut_ << endl;
333  s << "\nmaximum ECAL Et for which fine-grain veto is applied (GeV) \n "
334  << "eMaxForFGCut = " << eMaxForFGCut_ << endl;
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 "
338  << "eMinForHoECut = " << eMinForHoECut_ << endl;
339  s << "\nmaximum ECAL Et for which H/E veto is applied (GeV) \n "
340  << "eMaxForHoECut = " << eMaxForHoECut_ << endl;
341  s << "\nminimum HCAL Et for which H/E veto is applied (GeV) \n "
342  << "hMinForHoECut = " << hMinForHoECut_ << endl;
343  s << "\nECAL Et threshold above which tau activity bit is set (GeV) \n "
344  << "eActivityCut = " << eActivityCut_ << endl;
345  s << "\nHCAL Et threshold above which tau activity bit is set (GeV) \n "
346  << "hActivityCut = " << hActivityCut_ << endl;
347  s << "\nNeighboring trigger tower energy minimum threshold that marks candidate as non-isolated. (LSB bits) \n "
348  << "eicIsolationThreshold = " << eicIsolationThreshold_ << endl;
349  s << "\nIf jetMet energy in RCT Barrel Region is below this value, a quiet bit is set. (LSB bits)\n "
350  << "jscQuietThreshBarrel = " << jscQuietThresholdBarrel_ << endl;
351  s << "\nIf jetMet energy in RCT Endcap Region is below this value, a quiet bit is set. (LSB bits) \n "
352  << "jscQuietThreshEndcap = " << jscQuietThresholdEndcap_ << endl;
353  s << "\nWhen set to TRUE, HCAL energy is ignored if no ECAL energy is present in corresponding trigger tower for RCT "
354  "Barrel \n "
355  << "noiseVetoHB = " << noiseVetoHB_ << endl;
356  s << "\nWhen set to TRUE, HCAL energy is ignored if no ECAL energy is present in corresponding trigger tower for RCT "
357  "Encap+ \n "
358  << "noiseVetoHEplus = " << noiseVetoHEplus_ << endl;
359  s << "\nWhen set to TRUE, HCAL energy is ignored if no ECAL energy is present in corresponding trigger tower for RCT "
360  "Endcap- \n "
361  << "noiseVetoHEminus = " << noiseVetoHEminus_ << endl;
362 
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) // jet HCAL (HF regions are 29-32)
369  {
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;
373  } else {
374  s << "ieta ScaleFactor" << endl;
375  for (unsigned i = 0; i < sf.size(); i++)
376  s << setw(4) << i + 1 << " " << sf.at(i) << endl;
377  }
378  };
379 
380  s << "\n\neta-dependent multiplicative factors for ECAL Et before summation \n "
381  << "eGammaECal Scale Factors " << endl;
382  printScalefactors(eGammaECalScaleFactors_);
383 
384  s << "\n\neta-dependent multiplicative factors for HCAL Et before summation \n "
385  << "eGammaHCal Scale Factors " << endl;
386  printScalefactors(eGammaHCalScaleFactors_);
387 
388  s << "\n\neta-dependent multiplicative factors for ECAL Et before summation \n "
389  << "jetMETECal Scale Factors " << endl;
390  printScalefactors(jetMETECalScaleFactors_);
391 
392  s << "\n\neta-dependent multiplicative factors for HCAL Et before summation \n"
393  << "jetMETHCal Scale Factors " << endl;
394  printScalefactors(jetMETHCalScaleFactors_);
395 
396  if (useCorrections_) {
397  s << "\n\nUSING calibration variables " << endl;
398 
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++)
402  s << setw(4) << i + 1 << " " << HoverE_smear_low_.at(i) << endl;
403 
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++)
407  s << setw(4) << i + 1 << " " << HoverE_smear_high_.at(i) << endl;
408 
409  s << "\n\necal calibrations " << endl;
410  s << "ieta CorrFactor1 CorrFactor2 CorrFactor3" << endl;
411  int end = ecal_calib_[0].size();
412  for (int i = 0; i < 28; i++) {
413  s << setw(4) << i;
414  for (int j = 0; j < end; j++)
415  s << setw(11) << setprecision(8) << ecal_calib_[i][j];
416 
417  s << endl;
418  }
419 
420  s << "\n\nhcal calibrations " << endl;
421  s << "ieta CorrFactor1 CorrFactor2 CorrFactor3" << endl;
422  end = hcal_calib_[0].size();
423  for (int i = 0; i < 28; i++) {
424  s << setw(4) << i;
425  for (int j = 0; j < end; j++)
426  s << setw(11) << setprecision(8) << hcal_calib_[i][j];
427 
428  s << endl;
429  }
430  s << "\n\nhcal_high calibrations " << endl;
431  s << "ieta CorrFactor1 CorrFactor2 CorrFactor3" << endl;
432  end = hcal_high_calib_[0].size();
433  for (int i = 0; i < 28; i++) {
434  s << setw(4) << i;
435  for (int j = 0; j < end; j++)
436  s << setw(11) << setprecision(8) << hcal_high_calib_[i][j];
437 
438  s << endl;
439  }
440  end = cross_terms_[0].size();
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++) {
444  s << setw(4) << i;
445  for (int j = 0; j < end; j++)
446  s << setw(11) << setprecision(8) << cross_terms_[i][j];
447 
448  s << endl;
449  }
450 
451  } else
452  s << "\n\nNOT USING calibration variables " << endl;
453 
454  s << "\n\n" << endl;
455 }

References cross_terms_, eActivityCut_, ecal_calib_, eGammaECalScaleFactors_, eGammaHCalScaleFactors_, eGammaLSB_, eicIsolationThreshold_, eMaxForFGCut_, eMaxForHoECut_, eMinForFGCut_, eMinForHoECut_, mps_fire::end, hActivityCut_, hcal_calib_, hcal_high_calib_, hMinForHoECut_, hOeCut_, HoverE_smear_high_, HoverE_smear_low_, mps_fire::i, dqmiolumiharvest::j, jetMETECalScaleFactors_, jetMETHCalScaleFactors_, jetMETLSB_, jscQuietThresholdBarrel_, jscQuietThresholdEndcap_, noiseVetoHB_, noiseVetoHEminus_, noiseVetoHEplus_, alignCSCRings::s, and useCorrections_.

Referenced by L1RCTParametersTester::analyze().

◆ serialize()

template<class Archive >
void L1RCTParameters::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 218 of file L1RCTParameters.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 218 of file L1RCTParameters.h.

Member Data Documentation

◆ cross_terms_

std::vector<std::vector<double> > L1RCTParameters::cross_terms_
private

Definition at line 211 of file L1RCTParameters.h.

Referenced by correctedTPGSum(), L1RCTParameters(), and print().

◆ eActivityCut_

double L1RCTParameters::eActivityCut_
private

Definition at line 143 of file L1RCTParameters.h.

Referenced by eActivityCut(), and print().

◆ ecal_calib_

std::vector<std::vector<double> > L1RCTParameters::ecal_calib_
private

Definition at line 208 of file L1RCTParameters.h.

Referenced by correctedTPGSum(), L1RCTParameters(), and print().

◆ eGammaECalScaleFactors_

std::vector<double> L1RCTParameters::eGammaECalScaleFactors_
private

Definition at line 191 of file L1RCTParameters.h.

Referenced by eGammaECalScaleFactors(), EGammaTPGSum(), JetMETTPGSum(), and print().

◆ eGammaHCalScaleFactors_

std::vector<double> L1RCTParameters::eGammaHCalScaleFactors_
private

Definition at line 192 of file L1RCTParameters.h.

Referenced by eGammaHCalScaleFactors(), EGammaTPGSum(), and print().

◆ eGammaLSB_

double L1RCTParameters::eGammaLSB_
private

Definition at line 109 of file L1RCTParameters.h.

Referenced by eGammaLSB(), and print().

◆ eicIsolationThreshold_

unsigned L1RCTParameters::eicIsolationThreshold_
private

Definition at line 156 of file L1RCTParameters.h.

Referenced by eicIsolationThreshold(), and print().

◆ eMaxForFGCut_

double L1RCTParameters::eMaxForFGCut_
private

Definition at line 121 of file L1RCTParameters.h.

Referenced by eMaxForFGCut(), and print().

◆ eMaxForHoECut_

double L1RCTParameters::eMaxForHoECut_
private

Definition at line 133 of file L1RCTParameters.h.

Referenced by eMaxForHoECut(), and print().

◆ eMinForFGCut_

double L1RCTParameters::eMinForFGCut_
private

Definition at line 117 of file L1RCTParameters.h.

Referenced by eMinForFGCut(), and print().

◆ eMinForHoECut_

double L1RCTParameters::eMinForHoECut_
private

Definition at line 129 of file L1RCTParameters.h.

Referenced by eMinForHoECut(), and print().

◆ hActivityCut_

double L1RCTParameters::hActivityCut_
private

Definition at line 149 of file L1RCTParameters.h.

Referenced by hActivityCut(), and print().

◆ hcal_calib_

std::vector<std::vector<double> > L1RCTParameters::hcal_calib_
private

Definition at line 209 of file L1RCTParameters.h.

Referenced by correctedTPGSum(), L1RCTParameters(), and print().

◆ hcal_high_calib_

std::vector<std::vector<double> > L1RCTParameters::hcal_high_calib_
private

Definition at line 210 of file L1RCTParameters.h.

Referenced by correctedTPGSum(), L1RCTParameters(), and print().

◆ hMinForHoECut_

double L1RCTParameters::hMinForHoECut_
private

Definition at line 137 of file L1RCTParameters.h.

Referenced by hMinForHoECut(), and print().

◆ hOeCut_

double L1RCTParameters::hOeCut_
private

Definition at line 125 of file L1RCTParameters.h.

Referenced by hOeCut(), and print().

◆ HoverE_smear_high_

std::vector<double> L1RCTParameters::HoverE_smear_high_
private

Definition at line 216 of file L1RCTParameters.h.

Referenced by correctedTPGSum(), and print().

◆ HoverE_smear_low_

std::vector<double> L1RCTParameters::HoverE_smear_low_
private

Definition at line 215 of file L1RCTParameters.h.

Referenced by correctedTPGSum(), and print().

◆ jetMETECalScaleFactors_

std::vector<double> L1RCTParameters::jetMETECalScaleFactors_
private

Definition at line 198 of file L1RCTParameters.h.

Referenced by jetMETECalScaleFactors(), JetMETTPGSum(), and print().

◆ jetMETHCalScaleFactors_

std::vector<double> L1RCTParameters::jetMETHCalScaleFactors_
private

Definition at line 199 of file L1RCTParameters.h.

Referenced by jetMETHCalScaleFactors(), JetMETTPGSum(), and print().

◆ jetMETLSB_

double L1RCTParameters::jetMETLSB_
private

Definition at line 113 of file L1RCTParameters.h.

Referenced by jetMETLSB(), and print().

◆ jscQuietThresholdBarrel_

unsigned L1RCTParameters::jscQuietThresholdBarrel_
private

Definition at line 161 of file L1RCTParameters.h.

Referenced by jscQuietThresholdBarrel(), and print().

◆ jscQuietThresholdEndcap_

unsigned L1RCTParameters::jscQuietThresholdEndcap_
private

Definition at line 166 of file L1RCTParameters.h.

Referenced by jscQuietThresholdEndcap(), and print().

◆ noiseVetoHB_

bool L1RCTParameters::noiseVetoHB_
private

Definition at line 172 of file L1RCTParameters.h.

Referenced by noiseVetoHB(), and print().

◆ noiseVetoHEminus_

bool L1RCTParameters::noiseVetoHEminus_
private

Definition at line 182 of file L1RCTParameters.h.

Referenced by noiseVetoHEminus(), and print().

◆ noiseVetoHEplus_

bool L1RCTParameters::noiseVetoHEplus_
private

Definition at line 177 of file L1RCTParameters.h.

Referenced by noiseVetoHEplus(), and print().

◆ useCorrections_

bool L1RCTParameters::useCorrections_
private

Definition at line 185 of file L1RCTParameters.h.

Referenced by EGammaTPGSum(), JetMETTPGSum(), and print().

L1RCTParameters::eMinForFGCut
double eMinForFGCut() const
Definition: L1RCTParameters.h:67
L1RCTParameters::eicIsolationThreshold
unsigned eicIsolationThreshold() const
Definition: L1RCTParameters.h:75
L1RCTParameters::calcIAbsEta
unsigned short calcIAbsEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
Definition: L1RCTParameters.cc:171
L1RCTParameters::noiseVetoHB_
bool noiseVetoHB_
Definition: L1RCTParameters.h:172
mps_fire.i
i
Definition: mps_fire.py:428
L1RCTParameters::jscQuietThresholdBarrel_
unsigned jscQuietThresholdBarrel_
Definition: L1RCTParameters.h:161
L1RCTParameters::hMinForHoECut
double hMinForHoECut() const
Definition: L1RCTParameters.h:72
hcal
Definition: ConfigurationDatabase.cc:13
L1RCTParameters::hOeCut
double hOeCut() const
Definition: L1RCTParameters.h:69
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
L1RCTParameters::noiseVetoHEplus_
bool noiseVetoHEplus_
Definition: L1RCTParameters.h:177
L1RCTParameters::eActivityCut
double eActivityCut() const
Definition: L1RCTParameters.h:73
L1RCTParameters::noiseVetoHB
bool noiseVetoHB() const
Definition: L1RCTParameters.h:78
L1RCTParameters::eMinForHoECut_
double eMinForHoECut_
Definition: L1RCTParameters.h:129
L1RCTParameters::cross_terms_
std::vector< std::vector< double > > cross_terms_
Definition: L1RCTParameters.h:211
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
ecal
Definition: ElectronicsMappingGPU.h:13
L1RCTParameters::jetMETLSB_
double jetMETLSB_
Definition: L1RCTParameters.h:113
L1RCTParameters::jscQuietThresholdEndcap
unsigned jscQuietThresholdEndcap() const
Definition: L1RCTParameters.h:77
L1RCTParameters::eGammaECalScaleFactors
const std::vector< double > & eGammaECalScaleFactors() const
Definition: L1RCTParameters.h:81
L1RCTParameters::ecal_calib_
std::vector< std::vector< double > > ecal_calib_
Definition: L1RCTParameters.h:208
hltEgammaHLTExtra_cfi.hcal
hcal
Definition: hltEgammaHLTExtra_cfi.py:42
L1RCTParameters::eMaxForHoECut_
double eMaxForHoECut_
Definition: L1RCTParameters.h:133
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
L1RCTParameters::hActivityCut
double hActivityCut() const
Definition: L1RCTParameters.h:74
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1RCTParameters::eMaxForHoECut
double eMaxForHoECut() const
Definition: L1RCTParameters.h:71
h
L1RCTParameters::jetMETLSB
double jetMETLSB() const
Definition: L1RCTParameters.h:66
L1RCTParameters::noiseVetoHEminus
bool noiseVetoHEminus() const
Definition: L1RCTParameters.h:80
mps_fire.end
end
Definition: mps_fire.py:242
L1RCTParameters::useCorrections_
bool useCorrections_
Definition: L1RCTParameters.h:185
L1RCTParameters::HoverE_smear_low_
std::vector< double > HoverE_smear_low_
Definition: L1RCTParameters.h:215
L1RCTParameters::eMaxForFGCut
double eMaxForFGCut() const
Definition: L1RCTParameters.h:68
L1RCTParameters::hcal_high_calib_
std::vector< std::vector< double > > hcal_high_calib_
Definition: L1RCTParameters.h:210
L1RCTParameters::eGammaHCalScaleFactors
const std::vector< double > & eGammaHCalScaleFactors() const
Definition: L1RCTParameters.h:82
L1RCTParameters::jscQuietThresholdBarrel
unsigned jscQuietThresholdBarrel() const
Definition: L1RCTParameters.h:76
L1RCTParameters::jscQuietThresholdEndcap_
unsigned jscQuietThresholdEndcap_
Definition: L1RCTParameters.h:166
L1RCTParameters::jetMETECalScaleFactors
const std::vector< double > & jetMETECalScaleFactors() const
Definition: L1RCTParameters.h:83
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
L1RCTParameters::eicIsolationThreshold_
unsigned eicIsolationThreshold_
Definition: L1RCTParameters.h:156
L1RCTParameters::eGammaECalScaleFactors_
std::vector< double > eGammaECalScaleFactors_
Definition: L1RCTParameters.h:191
L1RCTParameters::eGammaHCalScaleFactors_
std::vector< double > eGammaHCalScaleFactors_
Definition: L1RCTParameters.h:192
createfilelist.int
int
Definition: createfilelist.py:10
L1RCTParameters::hActivityCut_
double hActivityCut_
Definition: L1RCTParameters.h:149
L1RCTParameters::jetMETHCalScaleFactors
const std::vector< double > & jetMETHCalScaleFactors() const
Definition: L1RCTParameters.h:84
L1RCTParameters::hMinForHoECut_
double hMinForHoECut_
Definition: L1RCTParameters.h:137
L1RCTParameters::HoverE_smear_high_
std::vector< double > HoverE_smear_high_
Definition: L1RCTParameters.h:216
L1RCTParameters::hOeCut_
double hOeCut_
Definition: L1RCTParameters.h:125
L1RCTParameters::eMinForHoECut
double eMinForHoECut() const
Definition: L1RCTParameters.h:70
L1RCTParameters::hcal_calib_
std::vector< std::vector< double > > hcal_calib_
Definition: L1RCTParameters.h:209
Exception
Definition: hltDiff.cc:245
L1RCTParameters::eGammaLSB
double eGammaLSB() const
Definition: L1RCTParameters.h:65
L1RCTParameters::noiseVetoHEplus
bool noiseVetoHEplus() const
Definition: L1RCTParameters.h:79
L1RCTParameters::eActivityCut_
double eActivityCut_
Definition: L1RCTParameters.h:143
bsc_activity_cfg.ecal
ecal
Definition: bsc_activity_cfg.py:25
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
mps_fire.result
result
Definition: mps_fire.py:311
L1RCTParameters::jetMETECalScaleFactors_
std::vector< double > jetMETECalScaleFactors_
Definition: L1RCTParameters.h:198
L1RCTParameters::eMinForFGCut_
double eMinForFGCut_
Definition: L1RCTParameters.h:117
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1RCTParameters::eGammaLSB_
double eGammaLSB_
Definition: L1RCTParameters.h:109
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1RCTParameters::correctedTPGSum
float correctedTPGSum(const float &ecal, const float &hcal, const unsigned &index) const
Definition: L1RCTParameters.cc:285
L1RCTParameters::eMaxForFGCut_
double eMaxForFGCut_
Definition: L1RCTParameters.h:121
L1RCTParameters::noiseVetoHEminus_
bool noiseVetoHEminus_
Definition: L1RCTParameters.h:182
L1RCTParameters::jetMETHCalScaleFactors_
std::vector< double > jetMETHCalScaleFactors_
Definition: L1RCTParameters.h:199
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37