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
l1t::GlobalScales::ScaleParameters::etaStep
double etaStep
Definition: GlobalScales.h:54
l1t::GlobalScales::getETTScales
const ScaleParameters & getETTScales() const
Definition: GlobalScales.h:90
l1t::GlobalScales::getTAUScales
const ScaleParameters & getTAUScales() const
Definition: GlobalScales.h:88
l1t::GlobalScales::getPrec_Pt
unsigned int getPrec_Pt(const std::string &lutName) const
Definition: GlobalScales.cc:310
l1t::GlobalScales::ScaleParameters::uptMax
double uptMax
Definition: GlobalScales.h:43
l1t::GlobalScales::m_ettScales
ScaleParameters m_ettScales
Definition: GlobalScales.h:132
l1t::GlobalScales::getETTEmScales
const ScaleParameters & getETTEmScales() const
Definition: GlobalScales.h:91
l1t::GlobalScales::getEGScales
const ScaleParameters & getEGScales() const
Definition: GlobalScales.h:87
boostedTaus_cff.precision
precision
Definition: boostedTaus_cff.py:29
l1t::GlobalScales::getETMScales
const ScaleParameters & getETMScales() const
Definition: GlobalScales.h:92
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
l1t::GlobalScales::ScaleParameters::etStep
double etStep
Definition: GlobalScales.h:38
l1t::GlobalScales::setMuonScales
void setMuonScales(ScaleParameters &scales)
Definition: GlobalScales.h:60
l1t::GlobalScales::ScaleParameters::phiMax
double phiMax
Definition: GlobalScales.h:48
l1t::GlobalScales::ScaleParameters::uptStep
double uptStep
Definition: GlobalScales.h:44
l1t::GlobalScales::getLUT_Cos
long long getLUT_Cos(const std::string &lutName, int element) const
Definition: GlobalScales.cc:435
l1t::GlobalScales::getLUT_Upt
long long getLUT_Upt(const std::string &lutName, int element) const
Definition: GlobalScales.cc:322
l1t::GlobalScales::ScaleParameters::etMin
double etMin
Definition: GlobalScales.h:36
l1t::GlobalScales::getJETScales
const ScaleParameters & getJETScales() const
Definition: GlobalScales.h:89
l1t::GlobalScales::getPrec_Upt
unsigned int getPrec_Upt(const std::string &lutName) const
Definition: GlobalScales.cc:337
l1t::GlobalScales::ScaleParameters::etaMin
double etaMin
Definition: GlobalScales.h:52
l1t::GlobalScales::setLUT_Cos
virtual void setLUT_Cos(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:130
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:380
l1t::GlobalScales::getLUT_Sin
long long getLUT_Sin(const std::string &lutName, int element) const
Definition: GlobalScales.cc:456
l1t::GlobalScales::print
virtual void print(std::ostream &myCout) const
Definition: GlobalScales.cc:640
l1t::GlobalScales::ScaleParameters::phiMin
double phiMin
Definition: GlobalScales.h:47
l1t::GlobalScales::setHTTScales
void setHTTScales(ScaleParameters &scales)
Definition: GlobalScales.h:66
l1t::GlobalScales::getLUT_CalMuPhi
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
Definition: GlobalScales.cc:173
l1t::GlobalScales::m_Prec_Sin
std::map< std::string, unsigned int > m_Prec_Sin
Definition: GlobalScales.h:157
l1t::GlobalScales::getLUT_Pt
long long getLUT_Pt(const std::string &lutName, int element) const
Definition: GlobalScales.cc:296
l1t::GlobalScales::setLUT_Cosh
virtual void setLUT_Cosh(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:116
l1t::GlobalScales::setHTMScales
void setHTMScales(ScaleParameters &scales)
Definition: GlobalScales.h:69
l1t::GlobalScales::m_Prec_DeltaEta
std::map< std::string, unsigned int > m_Prec_DeltaEta
Definition: GlobalScales.h:151
l1t::GlobalScales::setETTEmScales
void setETTEmScales(ScaleParameters &scales)
Definition: GlobalScales.h:65
l1t::GlobalScales::getLUT_DeltaEta
long long getLUT_DeltaEta(std::string lutName, int element) const
Definition: GlobalScales.cc:188
l1t::GlobalScales::setTauScales
void setTauScales(ScaleParameters &scales)
Definition: GlobalScales.h:59
l1t::GlobalScales::m_lut_CalMuPhi
std::map< std::string, std::vector< long long > > m_lut_CalMuPhi
Definition: GlobalScales.h:141
l1t::GlobalScales::ScaleParameters::uptBins
std::vector< std::pair< double, double > > uptBins
Definition: GlobalScales.h:45
l1t::GlobalScales::m_Prec_Cosh
std::map< std::string, unsigned int > m_Prec_Cosh
Definition: GlobalScales.h:155
l1t::GlobalScales::ScaleParameters::etaMax
double etaMax
Definition: GlobalScales.h:53
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:572
l1t::GlobalScales::m_ScaleSetName
std::string m_ScaleSetName
Definition: GlobalScales.h:124
l1t::GlobalScales::m_ettEmScales
ScaleParameters m_ettEmScales
Definition: GlobalScales.h:133
l1t::GlobalScales::getETMHFScales
const ScaleParameters & getETMHFScales() const
Definition: GlobalScales.h:93
l1t::GlobalScales::getPrec_Cos
unsigned int getPrec_Cos(const std::string &lutName) const
Definition: GlobalScales.cc:499
l1t::GlobalScales::setETMScales
void setETMScales(ScaleParameters &scales)
Definition: GlobalScales.h:67
l1t::GlobalScales::m_Prec_Upt
std::map< std::string, unsigned int > m_Prec_Upt
Definition: GlobalScales.h:154
l1t::GlobalScales
Definition: GlobalScales.h:25
l1t::GlobalScales::m_muScales
ScaleParameters m_muScales
Definition: GlobalScales.h:128
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:477
l1t::GlobalScales::m_tauScales
ScaleParameters m_tauScales
Definition: GlobalScales.h:127
l1t::GlobalScales::ScaleParameters::etaBins
std::vector< std::pair< double, double > > etaBins
Definition: GlobalScales.h:55
l1t::GlobalScales::dumpAllLUTs
virtual void dumpAllLUTs(std::ostream &myCout) const
Definition: GlobalScales.cc:521
l1t
delete x;
Definition: CaloConfig.h:22
l1t::GlobalScales::m_Prec_Cos
std::map< std::string, unsigned int > m_Prec_Cos
Definition: GlobalScales.h:156
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:737
l1t::GlobalScales::setETTScales
void setETTScales(ScaleParameters &scales)
Definition: GlobalScales.h:64
l1t::GlobalScales::ScaleParameters
typedef for a single object template
Definition: GlobalScales.h:35
l1t::GlobalScales::m_egScales
ScaleParameters m_egScales
Definition: GlobalScales.h:126
l1t::GlobalScales::getPrec_DeltaEta
unsigned int getPrec_DeltaEta(const std::string &lutName) const
Definition: GlobalScales.cc:220
l1t::GlobalScales::m_Prec_Pt
std::map< std::string, unsigned int > m_Prec_Pt
Definition: GlobalScales.h:153
l1t::GlobalScales::m_httScales
ScaleParameters m_httScales
Definition: GlobalScales.h:134
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:49
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t::GlobalScales::m_etmHfScales
ScaleParameters m_etmHfScales
Definition: GlobalScales.h:136
l1t::GlobalScales::m_lut_DeltaPhi
std::map< std::string, std::vector< long long > > m_lut_DeltaPhi
Definition: GlobalScales.h:143
l1t::GlobalScales::setEGScales
void setEGScales(ScaleParameters &scales)
Definition: GlobalScales.h:58
l1t::GlobalScales::getLUT_DeltaPhi_Cos
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
Definition: GlobalScales.cc:402
l1t::GlobalScales::setLUT_Sin
virtual void setLUT_Sin(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:144
l1t::GlobalScales::m_lut_Cos
std::map< std::string, std::vector< long long > > m_lut_Cos
Definition: GlobalScales.h:147
l1t::GlobalScales::getLUT_CalMuEta
long long getLUT_CalMuEta(const std::string &lutName, int element) const
Definition: GlobalScales.cc:158
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:274
l1t::GlobalScales::m_Prec_DeltaPhi
std::map< std::string, unsigned int > m_Prec_DeltaPhi
Definition: GlobalScales.h:152
l1t::GlobalScales::setLUT_CalMuEta
virtual void setLUT_CalMuEta(const std::string &lutName, std::vector< long long > lut)
Definition: GlobalScales.cc:29
l1t::GlobalScales::m_lut_Upt
std::map< std::string, std::vector< long long > > m_lut_Upt
Definition: GlobalScales.h:145
l1t::GlobalScales::getLUT_DeltaEta_Cosh
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
Definition: GlobalScales.cc:348
l1t::GlobalScales::getLUT_DeltaPhi
long long getLUT_DeltaPhi(std::string lutName, int element) const
Definition: GlobalScales.cc:242
l1t::GlobalScales::setJetScales
void setJetScales(ScaleParameters &scales)
Definition: GlobalScales.h:62
l1t::GlobalScales::m_jetScales
ScaleParameters m_jetScales
Definition: GlobalScales.h:130
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
l1t::GlobalScales::m_etmScales
ScaleParameters m_etmScales
Definition: GlobalScales.h:135
l1t::GlobalScales::ScaleParameters::uptMin
double uptMin
Definition: GlobalScales.h:42
l1t::GlobalScales::ScaleParameters::phiBins
std::vector< std::pair< double, double > > phiBins
Definition: GlobalScales.h:50
l1t::GlobalScales::m_lut_Cosh
std::map< std::string, std::vector< long long > > m_lut_Cosh
Definition: GlobalScales.h:146
l1t::GlobalScales::GlobalScales
GlobalScales()
Definition: GlobalScales.cc:22
l1t::GlobalScales::setETMHfScales
void setETMHfScales(ScaleParameters &scales)
Definition: GlobalScales.h:68
l1t::GlobalScales::setLUT_Upt
virtual void setLUT_Upt(const std::string &lutName, std::vector< long long > lut, unsigned int precision)
Definition: GlobalScales.cc:102
l1t::GlobalScales::m_lut_Pt
std::map< std::string, std::vector< long long > > m_lut_Pt
Definition: GlobalScales.h:144
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:142
l1t::GlobalScales::m_lut_CalMuEta
std::map< std::string, std::vector< long long > > m_lut_CalMuEta
Definition: GlobalScales.h:140
l1t::GlobalScales::ScaleParameters::etMax
double etMax
Definition: GlobalScales.h:37
l1t::GlobalScales::getHTTScales
const ScaleParameters & getHTTScales() const
Definition: GlobalScales.h:94
l1t::GlobalScales::getHTMScales
const ScaleParameters & getHTMScales() const
Definition: GlobalScales.h:95
l1t::GlobalScales::m_lut_Sin
std::map< std::string, std::vector< long long > > m_lut_Sin
Definition: GlobalScales.h:148
l1t::GlobalScales::m_htmScales
ScaleParameters m_htmScales
Definition: GlobalScales.h:137
l1t::GlobalScales::getMUScales
const ScaleParameters & getMUScales() const
Definition: GlobalScales.h:86
l1t::GlobalScales::getPrec_Sin
unsigned int getPrec_Sin(const std::string &lutName) const
Definition: GlobalScales.cc:510
l1t::GlobalScales::setScalesName
void setScalesName(const std::string &name)
Definition: GlobalScales.h:83