CMS 3D CMS Logo

GlobalCondition.cc
Go to the documentation of this file.
1 
18 // this class header
20 
21 // system include files
22 
23 // user include files
24 
25 // forward declarations
26 
27 // constructor
28 // empty
32  m_condChipNr = -1;
33  m_condRelativeBx = 0;
34 
35  // the rest of private members are C++ initialized
36 }
37 
38 // constructor from condition name
40  m_condName = cName;
41 
44  m_condChipNr = -1;
45  m_condRelativeBx = 0;
46 }
47 
48 // constructor from condition name, category and type
50  const l1t::GtConditionCategory& cCategory,
51  const l1t::GtConditionType& cType) {
52  m_condName = cName;
53  m_condCategory = cCategory;
54  m_condType = cType;
55 
56  m_condChipNr = -1;
57  m_condRelativeBx = 0;
58 }
59 
61  // empty
62 }
63 
64 // get number of trigger objects
65 const int GlobalCondition::nrObjects() const {
66  switch (m_condType) {
67  case l1t::TypeNull:
68  case l1t::TypeExternal: {
69  return 0;
70  }
71 
72  break;
73  case l1t::TypeCent0:
74  case l1t::TypeCent1:
75  case l1t::TypeCent2:
76  case l1t::TypeCent3:
77  case l1t::TypeCent4:
78  case l1t::TypeCent5:
79  case l1t::TypeCent6:
80  case l1t::TypeCent7: {
81  return 0;
82  }
83 
84  case l1t::Type1s: {
85  return 1;
86  }
87 
88  break;
89  case l1t::Type2s:
90  case l1t::Type2wsc:
91  case l1t::Type2cor: {
92  return 2;
93  }
94 
95  break;
97  return 3;
98  }
99 
100  break;
101  case l1t::Type3s: {
102  return 3;
103  }
104 
105  break;
106  case l1t::Type4s: {
107  return 4;
108  }
109 
110  break;
111  case l1t::TypeETT:
112  case l1t::TypeETM:
113  case l1t::TypeHTT:
114  case l1t::TypeHTM:
115  case l1t::TypeETMHF:
116  case l1t::TypeTowerCount:
121  case l1t::TypeAsymEt:
122  case l1t::TypeAsymHt:
123  case l1t::TypeAsymEtHF:
124  case l1t::TypeAsymHtHF: {
125  return 1;
126  }
127 
128  break;
129  default: {
130  // TODO no such type, throw exception?
131  return 0;
132  } break;
133  }
134 }
135 
136 // get logic flag for conditions, same type of trigger objects,
137 // and with spatial correlations
138 const bool GlobalCondition::wsc() const {
139  if (m_condType == l1t::Type2wsc) {
140  return true;
141  }
142 
143  return false;
144 }
145 
146 // get logic flag for conditions, different type of trigger objects,
147 // and with spatial correlations
148 const bool GlobalCondition::corr() const {
149  if (m_condType == l1t::Type2cor) {
150  return true;
151  }
152 
153  return false;
154 }
155 
156 // get logic flag for conditions, trigger objects are muons
157 const bool GlobalCondition::corrThree() const {
158  if (m_condType == l1t::Type3s) {
159  return true;
160  }
161 
162  return false;
163 }
164 
165 // print condition
166 void GlobalCondition::print(std::ostream& myCout) const {
167  myCout << "\n Condition name: " << m_condName << std::endl;
168 
169  switch (m_condCategory) {
170  case l1t::CondNull: {
171  myCout << " Condition category: "
172  << "l1t::CondNull"
173  << " - it means not defined!" << std::endl;
174  }
175 
176  break;
177  case l1t::CondMuon: {
178  myCout << " Condition category: "
179  << "l1t::CondMuon" << std::endl;
180  }
181 
182  break;
183  case l1t::CondCalo: {
184  myCout << " Condition category: "
185  << "l1t::CondCalo" << std::endl;
186  }
187 
188  break;
189  case l1t::CondEnergySum: {
190  myCout << " Condition category: "
191  << "CondEnergySum" << std::endl;
192  }
193 
194  break;
195  case l1t::CondCorrelation: {
196  myCout << " Condition category: "
197  << "CondCorrelation" << std::endl;
198  }
199 
200  break;
202  myCout << " Condition category: "
203  << "CondCorrelationThreeBody" << std::endl;
204  }
205 
206  break;
208  myCout << " Condition category: "
209  << "CondCorrelationWithOverlapRemoval" << std::endl;
210  }
211 
212  break;
213  case l1t::CondExternal: {
214  myCout << " Condition category: "
215  << "CondExternal" << std::endl;
216  }
217 
218  break;
219  default: {
220  myCout << " Condition category: " << m_condCategory
221  << " - no such category defined. Check l1t::GtConditionCategory enum." << std::endl;
222 
223  } break;
224  }
225 
226  switch (m_condType) {
227  case l1t::TypeNull: {
228  myCout << " Condition type: "
229  << "l1t::TypeNull"
230  << " - it means not defined!" << std::endl;
231  }
232 
233  break;
234  case l1t::Type1s: {
235  myCout << " Condition type: "
236  << "l1t::Type1s" << std::endl;
237  }
238 
239  break;
240  case l1t::Type2s: {
241  myCout << " Condition type: "
242  << "l1t::Type2s" << std::endl;
243  }
244 
245  break;
247  myCout << " Condition type: "
248  << "l1t::Type2corWithOverlapRemoval" << std::endl;
249  }
250 
251  break;
252  case l1t::Type2wsc: {
253  myCout << " Condition type: "
254  << "l1t::Type2wsc" << std::endl;
255  }
256 
257  break;
258  case l1t::Type2cor: {
259  myCout << " Condition type: "
260  << "l1t::Type2cor" << std::endl;
261  }
262 
263  break;
264  case l1t::Type3s: {
265  myCout << " Condition type: "
266  << "l1t::Type3s" << std::endl;
267  }
268 
269  break;
270  case l1t::Type4s: {
271  myCout << " Condition type: "
272  << "l1t::Type4s" << std::endl;
273  }
274 
275  break;
276  case l1t::TypeETM: {
277  myCout << " Condition type: "
278  << "TypeETM" << std::endl;
279  }
280 
281  break;
282  case l1t::TypeETT: {
283  myCout << " Condition type: "
284  << "TypeETT" << std::endl;
285  }
286 
287  break;
288  case l1t::TypeHTT: {
289  myCout << " Condition type: "
290  << "TypeHTT" << std::endl;
291  }
292 
293  break;
294  case l1t::TypeHTM: {
295  myCout << " Condition type: "
296  << "TypeHTM" << std::endl;
297  }
298 
299  break;
300  case l1t::TypeETMHF: {
301  myCout << " Condition type: "
302  << "TypeETMHF" << std::endl;
303  }
304 
305  break;
306  case l1t::TypeTowerCount: {
307  myCout << " Condition type: "
308  << "TypeTowerCount" << std::endl;
309  }
310 
311  break;
312  case l1t::TypeMinBiasHFP0: {
313  myCout << " Condition type: "
314  << "TypeMinBiasHFP0" << std::endl;
315  }
316 
317  break;
318  case l1t::TypeMinBiasHFM0: {
319  myCout << " Condition type: "
320  << "TypeMinBiasHFM0" << std::endl;
321  }
322 
323  break;
324  case l1t::TypeMinBiasHFP1: {
325  myCout << " Condition type: "
326  << "TypeMinBiasHFP1" << std::endl;
327  }
328 
329  break;
330  case l1t::TypeMinBiasHFM1: {
331  myCout << " Condition type: "
332  << "TypeMinBiasHFM1" << std::endl;
333  }
334 
335  break;
336  case l1t::TypeETTem: {
337  myCout << " Condition type: "
338  << "TypeETTem" << std::endl;
339  }
340 
341  break;
342  case l1t::TypeAsymEt: {
343  myCout << " Condition type: "
344  << "TypeAsymEt" << std::endl;
345  }
346 
347  break;
348  case l1t::TypeAsymHt: {
349  myCout << " Condition type: "
350  << "TypeAsymHt" << std::endl;
351  }
352 
353  break;
354  case l1t::TypeAsymEtHF: {
355  myCout << " Condition type: "
356  << "TypeAsymEtHF" << std::endl;
357  }
358 
359  break;
360  case l1t::TypeAsymHtHF: {
361  myCout << " Condition type: "
362  << "TypeAsymHtHF" << std::endl;
363  }
364 
365  break;
366  case l1t::TypeCent0: {
367  myCout << " Condition type: "
368  << "TypeCent0" << std::endl;
369  }
370 
371  break;
372  case l1t::TypeCent1: {
373  myCout << " Condition type: "
374  << "TypeCent1" << std::endl;
375  }
376 
377  break;
378  case l1t::TypeCent2: {
379  myCout << " Condition type: "
380  << "TypeCent2" << std::endl;
381  }
382 
383  break;
384  case l1t::TypeCent3: {
385  myCout << " Condition type: "
386  << "TypeCent3" << std::endl;
387  }
388 
389  break;
390  case l1t::TypeCent4: {
391  myCout << " Condition type: "
392  << "TypeCent4" << std::endl;
393  }
394 
395  break;
396  case l1t::TypeCent5: {
397  myCout << " Condition type: "
398  << "TypeCent5" << std::endl;
399  }
400 
401  break;
402  case l1t::TypeCent6: {
403  myCout << " Condition type: "
404  << "TypeCent6" << std::endl;
405  }
406 
407  break;
408  case l1t::TypeCent7: {
409  myCout << " Condition type: "
410  << "TypeCent7" << std::endl;
411  }
412 
413  break;
414  case l1t::TypeExternal: {
415  myCout << " Condition type: "
416  << "TypeExternal" << std::endl;
417  }
418 
419  break;
420  default: {
421  myCout << " Condition type: " << m_condType << " - no such type defined. Check l1t::GtConditionType enum."
422  << std::endl;
423  } break;
424  }
425 
426  myCout << " Object types: ";
427 
428  for (unsigned int i = 0; i < m_objectType.size(); ++i) {
429  switch (m_objectType[i]) {
430  case l1t::gtMu: {
431  myCout << " Mu ";
432  }
433 
434  break;
435  case l1t::gtEG: {
436  myCout << " EG ";
437  }
438 
439  break;
440 
441  case l1t::gtJet: {
442  myCout << " Jet ";
443  }
444 
445  break;
446 
447  case l1t::gtTau: {
448  myCout << " Tau ";
449  }
450 
451  break;
452  case l1t::gtETM: {
453  myCout << " ETM ";
454  }
455 
456  break;
457  case l1t::gtETT: {
458  myCout << " ETT ";
459  }
460 
461  break;
462  case l1t::gtHTT: {
463  myCout << " HTT ";
464  }
465 
466  break;
467  case l1t::gtHTM: {
468  myCout << " HTM ";
469  }
470 
471  break;
472 
473  case l1t::gtETMHF: {
474  myCout << " ETMHF ";
475  }
476 
477  break;
478  case l1t::gtTowerCount: {
479  myCout << " TowerCount ";
480  }
481 
482  break;
483  case l1t::gtMinBiasHFP0: {
484  myCout << " MinBiasHFP0 ";
485  }
486 
487  break;
488  case l1t::gtMinBiasHFM0: {
489  myCout << " MinBiasHFM0 ";
490  }
491 
492  break;
493  case l1t::gtMinBiasHFP1: {
494  myCout << " MinBiasHFP1 ";
495  }
496 
497  break;
498  case l1t::gtMinBiasHFM1: {
499  myCout << " MinBiasHFM1 ";
500  }
501 
502  break;
503  case l1t::gtETTem: {
504  myCout << " ETTem ";
505  }
506 
507  break;
508  case l1t::gtAsymmetryEt: {
509  myCout << " AsymmetryEt ";
510  }
511 
512  break;
513  case l1t::gtAsymmetryHt: {
514  myCout << " AsymmetryHt ";
515  }
516 
517  break;
518  case l1t::gtAsymmetryEtHF: {
519  myCout << " AsymmetryEtHF ";
520  }
521 
522  break;
523  case l1t::gtAsymmetryHtHF: {
524  myCout << " AsymmetryHtHF ";
525  }
526 
527  break;
528  case l1t::gtCentrality0: {
529  myCout << " Centrality0 ";
530  }
531 
532  break;
533  case l1t::gtCentrality1: {
534  myCout << " Centrality1 ";
535  }
536 
537  break;
538  case l1t::gtCentrality2: {
539  myCout << " Centrality2 ";
540  }
541 
542  break;
543  case l1t::gtCentrality3: {
544  myCout << " Centrality3 ";
545  }
546 
547  break;
548  case l1t::gtCentrality4: {
549  myCout << " Centrality4 ";
550  }
551 
552  break;
553  case l1t::gtCentrality5: {
554  myCout << " Centrality5 ";
555  }
556 
557  break;
558  case l1t::gtCentrality6: {
559  myCout << " Centrality6 ";
560  }
561 
562  break;
563  case l1t::gtCentrality7: {
564  myCout << " Centrality7 ";
565  }
566 
567  break;
568 
569  case l1t::gtExternal: {
570  myCout << " External ";
571  }
572 
573  break;
574  default: {
575  myCout << " Unknown type " << m_objectType[i];
576  } break;
577  }
578  }
579 
580  myCout << std::endl;
581 
582  myCout << " \" >= \" flag: " << m_condGEq << std::endl;
583 
584  myCout << " Condition chip: " << m_condChipNr;
585 
586  if (m_condChipNr < 0) {
587  myCout << " - not properly initialized! ";
588  }
589 
590  myCout << std::endl;
591 
592  myCout << " Relative BX: " << m_condRelativeBx << std::endl;
593 }
594 
595 // output stream operator
596 std::ostream& operator<<(std::ostream& os, const GlobalCondition& result) {
597  result.print(os);
598  return os;
599 }
l1t::gtHTM
Definition: GlobalObject.h:24
l1t::Type2cor
Definition: GlobalDefinitions.h:54
l1t::TypeCent5
Definition: GlobalDefinitions.h:75
l1t::gtCentrality0
Definition: GlobalObject.h:36
l1t::gtExternal
Definition: GlobalObject.h:44
mps_fire.i
i
Definition: mps_fire.py:428
l1t::TypeNull
Definition: GlobalDefinitions.h:50
GlobalCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: GlobalCondition.cc:166
GlobalCondition::corr
const bool corr() const
Definition: GlobalCondition.cc:148
l1t::TypeETM
Definition: GlobalDefinitions.h:57
l1t::gtEG
Definition: GlobalObject.h:18
l1t::Type3s
Definition: GlobalDefinitions.h:55
l1t::gtETTem
Definition: GlobalObject.h:31
l1t::CondCorrelationWithOverlapRemoval
Definition: GlobalDefinitions.h:100
l1t::gtMinBiasHFP1
Definition: GlobalObject.h:29
l1t::gtMinBiasHFM1
Definition: GlobalObject.h:30
l1t::TypeAsymEtHF
Definition: GlobalDefinitions.h:80
l1t::gtAsymmetryEt
Definition: GlobalObject.h:32
GlobalCondition.h
l1t::TypeMinBiasHFP0
Definition: GlobalDefinitions.h:63
GlobalCondition::m_condRelativeBx
int m_condRelativeBx
Definition: GlobalCondition.h:126
l1t::TypeCent2
Definition: GlobalDefinitions.h:72
l1t::TypeCent3
Definition: GlobalDefinitions.h:73
l1t::gtCentrality5
Definition: GlobalObject.h:41
l1t::TypeCent7
Definition: GlobalDefinitions.h:77
l1t::TypeMinBiasHFM1
Definition: GlobalDefinitions.h:66
l1t::gtCentrality7
Definition: GlobalObject.h:43
l1t::gtAsymmetryHt
Definition: GlobalObject.h:33
l1t::gtCentrality4
Definition: GlobalObject.h:40
l1t::gtJet
Definition: GlobalObject.h:19
l1t::gtTowerCount
Definition: GlobalObject.h:26
l1t::Type2corWithOverlapRemoval
Definition: GlobalDefinitions.h:69
l1t::TypeCent1
Definition: GlobalDefinitions.h:71
l1t::CondCalo
Definition: GlobalDefinitions.h:96
l1t::CondNull
Definition: GlobalDefinitions.h:94
l1t::GtConditionType
GtConditionType
Definition: GlobalDefinitions.h:49
operator<<
std::ostream & operator<<(std::ostream &os, const GlobalCondition &result)
Definition: GlobalCondition.cc:596
l1t::TypeAsymEt
Definition: GlobalDefinitions.h:78
l1t::gtETMHF
Definition: GlobalObject.h:25
l1t::TypeHTT
Definition: GlobalDefinitions.h:59
l1t::gtHTT
Definition: GlobalObject.h:23
GlobalCondition::wsc
const bool wsc() const
Definition: GlobalCondition.cc:138
l1t::TypeCent4
Definition: GlobalDefinitions.h:74
GlobalCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GlobalCondition.h:123
GlobalCondition::m_condCategory
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GlobalCondition.h:111
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalCondition::GlobalCondition
GlobalCondition()
Definition: GlobalCondition.cc:29
GlobalCondition::m_objectType
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
Definition: GlobalCondition.h:117
l1t::gtCentrality1
Definition: GlobalObject.h:37
l1t::gtETM
Definition: GlobalObject.h:21
l1t::CondCorrelationThreeBody
Definition: GlobalDefinitions.h:101
l1t::gtMu
Definition: GlobalObject.h:17
l1t::Type1s
Definition: GlobalDefinitions.h:51
l1t::gtAsymmetryEtHF
Definition: GlobalObject.h:34
GlobalCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: GlobalCondition.h:120
l1t::gtCentrality6
Definition: GlobalObject.h:42
l1t::gtMinBiasHFP0
Definition: GlobalObject.h:27
l1t::TypeMinBiasHFP1
Definition: GlobalDefinitions.h:65
l1t::TypeTowerCount
Definition: GlobalDefinitions.h:62
GlobalCondition::m_condName
std::string m_condName
the name of the condition
Definition: GlobalCondition.h:108
l1t::CondEnergySum
Definition: GlobalDefinitions.h:97
l1t::Type2wsc
Definition: GlobalDefinitions.h:53
l1t::gtETT
Definition: GlobalObject.h:22
l1t::TypeETMHF
Definition: GlobalDefinitions.h:61
l1t::TypeAsymHt
Definition: GlobalDefinitions.h:79
l1t::gtCentrality3
Definition: GlobalObject.h:39
l1t::TypeETTem
Definition: GlobalDefinitions.h:67
l1t::Type2s
Definition: GlobalDefinitions.h:52
l1t::TypeETT
Definition: GlobalDefinitions.h:58
GlobalCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: GlobalCondition.cc:65
GlobalCondition::m_condType
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GlobalCondition.h:114
l1t::TypeHTM
Definition: GlobalDefinitions.h:60
l1t::CondCorrelation
Definition: GlobalDefinitions.h:98
l1t::gtTau
Definition: GlobalObject.h:20
l1t::TypeExternal
Definition: GlobalDefinitions.h:68
l1t::CondExternal
Definition: GlobalDefinitions.h:99
l1t::TypeCent6
Definition: GlobalDefinitions.h:76
l1t::CondMuon
Definition: GlobalDefinitions.h:95
l1t::gtMinBiasHFM0
Definition: GlobalObject.h:28
l1t::TypeAsymHtHF
Definition: GlobalDefinitions.h:81
l1t::Type4s
Definition: GlobalDefinitions.h:56
l1t::GtConditionCategory
GtConditionCategory
condition categories
Definition: GlobalDefinitions.h:93
l1t::TypeMinBiasHFM0
Definition: GlobalDefinitions.h:64
mps_fire.result
result
Definition: mps_fire.py:311
GlobalCondition
Definition: GlobalCondition.h:34
l1t::TypeCent0
Definition: GlobalDefinitions.h:70
l1t::gtCentrality2
Definition: GlobalObject.h:38
GlobalCondition::corrThree
const bool corrThree() const
get logic flag for three-body conditions, trigger objects are muons
Definition: GlobalCondition.cc:157
l1t::gtAsymmetryHtHF
Definition: GlobalObject.h:35
GlobalCondition::~GlobalCondition
virtual ~GlobalCondition()
destructor
Definition: GlobalCondition.cc:60