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 
61 
63 
71 
72  virtual void setLUT_CalMuEta(const std::string& lutName, std::vector<long long> lut);
73  virtual void setLUT_CalMuPhi(const std::string& lutName, std::vector<long long> lut);
74  virtual void setLUT_DeltaEta(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
75  virtual void setLUT_DeltaPhi(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
76  virtual void setLUT_Pt(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
77  virtual void setLUT_Upt(const std::string& lutName,
78  std::vector<long long> lut,
79  unsigned int precision); // Added for displaced muons
80  virtual void setLUT_Cosh(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
81  virtual void setLUT_Cos(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
82  virtual void setLUT_Sin(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
83 
84  inline void setScalesName(const std::string& name) { m_ScaleSetName = name; }
85  virtual std::string getScalesName() const;
86 
87  inline const ScaleParameters& getMUScales() const { return m_muScales; }
88  inline const ScaleParameters& getEGScales() const { return m_egScales; }
89  inline const ScaleParameters& getTAUScales() const { return m_tauScales; }
90  inline const ScaleParameters& getJETScales() const { return m_jetScales; }
91  inline const ScaleParameters& getETTScales() const { return m_ettScales; }
92  inline const ScaleParameters& getETTEmScales() const { return m_ettEmScales; }
93  inline const ScaleParameters& getETMScales() const { return m_etmScales; }
94  inline const ScaleParameters& getETMHFScales() const { return m_etmHfScales; }
95  inline const ScaleParameters& getHTMHFScales() const { return m_htmHfScales; }
96  inline const ScaleParameters& getHTTScales() const { return m_httScales; }
97  inline const ScaleParameters& getHTMScales() const { return m_htmScales; }
98 
99  long long getLUT_CalMuEta(const std::string& lutName, int element) const;
100  long long getLUT_CalMuPhi(const std::string& lutName, int element) const;
101  long long getLUT_DeltaEta(std::string lutName, int element) const;
102  long long getLUT_DeltaPhi(std::string lutName, int element) const;
103  long long getLUT_Pt(const std::string& lutName, int element) const;
104  long long getLUT_Upt(const std::string& lutName, int element) const; // Added for displaced muons
105  long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const;
106  long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const;
107  long long getLUT_Cos(const std::string& lutName, int element) const;
108  long long getLUT_Sin(const std::string& lutName, int element) const;
109 
110  unsigned int getPrec_DeltaEta(const std::string& lutName) const;
111  unsigned int getPrec_DeltaPhi(const std::string& lutName) const;
112  unsigned int getPrec_Pt(const std::string& lutName) const;
113  unsigned int getPrec_Upt(const std::string& lutName) const; // Added for displaced muons
114  unsigned int getPrec_DeltaEta_Cosh(const std::string& lutName) const;
115  unsigned int getPrec_DeltaPhi_Cos(const std::string& lutName) const;
116  unsigned int getPrec_Cos(const std::string& lutName) const;
117  unsigned int getPrec_Sin(const std::string& lutName) const;
118 
119  virtual void dumpAllLUTs(std::ostream& myCout) const;
120  virtual void dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const;
121  virtual void print(std::ostream& myCout) const;
122  virtual void printScale(ScaleParameters scale, std::ostream& myCout) const;
123 
124  private:
125  private:
127 
131 
133 
141 
142  //LUTs
143  std::map<std::string, std::vector<long long>> m_lut_CalMuEta;
144  std::map<std::string, std::vector<long long>> m_lut_CalMuPhi;
145  std::map<std::string, std::vector<long long>> m_lut_DeltaEta;
146  std::map<std::string, std::vector<long long>> m_lut_DeltaPhi;
147  std::map<std::string, std::vector<long long>> m_lut_Pt;
148  std::map<std::string, std::vector<long long>> m_lut_Upt; // Added for displaced muons
149  std::map<std::string, std::vector<long long>> m_lut_Cosh;
150  std::map<std::string, std::vector<long long>> m_lut_Cos;
151  std::map<std::string, std::vector<long long>> m_lut_Sin;
152 
153  //LUTs Precision
154  std::map<std::string, unsigned int> m_Prec_DeltaEta;
155  std::map<std::string, unsigned int> m_Prec_DeltaPhi;
156  std::map<std::string, unsigned int> m_Prec_Pt;
157  std::map<std::string, unsigned int> m_Prec_Upt; // Added for displaced muons
158  std::map<std::string, unsigned int> m_Prec_Cosh;
159  std::map<std::string, unsigned int> m_Prec_Cos;
160  std::map<std::string, unsigned int> m_Prec_Sin;
161  };
162 
163 } // namespace l1t
164 #endif
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:67
const ScaleParameters & getHTMHFScales() const
Definition: GlobalScales.h:95
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
std::map< std::string, unsigned int > m_Prec_Upt
Definition: GlobalScales.h:157
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
ScaleParameters m_ettScales
Definition: GlobalScales.h:134
const ScaleParameters & getEGScales() const
Definition: GlobalScales.h:88
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:146
std::map< std::string, std::vector< long long > > m_lut_Upt
Definition: GlobalScales.h:148
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:129
ScaleParameters m_jetScales
Definition: GlobalScales.h:132
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
const ScaleParameters & getTAUScales() const
Definition: GlobalScales.h:89
virtual ~GlobalScales()
Definition: GlobalScales.cc:25
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:144
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:126
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:87
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:84
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:137
ScaleParameters m_htmHfScales
Definition: GlobalScales.h:139
long long getLUT_Cos(const std::string &lutName, int element) const
void setHTMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:69
const ScaleParameters & getETTEmScales() const
Definition: GlobalScales.h:92
std::map< std::string, std::vector< long long > > m_lut_Sin
Definition: GlobalScales.h:151
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:68
ScaleParameters m_egScales
Definition: GlobalScales.h:128
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:50
ScaleParameters m_ettEmScales
Definition: GlobalScales.h:135
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:140
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
ScaleParameters m_etmHfScales
Definition: GlobalScales.h:138
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
const ScaleParameters & getJETScales() const
Definition: GlobalScales.h:90
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
unsigned int getPrec_Cos(const std::string &lutName) const
const ScaleParameters & getETMHFScales() const
Definition: GlobalScales.h:94
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:147
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:159
long long getLUT_CalMuEta(const std::string &lutName, int element) const
ScaleParameters m_httScales
Definition: GlobalScales.h:136
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:154
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:155
unsigned int getPrec_DeltaEta(const std::string &lutName) const
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:156
std::map< std::string, std::vector< long long > > m_lut_DeltaEta
Definition: GlobalScales.h:145
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:158
long long getLUT_DeltaEta(std::string lutName, int element) const
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:143
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:70
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:91
const ScaleParameters & getHTTScales() const
Definition: GlobalScales.h:96
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:149
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:160
const ScaleParameters & getHTMScales() const
Definition: GlobalScales.h:97
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:93
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:150
virtual void dumpAllLUTs(std::ostream &myCout) const
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:55
ScaleParameters m_muScales
Definition: GlobalScales.h:130