Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:13

0001 #ifndef L1MUBM_LUT_H
0002 #define L1MUBM_LUT_H
0003 
0004 //---------------
0005 // C++ Headers --
0006 //---------------
0007 
0008 #include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
0009 #include "L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsAllPublic.h"
0010 
0011 #include <vector>
0012 #include <map>
0013 
0014 //----------------------
0015 // Base Class Headers --
0016 //----------------------
0017 
0018 //------------------------------------
0019 // Collaborating Class Declarations --
0020 //------------------------------------
0021 
0022 //              ---------------------
0023 //              -- Class Interface --
0024 //              ---------------------
0025 
0026 class L1MuBMLUTHandler {
0027 public:
0028   /// constructor
0029   L1MuBMLUTHandler(const L1TMuonBarrelParams& l1params);
0030 
0031   /// destructor
0032   virtual ~L1MuBMLUTHandler();
0033 
0034   /// print pt-assignment look-up tables
0035   void print_pta_lut() const;
0036 
0037   /// get pt-value for a given address
0038   int getPt(int pta_ind, int address) const;
0039 
0040   /// get pt-assignment LUT threshold
0041   int getPtLutThreshold(int pta_ind) const;
0042 
0043   /// print phi-assignment look-up tables
0044   void print_phi_lut() const;
0045 
0046   /// get delta-phi for a given address (bend-angle)
0047   int getDeltaPhi(int idx, int address) const;
0048 
0049   /// get precision for look-up tables
0050   std::pair<unsigned short, unsigned short> getPrecision() const;
0051 
0052   /// print extrapolation look-up tables
0053   void print_ext_lut() const;
0054 
0055   /// get low_value for a given address
0056   int getLow(int ext_ind, int address) const;
0057 
0058   /// get high_value for a given address
0059   int getHigh(int ext_ind, int address) const;
0060 
0061 private:
0062   // const L1TMuonBarrelParams* l1tbmparams;
0063   const L1TMuonBarrelParamsAllPublic* l1tbmparams;
0064 
0065 public:
0066   //max. number of Extrapolations
0067   const int MAX_EXT = 12;
0068 
0069   // extrapolation types
0070   enum Extrapolation { EX12, EX13, EX14, EX21, EX23, EX24, EX34, EX15, EX16, EX25, EX26, EX56 };
0071 
0072   // maximal number of pt assignment methods
0073   const int MAX_PTASSMETH = 19;
0074   const int MAX_PTASSMETHA = 12;
0075 
0076   // pt assignment methods
0077   enum PtAssMethod {
0078     PT12L,
0079     PT12H,
0080     PT13L,
0081     PT13H,
0082     PT14L,
0083     PT14H,
0084     PT23L,
0085     PT23H,
0086     PT24L,
0087     PT24H,
0088     PT34L,
0089     PT34H,
0090     PB12H,
0091     PB13H,
0092     PB14H,
0093     PB21H,
0094     PB23H,
0095     PB24H,
0096     PB34H,
0097     NODEF
0098   };
0099 };
0100 
0101 #endif