Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTPhiLut
0004  *
0005  *   Look-up tables for phi-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_PHI_LUT_H
0016 #define L1MUDT_PHI_LUT_H
0017 
0018 //---------------
0019 // C++ Headers --
0020 //---------------
0021 
0022 #include "CondFormats/Serialization/interface/Serializable.h"
0023 
0024 #include <vector>
0025 #include <map>
0026 #include <utility>
0027 
0028 //----------------------
0029 // Base Class Headers --
0030 //----------------------
0031 
0032 //------------------------------------
0033 // Collaborating Class Declarations --
0034 //------------------------------------
0035 
0036 //              ---------------------
0037 //              -- Class Interface --
0038 //              ---------------------
0039 
0040 class L1MuDTPhiLut {
0041 public:
0042   /// constructor
0043   L1MuDTPhiLut();
0044 
0045   /// destructor
0046   virtual ~L1MuDTPhiLut();
0047 
0048   /// reset phi-assignment look-up tables
0049   void reset();
0050 
0051   /// load phi-assignment look-up tables
0052   int load();
0053 
0054   /// print phi-assignment look-up tables
0055   void print() const;
0056 
0057   /// get delta-phi for a given address (bend-angle)
0058   int getDeltaPhi(int idx, int address) const;
0059 
0060   /// get precision for look-up tables
0061   std::pair<unsigned short, unsigned short> getPrecision() const;
0062 
0063 private:
0064   /// set precision for look-up tables
0065   void setPrecision();
0066 
0067 private:
0068   typedef std::map<short, short, std::less<short> > LUT;
0069 
0070   std::vector<LUT> phi_lut;
0071 
0072   unsigned short int nbit_phi;
0073   unsigned short int nbit_phib;
0074 
0075   COND_SERIALIZABLE;
0076 };
0077 
0078 #endif