Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-02 00:53:52

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 setHTMHfScales(ScaleParameters& scales) { m_htmHfScales = scales; }
0070     inline void setHTMScales(ScaleParameters& scales) { m_htmScales = scales; }
0071 
0072     virtual void setLUT_CalMuEta(const std::string& lutName, std::vector<long long> lut);
0073     virtual void setLUT_CalMuPhi(const std::string& lutName, std::vector<long long> lut);
0074     virtual void setLUT_DeltaEta(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0075     virtual void setLUT_DeltaPhi(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0076     virtual void setLUT_Pt(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0077     virtual void setLUT_Upt(const std::string& lutName,
0078                             std::vector<long long> lut,
0079                             unsigned int precision);  // Added for displaced muons
0080     virtual void setLUT_Cosh(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0081     virtual void setLUT_Cos(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0082     virtual void setLUT_Sin(const std::string& lutName, std::vector<long long> lut, unsigned int precision);
0083 
0084     inline void setScalesName(const std::string& name) { m_ScaleSetName = name; }
0085     virtual std::string getScalesName() const;
0086 
0087     inline const ScaleParameters& getMUScales() const { return m_muScales; }
0088     inline const ScaleParameters& getEGScales() const { return m_egScales; }
0089     inline const ScaleParameters& getTAUScales() const { return m_tauScales; }
0090     inline const ScaleParameters& getJETScales() const { return m_jetScales; }
0091     inline const ScaleParameters& getETTScales() const { return m_ettScales; }
0092     inline const ScaleParameters& getETTEmScales() const { return m_ettEmScales; }
0093     inline const ScaleParameters& getETMScales() const { return m_etmScales; }
0094     inline const ScaleParameters& getETMHFScales() const { return m_etmHfScales; }
0095     inline const ScaleParameters& getHTMHFScales() const { return m_htmHfScales; }
0096     inline const ScaleParameters& getHTTScales() const { return m_httScales; }
0097     inline const ScaleParameters& getHTMScales() const { return m_htmScales; }
0098 
0099     long long getLUT_CalMuEta(const std::string& lutName, int element) const;
0100     long long getLUT_CalMuPhi(const std::string& lutName, int element) const;
0101     long long getLUT_DeltaEta(std::string lutName, int element) const;
0102     long long getLUT_DeltaPhi(std::string lutName, int element) const;
0103     long long getLUT_Pt(const std::string& lutName, int element) const;
0104     long long getLUT_Upt(const std::string& lutName, int element) const;  // Added for displaced muons
0105     long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const;
0106     long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const;
0107     long long getLUT_Cos(const std::string& lutName, int element) const;
0108     long long getLUT_Sin(const std::string& lutName, int element) const;
0109 
0110     unsigned int getPrec_DeltaEta(const std::string& lutName) const;
0111     unsigned int getPrec_DeltaPhi(const std::string& lutName) const;
0112     unsigned int getPrec_Pt(const std::string& lutName) const;
0113     unsigned int getPrec_Upt(const std::string& lutName) const;  // Added for displaced muons
0114     unsigned int getPrec_DeltaEta_Cosh(const std::string& lutName) const;
0115     unsigned int getPrec_DeltaPhi_Cos(const std::string& lutName) const;
0116     unsigned int getPrec_Cos(const std::string& lutName) const;
0117     unsigned int getPrec_Sin(const std::string& lutName) const;
0118 
0119     virtual void dumpAllLUTs(std::ostream& myCout) const;
0120     virtual void dumpLUT(std::ostream& myCout, int LUTtype, std::string name) const;
0121     virtual void print(std::ostream& myCout) const;
0122     virtual void printScale(ScaleParameters scale, std::ostream& myCout) const;
0123 
0124   private:
0125   private:
0126     std::string m_ScaleSetName;
0127 
0128     ScaleParameters m_egScales;
0129     ScaleParameters m_tauScales;
0130     ScaleParameters m_muScales;
0131 
0132     ScaleParameters m_jetScales;
0133 
0134     ScaleParameters m_ettScales;
0135     ScaleParameters m_ettEmScales;
0136     ScaleParameters m_httScales;
0137     ScaleParameters m_etmScales;
0138     ScaleParameters m_etmHfScales;
0139     ScaleParameters m_htmHfScales;
0140     ScaleParameters m_htmScales;
0141 
0142     //LUTs
0143     std::map<std::string, std::vector<long long>> m_lut_CalMuEta;
0144     std::map<std::string, std::vector<long long>> m_lut_CalMuPhi;
0145     std::map<std::string, std::vector<long long>> m_lut_DeltaEta;
0146     std::map<std::string, std::vector<long long>> m_lut_DeltaPhi;
0147     std::map<std::string, std::vector<long long>> m_lut_Pt;
0148     std::map<std::string, std::vector<long long>> m_lut_Upt;  // Added for displaced muons
0149     std::map<std::string, std::vector<long long>> m_lut_Cosh;
0150     std::map<std::string, std::vector<long long>> m_lut_Cos;
0151     std::map<std::string, std::vector<long long>> m_lut_Sin;
0152 
0153     //LUTs Precision
0154     std::map<std::string, unsigned int> m_Prec_DeltaEta;
0155     std::map<std::string, unsigned int> m_Prec_DeltaPhi;
0156     std::map<std::string, unsigned int> m_Prec_Pt;
0157     std::map<std::string, unsigned int> m_Prec_Upt;  // Added for displaced muons
0158     std::map<std::string, unsigned int> m_Prec_Cosh;
0159     std::map<std::string, unsigned int> m_Prec_Cos;
0160     std::map<std::string, unsigned int> m_Prec_Sin;
0161   };
0162 
0163 }  // namespace l1t
0164 #endif