CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTReg.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 //
11 //
12 // $Date: 2009/12/18 21:21:57 $
13 // $Revision: 1.5 $
14 //
15 // Author :
16 // H. Sakulin HEPHY Vienna
17 //
18 // Migrated to CMSSW:
19 // I. Mikulec
20 //
21 //--------------------------------------------------
22 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTReg_h
23 #define L1TriggerGlobalMuonTrigger_L1MuGMTReg_h
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 #include <string>
30 #include <vector>
31 
32 //-------------------------------
33 // Collaborating Class Headers --
34 //-------------------------------
35 
39 
41 
42 // ---------------------
43 // -- Class Interface --
44 // ---------------------
45 
46 
47 class L1MuGMTReg {
48 
49  public:
51  L1MuGMTReg(int ninst = 2) : m_value(ninst, 0) { };
52 
54  virtual ~L1MuGMTReg() {};
55 
57  unsigned getValue(int idx) { return m_value[idx]; };
58 
60  unsigned getNumberOfInstances() { return m_value.size(); }
61 
63  virtual std::string getName() =0;
64 
65  protected:
66  std::vector<unsigned> m_value;
67 };
68 
69 //
71 //
73 //
74 
76 
77  public:
79 
81  L1MuGMTRegMMConfig(const std::string& param, MergeMethods def_brl, MergeMethods def_fwd) :
82  m_param(param) {
83  m_default[0] = def_brl;
84  m_default[1] = def_fwd;
85  setMergeMethod();
86  };
87 
89  virtual ~L1MuGMTRegMMConfig() {};
90 
92  virtual std::string getName() { return "MMConfig_" + m_param; };
93 
95  void setMergeMethod() {
96  static MergeMethods avlMethods[6] = { takeDTCSC, takeRPC, byRank, byMinPt, byCombi, Special };
97  std::string mn[6] = { "takeDT", "takeRPC", "byRank", "byMinPt", "byCombi", "Special" };
98 
99  MergeMethods mm;
100  std::string mm_str;
101 
102  mm = m_default[0];
104  else if(m_param=="Eta") mm_str = L1MuGMTConfig::getGMTParams()->getMergeMethodEtaBrl();
105  else if(m_param=="Pt") mm_str = L1MuGMTConfig::getGMTParams()->getMergeMethodPtBrl();
106  else if(m_param=="Charge") mm_str = L1MuGMTConfig::getGMTParams()->getMergeMethodChargeBrl();
107  for(int ii=0; ii<6; ii++) if(mm_str == mn[ii]) {mm = avlMethods[ii]; break;}
108  m_value[0] = 1 << (5-(int) MergeMethods(mm));
109  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_Register_Info") << " "
110  << "MergeMethod" << m_param << "Brl"
111  << " is " << mm
112  << "( value " << m_value[0] << " )";
113 
114  mm = m_default[1];
115  mn[0] = "takeCSC";
117  else if(m_param=="Eta") mm_str = L1MuGMTConfig::getGMTParams()->getMergeMethodEtaFwd();
118  else if(m_param=="Pt") mm_str = L1MuGMTConfig::getGMTParams()->getMergeMethodPtFwd();
119  else if(m_param=="Charge") mm_str = L1MuGMTConfig::getGMTParams()->getMergeMethodChargeFwd();
120  for(int ii=0; ii<6; ii++) if(mm_str == mn[ii]) {mm = avlMethods[ii]; break;}
121  m_value[1] = 1 << (5-(int) MergeMethods(mm));
122  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_Register_Info") << " "
123  << "MergeMethod" << m_param << "Fwd"
124  << " is " << mm
125  << "( value " << m_value[1] << " )";
126 
127 
128  };
129 
130  protected:
133 } ;
134 
135 //
137 //
139 
141 public:
143 };
144 
145 //
147 //
149 
151  public:
153 };
154 
155 //
157 //
159 
161  public:
163 };
164 
165 //
167 //
169 
171  public:
173 };
174 
175 
176 
177 //
179 //
181 //
182 
184 
185  public:
187  L1MuGMTRegMMConfigMIPISO(const std::string& param, MergeMethods def_brl, MergeMethods def_fwd, bool def_and_brl, bool def_and_fwd) :
188  L1MuGMTRegMMConfig(param, def_brl, def_fwd) {
189 
190  bool doAND = false;
191 
194  if(doAND) m_value[0] |= 64;
195  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_Register_Info") << " "
196  << "MergeMethod" << m_param << "SpecialUseANDBrl"
197  << " is " << doAND;
198 
201  if(doAND) m_value[1] |= 64;
202  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_Register_Info") << " "
203  << "MergeMethod" << m_param << "SpecialUseANDFwd"
204  << " is " << doAND;
205 
206  };
207 
210 } ;
211 
212 
213 //
215 //
217 
219  public:
221 };
222 
223 //
225 //
227 
229  public:
231 };
232 
233 //
235 //
237 //
238 
240 
241  public:
244 
245  bool haloOverwrites;
246 
248  if (haloOverwrites) m_value[0] |= 64;
249  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_Register_info") << " "
250  << "HaloOverwritesMatchedBrl"
251  << " is " << haloOverwrites;
252 
254  if (haloOverwrites) m_value[1] |= 64;
255  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_Register_info") << " "
256  << "HaloOverwritesMatchedFwd"
257  << " is " << haloOverwrites;
258 
259  };
260 
263 } ;
264 
265 //
267 //
269 //
270 
272 
273  public:
276 
278  if ( L1MuGMTConfig::Debug(1) )
279  edm::LogVerbatim("GMT_Register_info") << " SortRankOffsetBrl is " << m_value[0];
280 
282  if ( L1MuGMTConfig::Debug(1) )
283  edm::LogVerbatim("GMT_Register_info") << " SortRankOffsetFwd is " << m_value[1];
284 
285  };
286 
288  virtual std::string getName() { return "SortRankOffset"; };
289 
292 } ;
293 
294 //
296 //
298 //
299 
301 
302  public:
305  setCDLConfig();
306  };
307 
309  virtual ~L1MuGMTRegCDLConfig() {};
310 
312  virtual std::string getName() { return std::string("CDLConfig"); };
313 
315  void setCDLConfig() {
316 
318  if ( L1MuGMTConfig::Debug(1) )
319  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordDTCSC is " << m_value[0];
320 
322  if ( L1MuGMTConfig::Debug(1) )
323  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordCSCDT is " << m_value[1];
324 
326  if ( L1MuGMTConfig::Debug(1) )
327  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordbRPCCSC is " << m_value[2];
328 
330  if ( L1MuGMTConfig::Debug(1) )
331  edm::LogVerbatim("GMT_Register_info") << " CDLConfigWordfRPCDT is " << m_value[3];
332 
333  };
334 
335  protected:
336 } ;
337 
338 
339 #endif
340 
341 
342 
343 
344 
345 
346 
347 
348 
349 
350 
351 
virtual std::string getName()
get Name
Definition: L1MuGMTReg.h:92
bool getHaloOverwritesMatchedBrl() const
const std::string & getMergeMethodPtFwd() const
const std::string & getMergeMethodPhiBrl() const
GMT Register that implements additional AND/OR flag.
Definition: L1MuGMTReg.h:183
GMT Merge Method Config Register Phi.
Definition: L1MuGMTReg.h:140
virtual ~L1MuGMTRegMMConfigMIPISO()
Definition: L1MuGMTReg.h:209
const std::string & getMergeMethodEtaBrl() const
virtual std::string getName()
get Name
Definition: L1MuGMTReg.h:288
std::string m_param
Definition: L1MuGMTReg.h:128
const std::string & getMergeMethodEtaFwd() const
unsigned getValue(int idx)
get Value
Definition: L1MuGMTReg.h:57
L1MuGMTReg(int ninst=2)
default constructor
Definition: L1MuGMTReg.h:51
int ii
Definition: cuy.py:588
bool getHaloOverwritesMatchedFwd() const
GMT Register that implements enum of merge methods.
Definition: L1MuGMTReg.h:75
GMT Merge Method Config Register Charge.
Definition: L1MuGMTReg.h:170
unsigned getCDLConfigWordbRPCCSC() const
GMT Merge Method Config Register ISO.
Definition: L1MuGMTReg.h:228
std::vector< unsigned > m_value
Definition: L1MuGMTReg.h:66
unsigned getSortRankOffsetBrl() const
static bool Debug()
MergeMethods m_default[2]
Definition: L1MuGMTReg.h:132
const std::string & getMergeMethodPhiFwd() const
unsigned getSortRankOffsetFwd() const
bool getMergeMethodMIPSpecialUseANDBrl() const
void setMergeMethod()
Definition: L1MuGMTReg.h:95
unsigned getCDLConfigWordDTCSC() const
GMT Register that implements Rank offset for merged cands.
Definition: L1MuGMTReg.h:271
virtual std::string getName()
get Name
Definition: L1MuGMTReg.h:312
GMT Register that implements Configuration of Cancel Decisison Logic.
Definition: L1MuGMTReg.h:300
virtual ~L1MuGMTRegMMConfig()
Definition: L1MuGMTReg.h:89
virtual ~L1MuGMTRegCDLConfig()
Definition: L1MuGMTReg.h:309
GMT Register that implements additional Halo Overwrites Matched bit.
Definition: L1MuGMTReg.h:239
unsigned getCDLConfigWordCSCDT() const
bool getMergeMethodISOSpecialUseANDBrl() const
GMT Merge Method Config Register Eta.
Definition: L1MuGMTReg.h:150
virtual ~L1MuGMTRegSortRankOffset()
Definition: L1MuGMTReg.h:291
const std::string & getMergeMethodChargeBrl() const
static const L1MuGMTParameters * getGMTParams()
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
unsigned getCDLConfigWordfRPCDT() const
unsigned getNumberOfInstances()
get number on instances
Definition: L1MuGMTReg.h:60
virtual ~L1MuGMTRegMMConfigSRK()
Definition: L1MuGMTReg.h:262
GMT Merge Method Config Register Pt.
Definition: L1MuGMTReg.h:160
bool getMergeMethodISOSpecialUseANDFwd() const
GMT Merge Method Config Register MIP.
Definition: L1MuGMTReg.h:218
virtual ~L1MuGMTReg()
destructor
Definition: L1MuGMTReg.h:54
L1MuGMTRegMMConfigMIPISO(const std::string &param, MergeMethods def_brl, MergeMethods def_fwd, bool def_and_brl, bool def_and_fwd)
Definition: L1MuGMTReg.h:187
L1MuGMTRegMMConfig(const std::string &param, MergeMethods def_brl, MergeMethods def_fwd)
Definition: L1MuGMTReg.h:81
bool getMergeMethodMIPSpecialUseANDFwd() const
const std::string & getMergeMethodPtBrl() const
const std::string & getMergeMethodChargeFwd() const
virtual std::string getName()=0
get Name