CMS 3D CMS Logo

GlobalScales.h
Go to the documentation of this file.
1 #ifndef L1TGlobalScales_h
2 #define L1TGlobalScales_h
3 
15 // system include files
16 #include <vector>
17 #include <string>
18 #include <map>
19 #include <iosfwd>
20 
21 // class declaration
22 
23 namespace l1t {
24 
25  class GlobalScales {
26  public:
27  // constructors
28  GlobalScales();
29 
30  // destructor
31  virtual ~GlobalScales();
32 
33  public:
35  struct ScaleParameters {
36  double etMin;
37  double etMax;
38  double etStep;
39  std::vector<std::pair<double, double>> etBins;
40 
41  double phiMin;
42  double phiMax;
43  double phiStep;
44  std::vector<std::pair<double, double>> phiBins;
45 
46  double etaMin;
47  double etaMax;
48  double etaStep;
49  std::vector<std::pair<double, double>> etaBins;
50  };
51 
52  inline void setEGScales(ScaleParameters& scales) { m_egScales = scales; }
53  inline void setTauScales(ScaleParameters& scales) { m_tauScales = scales; }
54  inline void setMuonScales(ScaleParameters& scales) { m_muScales = scales; }
55 
56  inline void setJetScales(ScaleParameters& scales) { m_jetScales = scales; }
57 
58  inline void setETTScales(ScaleParameters& scales) { m_ettScales = scales; }
59  inline void setETTEmScales(ScaleParameters& scales) { m_ettEmScales = scales; }
60  inline void setHTTScales(ScaleParameters& scales) { m_httScales = scales; }
61  inline void setETMScales(ScaleParameters& scales) { m_etmScales = scales; }
62  inline void setETMHfScales(ScaleParameters& scales) { m_etmHfScales = scales; }
63  inline void setHTMScales(ScaleParameters& scales) { m_htmScales = scales; }
64 
65  virtual void setLUT_CalMuEta(const std::string& lutName, std::vector<long long> lut);
66  virtual void setLUT_CalMuPhi(const std::string& lutName, std::vector<long long> lut);
67  virtual void setLUT_DeltaEta(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
68  virtual void setLUT_DeltaPhi(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
69  virtual void setLUT_Pt(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
70  virtual void setLUT_Cosh(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
71  virtual void setLUT_Cos(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
72  virtual void setLUT_Sin(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
73 
74  inline void setScalesName(const std::string& name) { m_ScaleSetName = name; }
75  virtual std::string getScalesName() const;
76 
77  inline const ScaleParameters& getMUScales() const { return m_muScales; }
78  inline const ScaleParameters& getEGScales() const { return m_egScales; }
79  inline const ScaleParameters& getTAUScales() const { return m_tauScales; }
80  inline const ScaleParameters& getJETScales() const { return m_jetScales; }
81  inline const ScaleParameters& getETTScales() const { return m_ettScales; }
82  inline const ScaleParameters& getETTEmScales() const { return m_ettEmScales; }
83  inline const ScaleParameters& getETMScales() const { return m_etmScales; }
84  inline const ScaleParameters& getETMHFScales() const { return m_etmHfScales; }
85  inline const ScaleParameters& getHTTScales() const { return m_httScales; }
86  inline const ScaleParameters& getHTMScales() const { return m_htmScales; }
87 
88  long long getLUT_CalMuEta(const std::string& lutName, int element) const;
89  long long getLUT_CalMuPhi(const std::string& lutName, int element) const;
90  long long getLUT_DeltaEta(std::string lutName, int element) const;
91  long long getLUT_DeltaPhi(std::string lutName, int element) const;
92  long long getLUT_Pt(const std::string& lutName, int element) const;
93  long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const;
94  long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const;
95  long long getLUT_Cos(const std::string& lutName, int element) const;
96  long long getLUT_Sin(const std::string& lutName, int element) const;
97 
98  unsigned int getPrec_DeltaEta(const std::string& lutName) const;
99  unsigned int getPrec_DeltaPhi(const std::string& lutName) const;
100  unsigned int getPrec_Pt(const std::string& lutName) const;
101  unsigned int getPrec_DeltaEta_Cosh(const std::string& lutName) const;
102  unsigned int getPrec_DeltaPhi_Cos(const std::string& lutName) const;
103  unsigned int getPrec_Cos(const std::string& lutName) const;
104  unsigned int getPrec_Sin(const std::string& lutName) const;
105 
106  virtual void dumpAllLUTs(std::ostream& myCout) const;
107  virtual void dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const;
108  virtual void print(std::ostream& myCout) const;
109  virtual void printScale(ScaleParameters scale, std::ostream& myCout) const;
110 
111  private:
112  private:
114 
118 
120 
127 
128  //LUTs
129  std::map<std::string, std::vector<long long>> m_lut_CalMuEta;
130  std::map<std::string, std::vector<long long>> m_lut_CalMuPhi;
131  std::map<std::string, std::vector<long long>> m_lut_DeltaEta;
132  std::map<std::string, std::vector<long long>> m_lut_DeltaPhi;
133  std::map<std::string, std::vector<long long>> m_lut_Pt;
134  std::map<std::string, std::vector<long long>> m_lut_Cosh;
135  std::map<std::string, std::vector<long long>> m_lut_Cos;
136  std::map<std::string, std::vector<long long>> m_lut_Sin;
137 
138  //LUTs Precision
139  std::map<std::string, unsigned int> m_Prec_DeltaEta;
140  std::map<std::string, unsigned int> m_Prec_DeltaPhi;
141  std::map<std::string, unsigned int> m_Prec_Pt;
142  std::map<std::string, unsigned int> m_Prec_Cosh;
143  std::map<std::string, unsigned int> m_Prec_Cos;
144  std::map<std::string, unsigned int> m_Prec_Sin;
145  };
146 
147 } // namespace l1t
148 #endif
l1t::GlobalScales::ScaleParameters::etaStep
double etaStep
Definition: GlobalScales.h:48
l1t::GlobalScales::getETTScales
const ScaleParameters & getETTScales() const
Definition: GlobalScales.h:81
l1t::GlobalScales::getTAUScales
const ScaleParameters & getTAUScales() const
Definition: GlobalScales.h:79
l1t::GlobalScales::getPrec_Pt
unsigned int getPrec_Pt(const std::string &lutName) const
Definition: GlobalScales.cc:295
l1t::GlobalScales::m_ettScales
ScaleParameters m_ettScales
Definition: GlobalScales.h:121
l1t::GlobalScales::getETTEmScales
const ScaleParameters & getETTEmScales() const
Definition: GlobalScales.h:82
l1t::GlobalScales::getEGScales
const ScaleParameters & getEGScales() const
Definition: GlobalScales.h:78
l1t::GlobalScales::getETMScales
const ScaleParameters & getETMScales() const
Definition: GlobalScales.h:83
l1t::GlobalScales::ScaleParameters::etStep
double etStep
Definition: GlobalScales.h:38
l1t::GlobalScales::setMuonScales
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:54
l1t::GlobalScales::ScaleParameters::phiMax
double phiMax
Definition: GlobalScales.h:42
HLT_FULL_cff.scale
scale
Definition: HLT_FULL_cff.py:6637
l1t::GlobalScales::getLUT_Cos
long long getLUT_Cos(const std::string &lutName, int element) const
Definition: GlobalScales.cc:393
l1t::GlobalScales::ScaleParameters::etMin
double etMin
Definition: GlobalScales.h:36
l1t::GlobalScales::getJETScales
const ScaleParameters & getJETScales() const
Definition: GlobalScales.h:80
l1t::GlobalScales::ScaleParameters::etaMin
double etaMin
Definition: GlobalScales.h:46
l1t::GlobalScales::setLUT_Cos
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:115
l1t::GlobalScales::setLUT_CalMuPhi
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:42
l1t::GlobalScales::getPrec_DeltaEta_Cosh
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
Definition: GlobalScales.cc:338
l1t::GlobalScales::getLUT_Sin
long long getLUT_Sin(const std::string &lutName, int element) const
Definition: GlobalScales.cc:414
l1t::GlobalScales::print
virtual void print(std::ostream &myCout) const
Definition: GlobalScales.cc:587
l1t::GlobalScales::ScaleParameters::phiMin
double phiMin
Definition: GlobalScales.h:41
l1t::GlobalScales::setHTTScales
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
l1t::GlobalScales::getLUT_CalMuPhi
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
Definition: GlobalScales.cc:158
l1t::GlobalScales::m_Prec_Sin
std::map< std::string, unsigned int > m_Prec_Sin
Definition: GlobalScales.h:144
l1t::GlobalScales::getLUT_Pt
long long getLUT_Pt(const std::string &lutName, int element) const
Definition: GlobalScales.cc:281
l1t::GlobalScales::setLUT_Cosh
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:101
l1t::GlobalScales::setHTMScales
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:63
l1t::GlobalScales::m_Prec_DeltaEta
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:139
l1t::GlobalScales::setETTEmScales
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
l1t::GlobalScales::getLUT_DeltaEta
long long getLUT_DeltaEta(std::string lutName, int element) const
Definition: GlobalScales.cc:173
l1t::GlobalScales::setTauScales
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:53
l1t::GlobalScales::m_lut_CalMuPhi
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:130
l1t::GlobalScales::m_Prec_Cosh
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:142
l1t::GlobalScales::ScaleParameters::etaMax
double etaMax
Definition: GlobalScales.h:47
l1t::GlobalScales::~GlobalScales
virtual ~GlobalScales()
Definition: GlobalScales.cc:25
l1t::GlobalScales::dumpLUT
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) const
Definition: GlobalScales.cc:525
l1t::GlobalScales::m_ScaleSetName
std::string m_ScaleSetName
Definition: GlobalScales.h:113
l1t::GlobalScales::m_ettEmScales
ScaleParameters m_ettEmScales
Definition: GlobalScales.h:122
l1t::GlobalScales::getETMHFScales
const ScaleParameters & getETMHFScales() const
Definition: GlobalScales.h:84
l1t::GlobalScales::getPrec_Cos
unsigned int getPrec_Cos(const std::string &lutName) const
Definition: GlobalScales.cc:457
l1t::GlobalScales::setETMScales
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:61
l1t::GlobalScales
Definition: GlobalScales.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t::GlobalScales::m_muScales
ScaleParameters m_muScales
Definition: GlobalScales.h:117
common_cff.precision
precision
Definition: common_cff.py:44
l1t::GlobalScales::getScalesName
virtual std::string getScalesName() const
Definition: GlobalScales.cc:27
l1t::GlobalScales::getPrec_DeltaPhi_Cos
unsigned int getPrec_DeltaPhi_Cos(const std::string &lutName) const
Definition: GlobalScales.cc:435
l1t::GlobalScales::m_tauScales
ScaleParameters m_tauScales
Definition: GlobalScales.h:116
l1t::GlobalScales::ScaleParameters::etaBins
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:49
l1t::GlobalScales::dumpAllLUTs
virtual void dumpAllLUTs(std::ostream &myCout) const
Definition: GlobalScales.cc:479
l1t
delete x;
Definition: CaloConfig.h:22
l1t::GlobalScales::m_Prec_Cos
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:143
l1t::GlobalScales::setLUT_DeltaPhi
virtual void setLUT_DeltaPhi(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
l1t::GlobalScales::printScale
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
Definition: GlobalScales.cc:676
l1t::GlobalScales::setETTScales
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
l1t::GlobalScales::ScaleParameters
typedef for a single object template
Definition: GlobalScales.h:35
l1t::GlobalScales::m_egScales
ScaleParameters m_egScales
Definition: GlobalScales.h:115
l1t::GlobalScales::getPrec_DeltaEta
unsigned int getPrec_DeltaEta(const std::string &lutName) const
Definition: GlobalScales.cc:205
l1t::GlobalScales::m_Prec_Pt
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:141
l1t::GlobalScales::m_httScales
ScaleParameters m_httScales
Definition: GlobalScales.h:123
l1t::GlobalScales::setLUT_Pt
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:87
l1t::GlobalScales::ScaleParameters::phiStep
double phiStep
Definition: GlobalScales.h:43
l1t::GlobalScales::m_etmHfScales
ScaleParameters m_etmHfScales
Definition: GlobalScales.h:125
l1t::GlobalScales::m_lut_DeltaPhi
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:132
l1t::GlobalScales::setEGScales
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:52
l1t::GlobalScales::getLUT_DeltaPhi_Cos
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
Definition: GlobalScales.cc:360
l1t::GlobalScales::setLUT_Sin
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:129
l1t::GlobalScales::m_lut_Cos
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:135
l1t::GlobalScales::getLUT_CalMuEta
long long getLUT_CalMuEta(const std::string &lutName, int element) const
Definition: GlobalScales.cc:143
l1t::GlobalScales::ScaleParameters::etBins
std::vector< std::pair< double, double > > etBins
Definition: GlobalScales.h:39
l1t::GlobalScales::getPrec_DeltaPhi
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
Definition: GlobalScales.cc:259
l1t::GlobalScales::m_Prec_DeltaPhi
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:140
l1t::GlobalScales::setLUT_CalMuEta
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
l1t::GlobalScales::getLUT_DeltaEta_Cosh
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
Definition: GlobalScales.cc:306
l1t::GlobalScales::getLUT_DeltaPhi
long long getLUT_DeltaPhi(std::string lutName, int element) const
Definition: GlobalScales.cc:227
l1t::GlobalScales::setJetScales
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:56
l1t::GlobalScales::m_jetScales
ScaleParameters m_jetScales
Definition: GlobalScales.h:119
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
l1t::GlobalScales::m_etmScales
ScaleParameters m_etmScales
Definition: GlobalScales.h:124
l1t::GlobalScales::ScaleParameters::phiBins
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:44
l1t::GlobalScales::m_lut_Cosh
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:134
l1t::GlobalScales::GlobalScales
GlobalScales()
Definition: GlobalScales.cc:22
l1t::GlobalScales::setETMHfScales
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
l1t::GlobalScales::m_lut_Pt
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:133
l1t::GlobalScales::setLUT_DeltaEta
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:55
l1t::GlobalScales::m_lut_DeltaEta
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:131
l1t::GlobalScales::m_lut_CalMuEta
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:129
l1t::GlobalScales::ScaleParameters::etMax
double etMax
Definition: GlobalScales.h:37
l1t::GlobalScales::getHTTScales
const ScaleParameters & getHTTScales() const
Definition: GlobalScales.h:85
l1t::GlobalScales::getHTMScales
const ScaleParameters & getHTMScales() const
Definition: GlobalScales.h:86
l1t::GlobalScales::m_lut_Sin
std::map< std::string, std::vector< long long > > m_lut_Sin
Definition: GlobalScales.h:136
l1t::GlobalScales::m_htmScales
ScaleParameters m_htmScales
Definition: GlobalScales.h:126
l1t::GlobalScales::getMUScales
const ScaleParameters & getMUScales() const
Definition: GlobalScales.h:77
l1t::GlobalScales::getPrec_Sin
unsigned int getPrec_Sin(const std::string &lutName) const
Definition: GlobalScales.cc:468
l1t::GlobalScales::setScalesName
void setScalesName(const std::string &name)
Definition: GlobalScales.h:74