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  // Added displaced muons
42  double uptMin;
43  double uptMax;
44  double uptStep;
45  std::vector<std::pair<double, double>> uptBins;
46 
47  double phiMin;
48  double phiMax;
49  double phiStep;
50  std::vector<std::pair<double, double>> phiBins;
51 
52  double etaMin;
53  double etaMax;
54  double etaStep;
55  std::vector<std::pair<double, double>> etaBins;
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_Upt(const std::string& lutName,
77  std::vector<long long> lut,
78  unsigned int precision); // Added for displaced muons
79  virtual void setLUT_Cosh(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
80  virtual void setLUT_Cos(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
81  virtual void setLUT_Sin(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
82 
83  inline void setScalesName(const std::string& name) { m_ScaleSetName = name; }
84  virtual std::string getScalesName() const;
85 
86  inline const ScaleParameters& getMUScales() const { return m_muScales; }
87  inline const ScaleParameters& getEGScales() const { return m_egScales; }
88  inline const ScaleParameters& getTAUScales() const { return m_tauScales; }
89  inline const ScaleParameters& getJETScales() const { return m_jetScales; }
90  inline const ScaleParameters& getETTScales() const { return m_ettScales; }
91  inline const ScaleParameters& getETTEmScales() const { return m_ettEmScales; }
92  inline const ScaleParameters& getETMScales() const { return m_etmScales; }
93  inline const ScaleParameters& getETMHFScales() const { return m_etmHfScales; }
94  inline const ScaleParameters& getHTTScales() const { return m_httScales; }
95  inline const ScaleParameters& getHTMScales() const { return m_htmScales; }
96 
97  long long getLUT_CalMuEta(const std::string& lutName, int element) const;
98  long long getLUT_CalMuPhi(const std::string& lutName, int element) const;
99  long long getLUT_DeltaEta(std::string lutName, int element) const;
100  long long getLUT_DeltaPhi(std::string lutName, int element) const;
101  long long getLUT_Pt(const std::string& lutName, int element) const;
102  long long getLUT_Upt(const std::string& lutName, int element) const; // Added for displaced muons
103  long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const;
104  long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const;
105  long long getLUT_Cos(const std::string& lutName, int element) const;
106  long long getLUT_Sin(const std::string& lutName, int element) const;
107 
108  unsigned int getPrec_DeltaEta(const std::string& lutName) const;
109  unsigned int getPrec_DeltaPhi(const std::string& lutName) const;
110  unsigned int getPrec_Pt(const std::string& lutName) const;
111  unsigned int getPrec_Upt(const std::string& lutName) const; // Added for displaced muons
112  unsigned int getPrec_DeltaEta_Cosh(const std::string& lutName) const;
113  unsigned int getPrec_DeltaPhi_Cos(const std::string& lutName) const;
114  unsigned int getPrec_Cos(const std::string& lutName) const;
115  unsigned int getPrec_Sin(const std::string& lutName) const;
116 
117  virtual void dumpAllLUTs(std::ostream& myCout) const;
118  virtual void dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const;
119  virtual void print(std::ostream& myCout) const;
120  virtual void printScale(ScaleParameters scale, std::ostream& myCout) const;
121 
122  private:
123  private:
125 
129 
131 
138 
139  //LUTs
140  std::map<std::string, std::vector<long long>> m_lut_CalMuEta;
141  std::map<std::string, std::vector<long long>> m_lut_CalMuPhi;
142  std::map<std::string, std::vector<long long>> m_lut_DeltaEta;
143  std::map<std::string, std::vector<long long>> m_lut_DeltaPhi;
144  std::map<std::string, std::vector<long long>> m_lut_Pt;
145  std::map<std::string, std::vector<long long>> m_lut_Upt; // Added for displaced muons
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_Upt; // Added for displaced muons
155  std::map<std::string, unsigned int> m_Prec_Cosh;
156  std::map<std::string, unsigned int> m_Prec_Cos;
157  std::map<std::string, unsigned int> m_Prec_Sin;
158  };
159 
160 } // namespace l1t
161 #endif
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:67
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
std::map< std::string, unsigned int > m_Prec_Upt
Definition: GlobalScales.h:154
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
ScaleParameters m_ettScales
Definition: GlobalScales.h:132
const ScaleParameters & getEGScales() const
Definition: GlobalScales.h:87
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:143
std::map< std::string, std::vector< long long > > m_lut_Upt
Definition: GlobalScales.h:145
long long getLUT_DeltaPhi(std::string lutName, int element) const
unsigned int getPrec_Sin(const std::string &lutName) const
ScaleParameters m_tauScales
Definition: GlobalScales.h:127
ScaleParameters m_jetScales
Definition: GlobalScales.h:130
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
const ScaleParameters & getTAUScales() const
Definition: GlobalScales.h:88
virtual ~GlobalScales()
Definition: GlobalScales.cc:25
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:141
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
virtual void printScale(ScaleParameters scale, std::ostream &myCout) const
std::string m_ScaleSetName
Definition: GlobalScales.h:124
unsigned int getPrec_DeltaPhi_Cos(const std::string &lutName) const
long long getLUT_Upt(const std::string &lutName, int element) const
virtual std::string getScalesName() const
Definition: GlobalScales.cc:27
const ScaleParameters & getMUScales() const
Definition: GlobalScales.h:86
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:83
virtual void setLUT_Upt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
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
ScaleParameters m_etmScales
Definition: GlobalScales.h:135
long long getLUT_Cos(const std::string &lutName, int element) const
const ScaleParameters & getETTEmScales() const
Definition: GlobalScales.h:91
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:126
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:50
ScaleParameters m_ettEmScales
Definition: GlobalScales.h:133
unsigned int getPrec_Pt(const std::string &lutName) const
long long getLUT_Pt(const std::string &lutName, int element) const
ScaleParameters m_htmScales
Definition: GlobalScales.h:137
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
ScaleParameters m_etmHfScales
Definition: GlobalScales.h:136
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
const ScaleParameters & getJETScales() const
Definition: GlobalScales.h:89
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
unsigned int getPrec_Cos(const std::string &lutName) const
const ScaleParameters & getETMHFScales() const
Definition: GlobalScales.h:93
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:144
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:65
virtual void dumpLUT(std::ostream &myCout, int LUTtype, std::string name) 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:156
long long getLUT_CalMuEta(const std::string &lutName, int element) const
ScaleParameters m_httScales
Definition: GlobalScales.h:134
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:151
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:60
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:66
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:152
unsigned int getPrec_DeltaEta(const std::string &lutName) const
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:153
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:142
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:155
long long getLUT_DeltaEta(std::string lutName, int element) const
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:140
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
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:69
std::vector< std::pair< double, double > > etBins
Definition: GlobalScales.h:39
unsigned int getPrec_Upt(const std::string &lutName) const
typedef for a single object template
Definition: GlobalScales.h:35
const ScaleParameters & getETTScales() const
Definition: GlobalScales.h:90
const ScaleParameters & getHTTScales() const
Definition: GlobalScales.h:94
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
long long getLUT_Sin(const std::string &lutName, int element) const
std::vector< std::pair< double, double > > uptBins
Definition: GlobalScales.h:45
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 print(std::ostream &myCout) const
std::map< std::string, unsigned int > m_Prec_Sin
Definition: GlobalScales.h:157
const ScaleParameters & getHTMScales() const
Definition: GlobalScales.h:95
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
const ScaleParameters & getETMScales() const
Definition: GlobalScales.h:92
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:147
virtual void dumpAllLUTs(std::ostream &myCout) const
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:55
ScaleParameters m_muScales
Definition: GlobalScales.h:128