CMS 3D CMS Logo

L1MuGMTReg.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 //
11 //
12 //
13 // Author :
14 // H. Sakulin HEPHY Vienna
15 //
16 // Migrated to CMSSW:
17 // I. Mikulec
18 //
19 //--------------------------------------------------
20 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTReg_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTReg_h
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 #include <string>
28 #include <vector>
29 
30 //-------------------------------
31 // Collaborating Class Headers --
32 //-------------------------------
33 
37 
39 
40 // ---------------------
41 // -- Class Interface --
42 // ---------------------
43 
44 class L1MuGMTReg {
45 public:
47  L1MuGMTReg(int ninst = 2) : m_value(ninst, 0){};
48 
50  virtual ~L1MuGMTReg(){};
51 
53  unsigned getValue(int idx) { return m_value[idx]; };
54 
56  unsigned getNumberOfInstances() { return m_value.size(); }
57 
59  virtual std::string getName() = 0;
60 
61 protected:
62  std::vector<unsigned> m_value;
63 };
64 
65 //
67 //
69 //
70 
72 public:
74 
76  L1MuGMTRegMMConfig(const std::string& param, MergeMethods def_brl, MergeMethods def_fwd) : m_param(param) {
77  m_default[0] = def_brl;
78  m_default[1] = def_fwd;
80  };
81 
83  ~L1MuGMTRegMMConfig() override{};
84 
86  std::string getName() override { return "MMConfig_" + m_param; };
87 
89  void setMergeMethod() {
90  static MergeMethods avlMethods[6] = {takeDTCSC, takeRPC, byRank, byMinPt, byCombi, Special};
91  std::string mn[6] = {"takeDT", "takeRPC", "byRank", "byMinPt", "byCombi", "Special"};
92 
93  MergeMethods mm;
94  std::string mm_str;
95 
96  mm = m_default[0];
97  if (m_param == "Phi")
99  else if (m_param == "Eta")
101  else if (m_param == "Pt")
103  else if (m_param == "Charge")
105  for (int ii = 0; ii < 6; ii++)
106  if (mm_str == mn[ii]) {
107  mm = avlMethods[ii];
108  break;
109  }
110  m_value[0] = 1 << (5 - (int)MergeMethods(mm));
111  if (L1MuGMTConfig::Debug(1))
112  edm::LogVerbatim("GMT_Register_Info") << " "
113  << "MergeMethod" << m_param << "Brl"
114  << " is " << mm << "( value " << m_value[0] << " )";
115 
116  mm = m_default[1];
117  mn[0] = "takeCSC";
118  if (m_param == "Phi")
120  else if (m_param == "Eta")
122  else if (m_param == "Pt")
124  else if (m_param == "Charge")
126  for (int ii = 0; ii < 6; ii++)
127  if (mm_str == mn[ii]) {
128  mm = avlMethods[ii];
129  break;
130  }
131  m_value[1] = 1 << (5 - (int)MergeMethods(mm));
132  if (L1MuGMTConfig::Debug(1))
133  edm::LogVerbatim("GMT_Register_Info") << " "
134  << "MergeMethod" << m_param << "Fwd"
135  << " is " << mm << "( value " << m_value[1] << " )";
136  };
137 
138 protected:
141 };
142 
143 //
145 //
147 
149 public:
151 };
152 
153 //
155 //
157 
159 public:
161 };
162 
163 //
165 //
167 
169 public:
171 };
172 
173 //
175 //
177 
179 public:
182 };
183 
184 //
186 //
188 //
189 
191 public:
194  const std::string& param, MergeMethods def_brl, MergeMethods def_fwd, bool def_and_brl, bool def_and_fwd)
195  : L1MuGMTRegMMConfig(param, def_brl, def_fwd) {
196  bool doAND = false;
197 
198  if (m_param == "MIP")
200  else if (m_param == "ISO")
202  if (doAND)
203  m_value[0] |= 64;
204  if (L1MuGMTConfig::Debug(1))
205  edm::LogVerbatim("GMT_Register_Info") << " "
206  << "MergeMethod" << m_param << "SpecialUseANDBrl"
207  << " is " << doAND;
208 
209  if (m_param == "MIP")
211  else if (m_param == "ISO")
213  if (doAND)
214  m_value[1] |= 64;
215  if (L1MuGMTConfig::Debug(1))
216  edm::LogVerbatim("GMT_Register_Info") << " "
217  << "MergeMethod" << m_param << "SpecialUseANDFwd"
218  << " is " << doAND;
219  };
220 
223 };
224 
225 //
227 //
229 
231 public:
234 };
235 
236 //
238 //
240 
242 public:
245 };
246 
247 //
249 //
251 //
252 
254 public:
257  bool haloOverwrites;
258 
260  if (haloOverwrites)
261  m_value[0] |= 64;
262  if (L1MuGMTConfig::Debug(1))
263  edm::LogVerbatim("GMT_Register_info") << " "
264  << "HaloOverwritesMatchedBrl"
265  << " is " << haloOverwrites;
266 
268  if (haloOverwrites)
269  m_value[1] |= 64;
270  if (L1MuGMTConfig::Debug(1))
271  edm::LogVerbatim("GMT_Register_info") << " "
272  << "HaloOverwritesMatchedFwd"
273  << " is " << haloOverwrites;
274  };
275 
278 };
279 
280 //
282 //
284 //
285 
287 public:
291  if (L1MuGMTConfig::Debug(1))
292  edm::LogVerbatim("GMT_Register_info") << " SortRankOffsetBrl is " << m_value[0];
293 
295  if (L1MuGMTConfig::Debug(1))
296  edm::LogVerbatim("GMT_Register_info") << " SortRankOffsetFwd is " << m_value[1];
297  };
298 
300  std::string getName() override { return "SortRankOffset"; };
301 
304 };
305 
306 //
308 //
310 //
311 
313 public:
316 
318  ~L1MuGMTRegCDLConfig() override{};
319 
321  std::string getName() override { return std::string("CDLConfig"); };
322 
324  void setCDLConfig() {
326  if (L1MuGMTConfig::Debug(1))
327  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordDTCSC is " << m_value[0];
328 
330  if (L1MuGMTConfig::Debug(1))
331  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordCSCDT is " << m_value[1];
332 
334  if (L1MuGMTConfig::Debug(1))
335  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordbRPCCSC is " << m_value[2];
336 
338  if (L1MuGMTConfig::Debug(1))
339  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordfRPCDT is " << m_value[3];
340  };
341 
342 protected:
343 };
344 
345 #endif
L1MuGMTRegMMConfigEta::L1MuGMTRegMMConfigEta
L1MuGMTRegMMConfigEta()
Definition: L1MuGMTReg.h:160
L1MuGMTParameters::getCDLConfigWordbRPCCSC
unsigned getCDLConfigWordbRPCCSC() const
Definition: L1MuGMTParameters.h:165
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
L1MuGMTRegCDLConfig::~L1MuGMTRegCDLConfig
~L1MuGMTRegCDLConfig() override
Definition: L1MuGMTReg.h:318
L1MuGMTRegCDLConfig::L1MuGMTRegCDLConfig
L1MuGMTRegCDLConfig()
Definition: L1MuGMTReg.h:315
L1MuGMTRegMMConfigMIPISO::~L1MuGMTRegMMConfigMIPISO
~L1MuGMTRegMMConfigMIPISO() override
Definition: L1MuGMTReg.h:222
L1MuGMTReg
Definition: L1MuGMTReg.h:44
L1MuGMTRegMMConfigPhi
GMT Merge Method Config Register Phi.
Definition: L1MuGMTReg.h:148
L1MuGMTParameters::getMergeMethodPtBrl
const std::string & getMergeMethodPtBrl() const
Definition: L1MuGMTParameters.h:89
L1MuGMTConfig::getGMTParams
static const L1MuGMTParameters * getGMTParams()
Definition: L1MuGMTConfig.h:184
L1MuGMTRegMMConfig::byMinPt
Definition: L1MuGMTReg.h:73
L1MuGMTRegMMConfigCharge
GMT Merge Method Config Register Charge.
Definition: L1MuGMTReg.h:178
L1MuGMTReg::getNumberOfInstances
unsigned getNumberOfInstances()
get number on instances
Definition: L1MuGMTReg.h:56
L1MuGMTRegCDLConfig::setCDLConfig
void setCDLConfig()
Definition: L1MuGMTReg.h:324
L1MuGMTParameters::getCDLConfigWordfRPCDT
unsigned getCDLConfigWordfRPCDT() const
Definition: L1MuGMTParameters.h:168
L1MuGMTParameters::getHaloOverwritesMatchedFwd
bool getHaloOverwritesMatchedFwd() const
Definition: L1MuGMTParameters.h:150
L1MuGMTRegMMConfigPhi::L1MuGMTRegMMConfigPhi
L1MuGMTRegMMConfigPhi()
Definition: L1MuGMTReg.h:150
L1MuGMTRegCDLConfig
GMT Register that implements Configuration of Cancel Decisison Logic.
Definition: L1MuGMTReg.h:312
L1MuGMTRegMMConfig::m_default
MergeMethods m_default[2]
Definition: L1MuGMTReg.h:140
L1MuGMTRegMMConfig::L1MuGMTRegMMConfig
L1MuGMTRegMMConfig(const std::string &param, MergeMethods def_brl, MergeMethods def_fwd)
Definition: L1MuGMTReg.h:76
L1MuGMTRegMMConfigSRK::~L1MuGMTRegMMConfigSRK
~L1MuGMTRegMMConfigSRK() override
Definition: L1MuGMTReg.h:277
L1MuGMTRegMMConfig::takeRPC
Definition: L1MuGMTReg.h:73
L1MuGMTRegCDLConfig::getName
std::string getName() override
get Name
Definition: L1MuGMTReg.h:321
L1MuGMTRegMMConfigISO
GMT Merge Method Config Register ISO.
Definition: L1MuGMTReg.h:241
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
L1MuGMTParameters::getCDLConfigWordDTCSC
unsigned getCDLConfigWordDTCSC() const
Definition: L1MuGMTParameters.h:159
L1MuGMTRegMMConfigPt
GMT Merge Method Config Register Pt.
Definition: L1MuGMTReg.h:168
L1MuGMTParameters::getMergeMethodEtaBrl
const std::string & getMergeMethodEtaBrl() const
Definition: L1MuGMTParameters.h:83
L1MuGMTParameters.h
L1MuGMTRegMMConfig::~L1MuGMTRegMMConfig
~L1MuGMTRegMMConfig() override
Definition: L1MuGMTReg.h:83
L1MuGMTRegMMConfig::m_param
std::string m_param
Definition: L1MuGMTReg.h:136
L1MuGMTReg::~L1MuGMTReg
virtual ~L1MuGMTReg()
destructor
Definition: L1MuGMTReg.h:50
L1MuGMTRegMMConfig::byRank
Definition: L1MuGMTReg.h:73
L1MuGMTParameters::getMergeMethodMIPSpecialUseANDFwd
bool getMergeMethodMIPSpecialUseANDFwd() const
Definition: L1MuGMTParameters.h:118
L1MuGMTRegSortRankOffset
GMT Register that implements Rank offset for merged cands.
Definition: L1MuGMTReg.h:286
L1MuGMTReg::getName
virtual std::string getName()=0
get Name
L1MuGMTParameters::getCDLConfigWordCSCDT
unsigned getCDLConfigWordCSCDT() const
Definition: L1MuGMTParameters.h:162
L1MuGMTParameters::getMergeMethodPtFwd
const std::string & getMergeMethodPtFwd() const
Definition: L1MuGMTParameters.h:92
L1MuGMTRegMMConfig::takeDTCSC
Definition: L1MuGMTReg.h:73
L1MuGMTRegMMConfig::MergeMethods
MergeMethods
Definition: L1MuGMTReg.h:73
L1MuGMTParameters::getMergeMethodISOSpecialUseANDBrl
bool getMergeMethodISOSpecialUseANDBrl() const
Definition: L1MuGMTParameters.h:129
L1MuGMTConfig.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1MuGMTRegMMConfigPt::L1MuGMTRegMMConfigPt
L1MuGMTRegMMConfigPt()
Definition: L1MuGMTReg.h:170
L1MuGMTRegMMConfig::getName
std::string getName() override
get Name
Definition: L1MuGMTReg.h:86
funct::true
true
Definition: Factorize.h:173
L1MuGMTRegMMConfig
GMT Register that implements enum of merge methods.
Definition: L1MuGMTReg.h:71
L1MuGMTRegSortRankOffset::~L1MuGMTRegSortRankOffset
~L1MuGMTRegSortRankOffset() override
Definition: L1MuGMTReg.h:303
L1MuGMTParameters::getMergeMethodChargeBrl
const std::string & getMergeMethodChargeBrl() const
Definition: L1MuGMTParameters.h:97
L1MuGMTParameters::getMergeMethodPhiBrl
const std::string & getMergeMethodPhiBrl() const
Definition: L1MuGMTParameters.h:77
L1MuGMTRegMMConfigEta
GMT Merge Method Config Register Eta.
Definition: L1MuGMTReg.h:158
L1MuGMTRegSortRankOffset::L1MuGMTRegSortRankOffset
L1MuGMTRegSortRankOffset()
Definition: L1MuGMTReg.h:289
createfilelist.int
int
Definition: createfilelist.py:10
L1MuGMTRegMMConfigMIPISO::L1MuGMTRegMMConfigMIPISO
L1MuGMTRegMMConfigMIPISO(const std::string &param, MergeMethods def_brl, MergeMethods def_fwd, bool def_and_brl, bool def_and_fwd)
Definition: L1MuGMTReg.h:193
L1MuGMTRegMMConfigSRK
GMT Register that implements additional Halo Overwrites Matched bit.
Definition: L1MuGMTReg.h:253
L1MuGMTParameters::getMergeMethodMIPSpecialUseANDBrl
bool getMergeMethodMIPSpecialUseANDBrl() const
Definition: L1MuGMTParameters.h:113
L1MuGMTParameters::getSortRankOffsetBrl
unsigned getSortRankOffsetBrl() const
Definition: L1MuGMTParameters.h:153
L1MuGMTReg::getValue
unsigned getValue(int idx)
get Value
Definition: L1MuGMTReg.h:53
L1MuGMTParameters::getMergeMethodEtaFwd
const std::string & getMergeMethodEtaFwd() const
Definition: L1MuGMTParameters.h:86
L1MuGMTParameters::getMergeMethodPhiFwd
const std::string & getMergeMethodPhiFwd() const
Definition: L1MuGMTParameters.h:80
L1MuGMTRegMMConfig::byCombi
Definition: L1MuGMTReg.h:73
L1MuGMTReg::L1MuGMTReg
L1MuGMTReg(int ninst=2)
default constructor
Definition: L1MuGMTReg.h:47
L1MuGMTParameters::getSortRankOffsetFwd
unsigned getSortRankOffsetFwd() const
Definition: L1MuGMTParameters.h:156
L1MuGMTRegMMConfig::Special
Definition: L1MuGMTReg.h:73
L1MuGMTParameters::getMergeMethodChargeFwd
const std::string & getMergeMethodChargeFwd() const
Definition: L1MuGMTParameters.h:102
L1MuGMTParameters::getHaloOverwritesMatchedBrl
bool getHaloOverwritesMatchedBrl() const
Definition: L1MuGMTParameters.h:145
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
L1MuGMTRegSortRankOffset::getName
std::string getName() override
get Name
Definition: L1MuGMTReg.h:300
L1MuGMTReg::m_value
std::vector< unsigned > m_value
Definition: L1MuGMTReg.h:62
L1MuGMTParameters::getMergeMethodISOSpecialUseANDFwd
bool getMergeMethodISOSpecialUseANDFwd() const
Definition: L1MuGMTParameters.h:134
L1MuGMTRegMMConfigCharge::L1MuGMTRegMMConfigCharge
L1MuGMTRegMMConfigCharge()
Definition: L1MuGMTReg.h:180
L1MuGMTRegMMConfigISO::L1MuGMTRegMMConfigISO
L1MuGMTRegMMConfigISO()
Definition: L1MuGMTReg.h:243
L1MuGMTRegMMConfigMIP::L1MuGMTRegMMConfigMIP
L1MuGMTRegMMConfigMIP()
Definition: L1MuGMTReg.h:232
L1MuGMTRegMMConfigSRK::L1MuGMTRegMMConfigSRK
L1MuGMTRegMMConfigSRK()
Definition: L1MuGMTReg.h:256
ParameterSet.h
L1MuGMTRegMMConfig::setMergeMethod
void setMergeMethod()
Definition: L1MuGMTReg.h:89
L1MuGMTConfig::Debug
static bool Debug()
Definition: L1MuGMTConfig.h:101
edm::Log
Definition: MessageLogger.h:70
L1MuGMTRegMMConfigMIPISO
GMT Register that implements additional AND/OR flag.
Definition: L1MuGMTReg.h:190
cuy.ii
ii
Definition: cuy.py:590
L1MuGMTRegMMConfigMIP
GMT Merge Method Config Register MIP.
Definition: L1MuGMTReg.h:230