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
const ScaleParameters & getETMScales() const
Definition: GlobalScales.h:83
unsigned int getPrec_Cos(const std::string &lutName) const
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:61
unsigned int getPrec_Pt(const std::string &lutName) const
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:56
ScaleParameters m_ettScales
Definition: GlobalScales.h:121
long long getLUT_Sin(const std::string &lutName, int element) const
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:132
ScaleParameters m_tauScales
Definition: GlobalScales.h:116
ScaleParameters m_jetScales
Definition: GlobalScales.h:119
virtual ~GlobalScales()
Definition: GlobalScales.cc:25
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:130
std::string m_ScaleSetName
Definition: GlobalScales.h:113
const ScaleParameters & getJETScales() const
Definition: GlobalScales.h:80
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
const ScaleParameters & getETMHFScales() const
Definition: GlobalScales.h:84
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:42
void setScalesName(const std::string &name)
Definition: GlobalScales.h:74
const ScaleParameters & getEGScales() const
Definition: GlobalScales.h:78
delete x;
Definition: CaloConfig.h:22
virtual void setLUT_DeltaEta(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:55
long long getLUT_DeltaEta(std::string lutName, int element) const
unsigned int getPrec_Sin(const std::string &lutName) const
ScaleParameters m_etmScales
Definition: GlobalScales.h:124
std::map< std::string, std::vector< long long > > m_lut_Sin
Definition: GlobalScales.h:136
const ScaleParameters & getHTTScales() const
Definition: GlobalScales.h:85
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
ScaleParameters m_egScales
Definition: GlobalScales.h:115
virtual void dumpAllLUTs(std::ostream &myCout) const
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:44
ScaleParameters m_ettEmScales
Definition: GlobalScales.h:122
ScaleParameters m_htmScales
Definition: GlobalScales.h:126
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
long long getLUT_Cos(const std::string &lutName, int element) const
ScaleParameters m_etmHfScales
Definition: GlobalScales.h:125
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:52
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:53
long long getLUT_Pt(const std::string &lutName, int element) const
unsigned int getPrec_DeltaEta(const std::string &lutName) const
virtual void print(std::ostream &myCout) const
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:133
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
const ScaleParameters & getTAUScales() const
Definition: GlobalScales.h:79
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:143
ScaleParameters m_httScales
Definition: GlobalScales.h:123
long long getLUT_CalMuEta(const std::string &lutName, int element) const
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) const
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:139
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
virtual void setLUT_DeltaPhi(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:71
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:54
long long getLUT_DeltaPhi(std::string lutName, int element) const
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:140
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:141
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:131
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:142
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:129
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:87
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:63
std::vector< std::pair< double, double > > etBins
Definition: GlobalScales.h:39
typedef for a single object template
Definition: GlobalScales.h:35
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:134
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
const ScaleParameters & getETTEmScales() const
Definition: GlobalScales.h:82
const ScaleParameters & getMUScales() const
Definition: GlobalScales.h:77
const ScaleParameters & getETTScales() const
Definition: GlobalScales.h:81
std::map< std::string, unsigned int > m_Prec_Sin
Definition: GlobalScales.h:144
const ScaleParameters & getHTMScales() const
Definition: GlobalScales.h:86
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
unsigned int getPrec_DeltaPhi_Cos(const std::string &lutName) const
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:135
virtual std::string getScalesName() const
Definition: GlobalScales.cc:27
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:49
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
ScaleParameters m_muScales
Definition: GlobalScales.h:117