Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-15 02:45:10

0001 #ifndef L1TGlobalScales_h
0002 #define L1TGlobalScales_h
0003 
0004 /**
0005  * \class GlobalScales
0006  *
0007  *
0008  * Description: Accessor Class for uGT Result
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  */
0014 
0015 // system include files
0016 #include <vector>
0017 #include <string>
0018 #include <map>
0019 #include <iosfwd>
0020 
0021 // class declaration
0022 
0023 namespace l1t {
0024 
0025   class GlobalScales {
0026   public:
0027     // constructors
0028     GlobalScales();
0029 
0030     // destructor
0031     virtual ~GlobalScales();
0032 
0033   public:
0034     /// typedef for a single object template
0035     struct ScaleParameters {
0036       double etMin;
0037       double etMax;
0038       double etStep;
0039       std::vector<std::pair<double, double>> etBins;
0040 
0041       // Added displaced muons
0042       double uptMin;
0043       double uptMax;
0044       double uptStep;
0045       std::vector<std::pair<double, double>> uptBins;
0046 
0047       double phiMin;
0048       double phiMax;
0049       double phiStep;
0050       std::vector<std::pair<double, double>> phiBins;
0051 
0052       double etaMin;
0053       double etaMax;
0054       double etaStep;
0055       std::vector<std::pair<double, double>> etaBins;
0056     };
0057 
0058     inline void setEGScales(ScaleParameters& scales) { m_egScales = scales; }
0059     inline void setTauScales(ScaleParameters& scales) { m_tauScales = scales; }
0060     inline void setMuonScales(ScaleParameters& scales) { m_muScales = scales; }
0061 
0062     inline void setJetScales(ScaleParameters& scales) { m_jetScales = scales; }
0063 
0064     inline void setETTScales(ScaleParameters& scales) { m_ettScales = scales; }
0065     inline void setETTEmScales(ScaleParameters& scales) { m_ettEmScales = scales; }
0066     inline void setHTTScales(ScaleParameters& scales) { m_httScales = scales; }
0067     inline void setETMScales(ScaleParameters& scales) { m_etmScales = scales; }
0068     inline void setETMHfScales(ScaleParameters& scales) { m_etmHfScales = scales; }
0069     inline void setHTMScales(ScaleParameters& scales) { m_htmScales = scales; }
0070 
0071     virtual void setLUT_CalMuEta(const std::string& lutName, std::vector<long long> lut);
0072     virtual void setLUT_CalMuPhi(const std::string& lutName, std::vector<long long> lut);
0073     virtual void setLUT_DeltaEta(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0074     virtual void setLUT_DeltaPhi(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0075     virtual void setLUT_Pt(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0076     virtual void setLUT_Upt(const std::string& lutName,
0077                             std::vector<long long> lut,
0078                             unsigned int precision);  // Added for displaced muons
0079     virtual void setLUT_Cosh(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0080     virtual void setLUT_Cos(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0081     virtual void setLUT_Sin(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0082 
0083     inline void setScalesName(const std::string& name) { m_ScaleSetName = name; }
0084     virtual std::string getScalesName() const;
0085 
0086     inline const ScaleParameters& getMUScales() const { return m_muScales; }
0087     inline const ScaleParameters& getEGScales() const { return m_egScales; }
0088     inline const ScaleParameters& getTAUScales() const { return m_tauScales; }
0089     inline const ScaleParameters& getJETScales() const { return m_jetScales; }
0090     inline const ScaleParameters& getETTScales() const { return m_ettScales; }
0091     inline const ScaleParameters& getETTEmScales() const { return m_ettEmScales; }
0092     inline const ScaleParameters& getETMScales() const { return m_etmScales; }
0093     inline const ScaleParameters& getETMHFScales() const { return m_etmHfScales; }
0094     inline const ScaleParameters& getHTTScales() const { return m_httScales; }
0095     inline const ScaleParameters& getHTMScales() const { return m_htmScales; }
0096 
0097     long long getLUT_CalMuEta(const std::string& lutName, int element) const;
0098     long long getLUT_CalMuPhi(const std::string& lutName, int element) const;
0099     long long getLUT_DeltaEta(std::string lutName, int element) const;
0100     long long getLUT_DeltaPhi(std::string lutName, int element) const;
0101     long long getLUT_Pt(const std::string& lutName, int element) const;
0102     long long getLUT_Upt(const std::string& lutName, int element) const;  // Added for displaced muons
0103     long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const;
0104     long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const;
0105     long long getLUT_Cos(const std::string& lutName, int element) const;
0106     long long getLUT_Sin(const std::string& lutName, int element) const;
0107 
0108     unsigned int getPrec_DeltaEta(const std::string& lutName) const;
0109     unsigned int getPrec_DeltaPhi(const std::string& lutName) const;
0110     unsigned int getPrec_Pt(const std::string& lutName) const;
0111     unsigned int getPrec_Upt(const std::string& lutName) const;  // Added for displaced muons
0112     unsigned int getPrec_DeltaEta_Cosh(const std::string& lutName) const;
0113     unsigned int getPrec_DeltaPhi_Cos(const std::string& lutName) const;
0114     unsigned int getPrec_Cos(const std::string& lutName) const;
0115     unsigned int getPrec_Sin(const std::string& lutName) const;
0116 
0117     virtual void dumpAllLUTs(std::ostream& myCout) const;
0118     virtual void dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const;
0119     virtual void print(std::ostream& myCout) const;
0120     virtual void printScale(ScaleParameters scale, std::ostream& myCout) const;
0121 
0122   private:
0123   private:
0124     std::string m_ScaleSetName;
0125 
0126     ScaleParameters m_egScales;
0127     ScaleParameters m_tauScales;
0128     ScaleParameters m_muScales;
0129 
0130     ScaleParameters m_jetScales;
0131 
0132     ScaleParameters m_ettScales;
0133     ScaleParameters m_ettEmScales;
0134     ScaleParameters m_httScales;
0135     ScaleParameters m_etmScales;
0136     ScaleParameters m_etmHfScales;
0137     ScaleParameters m_htmScales;
0138 
0139     //LUTs
0140     std::map<std::string, std::vector<long long>> m_lut_CalMuEta;
0141     std::map<std::string, std::vector<long long>> m_lut_CalMuPhi;
0142     std::map<std::string, std::vector<long long>> m_lut_DeltaEta;
0143     std::map<std::string, std::vector<long long>> m_lut_DeltaPhi;
0144     std::map<std::string, std::vector<long long>> m_lut_Pt;
0145     std::map<std::string, std::vector<long long>> m_lut_Upt;  // Added for displaced muons
0146     std::map<std::string, std::vector<long long>> m_lut_Cosh;
0147     std::map<std::string, std::vector<long long>> m_lut_Cos;
0148     std::map<std::string, std::vector<long long>> m_lut_Sin;
0149 
0150     //LUTs Precision
0151     std::map<std::string, unsigned int> m_Prec_DeltaEta;
0152     std::map<std::string, unsigned int> m_Prec_DeltaPhi;
0153     std::map<std::string, unsigned int> m_Prec_Pt;
0154     std::map<std::string, unsigned int> m_Prec_Upt;  // Added for displaced muons
0155     std::map<std::string, unsigned int> m_Prec_Cosh;
0156     std::map<std::string, unsigned int> m_Prec_Cos;
0157     std::map<std::string, unsigned int> m_Prec_Sin;
0158   };
0159 
0160 }  // namespace l1t
0161 #endif