CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
l1t::GlobalScales Class Reference

#include <GlobalScales.h>

Classes

class  cc
 
struct  ScaleParameters
 typedef for a single object template More...
 

Public Member Functions

virtual void dumpAllLUTs (std::ostream &myCout) const
 
virtual void dumpLUT (std::ostream &myCout, int LUTtype, std::string name) const
 
ScaleParameters getEGScales () const
 
ScaleParameters getETMScales () const
 
ScaleParameters getETTScales () const
 
ScaleParameters getHTMScales () const
 
ScaleParameters getHTTScales () const
 
ScaleParameters getJETScales () const
 
long long getLUT_CalMuEta (std::string lutName, int element) const
 
long long getLUT_CalMuPhi (std::string lutName, int element) const
 
long long getLUT_Cos (std::string lutName, int element) const
 
long long getLUT_Cosh (std::string lutName, int element) const
 
long long getLUT_DeltaEta (std::string lutName, int element) const
 
long long getLUT_DeltaPhi (std::string lutName, int element) const
 
long long getLUT_Pt (std::string lutName, int element) const
 
ScaleParameters getMUScales () const
 
unsigned int getPrec_Cos (std::string lutName) const
 
unsigned int getPrec_Cosh (std::string lutName) const
 
unsigned int getPrec_DeltaEta (std::string lutName) const
 
unsigned int getPrec_DeltaPhi (std::string lutName) const
 
unsigned int getPrec_Pt (std::string lutName) const
 
virtual std::string getScalesName () const
 
ScaleParameters getTAUScales () const
 
 GlobalScales ()
 
virtual void print (std::ostream &myCout) const
 
virtual void printScale (ScaleParameters scale, std::ostream &myCout) const
 
void setEGScales (ScaleParameters &scales)
 
void setETMScales (ScaleParameters &scales)
 
void setETTScales (ScaleParameters &scales)
 
void setHTMScales (ScaleParameters &scales)
 
void setHTTScales (ScaleParameters &scales)
 
void setJetScales (ScaleParameters &scales)
 
virtual void setLUT_CalMuEta (std::string lutName, std::vector< long long > lut)
 
virtual void setLUT_CalMuPhi (std::string lutName, std::vector< long long > lut)
 
virtual void setLUT_Cos (std::string lutName, std::vector< long long > lut, unsigned int precision)
 
virtual void setLUT_Cosh (std::string lutName, std::vector< long long > lut, unsigned int precision)
 
virtual void setLUT_DeltaEta (std::string lutName, std::vector< long long > lut, unsigned int precision)
 
virtual void setLUT_DeltaPhi (std::string lutName, std::vector< long long > lut, unsigned int precision)
 
virtual void setLUT_Pt (std::string lutName, std::vector< long long > lut, unsigned int precision)
 
void setMuonScales (ScaleParameters &scales)
 
void setScalesName (std::string name)
 
void setTauScales (ScaleParameters &scales)
 
virtual ~GlobalScales ()
 

Private Attributes

ScaleParameters m_egScales
 
ScaleParameters m_etmScales
 
ScaleParameters m_ettScales
 
ScaleParameters m_htmScales
 
ScaleParameters m_httScales
 
ScaleParameters m_jetScales
 
std::map< std::string,
std::vector< long long > > 
m_lut_CalMuEta
 
std::map< std::string,
std::vector< long long > > 
m_lut_CalMuPhi
 
std::map< std::string,
std::vector< long long > > 
m_lut_Cos
 
std::map< std::string,
std::vector< long long > > 
m_lut_Cosh
 
std::map< std::string,
std::vector< long long > > 
m_lut_DeltaEta
 
std::map< std::string,
std::vector< long long > > 
m_lut_DeltaPhi
 
std::map< std::string,
std::vector< long long > > 
m_lut_Pt
 
ScaleParameters m_muScales
 
std::map< std::string,
unsigned int > 
m_Prec_Cos
 
std::map< std::string,
unsigned int > 
m_Prec_Cosh
 
std::map< std::string,
unsigned int > 
m_Prec_DeltaEta
 
std::map< std::string,
unsigned int > 
m_Prec_DeltaPhi
 
std::map< std::string,
unsigned int > 
m_Prec_Pt
 
std::string m_ScaleSetName
 
ScaleParameters m_tauScales
 

Detailed Description

Definition at line 25 of file GlobalScales.h.

Constructor & Destructor Documentation

GlobalScales::GlobalScales ( )

Definition at line 25 of file GlobalScales.cc.

26 {
27 
28 
29 }
GlobalScales::~GlobalScales ( )
virtual

Definition at line 32 of file GlobalScales.cc.

32  {
33 
34 }

Member Function Documentation

void GlobalScales::dumpAllLUTs ( std::ostream &  myCout) const
virtual

Definition at line 417 of file GlobalScales.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

418 {
419 
420  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin(); itr != m_lut_CalMuEta.end(); itr++) {
421  dumpLUT(myCout,1,itr->first);
422  }
423 
424  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin(); itr != m_lut_CalMuPhi.end(); itr++) {
425  dumpLUT(myCout,2,itr->first);
426  }
427 
428 
429  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin(); itr != m_lut_DeltaEta.end(); itr++) {
430  dumpLUT(myCout,3,itr->first);
431  }
432 
433 
434  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin(); itr != m_lut_DeltaPhi.end(); itr++) {
435  dumpLUT(myCout,4,itr->first);
436  }
437 
438 
439  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end(); itr++) {
440  dumpLUT(myCout,5,itr->first);
441  }
442 
443 
444  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end(); itr++) {
445  dumpLUT(myCout,6,itr->first);
446  }
447 
448 
449  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end(); itr++) {
450  dumpLUT(myCout,7,itr->first);
451  }
452 }
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:133
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:131
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:134
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) const
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:132
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:130
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:135
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:136
void GlobalScales::dumpLUT ( std::ostream &  myCout,
int  LUTtype,
std::string  name 
) const
virtual

Definition at line 454 of file GlobalScales.cc.

References i, and AlCaHLTBitMon_QueryRunRegistry::string.

455 {
456  std::vector<long long> dumpV;
457  unsigned int prec = 0;
458  std::string type = "Null";
459  switch(LUTtype) {
460  case 1: {
461  dumpV = m_lut_CalMuEta.find(name)->second;
462  type = "Cal-Mu Eta";
463  break;
464  }
465  case 2: {
466  dumpV = m_lut_CalMuPhi.find(name)->second;
467  type = "Cal-Mu Phi";
468  break;
469  }
470  case 3: {
471  dumpV = m_lut_DeltaEta.find(name)->second;
472  prec = m_Prec_DeltaEta.find(name)->second;
473  type = "Delta Eta";
474  break;
475  }
476  case 4: {
477  dumpV = m_lut_DeltaPhi.find(name)->second;
478  prec = m_Prec_DeltaPhi.find(name)->second;
479  type = "Delta Phi";
480  break;
481  }
482  case 5: {
483  dumpV = m_lut_Cosh.find(name)->second;
484  prec = m_Prec_Cosh.find(name)->second;
485  type = "Cosh";
486  break;
487  }
488  case 6: {
489  dumpV = m_lut_Cos.find(name)->second;
490  prec = m_Prec_Cos.find(name)->second;
491  type = "Cos";
492  break;
493  }
494  case 7: {
495  dumpV = m_lut_Pt.find(name)->second;
496  prec = m_Prec_Pt.find(name)->second;
497  type = "Pt";
498  break;
499  }
500  }
501 
502  myCout << "=========================================" << std::endl;
503  myCout << " LUT: " << type << " Table: " << name << " Size = " << dumpV.size() << " Precision " << prec << std::endl;
504  myCout << "=========================================" << std::endl;
505  for(int i=0; i<(int)dumpV.size(); i++) {
506  myCout << " Element " << i << " " << dumpV.at(i) << std::endl;
507  }
508 }
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:141
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:133
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:142
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:131
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:143
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:139
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:134
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:140
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:132
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:130
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:135
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:136
ScaleParameters l1t::GlobalScales::getEGScales ( ) const
inline

Definition at line 81 of file GlobalScales.h.

References m_egScales.

81 { return m_egScales; }
ScaleParameters m_egScales
Definition: GlobalScales.h:118
ScaleParameters l1t::GlobalScales::getETMScales ( ) const
inline

Definition at line 85 of file GlobalScales.h.

References m_etmScales.

85 { return m_etmScales; }
ScaleParameters m_etmScales
Definition: GlobalScales.h:126
ScaleParameters l1t::GlobalScales::getETTScales ( ) const
inline

Definition at line 84 of file GlobalScales.h.

References m_ettScales.

84 { return m_ettScales; }
ScaleParameters m_ettScales
Definition: GlobalScales.h:124
ScaleParameters l1t::GlobalScales::getHTMScales ( ) const
inline

Definition at line 87 of file GlobalScales.h.

References m_htmScales.

87 { return m_htmScales; }
ScaleParameters m_htmScales
Definition: GlobalScales.h:127
ScaleParameters l1t::GlobalScales::getHTTScales ( ) const
inline

Definition at line 86 of file GlobalScales.h.

References m_httScales.

86 { return m_httScales; }
ScaleParameters m_httScales
Definition: GlobalScales.h:125
ScaleParameters l1t::GlobalScales::getJETScales ( ) const
inline

Definition at line 83 of file GlobalScales.h.

References m_jetScales.

83 { return m_jetScales; }
ScaleParameters m_jetScales
Definition: GlobalScales.h:122
long long GlobalScales::getLUT_CalMuEta ( std::string  lutName,
int  element 
) const

Definition at line 152 of file GlobalScales.cc.

References gather_cfg::cout, and relativeConstraints::value.

153 {
154  long long value = 0;
155 
156  if(element < (int)m_lut_CalMuEta.find(lutName)->second.size()) {
157  value = m_lut_CalMuEta.find(lutName)->second.at(element);
158  } else {
159  std::cout << "Warning: Element Requested " << element << " too large for CalMuEta LUT (" << lutName <<") size = " << m_lut_CalMuEta.find(lutName)->second.size() << std::endl;
160  }
161  return value;
162 }
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:130
tuple cout
Definition: gather_cfg.py:145
long long GlobalScales::getLUT_CalMuPhi ( std::string  lutName,
int  element 
) const

Definition at line 164 of file GlobalScales.cc.

References gather_cfg::cout, and relativeConstraints::value.

165 {
166  long long value = 0;
167 
168  if(element < (int)m_lut_CalMuPhi.find(lutName)->second.size()) {
169  value = m_lut_CalMuPhi.find(lutName)->second.at(element);
170  } else {
171  std::cout << "Warning: Element Requested " << element << " too large for CalMuPhi LUT (" << lutName <<") size = " << m_lut_CalMuPhi.find(lutName)->second.size() << std::endl;
172  }
173  return value;
174 }
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:131
tuple cout
Definition: gather_cfg.py:145
long long GlobalScales::getLUT_Cos ( std::string  lutName,
int  element 
) const

Definition at line 364 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

365 {
366  long long value = 0;
367 
368  //first check whether this LUT exists
369  if(m_lut_Cos.find(lutName) == m_lut_Cos.end()) {
370 
371  //does not exist. Check for oppoisite ordering
372  std::size_t pos = lutName.find("-");
373  std::string name = lutName.substr(pos+1);
374  name += "-";
375  name += lutName.substr(0,pos);
376 
377  //check again
378  if(m_lut_Cos.find(name) == m_lut_Cos.end()) {
379  std::cout << "Warning: No LUT by name "<< lutName << " or " << name << " exists! " << std::endl;
380  return value;
381  } else {
382  lutName = name;
383  }
384  }
385 
386  if(element < (int)m_lut_Cos.find(lutName)->second.size()) {
387  value = m_lut_Cos.find(lutName)->second.at(element);
388  } else {
389  std::cout << "Warning: Element Requested " << element << " too large for Cos LUT (" << lutName <<") size = " << m_lut_Cos.find(lutName)->second.size() << std::endl;
390  }
391  return value;
392 }
tuple cout
Definition: gather_cfg.py:145
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:136
long long GlobalScales::getLUT_Cosh ( std::string  lutName,
int  element 
) const

Definition at line 310 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

311 {
312  long long value = 0;
313 
314 
315  //first check whether this LUT exists
316  if(m_lut_Cosh.find(lutName) == m_lut_Cosh.end()) {
317 
318  //does not exist. Check for oppoisite ordering
319  std::size_t pos = lutName.find("-");
320  std::string name = lutName.substr(pos+1);
321  name += "-";
322  name += lutName.substr(0,pos);
323 
324  //check again
325  if(m_lut_Cosh.find(name) == m_lut_Cosh.end()) {
326  std::cout << "Warning: No LUT by name "<< lutName << " or " << name << " exists! " << std::endl;
327  return value;
328  } else {
329  lutName = name;
330  }
331  }
332 
333  if(element < (int)m_lut_Cosh.find(lutName)->second.size()) {
334  value = m_lut_Cosh.find(lutName)->second.at(element);
335  } else {
336  std::cout << "Warning: Element Requested " << element << " too large for Cosh LUT (" << lutName <<") size = " << m_lut_Cosh.find(lutName)->second.size() << std::endl;
337  }
338  return value;
339 }
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:135
tuple cout
Definition: gather_cfg.py:145
long long GlobalScales::getLUT_DeltaEta ( std::string  lutName,
int  element 
) const

Definition at line 177 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

178 {
179  long long value = 0;
180 
181  //first check whether this LUT exists
182  if(m_lut_DeltaEta.find(lutName) == m_lut_DeltaEta.end()) {
183 
184  //does not exist. Check for oppoisite ordering
185  std::size_t pos = lutName.find("-");
186  std::string name = lutName.substr(pos+1);
187  name += "-";
188  name += lutName.substr(0,pos);
189 
190  //check again
191  if(m_lut_DeltaEta.find(name) == m_lut_DeltaEta.end()) {
192  std::cout << "Warning: No LUT by name "<< lutName << " or " << name << " exists! " << std::endl;
193  return value;
194  } else {
195  lutName = name;
196  }
197  }
198 
199 
200  if(element < (int)m_lut_DeltaEta.find(lutName)->second.size()) {
201  value = m_lut_DeltaEta.find(lutName)->second.at(element);
202  } else {
203  std::cout << "Warning: Element Requested " << element << " too large for DeltaEta LUT (" << lutName <<") size = " << m_lut_DeltaEta.find(lutName)->second.size() << std::endl;
204  }
205  return value;
206 }
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:132
tuple cout
Definition: gather_cfg.py:145
long long GlobalScales::getLUT_DeltaPhi ( std::string  lutName,
int  element 
) const

Definition at line 232 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

233 {
234  long long value = 0;
235 
236  //first check whether this LUT exists
237  if(m_lut_DeltaPhi.find(lutName) == m_lut_DeltaPhi.end()) {
238 
239  //does not exist. Check for oppoisite ordering
240  std::size_t pos = lutName.find("-");
241  std::string name = lutName.substr(pos+1);
242  name += "-";
243  name += lutName.substr(0,pos);
244 
245  //check again
246  if(m_lut_DeltaPhi.find(name) == m_lut_DeltaPhi.end()) {
247  std::cout << "Warning: No LUT by name "<< lutName << " or " << name << " exists! " << std::endl;
248  return value;
249  } else {
250  lutName = name;
251  }
252  }
253 
254 
255  if(element < (int)m_lut_DeltaPhi.find(lutName)->second.size()) {
256  value = m_lut_DeltaPhi.find(lutName)->second.at(element);
257  } else {
258  std::cout << "Warning: Element Requested " << element << " too large for DeltaPhi LUT (" << lutName <<") size = " << m_lut_DeltaPhi.find(lutName)->second.size() << std::endl;
259  }
260  return value;
261 }
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:133
tuple cout
Definition: gather_cfg.py:145
long long GlobalScales::getLUT_Pt ( std::string  lutName,
int  element 
) const

Definition at line 287 of file GlobalScales.cc.

References gather_cfg::cout, and relativeConstraints::value.

288 {
289  long long value = 0;
290 
291  if(element < (int)m_lut_Pt.find(lutName)->second.size()) {
292  value = m_lut_Pt.find(lutName)->second.at(element);
293  } else {
294  std::cout << "Warning: Element Requested " << element << " too large for Pt LUT (" << lutName <<") size = " << m_lut_Pt.find(lutName)->second.size() << std::endl;
295  }
296  return value;
297 }
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:134
tuple cout
Definition: gather_cfg.py:145
ScaleParameters l1t::GlobalScales::getMUScales ( ) const
inline

Definition at line 80 of file GlobalScales.h.

References m_muScales.

80 { return m_muScales; }
ScaleParameters m_muScales
Definition: GlobalScales.h:120
unsigned int GlobalScales::getPrec_Cos ( std::string  lutName) const

Definition at line 393 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

394 {
395  unsigned int value = 0;
396 
397  if(m_Prec_Cos.find(lutName) != m_Prec_Cos.end()) {
398  value = m_Prec_Cos.find(lutName)->second;
399  } else {
400 
401  //does not exist. Check for oppoisite ordering
402  std::size_t pos = lutName.find("-");
403  std::string name = lutName.substr(pos+1);
404  name += "-";
405  name += lutName.substr(0,pos);
406 
407  //check again
408  if(m_Prec_Cos.find(name) != m_Prec_Cos.end()) {
409  value = m_Prec_Cos.find(name)->second;
410  } else {
411  std::cout << "Warning: LUT " << lutName << " for Cos not found" << std::endl;
412  }
413  }
414  return value;
415 }
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:143
tuple cout
Definition: gather_cfg.py:145
unsigned int GlobalScales::getPrec_Cosh ( std::string  lutName) const

Definition at line 340 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

341 {
342  unsigned int value = 0;
343 
344  if(m_Prec_Cosh.find(lutName) != m_Prec_Cosh.end()) {
345  value = m_Prec_Cosh.find(lutName)->second;
346  } else {
347 
348  //does not exist. Check for oppoisite ordering
349  std::size_t pos = lutName.find("-");
350  std::string name = lutName.substr(pos+1);
351  name += "-";
352  name += lutName.substr(0,pos);
353 
354  //check again
355  if(m_Prec_Cosh.find(name) != m_Prec_Cosh.end()) {
356  value = m_Prec_Cosh.find(name)->second;
357  } else {
358  std::cout << "Warning: LUT " << lutName << " for Cosh not found" << std::endl;
359  }
360  }
361  return value;
362 }
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:142
tuple cout
Definition: gather_cfg.py:145
unsigned int GlobalScales::getPrec_DeltaEta ( std::string  lutName) const

Definition at line 207 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

208 {
209  unsigned int value = 0;
210 
211  if(m_Prec_DeltaEta.find(lutName) != m_Prec_DeltaEta.end()) {
212  value = m_Prec_DeltaEta.find(lutName)->second;
213  } else {
214 
215  //does not exist. Check for oppoisite ordering
216  std::size_t pos = lutName.find("-");
217  std::string name = lutName.substr(pos+1);
218  name += "-";
219  name += lutName.substr(0,pos);
220 
221  //check again
222  if(m_Prec_DeltaEta.find(name) != m_Prec_DeltaEta.end()) {
223  value = m_Prec_DeltaEta.find(name)->second;
224  } else {
225  std::cout << "Warning: LUT " << lutName << " for DeltaEta not found" << std::endl;
226  }
227  }
228  return value;
229 }
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:139
tuple cout
Definition: gather_cfg.py:145
unsigned int GlobalScales::getPrec_DeltaPhi ( std::string  lutName) const

Definition at line 262 of file GlobalScales.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

263 {
264  unsigned int value = 0;
265 
266  if(m_Prec_DeltaPhi.find(lutName) != m_Prec_DeltaPhi.end()) {
267  value = m_Prec_DeltaPhi.find(lutName)->second;
268  } else {
269 
270  //does not exist. Check for oppoisite ordering
271  std::size_t pos = lutName.find("-");
272  std::string name = lutName.substr(pos+1);
273  name += "-";
274  name += lutName.substr(0,pos);
275 
276  //check again
277  if(m_Prec_DeltaPhi.find(name) != m_Prec_DeltaPhi.end()) {
278  value = m_Prec_DeltaPhi.find(name)->second;
279  } else {
280  std::cout << "Warning: LUT " << lutName << " for DeltaPhi not found" << std::endl;
281  }
282  }
283  return value;
284 }
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:140
tuple cout
Definition: gather_cfg.py:145
unsigned int GlobalScales::getPrec_Pt ( std::string  lutName) const

Definition at line 298 of file GlobalScales.cc.

References gather_cfg::cout, and relativeConstraints::value.

299 {
300  unsigned int value = 0;
301 
302  if(m_Prec_Pt.find(lutName) != m_Prec_Pt.end()) {
303  value = m_Prec_Pt.find(lutName)->second;
304  } else {
305  std::cout << "Warning: LUT " << lutName << " for Pt not found" << std::endl;
306  }
307  return value;
308 }
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:141
tuple cout
Definition: gather_cfg.py:145
std::string GlobalScales::getScalesName ( ) const
virtual

Definition at line 36 of file GlobalScales.cc.

Referenced by l1t::GlobalBoard::runGTL().

36 { return m_ScaleSetName;}
std::string m_ScaleSetName
Definition: GlobalScales.h:116
ScaleParameters l1t::GlobalScales::getTAUScales ( ) const
inline

Definition at line 82 of file GlobalScales.h.

References m_tauScales.

82 { return m_tauScales; }
ScaleParameters m_tauScales
Definition: GlobalScales.h:119
void GlobalScales::print ( std::ostream &  myCout) const
virtual

Definition at line 510 of file GlobalScales.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

511 {
512 
513  myCout << "\n ************* L1T Global Scales ************" << std::endl;
514 
515 
516  myCout << " Muon Scales: " << std::endl;
517  printScale(m_muScales,myCout);
518 
519  myCout << " EG Scales: "<< std::endl;
520  printScale(m_egScales,myCout);
521 
522  myCout << " Tau Scales: "<< std::endl;
523  printScale(m_tauScales,myCout);
524 
525  myCout << " Jet Scales: "<< std::endl;
526  printScale(m_jetScales,myCout);
527 
528 
529  myCout << " HTT Scales: "<< std::endl;
530  printScale(m_httScales,myCout);
531 
532  myCout << " ETT Scales: "<< std::endl;
533  printScale(m_ettScales,myCout);
534 
535  myCout << " HTM Scales: "<< std::endl;
536  printScale(m_htmScales,myCout);
537 
538  myCout << " ETM Scales: "<< std::endl;
539  printScale(m_etmScales,myCout);
540 
541 
542  myCout << std::endl;
543  myCout << " LUTs Stored: " << std::endl;
544  myCout << " CalMuEta:";
545  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuEta.begin(); itr != m_lut_CalMuEta.end(); itr++) {
546  myCout << " " << itr->first;
547  }
548  myCout << std::endl;
549 
550  myCout << " CalMuPhi:";
551  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_CalMuPhi.begin(); itr != m_lut_CalMuPhi.end(); itr++) {
552  myCout << " " << itr->first;
553  }
554  myCout << std::endl;
555 
556  myCout << " DeltaEta:";
557  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaEta.begin(); itr != m_lut_DeltaEta.end(); itr++) {
558  myCout << " " << itr->first;
559  }
560  myCout << std::endl;
561 
562  myCout << " DeltaPhi:";
563  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_DeltaPhi.begin(); itr != m_lut_DeltaPhi.end(); itr++) {
564  myCout << " " << itr->first;
565  }
566  myCout << std::endl;
567 
568  myCout << " Cos: ";
569  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cos.begin(); itr != m_lut_Cos.end(); itr++) {
570  myCout << " " << itr->first;
571  }
572  myCout << std::endl;
573 
574  myCout << " Cosh: ";
575  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Cosh.begin(); itr != m_lut_Cosh.end(); itr++) {
576  myCout << " " << itr->first;
577  }
578  myCout << std::endl;
579 
580  myCout << " Pt: ";
581  for (std::map<std::string, std::vector<long long>>::const_iterator itr = m_lut_Pt.begin(); itr != m_lut_Pt.end(); itr++) {
582  myCout << " " << itr->first;
583  }
584  myCout << std::endl;
585 
586 }
ScaleParameters m_ettScales
Definition: GlobalScales.h:124
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:133
ScaleParameters m_tauScales
Definition: GlobalScales.h:119
ScaleParameters m_jetScales
Definition: GlobalScales.h:122
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:131
ScaleParameters m_etmScales
Definition: GlobalScales.h:126
ScaleParameters m_egScales
Definition: GlobalScales.h:118
ScaleParameters m_htmScales
Definition: GlobalScales.h:127
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:134
ScaleParameters m_httScales
Definition: GlobalScales.h:125
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:132
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:130
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:135
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:136
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
ScaleParameters m_muScales
Definition: GlobalScales.h:120
void GlobalScales::printScale ( ScaleParameters  scale,
std::ostream &  myCout 
) const
virtual

Definition at line 587 of file GlobalScales.cc.

References l1t::GlobalScales::ScaleParameters::etaBins, l1t::GlobalScales::ScaleParameters::etaMax, l1t::GlobalScales::ScaleParameters::etaMin, l1t::GlobalScales::ScaleParameters::etaStep, l1t::GlobalScales::ScaleParameters::etBins, l1t::GlobalScales::ScaleParameters::etMax, l1t::GlobalScales::ScaleParameters::etMin, l1t::GlobalScales::ScaleParameters::etStep, l1t::GlobalScales::ScaleParameters::phiBins, l1t::GlobalScales::ScaleParameters::phiMax, l1t::GlobalScales::ScaleParameters::phiMin, and l1t::GlobalScales::ScaleParameters::phiStep.

588 {
589 
590  myCout << " Pt Min = " << std::setw(10) << scale.etMin
591  << " Pt Max = " << std::setw(10) << scale.etMax
592  << " Pt Step = " << std::setw(10) << scale.etStep
593  << " Number = " << std::setw(10) << scale.etBins.size()
594  << "\n Phi Min = " << std::setw(10) << scale.phiMin
595  << " Phi Max = " << std::setw(10) << scale.phiMax
596  << " Phi Step = " << std::setw(10) << scale.phiStep
597  << " Number = " << std::setw(10) << scale.phiBins.size()
598  << "\n Eta Min = " << std::setw(10) << scale.etaMin
599  << " Eta Max = " << std::setw(10) << scale.etaMax
600  << " Eta Step = " << std::setw(10) << scale.etaStep
601  << " Number = " << std::setw(10) << scale.etaBins.size()
602  << std::endl;
603 
604 }
void l1t::GlobalScales::setEGScales ( ScaleParameters scales)
inline

Definition at line 58 of file GlobalScales.h.

References m_egScales.

58 { m_egScales = scales; }
ScaleParameters m_egScales
Definition: GlobalScales.h:118
void l1t::GlobalScales::setETMScales ( ScaleParameters scales)
inline

Definition at line 66 of file GlobalScales.h.

References m_etmScales.

66 { m_etmScales = scales; }
ScaleParameters m_etmScales
Definition: GlobalScales.h:126
void l1t::GlobalScales::setETTScales ( ScaleParameters scales)
inline

Definition at line 64 of file GlobalScales.h.

References m_ettScales.

64 { m_ettScales = scales; }
ScaleParameters m_ettScales
Definition: GlobalScales.h:124
void l1t::GlobalScales::setHTMScales ( ScaleParameters scales)
inline

Definition at line 67 of file GlobalScales.h.

References m_htmScales.

67 { m_htmScales = scales; }
ScaleParameters m_htmScales
Definition: GlobalScales.h:127
void l1t::GlobalScales::setHTTScales ( ScaleParameters scales)
inline

Definition at line 65 of file GlobalScales.h.

References m_httScales.

65 { m_httScales = scales; }
ScaleParameters m_httScales
Definition: GlobalScales.h:125
void l1t::GlobalScales::setJetScales ( ScaleParameters scales)
inline

Definition at line 62 of file GlobalScales.h.

References m_jetScales.

62 { m_jetScales = scales; }
ScaleParameters m_jetScales
Definition: GlobalScales.h:122
void GlobalScales::setLUT_CalMuEta ( std::string  lutName,
std::vector< long long >  lut 
)
virtual

Definition at line 39 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

40 {
41  if (m_lut_CalMuEta.count(lutName) != 0) {
42  LogTrace("GlobalScales") << " LUT \"" << lutName
43  << "\"already exists in the LUT map- not inserted!" << std::endl;
44  return;
45  }
46 
47  // Insert this LUT into the Table
48  m_lut_CalMuEta.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
49 
50  return;
51 
52 }
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:130
void GlobalScales::setLUT_CalMuPhi ( std::string  lutName,
std::vector< long long >  lut 
)
virtual

Definition at line 55 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

56 {
57  if (m_lut_CalMuPhi.count(lutName) != 0) {
58  LogTrace("GlobalScales") << " LUT \"" << lutName
59  << "\"already exists in the LUT map- not inserted!" << std::endl;
60  return;
61  }
62 
63  // Insert this LUT into the Table
64  m_lut_CalMuPhi.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
65 
66  return;
67 
68 }
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:131
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
void GlobalScales::setLUT_Cos ( std::string  lutName,
std::vector< long long >  lut,
unsigned int  precision 
)
virtual

Definition at line 135 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

136 {
137  if (m_lut_Cos.count(lutName) != 0) {
138  LogTrace("GlobalScales") << " LUT \"" << lutName
139  << "\"already exists in the LUT map- not inserted!" << std::endl;
140  return;
141  }
142 
143  // Insert this LUT into the Table
144  m_lut_Cos.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
146 
147  return;
148 
149 }
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:143
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:136
void GlobalScales::setLUT_Cosh ( std::string  lutName,
std::vector< long long >  lut,
unsigned int  precision 
)
virtual

Definition at line 119 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

120 {
121  if (m_lut_Cosh.count(lutName) != 0) {
122  LogTrace("GlobalScales") << " LUT \"" << lutName
123  << "\"already exists in the LUT map- not inserted!" << std::endl;
124  return;
125  }
126 
127  // Insert this LUT into the Table
128  m_lut_Cosh.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
130 
131  return;
132 
133 }
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:142
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:135
void GlobalScales::setLUT_DeltaEta ( std::string  lutName,
std::vector< long long >  lut,
unsigned int  precision 
)
virtual

Definition at line 71 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

72 {
73  if (m_lut_DeltaEta.count(lutName) != 0) {
74  LogTrace("GlobalScales") << " LUT \"" << lutName
75  << "\"already exists in the LUT map- not inserted!" << std::endl;
76  return;
77  }
78 
79  // Insert this LUT into the Table
80  m_lut_DeltaEta.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
82 
83  return;
84 
85 }
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:139
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:132
void GlobalScales::setLUT_DeltaPhi ( std::string  lutName,
std::vector< long long >  lut,
unsigned int  precision 
)
virtual

Definition at line 87 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

88 {
89  if (m_lut_DeltaPhi.count(lutName) != 0) {
90  LogTrace("GlobalScales") << " LUT \"" << lutName
91  << "\"already exists in the LUT map- not inserted!" << std::endl;
92  return;
93  }
94 
95  // Insert this LUT into the Table
96  m_lut_DeltaPhi.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
98 
99  return;
100 
101 }
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:133
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:140
void GlobalScales::setLUT_Pt ( std::string  lutName,
std::vector< long long >  lut,
unsigned int  precision 
)
virtual

Definition at line 103 of file GlobalScales.cc.

References LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

104 {
105  if (m_lut_Pt.count(lutName) != 0) {
106  LogTrace("GlobalScales") << " LUT \"" << lutName
107  << "\"already exists in the LUT map- not inserted!" << std::endl;
108  return;
109  }
110 
111  // Insert this LUT into the Table
112  m_lut_Pt.insert(std::map<std::string, std::vector<long long>>::value_type(lutName,lut));
114 
115  return;
116 
117 }
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:141
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:134
tuple lut
Definition: lumiPlot.py:244
#define LogTrace(id)
void l1t::GlobalScales::setMuonScales ( ScaleParameters scales)
inline

Definition at line 60 of file GlobalScales.h.

References m_muScales.

60 { m_muScales = scales; }
ScaleParameters m_muScales
Definition: GlobalScales.h:120
void l1t::GlobalScales::setScalesName ( std::string  name)
inline
void l1t::GlobalScales::setTauScales ( ScaleParameters scales)
inline

Definition at line 59 of file GlobalScales.h.

References m_tauScales.

59 { m_tauScales = scales; }
ScaleParameters m_tauScales
Definition: GlobalScales.h:119

Member Data Documentation

ScaleParameters l1t::GlobalScales::m_egScales
private

Definition at line 118 of file GlobalScales.h.

Referenced by getEGScales(), and setEGScales().

ScaleParameters l1t::GlobalScales::m_etmScales
private

Definition at line 126 of file GlobalScales.h.

Referenced by getETMScales(), and setETMScales().

ScaleParameters l1t::GlobalScales::m_ettScales
private

Definition at line 124 of file GlobalScales.h.

Referenced by getETTScales(), and setETTScales().

ScaleParameters l1t::GlobalScales::m_htmScales
private

Definition at line 127 of file GlobalScales.h.

Referenced by getHTMScales(), and setHTMScales().

ScaleParameters l1t::GlobalScales::m_httScales
private

Definition at line 125 of file GlobalScales.h.

Referenced by getHTTScales(), and setHTTScales().

ScaleParameters l1t::GlobalScales::m_jetScales
private

Definition at line 122 of file GlobalScales.h.

Referenced by getJETScales(), and setJetScales().

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_CalMuEta
private

Definition at line 130 of file GlobalScales.h.

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_CalMuPhi
private

Definition at line 131 of file GlobalScales.h.

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_Cos
private

Definition at line 136 of file GlobalScales.h.

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_Cosh
private

Definition at line 135 of file GlobalScales.h.

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_DeltaEta
private

Definition at line 132 of file GlobalScales.h.

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_DeltaPhi
private

Definition at line 133 of file GlobalScales.h.

std::map<std::string, std::vector<long long> > l1t::GlobalScales::m_lut_Pt
private

Definition at line 134 of file GlobalScales.h.

ScaleParameters l1t::GlobalScales::m_muScales
private

Definition at line 120 of file GlobalScales.h.

Referenced by getMUScales(), and setMuonScales().

std::map<std::string, unsigned int > l1t::GlobalScales::m_Prec_Cos
private

Definition at line 143 of file GlobalScales.h.

std::map<std::string, unsigned int > l1t::GlobalScales::m_Prec_Cosh
private

Definition at line 142 of file GlobalScales.h.

std::map<std::string, unsigned int > l1t::GlobalScales::m_Prec_DeltaEta
private

Definition at line 139 of file GlobalScales.h.

std::map<std::string, unsigned int > l1t::GlobalScales::m_Prec_DeltaPhi
private

Definition at line 140 of file GlobalScales.h.

std::map<std::string, unsigned int > l1t::GlobalScales::m_Prec_Pt
private

Definition at line 141 of file GlobalScales.h.

std::string l1t::GlobalScales::m_ScaleSetName
private

Definition at line 116 of file GlobalScales.h.

Referenced by setScalesName().

ScaleParameters l1t::GlobalScales::m_tauScales
private

Definition at line 119 of file GlobalScales.h.

Referenced by getTAUScales(), and setTauScales().