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 
26 
29 
30 typedef std::map<short, short, std::less<short> > LUT;
31 
33 {
34 public:
36  L1TMuonBarrelParamsHelper(const L1TMuonBarrelParams& barrelParams) ;
37 
39 
40  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);
41  void configFromDB(l1t::TriggerSystem& trgSys);
42 
43 
44 
45  std::string AssLUTPath() const { return pnodes_[CONFIG].sparams_.size() > 0 ? pnodes_[CONFIG].sparams_[0] : ""; }
46  void setAssLUTPath (std::string path) { pnodes_[CONFIG].sparams_.push_back(path); }
47 
48  void setpta_lut(std::vector<LUT> ptalut) { lutparams_.pta_lut_ = ptalut; };
49  std::vector<LUT> pta_lut() const {return lutparams_.pta_lut_; };
50  void setpta_threshold(std::vector<int> ptathresh) { lutparams_.pta_threshold_ = ptathresh; };
51  std::vector<int> pta_threshold() const { return lutparams_.pta_threshold_; };
52 
53  void setphi_lut(std::vector<LUT> philut) { lutparams_.phi_lut_ = philut; };
54  std::vector<LUT> phi_lut() const {return lutparams_.phi_lut_; };
55 
56  void setext_lut(std::vector<LUTParams::extLUT> extlut) { lutparams_.ext_lut_ = extlut; };
57  std::vector<LUTParams::extLUT> ext_lut() const {return lutparams_.ext_lut_; };
58 
59  void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; };
60  qpLUT qp_lut() const {return lutparams_.qp_lut_; };
61 
63  etaLUT eta_lut() const {return lutparams_.eta_lut_; };
64 
65 
72  void set_BX_min(int par1) {pnodes_[CONFIG].iparams_[BX_min] = par1;}
73  void set_BX_max(int par1) {pnodes_[CONFIG].iparams_[BX_max] = par1;}
77  void set_Open_LUTs(bool par1) {pnodes_[CONFIG].iparams_[Open_LUTs] = par1;}
81 
82 
89  int get_BX_min() const {return pnodes_[CONFIG].iparams_[BX_min] ;}
90  int get_BX_max() const {return pnodes_[CONFIG].iparams_[BX_max];}
93 
94 
95  bool get_OutOfTime_Filter() const {return pnodes_[CONFIG].iparams_[OutOfTime_Filter];}
96  bool get_Open_LUTs() const {return pnodes_[CONFIG].iparams_[Open_LUTs] ;}
97  bool get_EtaTrackFinder() const {return pnodes_[CONFIG].iparams_[EtaTrackFinder] ;}
98  bool get_Extrapolation_21() const {return pnodes_[CONFIG].iparams_[Extrapolation_21] ;}
99  bool get_DisableNewAlgo() const {return pnodes_[CONFIG].iparams_[DisableNewAlgo] ;}
100 
101  // FW version
102  unsigned fwVersion() const { return fwVersion_; }
103  void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; }
104 
105  // print parameters to stream:
106  void print(std::ostream&) const;
108 
109 // L1MuDTExtLut l1mudttfextlut;
112 
113 private:
114 
115  int load_pt(std::vector<LUT>& , std::vector<int>&, unsigned short int, std::string);
116  int load_phi(std::vector<LUT>& , unsigned short int, unsigned short int, std::string);
117  int load_ext(std::vector<L1TMuonBarrelParams::LUTParams::extLUT>&, unsigned short int, unsigned short int );
118 
119 };
120 
121 #endif
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)
L1MuDTQualPatternLut l1mudttfqualplut
friend std::ostream& operator<<(std::ostream& o, const L1TMuonBarrelParams & p) { p...
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)