File indexing completed on 2025-01-31 02:19:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef CondFormats_L1TObjects_L1TMuonBarrelParams_h
0011 #define CondFormats_L1TObjects_L1TMuonBarrelParams_h
0012
0013 #include <memory>
0014 #include <iostream>
0015 #include <vector>
0016 #include <map>
0017
0018 #include "CondFormats/Serialization/interface/Serializable.h"
0019 #include "CondFormats/L1TObjects/interface/LUT.h"
0020 #include "CondFormats/L1TObjects/interface/L1MuDTTFParameters.h"
0021 #include "CondFormats/L1TObjects/interface/L1MuDTTFMasks.h"
0022 #include "CondFormats/L1TObjects/interface/L1MuDTEtaPattern.h"
0023
0024 class L1TMuonBarrelParams {
0025 public:
0026 L1TMuonBarrelParams();
0027 enum { Version = 1 };
0028
0029 class Node {
0030 public:
0031 std::string type_;
0032 unsigned version_;
0033 l1t::LUT LUT_;
0034 std::vector<double> dparams_;
0035 std::vector<unsigned> uparams_;
0036 std::vector<int> iparams_;
0037 std::vector<std::string> sparams_;
0038 Node() {
0039 type_ = "unspecified";
0040 version_ = 0;
0041 }
0042 COND_SERIALIZABLE;
0043 };
0044 enum { CONFIG = 0, NUM_BMTF_PARAM_NODES = 2 };
0045
0046 enum {
0047 PT_Assignment_nbits_Phi,
0048 PT_Assignment_nbits_PhiB,
0049 PHI_Assignment_nbits_Phi,
0050 PHI_Assignment_nbits_PhiB,
0051 Extrapolation_nbits_Phi,
0052 Extrapolation_nbits_PhiB,
0053 BX_min,
0054 BX_max,
0055 Extrapolation_Filter,
0056 OutOfTime_Filter_Window,
0057 OutOfTime_Filter,
0058 Open_LUTs,
0059 EtaTrackFinder,
0060 Extrapolation_21,
0061 DisableNewAlgo,
0062 NUM_CONFIG_PARAMS
0063 };
0064
0065
0066 L1MuDTTFParameters l1mudttfparams;
0067 L1MuDTTFMasks l1mudttfmasks;
0068
0069
0070
0071
0072
0073 typedef std::map<short, short, std::less<short> > LUT;
0074
0075 typedef std::pair<short, short> LUTID;
0076 typedef std::pair<short, std::vector<short> > LUTCONT;
0077 typedef std::map<LUTID, LUTCONT> qpLUT;
0078
0079 typedef std::map<short, L1MuDTEtaPattern, std::less<short> > etaLUT;
0080
0081 class LUTParams {
0082 public:
0083 std::vector<LUT> pta_lut_;
0084 std::vector<LUT> phi_lut_;
0085 std::vector<int> pta_threshold_;
0086 qpLUT qp_lut_;
0087 etaLUT eta_lut_;
0088
0089
0090 class extLUT {
0091 public:
0092 LUT low;
0093 LUT high;
0094 COND_SERIALIZABLE;
0095 };
0096 std::vector<extLUT> ext_lut_;
0097 LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6), ext_lut_(0) {}
0098 COND_SERIALIZABLE;
0099 };
0100
0101 ~L1TMuonBarrelParams() {}
0102
0103 std::string AssLUTPath() const { return !pnodes_[CONFIG].sparams_.empty() ? pnodes_[CONFIG].sparams_[0] : ""; };
0104 void setAssLUTPath(std::string path) { pnodes_[CONFIG].sparams_.push_back(path); };
0105
0106 void setpta_lut(std::vector<LUT> ptalut) { lutparams_.pta_lut_ = ptalut; };
0107 std::vector<LUT> pta_lut() const { return lutparams_.pta_lut_; };
0108 void setpta_threshold(std::vector<int> ptathresh) { lutparams_.pta_threshold_ = ptathresh; };
0109 std::vector<int> pta_threshold() const { return lutparams_.pta_threshold_; };
0110
0111 void setphi_lut(std::vector<LUT> philut) { lutparams_.phi_lut_ = philut; };
0112 std::vector<LUT> phi_lut() const { return lutparams_.phi_lut_; };
0113
0114 void setext_lut(std::vector<LUTParams::extLUT> extlut) { lutparams_.ext_lut_ = extlut; };
0115 std::vector<LUTParams::extLUT> ext_lut() const { return lutparams_.ext_lut_; };
0116
0117 void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; };
0118 qpLUT qp_lut() const { return lutparams_.qp_lut_; };
0119
0120 void seteta_lut(etaLUT eta_lut) { lutparams_.eta_lut_ = eta_lut; };
0121 etaLUT eta_lut() const { return lutparams_.eta_lut_; };
0122
0123 void set_PT_Assignment_nbits_Phi(int par1) { pnodes_[CONFIG].iparams_[PT_Assignment_nbits_Phi] = par1; };
0124 void set_PT_Assignment_nbits_PhiB(int par1) { pnodes_[CONFIG].iparams_[PT_Assignment_nbits_PhiB] = par1; };
0125 void set_PHI_Assignment_nbits_Phi(int par1) { pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_Phi] = par1; };
0126 void set_PHI_Assignment_nbits_PhiB(int par1) { pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_PhiB] = par1; };
0127 void set_Extrapolation_nbits_Phi(int par1) { pnodes_[CONFIG].iparams_[Extrapolation_nbits_Phi] = par1; };
0128 void set_Extrapolation_nbits_PhiB(int par1) { pnodes_[CONFIG].iparams_[Extrapolation_nbits_PhiB] = par1; };
0129 void set_BX_min(int par1) { pnodes_[CONFIG].iparams_[BX_min] = par1; };
0130 void set_BX_max(int par1) { pnodes_[CONFIG].iparams_[BX_max] = par1; };
0131 void set_Extrapolation_Filter(int par1) { pnodes_[CONFIG].iparams_[Extrapolation_Filter] = par1; };
0132 void set_OutOfTime_Filter_Window(int par1) { pnodes_[CONFIG].iparams_[OutOfTime_Filter_Window] = par1; };
0133 void set_OutOfTime_Filter(bool par1) { pnodes_[CONFIG].iparams_[OutOfTime_Filter] = par1; };
0134 void set_Open_LUTs(bool par1) { pnodes_[CONFIG].iparams_[Open_LUTs] = par1; };
0135 void set_EtaTrackFinder(bool par1) { pnodes_[CONFIG].iparams_[EtaTrackFinder] = par1; };
0136 void set_Extrapolation_21(bool par1) { pnodes_[CONFIG].iparams_[Extrapolation_21] = par1; };
0137 void set_DisableNewAlgo(bool par1) { pnodes_[CONFIG].iparams_[DisableNewAlgo] = par1; };
0138
0139 int get_PT_Assignment_nbits_Phi() const { return pnodes_[CONFIG].iparams_[PT_Assignment_nbits_Phi]; };
0140 int get_PT_Assignment_nbits_PhiB() const { return pnodes_[CONFIG].iparams_[PT_Assignment_nbits_PhiB]; };
0141 int get_PHI_Assignment_nbits_Phi() const { return pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_Phi]; };
0142 int get_PHI_Assignment_nbits_PhiB() const { return pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_PhiB]; };
0143 int get_Extrapolation_nbits_Phi() const { return pnodes_[CONFIG].iparams_[Extrapolation_nbits_Phi]; };
0144 int get_Extrapolation_nbits_PhiB() const { return pnodes_[CONFIG].iparams_[Extrapolation_nbits_PhiB]; };
0145 int get_BX_min() const { return pnodes_[CONFIG].iparams_[BX_min]; };
0146 int get_BX_max() const { return pnodes_[CONFIG].iparams_[BX_max]; };
0147 int get_Extrapolation_Filter() const { return pnodes_[CONFIG].iparams_[Extrapolation_Filter]; };
0148 int get_OutOfTime_Filter_Window() const { return pnodes_[CONFIG].iparams_[OutOfTime_Filter_Window]; };
0149
0150 bool get_OutOfTime_Filter() const { return pnodes_[CONFIG].iparams_[OutOfTime_Filter]; };
0151 bool get_Open_LUTs() const { return pnodes_[CONFIG].iparams_[Open_LUTs]; };
0152 bool get_EtaTrackFinder() const { return pnodes_[CONFIG].iparams_[EtaTrackFinder]; };
0153 bool get_Extrapolation_21() const { return pnodes_[CONFIG].iparams_[Extrapolation_21]; };
0154 bool get_DisableNewAlgo() const { return pnodes_[CONFIG].iparams_[DisableNewAlgo]; };
0155
0156 unsigned fwVersion() const { return fwVersion_; };
0157 void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; };
0158
0159 public:
0160 unsigned version_;
0161 unsigned fwVersion_;
0162
0163 std::vector<Node> pnodes_;
0164
0165 std::vector<L1MuDTTFParameters> l1mudttfparams_;
0166 std::vector<L1MuDTTFMasks> l1mudttfmasks_;
0167 LUTParams lutparams_;
0168
0169 COND_SERIALIZABLE;
0170 };
0171 #endif