Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:20

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTPtaLut
0004  *
0005  *   Look-up tables for pt-assignment
0006  *
0007  *
0008  *   $Date: 2007/03/30 07:48:02 $
0009  *   $Revision: 1.1 $
0010  *
0011  *   N. Neumeister            CERN EP
0012  */
0013 //
0014 //--------------------------------------------------
0015 #ifndef L1MUDT_PTA_LUT_H
0016 #define L1MUDT_PTA_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 L1MuDTPtaLut {
0040 public:
0041   /// constructor
0042   L1MuDTPtaLut();
0043 
0044   /// destructor
0045   virtual ~L1MuDTPtaLut();
0046 
0047   /// reset pt-assignment look-up tables
0048   void reset();
0049 
0050   /// load pt-assignment look-up tables
0051   int load();
0052 
0053   /// print pt-assignment look-up tables
0054   void print() const;
0055 
0056   /// get pt-value for a given address
0057   int getPt(int pta_ind, int address) const;
0058 
0059   /// get pt-assignment LUT threshold
0060   int getPtLutThreshold(int pta_ind) const;
0061 
0062 private:
0063   /// set precision for look-up tables
0064   void setPrecision();
0065 
0066 private:
0067   typedef std::map<short, short, std::less<short> > LUT;
0068 
0069   std::vector<LUT> pta_lut;
0070   std::vector<int> pta_threshold;
0071 
0072   unsigned short int nbit_phi;
0073 
0074   COND_SERIALIZABLE;
0075 };
0076 
0077 #endif