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 
26 {
27 
28 public:
29 
30  // constructors
31  GlobalScales();
32 
33  // destructor
34  virtual ~GlobalScales();
35 
36 public:
37 
40  {
41  double etMin;
42  double etMax;
43  double etStep;
44  std::vector<std::pair<double,double>> etBins;
45 
46  double phiMin;
47  double phiMax;
48  double phiStep;
49  std::vector<std::pair<double,double>> phiBins;
50 
51  double etaMin;
52  double etaMax;
53  double etaStep;
54  std::vector<std::pair<double,double>> etaBins;
55 
56  };
57 
58  inline void setEGScales(ScaleParameters& scales) { m_egScales = scales; }
59  inline void setTauScales(ScaleParameters& scales) { m_tauScales = scales; }
60  inline void setMuonScales(ScaleParameters& scales) { m_muScales = scales; }
61 
62  inline void setJetScales(ScaleParameters& scales) { m_jetScales = scales; }
63 
64  inline void setETTScales(ScaleParameters& scales) { m_ettScales = scales; }
65  inline void setETTEmScales(ScaleParameters& scales) { m_ettEmScales = scales; }
66  inline void setHTTScales(ScaleParameters& scales) { m_httScales = scales; }
67  inline void setETMScales(ScaleParameters& scales) { m_etmScales = scales; }
68  inline void setETMHfScales(ScaleParameters& scales) { m_etmHfScales = scales; }
69  inline void setHTMScales(ScaleParameters& scales) { m_htmScales = scales; }
70 
71  virtual void setLUT_CalMuEta(const std::string & lutName, std::vector<long long> lut);
72  virtual void setLUT_CalMuPhi(const std::string & lutName, std::vector<long long> lut);
73  virtual void setLUT_DeltaEta(const std::string & lutName, std::vector<long long> lut, unsigned int precision);
74  virtual void setLUT_DeltaPhi(const std::string & lutName, std::vector<long long> lut, unsigned int precision);
75  virtual void setLUT_Pt(const std::string & lutName, std::vector<long long> lut, unsigned int precision);
76  virtual void setLUT_Cosh(const std::string & lutName, std::vector<long long> lut, unsigned int precision);
77  virtual void setLUT_Cos(const std::string & lutName, std::vector<long long> lut, unsigned int precision);
78  virtual void setLUT_Sin(const std::string & lutName, std::vector<long long> lut, unsigned int precision);
79 
80  inline void setScalesName(const std::string & name) { m_ScaleSetName = name; }
81  virtual std::string getScalesName() const;
82 
83  inline ScaleParameters getMUScales() const { return m_muScales; }
84  inline ScaleParameters getEGScales() const { return m_egScales; }
85  inline ScaleParameters getTAUScales() const { return m_tauScales; }
86  inline ScaleParameters getJETScales() const { return m_jetScales; }
87  inline ScaleParameters getETTScales() const { return m_ettScales; }
88  inline ScaleParameters getETTEmScales() const { return m_ettEmScales; }
89  inline ScaleParameters getETMScales() const { return m_etmScales; }
90  inline ScaleParameters getETMHFScales() const { return m_etmHfScales; }
91  inline ScaleParameters getHTTScales() const { return m_httScales; }
92  inline ScaleParameters getHTMScales() const { return m_htmScales; }
93 
94 
95  long long getLUT_CalMuEta(const std::string & lutName, int element) const;
96  long long getLUT_CalMuPhi(const std::string & lutName, int element) const;
97  long long getLUT_DeltaEta(std::string lutName, int element) const;
98  long long getLUT_DeltaPhi(std::string lutName, int element) const;
99  long long getLUT_Pt(const std::string & lutName, int element) const;
100  long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const;
101  long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const;
102  long long getLUT_Cos(const std::string & lutName, int element) const;
103  long long getLUT_Sin(const std::string & lutName, int element) const;
104 
105  unsigned int getPrec_DeltaEta(const std::string & lutName) const;
106  unsigned int getPrec_DeltaPhi(const std::string & lutName) const;
107  unsigned int getPrec_Pt(const std::string & lutName) const;
108  unsigned int getPrec_DeltaEta_Cosh(const std::string & lutName) const;
109  unsigned int getPrec_DeltaPhi_Cos(const std::string & lutName) const;
110  unsigned int getPrec_Cos(const std::string & lutName) const;
111  unsigned int getPrec_Sin(const std::string & lutName) const;
112 
113 
114  virtual void dumpAllLUTs(std::ostream& myCout) const;
115  virtual void dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const;
116  virtual void print(std::ostream& myCout) const;
117  virtual void printScale(ScaleParameters scale, std::ostream& myCout) const;
118 
119 private:
120 
121 
122 private:
123 
124 
126 
130 
132 
139 
140  //LUTs
141  std::map<std::string, std::vector<long long> > m_lut_CalMuEta;
142  std::map<std::string, std::vector<long long> > m_lut_CalMuPhi;
143  std::map<std::string, std::vector<long long> > m_lut_DeltaEta;
144  std::map<std::string, std::vector<long long> > m_lut_DeltaPhi;
145  std::map<std::string, std::vector<long long> > m_lut_Pt;
146  std::map<std::string, std::vector<long long> > m_lut_Cosh;
147  std::map<std::string, std::vector<long long> > m_lut_Cos;
148  std::map<std::string, std::vector<long long> > m_lut_Sin;
149 
150  //LUTs Precision
151  std::map<std::string, unsigned int > m_Prec_DeltaEta;
152  std::map<std::string, unsigned int > m_Prec_DeltaPhi;
153  std::map<std::string, unsigned int > m_Prec_Pt;
154  std::map<std::string, unsigned int > m_Prec_Cosh;
155  std::map<std::string, unsigned int > m_Prec_Cos;
156  std::map<std::string, unsigned int > m_Prec_Sin;
157 
158 };
159 
160 }
161 #endif
ScaleParameters getMUScales() const
Definition: GlobalScales.h:83
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:153
unsigned int getPrec_Cos(const std::string &lutName) const
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:67
unsigned int getPrec_Pt(const std::string &lutName) const
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
ScaleParameters m_ettScales
Definition: GlobalScales.h:133
long long getLUT_Sin(const std::string &lutName, int element) const
ScaleParameters getETMScales() const
Definition: GlobalScales.h:89
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:144
ScaleParameters m_tauScales
Definition: GlobalScales.h:128
ScaleParameters m_jetScales
Definition: GlobalScales.h:131
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:154
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:54
virtual ~GlobalScales()
Definition: GlobalScales.cc:32
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:142
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:49
std::string m_ScaleSetName
Definition: GlobalScales.h:125
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
virtual void setLUT_CalMuPhi(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:55
void setScalesName(const std::string &name)
Definition: GlobalScales.h:80
ScaleParameters getJETScales() const
Definition: GlobalScales.h:86
ScaleParameters getEGScales() const
Definition: GlobalScales.h:84
ScaleParameters getHTMScales() const
Definition: GlobalScales.h:92
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:71
long long getLUT_DeltaEta(std::string lutName, int element) const
unsigned int getPrec_Sin(const std::string &lutName) const
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:155
ScaleParameters m_etmScales
Definition: GlobalScales.h:136
std::map< std::string, std::vector< long long > > m_lut_Sin
Definition: GlobalScales.h:148
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:68
ScaleParameters m_egScales
Definition: GlobalScales.h:127
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:151
virtual void dumpAllLUTs(std::ostream &myCout) const
ScaleParameters m_ettEmScales
Definition: GlobalScales.h:134
ScaleParameters getTAUScales() const
Definition: GlobalScales.h:85
ScaleParameters m_htmScales
Definition: GlobalScales.h:138
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:137
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
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:145
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:65
ScaleParameters getETTScales() const
Definition: GlobalScales.h:87
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)
ScaleParameters m_httScales
Definition: GlobalScales.h:135
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_DeltaPhi
Definition: GlobalScales.h:152
std::vector< std::pair< double, double > > etBins
Definition: GlobalScales.h:44
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:87
ScaleParameters getHTTScales() const
Definition: GlobalScales.h:91
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
long long getLUT_DeltaPhi(std::string lutName, int element) const
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:66
ScaleParameters getETTEmScales() const
Definition: GlobalScales.h:88
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:143
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:141
virtual void setLUT_Pt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:69
typedef for a single object template
Definition: GlobalScales.h:39
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
std::map< std::string, unsigned int > m_Prec_Sin
Definition: GlobalScales.h:156
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:146
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:64
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:39
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:147
virtual std::string getScalesName() const
Definition: GlobalScales.cc:36
ScaleParameters getETMHFScales() const
Definition: GlobalScales.h:90
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
ScaleParameters m_muScales
Definition: GlobalScales.h:129