Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-15 23:40:40

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