L1MuDTPtaLut

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
//-------------------------------------------------
//
/**  \class L1MuDTPtaLut
 *
 *   Look-up tables for pt-assignment
 *
 *
 *   $Date: 2007/03/30 07:48:02 $
 *   $Revision: 1.1 $
 *
 *   N. Neumeister            CERN EP
 */
//
//--------------------------------------------------
#ifndef L1MUDT_PTA_LUT_H
#define L1MUDT_PTA_LUT_H

//---------------
// C++ Headers --
//---------------

#include "CondFormats/Serialization/interface/Serializable.h"

#include <vector>
#include <map>

//----------------------
// Base Class Headers --
//----------------------

//------------------------------------
// Collaborating Class Declarations --
//------------------------------------

//              ---------------------
//              -- Class Interface --
//              ---------------------

class L1MuDTPtaLut {
public:
  /// constructor
  L1MuDTPtaLut();

  /// destructor
  virtual ~L1MuDTPtaLut();

  /// reset pt-assignment look-up tables
  void reset();

  /// load pt-assignment look-up tables
  int load();

  /// print pt-assignment look-up tables
  void print() const;

  /// get pt-value for a given address
  int getPt(int pta_ind, int address) const;

  /// get pt-assignment LUT threshold
  int getPtLutThreshold(int pta_ind) const;

private:
  /// set precision for look-up tables
  void setPrecision();

private:
  typedef std::map<short, short, std::less<short> > LUT;

  std::vector<LUT> pta_lut;
  std::vector<int> pta_threshold;

  unsigned short int nbit_phi;

  COND_SERIALIZABLE;
};

#endif