CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
23 
25 public:
27  enum { Version = 1 };
28 
29  class Node {
30  public:
32  unsigned version_;
34  std::vector<double> dparams_;
35  std::vector<unsigned> uparams_;
36  std::vector<int> iparams_;
37  std::vector<std::string> sparams_;
38  Node(){ type_="unspecified"; version_=0; }
40  };
41  enum {
42  CONFIG = 0,
44  };
45 
61 
62  // after initial integration with downstream code, a small update will change:
65  // to this:
66  //L1MuDTTFParameters & l1mudttfparams(){return l1mudttfparams_[0]; }
67  //L1MuDTTFMasks & l1mudttfmasks(){return l1mudttfmasks_[0]; }
68 
70  typedef std::map<short, short, std::less<short> > LUT;
72  typedef std::pair< short, short > LUTID;
73  typedef std::pair< short, std::vector<short> > LUTCONT;
74  typedef std::map< LUTID, LUTCONT > qpLUT;
76  typedef std::map<short, L1MuDTEtaPattern, std::less<short> > etaLUT;
77 
78  class LUTParams{
79  public:
80  std::vector<LUT> pta_lut_;
81  std::vector<LUT> phi_lut_;
82  std::vector<int> pta_threshold_;
85 
86  // helper class for extrapolation look-up tables
87  class extLUT {
88  public:
92  };
93  std::vector<extLUT> ext_lut_;
96  };
97 
98 
99 
100 
101  std::string AssLUTPath() const { return pnodes_[CONFIG].sparams_.size() > 0 ? pnodes_[CONFIG].sparams_[0] : ""; }
102  void setAssLUTPath (std::string path) { pnodes_[CONFIG].sparams_.push_back(path); }
103 
104  void setpta_lut(std::vector<LUT> ptalut) { lutparams_.pta_lut_ = ptalut; };
105  std::vector<LUT> pta_lut() const {return lutparams_.pta_lut_; };
106  void setpta_threshold(std::vector<int> ptathresh) { lutparams_.pta_threshold_ = ptathresh; };
107  std::vector<int> pta_threshold() const { return lutparams_.pta_threshold_; };
108 
109  void setphi_lut(std::vector<LUT> philut) { lutparams_.phi_lut_ = philut; };
110  std::vector<LUT> phi_lut() const {return lutparams_.phi_lut_; };
111 
112  void setext_lut(std::vector<LUTParams::extLUT> extlut) { lutparams_.ext_lut_ = extlut; };
113  std::vector<LUTParams::extLUT> ext_lut() const {return lutparams_.ext_lut_; };
114 
115  void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; };
116  qpLUT qp_lut() const {return lutparams_.qp_lut_; };
117 
119  etaLUT eta_lut() const {return lutparams_.eta_lut_; };
120 
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;}
130  void set_Extrapolation_Filter(int par1) {pnodes_[CONFIG].iparams_[Extrapolation_Filter] = par1;}
132  void set_OutOfTime_Filter(bool par1) {pnodes_[CONFIG].iparams_[OutOfTime_Filter] = 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;}
135  void set_Extrapolation_21(bool par1) {pnodes_[CONFIG].iparams_[Extrapolation_21] = par1;}
136 
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];}
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 
155 
156  // FW version
157  unsigned fwVersion() const { return fwVersion_; }
159 
160  // print parameters to stream:
161  void print(std::ostream&) const;
162  friend std::ostream& operator<<(std::ostream& o, const L1TMuonBarrelParams & p) { p.print(o); return o; }
163  private:
164  unsigned version_;
165  unsigned fwVersion_;
166 
167  std::vector<Node> pnodes_;
168  // std::vector here is just so we can use "blob" in DB and evade max size limitations...
169  std::vector<L1MuDTTFParameters> l1mudttfparams_;
170  std::vector<L1MuDTTFMasks> l1mudttfmasks_;
172 
174 };
175 #endif
L1MuDTTFParameters l1mudttfparams
void set_Extrapolation_Filter(int par1)
int get_PT_Assignment_nbits_PhiB() const
void setext_lut(std::vector< LUTParams::extLUT > extlut)
int get_Extrapolation_nbits_Phi() const
std::vector< LUT > pta_lut() const
bool get_OutOfTime_Filter() const
void setAssLUTPath(std::string path)
void setqp_lut(qpLUT qplut)
void seteta_lut(etaLUT eta_lut)
void setFwVersion(unsigned fwVersion)
void set_Extrapolation_nbits_Phi(int par1)
std::vector< LUTParams::extLUT > ext_lut() const
int get_PT_Assignment_nbits_Phi() const
void set_EtaTrackFinder(bool par1)
void setpta_threshold(std::vector< int > ptathresh)
void set_Extrapolation_nbits_PhiB(int par1)
void setpta_lut(std::vector< LUT > ptalut)
void set_Open_LUTs(bool par1)
bool get_EtaTrackFinder() const
std::string AssLUTPath() const
std::vector< double > dparams_
std::pair< short, short > LUTID
Qual Pattern LUT.
std::pair< short, std::vector< short > > LUTCONT
L1MuDTTFMasks l1mudttfmasks
std::vector< unsigned > uparams_
std::map< LUTID, LUTCONT > qpLUT
int get_Extrapolation_Filter() const
bool get_Extrapolation_21() const
unsigned fwVersion() const
int get_PHI_Assignment_nbits_PhiB() const
int get_OutOfTime_Filter_Window() const
Definition: LUT.h:29
void set_Extrapolation_21(bool par1)
void print(std::ostream &) const
int get_Extrapolation_nbits_PhiB() const
std::vector< LUT > phi_lut() const
int get_PHI_Assignment_nbits_Phi() const
void set_PT_Assignment_nbits_PhiB(int par1)
std::map< short, short, std::less< short > > LUT
L1MuBMPtaLut.
std::vector< int > pta_threshold() const
void set_PT_Assignment_nbits_Phi(int par1)
#define COND_SERIALIZABLE
Definition: Serializable.h:37
void set_PHI_Assignment_nbits_Phi(int par1)
void setphi_lut(std::vector< LUT > philut)
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< L1MuDTTFParameters > l1mudttfparams_
std::vector< L1MuDTTFMasks > l1mudttfmasks_
std::map< short, L1MuDTEtaPattern, std::less< short > > etaLUT
Eta Pattern LUT.
void set_OutOfTime_Filter(bool par1)
friend std::ostream & operator<<(std::ostream &o, const L1TMuonBarrelParams &p)