Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:17

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTExtLut
0004  *
0005  *   Look-up tables for extrapolation
0006  *
0007  *
0008  *   $Date: 2008/04/09 15:22:31 $
0009  *   $Revision: 1.4 $
0010  *
0011  *   N. Neumeister            CERN EP
0012  */
0013 //
0014 //--------------------------------------------------
0015 #ifndef L1MUDT_EXT_LUT_H
0016 #define L1MUDT_EXT_LUT_H
0017 
0018 //---------------
0019 // C++ Headers --
0020 //---------------
0021 
0022 #include "CondFormats/Serialization/interface/Serializable.h"
0023 
0024 #include <vector>
0025 #include <map>
0026 
0027 //----------------------
0028 // Base Class Headers --
0029 //----------------------
0030 
0031 //------------------------------------
0032 // Collaborating Class Declarations --
0033 //------------------------------------
0034 
0035 //              ---------------------
0036 //              -- Class Interface --
0037 //              ---------------------
0038 
0039 class L1MuDTExtLut {
0040 public:
0041   /// helper class for look-up tables
0042   class LUT {
0043   public:
0044     typedef std::map<short, short, std::less<short> > LUTmap;
0045 
0046     LUTmap low;
0047     LUTmap high;
0048 
0049     COND_SERIALIZABLE;
0050   };
0051 
0052   /// constructor
0053   L1MuDTExtLut();
0054 
0055   /// destructor
0056   virtual ~L1MuDTExtLut();
0057 
0058   /// reset extrapolation look-up tables
0059   void reset();
0060 
0061   /// load extrapolation look-up tables
0062   int load();
0063 
0064   /// print extrapolation look-up tables
0065   void print() const;
0066 
0067   /// get low_value for a given address
0068   int getLow(int ext_ind, int address) const;
0069 
0070   /// get high_value for a given address
0071   int getHigh(int ext_ind, int address) const;
0072 
0073 private:
0074   /// set precision for look-up tables
0075   void setPrecision();
0076 
0077 private:
0078   std::vector<LUT> ext_lut;
0079 
0080   unsigned short int nbit_phi;
0081   unsigned short int nbit_phib;
0082 
0083   COND_SERIALIZABLE;
0084 };
0085 
0086 #endif