CMS 3D CMS Logo

L1TMuonBarrelParams.h
Go to the documentation of this file.
1 
10 #ifndef L1TBMTFParams_h
11 #define L1TBMTFParams_h
12 
13 #include <memory>
14 #include <iostream>
15 #include <vector>
16 
22 
24 public:
26  enum { Version = 1 };
27 
28  class Node {
29  public:
31  unsigned version_;
33  std::vector<double> dparams_;
34  std::vector<unsigned> uparams_;
35  std::vector<int> iparams_;
36  std::vector<std::string> sparams_;
37  Node() {
38  type_ = "unspecified";
39  version_ = 0;
40  }
42  };
43  enum { CONFIG = 0, NUM_BMTF_PARAM_NODES = 2 };
44 
45  enum {
62  };
63 
64  // after initial integration with downstream code, a small update will change:
67  // to this:
68  //L1MuDTTFParameters & l1mudttfparams(){return l1mudttfparams_[0]; }
69  //L1MuDTTFMasks & l1mudttfmasks(){return l1mudttfmasks_[0]; }
70 
72  typedef std::map<short, short, std::less<short> > LUT;
74  typedef std::pair<short, short> LUTID;
75  typedef std::pair<short, std::vector<short> > LUTCONT;
76  typedef std::map<LUTID, LUTCONT> qpLUT;
78  typedef std::map<short, L1MuDTEtaPattern, std::less<short> > etaLUT;
79 
80  class LUTParams {
81  public:
82  std::vector<LUT> pta_lut_;
83  std::vector<LUT> phi_lut_;
84  std::vector<int> pta_threshold_;
87 
88  // helper class for extrapolation look-up tables
89  class extLUT {
90  public:
94  };
95  std::vector<extLUT> ext_lut_;
98  };
99 
101 
102  std::string AssLUTPath() const { return !pnodes_[CONFIG].sparams_.empty() ? pnodes_[CONFIG].sparams_[0] : ""; };
103  void setAssLUTPath(std::string path) { pnodes_[CONFIG].sparams_.push_back(path); };
104 
105  void setpta_lut(std::vector<LUT> ptalut) { lutparams_.pta_lut_ = ptalut; };
106  std::vector<LUT> pta_lut() const { return lutparams_.pta_lut_; };
107  void setpta_threshold(std::vector<int> ptathresh) { lutparams_.pta_threshold_ = ptathresh; };
108  std::vector<int> pta_threshold() const { return lutparams_.pta_threshold_; };
109 
110  void setphi_lut(std::vector<LUT> philut) { lutparams_.phi_lut_ = philut; };
111  std::vector<LUT> phi_lut() const { return lutparams_.phi_lut_; };
112 
113  void setext_lut(std::vector<LUTParams::extLUT> extlut) { lutparams_.ext_lut_ = extlut; };
114  std::vector<LUTParams::extLUT> ext_lut() const { return lutparams_.ext_lut_; };
115 
116  void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; };
117  qpLUT qp_lut() const { return lutparams_.qp_lut_; };
118 
120  etaLUT eta_lut() const { return lutparams_.eta_lut_; };
121 
128  void set_BX_min(int par1) { pnodes_[CONFIG].iparams_[BX_min] = par1; };
129  void set_BX_max(int par1) { pnodes_[CONFIG].iparams_[BX_max] = par1; };
133  void set_Open_LUTs(bool par1) { pnodes_[CONFIG].iparams_[Open_LUTs] = par1; };
134  void set_EtaTrackFinder(bool par1) { pnodes_[CONFIG].iparams_[EtaTrackFinder] = par1; };
136  void set_DisableNewAlgo(bool par1) { pnodes_[CONFIG].iparams_[DisableNewAlgo] = par1; };
137 
144  int get_BX_min() const { return pnodes_[CONFIG].iparams_[BX_min]; };
145  int get_BX_max() const { return pnodes_[CONFIG].iparams_[BX_max]; };
146  int get_Extrapolation_Filter() const { return pnodes_[CONFIG].iparams_[Extrapolation_Filter]; };
148 
149  bool get_OutOfTime_Filter() const { return pnodes_[CONFIG].iparams_[OutOfTime_Filter]; };
150  bool get_Open_LUTs() const { return pnodes_[CONFIG].iparams_[Open_LUTs]; };
151  bool get_EtaTrackFinder() const { return pnodes_[CONFIG].iparams_[EtaTrackFinder]; };
152  bool get_Extrapolation_21() const { return pnodes_[CONFIG].iparams_[Extrapolation_21]; };
153  bool get_DisableNewAlgo() const { return pnodes_[CONFIG].iparams_[DisableNewAlgo]; };
154 
155  unsigned fwVersion() const { return fwVersion_; };
157 
158 public:
159  unsigned version_;
160  unsigned fwVersion_;
161 
162  std::vector<Node> pnodes_;
163  // std::vector here is just so we can use "blob" in DB and evade max size limitations...
164  std::vector<L1MuDTTFParameters> l1mudttfparams_;
165  std::vector<L1MuDTTFMasks> l1mudttfmasks_;
167 
169 };
170 #endif
int get_OutOfTime_Filter_Window() const
bool get_Extrapolation_21() const
L1MuDTTFParameters l1mudttfparams
void set_Extrapolation_Filter(int par1)
int get_Extrapolation_nbits_PhiB() const
void setext_lut(std::vector< LUTParams::extLUT > extlut)
void setAssLUTPath(std::string path)
void setqp_lut(qpLUT qplut)
std::map< LUTID, LUTCONT > qpLUT
void seteta_lut(etaLUT eta_lut)
void setFwVersion(unsigned fwVersion)
void set_Extrapolation_nbits_Phi(int par1)
std::vector< int > pta_threshold() const
void set_EtaTrackFinder(bool par1)
void setpta_threshold(std::vector< int > ptathresh)
void set_Extrapolation_nbits_PhiB(int par1)
bool get_EtaTrackFinder() const
int get_PT_Assignment_nbits_Phi() const
void setpta_lut(std::vector< LUT > ptalut)
void set_Open_LUTs(bool par1)
std::pair< short, short > LUTID
Qual Pattern LUT.
int get_Extrapolation_Filter() const
std::vector< double > dparams_
L1MuDTTFMasks l1mudttfmasks
unsigned fwVersion() const
std::vector< unsigned > uparams_
bool get_DisableNewAlgo() const
std::string AssLUTPath() const
int get_PT_Assignment_nbits_PhiB() const
int get_PHI_Assignment_nbits_Phi() const
Definition: LUT.h:29
void set_Extrapolation_21(bool par1)
int get_PHI_Assignment_nbits_PhiB() const
void set_PT_Assignment_nbits_PhiB(int par1)
std::map< short, short, std::less< short > > LUT
L1MuBMPtaLut.
void set_DisableNewAlgo(bool par1)
void set_PT_Assignment_nbits_Phi(int par1)
#define COND_SERIALIZABLE
Definition: Serializable.h:39
bool get_OutOfTime_Filter() const
void set_PHI_Assignment_nbits_Phi(int par1)
std::pair< short, std::vector< short > > LUTCONT
std::vector< LUTParams::extLUT > ext_lut() const
void setphi_lut(std::vector< LUT > philut)
std::vector< LUT > pta_lut() const
void set_OutOfTime_Filter_Window(int par1)
void set_PHI_Assignment_nbits_PhiB(int par1)
std::vector< std::string > sparams_
std::vector< Node > pnodes_
std::vector< LUT > phi_lut() const
std::vector< L1MuDTTFParameters > l1mudttfparams_
std::vector< L1MuDTTFMasks > l1mudttfmasks_
int get_Extrapolation_nbits_Phi() const
std::map< short, L1MuDTEtaPattern, std::less< short > > etaLUT
Eta Pattern LUT.
void set_OutOfTime_Filter(bool par1)