CMS 3D CMS Logo

L1TMuonBarrelParamsHelper.h
Go to the documentation of this file.
1 #ifndef L1TMUON_BARREL_PARAMS_HELPER_h
2 #define L1TMUON_BARREL_PARAMS_HELPER_h
3 
4 // system include files
5 #include <memory>
6 #include "boost/shared_ptr.hpp"
7 
8 // user include files
13 
17 
21 
25 
28 
29 typedef std::map<short, short, std::less<short> > LUT;
30 
32 {
33 public:
35  L1TMuonBarrelParamsHelper(const L1TMuonBarrelParams& barrelParams) ;
36 
38 
39  void configFromPy(std::map<std::string, int>& allInts, std::map<std::string, bool>& allBools, std::map<std::string, std::vector<std::string> > allMasks, unsigned int fwVersion, const std::string& AssLUTpath);
40  void configFromDB(l1t::TriggerSystem& trgSys);
41 
42 
43 
44  std::string AssLUTPath() const { return !pnodes_[CONFIG].sparams_.empty() ? pnodes_[CONFIG].sparams_[0] : ""; }
45  void setAssLUTPath (std::string path) { pnodes_[CONFIG].sparams_.push_back(path); }
46 
47  void setpta_lut(std::vector<LUT> ptalut) { lutparams_.pta_lut_ = ptalut; };
48  std::vector<LUT> pta_lut() const {return lutparams_.pta_lut_; };
49  void setpta_threshold(std::vector<int> ptathresh) { lutparams_.pta_threshold_ = ptathresh; };
50  std::vector<int> pta_threshold() const { return lutparams_.pta_threshold_; };
51 
52  void setphi_lut(std::vector<LUT> philut) { lutparams_.phi_lut_ = philut; };
53  std::vector<LUT> phi_lut() const {return lutparams_.phi_lut_; };
54 
55  void setext_lut(std::vector<LUTParams::extLUT> extlut) { lutparams_.ext_lut_ = extlut; };
56  std::vector<LUTParams::extLUT> ext_lut() const {return lutparams_.ext_lut_; };
57 
58  void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; };
59  qpLUT qp_lut() const {return lutparams_.qp_lut_; };
60 
62  etaLUT eta_lut() const {return lutparams_.eta_lut_; };
63 
64 
71  void set_BX_min(int par1) {pnodes_[CONFIG].iparams_[BX_min] = par1;}
72  void set_BX_max(int par1) {pnodes_[CONFIG].iparams_[BX_max] = par1;}
76  void set_Open_LUTs(bool par1) {pnodes_[CONFIG].iparams_[Open_LUTs] = par1;}
80 
81 
88  int get_BX_min() const {return pnodes_[CONFIG].iparams_[BX_min] ;}
89  int get_BX_max() const {return pnodes_[CONFIG].iparams_[BX_max];}
92 
93 
94  bool get_OutOfTime_Filter() const {return pnodes_[CONFIG].iparams_[OutOfTime_Filter];}
95  bool get_Open_LUTs() const {return pnodes_[CONFIG].iparams_[Open_LUTs] ;}
96  bool get_EtaTrackFinder() const {return pnodes_[CONFIG].iparams_[EtaTrackFinder] ;}
97  bool get_Extrapolation_21() const {return pnodes_[CONFIG].iparams_[Extrapolation_21] ;}
98  bool get_DisableNewAlgo() const {return pnodes_[CONFIG].iparams_[DisableNewAlgo] ;}
99 
100  // FW version
101  unsigned fwVersion() const { return fwVersion_; }
102  void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; }
103 
104  // print parameters to stream:
105  void print(std::ostream&) const;
107 
108 // L1MuDTExtLut l1mudttfextlut;
111 
112 private:
113 
114  int load_pt(std::vector<LUT>& , std::vector<int>&, unsigned short int, std::string);
115  int load_phi(std::vector<LUT>& , unsigned short int, unsigned short int, std::string);
116  int load_ext(std::vector<L1TMuonBarrelParams::LUTParams::extLUT>&, unsigned short int, unsigned short int );
117 
118 };
119 
120 #endif
L1MuBMTQualPatternLut l1mudttfqualplut
friend std::ostream& operator<<(std::ostream& o, const L1TMuonBarrelParams & p) { p...
int load_phi(std::vector< LUT > &, unsigned short int, unsigned short int, std::string)
std::vector< LUT > phi_lut() const
std::vector< LUT > pta_lut() const
std::map< short, short, std::less< short > > LUT
std::vector< int > pta_threshold() const
std::vector< LUTParams::extLUT > ext_lut() const
void setphi_lut(std::vector< LUT > philut)
int load_ext(std::vector< L1TMuonBarrelParams::LUTParams::extLUT > &, unsigned short int, unsigned short int)
std::map< LUTID, LUTCONT > qpLUT
void setpta_lut(std::vector< LUT > ptalut)
int load_pt(std::vector< LUT > &, std::vector< int > &, unsigned short int, std::string)
if configDB
void setAssLUTPath(std::string path)
void setFwVersion(unsigned fwVersion)
void setext_lut(std::vector< LUTParams::extLUT > extlut)
void configFromPy(std::map< std::string, int > &allInts, std::map< std::string, bool > &allBools, std::map< std::string, std::vector< std::string > > allMasks, unsigned int fwVersion, const std::string &AssLUTpath)
void print(std::ostream &) const
void configFromDB(l1t::TriggerSystem &trgSys)
std::vector< Node > pnodes_
std::map< short, L1MuDTEtaPattern, std::less< short > > etaLUT
Eta Pattern LUT.
void setpta_threshold(std::vector< int > ptathresh)