File indexing completed on 2024-07-02 00:53:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 GlobalCondition::GlobalCondition() {
0030 m_condCategory = l1t::CondNull;
0031 m_condType = l1t::TypeNull;
0032 m_condChipNr = -1;
0033 m_condRelativeBx = 0;
0034
0035
0036 }
0037
0038
0039 GlobalCondition::GlobalCondition(const std::string& cName) {
0040 m_condName = cName;
0041
0042 m_condCategory = l1t::CondNull;
0043 m_condType = l1t::TypeNull;
0044 m_condChipNr = -1;
0045 m_condRelativeBx = 0;
0046 }
0047
0048
0049 GlobalCondition::GlobalCondition(const std::string& cName,
0050 const l1t::GtConditionCategory& cCategory,
0051 const l1t::GtConditionType& cType) {
0052 m_condName = cName;
0053 m_condCategory = cCategory;
0054 m_condType = cType;
0055
0056 m_condChipNr = -1;
0057 m_condRelativeBx = 0;
0058 }
0059
0060 GlobalCondition::~GlobalCondition() {
0061
0062 }
0063
0064
0065 const int GlobalCondition::nrObjects() const {
0066 switch (m_condType) {
0067 case l1t::TypeNull:
0068 case l1t::TypeExternal: {
0069 return 0;
0070 }
0071
0072 break;
0073 case l1t::TypeCent0:
0074 case l1t::TypeCent1:
0075 case l1t::TypeCent2:
0076 case l1t::TypeCent3:
0077 case l1t::TypeCent4:
0078 case l1t::TypeCent5:
0079 case l1t::TypeCent6:
0080 case l1t::TypeCent7: {
0081 return 0;
0082 }
0083
0084 case l1t::Type1s: {
0085 return 1;
0086 }
0087
0088 break;
0089 case l1t::Type2s:
0090 case l1t::Type2wsc:
0091 case l1t::Type2cor: {
0092 return 2;
0093 }
0094
0095 break;
0096 case l1t::Type2corWithOverlapRemoval: {
0097 return 3;
0098 }
0099
0100 break;
0101 case l1t::Type3s: {
0102 return 3;
0103 }
0104
0105 break;
0106 case l1t::Type4s: {
0107 return 4;
0108 }
0109
0110 break;
0111 case l1t::TypeETT:
0112 case l1t::TypeETM:
0113 case l1t::TypeHTT:
0114 case l1t::TypeHTM:
0115 case l1t::TypeETMHF:
0116 case l1t::TypeHTMHF:
0117 case l1t::TypeTowerCount:
0118 case l1t::TypeMinBiasHFP0:
0119 case l1t::TypeMinBiasHFM0:
0120 case l1t::TypeMinBiasHFP1:
0121 case l1t::TypeMinBiasHFM1:
0122 case l1t::TypeZDCP:
0123 case l1t::TypeZDCM:
0124 case l1t::TypeAXOL1TL:
0125 case l1t::TypeAsymEt:
0126 case l1t::TypeAsymHt:
0127 case l1t::TypeAsymEtHF:
0128 case l1t::TypeAsymHtHF: {
0129 return 1;
0130 }
0131
0132 break;
0133 default: {
0134
0135 return 0;
0136 } break;
0137 }
0138 }
0139
0140
0141
0142 const bool GlobalCondition::wsc() const {
0143 if (m_condType == l1t::Type2wsc) {
0144 return true;
0145 }
0146
0147 return false;
0148 }
0149
0150
0151
0152 const bool GlobalCondition::corr() const {
0153 if (m_condType == l1t::Type2cor) {
0154 return true;
0155 }
0156
0157 return false;
0158 }
0159
0160
0161 const bool GlobalCondition::corrThree() const {
0162 if (m_condType == l1t::Type3s) {
0163 return true;
0164 }
0165
0166 return false;
0167 }
0168
0169
0170 void GlobalCondition::print(std::ostream& myCout) const {
0171 myCout << "\n Condition name: " << m_condName << std::endl;
0172
0173 switch (m_condCategory) {
0174 case l1t::CondNull: {
0175 myCout << " Condition category: "
0176 << "l1t::CondNull"
0177 << " - it means not defined!" << std::endl;
0178 }
0179
0180 break;
0181 case l1t::CondMuon: {
0182 myCout << " Condition category: "
0183 << "l1t::CondMuon" << std::endl;
0184 }
0185
0186 break;
0187 case l1t::CondMuonShower: {
0188 myCout << " Condition category: "
0189 << "l1t::CondMuonShower" << std::endl;
0190 }
0191
0192 break;
0193 case l1t::CondCalo: {
0194 myCout << " Condition category: "
0195 << "l1t::CondCalo" << std::endl;
0196 }
0197
0198 break;
0199 case l1t::CondEnergySum: {
0200 myCout << " Condition category: "
0201 << "CondEnergySum" << std::endl;
0202 }
0203
0204 break;
0205 case l1t::CondEnergySumZdc: {
0206 myCout << " Condition category: "
0207 << "CondEnergySumZdc" << std::endl;
0208 }
0209
0210 break;
0211 case l1t::CondAXOL1TL: {
0212 myCout << " Condition category: "
0213 << "CondAXOL1TL" << std::endl;
0214 }
0215
0216 break;
0217 case l1t::CondCorrelation: {
0218 myCout << " Condition category: "
0219 << "CondCorrelation" << std::endl;
0220 }
0221
0222 break;
0223 case l1t::CondCorrelationThreeBody: {
0224 myCout << " Condition category: "
0225 << "CondCorrelationThreeBody" << std::endl;
0226 }
0227
0228 break;
0229 case l1t::CondCorrelationWithOverlapRemoval: {
0230 myCout << " Condition category: "
0231 << "CondCorrelationWithOverlapRemoval" << std::endl;
0232 }
0233
0234 break;
0235 case l1t::CondExternal: {
0236 myCout << " Condition category: "
0237 << "CondExternal" << std::endl;
0238 }
0239
0240 break;
0241 default: {
0242 myCout << " Condition category: " << m_condCategory
0243 << " - no such category defined. Check l1t::GtConditionCategory enum." << std::endl;
0244
0245 } break;
0246 }
0247
0248 switch (m_condType) {
0249 case l1t::TypeNull: {
0250 myCout << " Condition type: "
0251 << "l1t::TypeNull"
0252 << " - it means not defined!" << std::endl;
0253 }
0254
0255 break;
0256 case l1t::Type1s: {
0257 myCout << " Condition type: "
0258 << "l1t::Type1s" << std::endl;
0259 }
0260
0261 break;
0262 case l1t::Type2s: {
0263 myCout << " Condition type: "
0264 << "l1t::Type2s" << std::endl;
0265 }
0266
0267 break;
0268 case l1t::Type2corWithOverlapRemoval: {
0269 myCout << " Condition type: "
0270 << "l1t::Type2corWithOverlapRemoval" << std::endl;
0271 }
0272
0273 break;
0274 case l1t::Type2wsc: {
0275 myCout << " Condition type: "
0276 << "l1t::Type2wsc" << std::endl;
0277 }
0278
0279 break;
0280 case l1t::Type2cor: {
0281 myCout << " Condition type: "
0282 << "l1t::Type2cor" << std::endl;
0283 }
0284
0285 break;
0286 case l1t::Type3s: {
0287 myCout << " Condition type: "
0288 << "l1t::Type3s" << std::endl;
0289 }
0290
0291 break;
0292 case l1t::Type4s: {
0293 myCout << " Condition type: "
0294 << "l1t::Type4s" << std::endl;
0295 }
0296
0297 break;
0298 case l1t::TypeETM: {
0299 myCout << " Condition type: "
0300 << "TypeETM" << std::endl;
0301 }
0302
0303 break;
0304 case l1t::TypeETT: {
0305 myCout << " Condition type: "
0306 << "TypeETT" << std::endl;
0307 }
0308
0309 break;
0310 case l1t::TypeHTT: {
0311 myCout << " Condition type: "
0312 << "TypeHTT" << std::endl;
0313 }
0314
0315 break;
0316 case l1t::TypeHTM: {
0317 myCout << " Condition type: "
0318 << "TypeHTM" << std::endl;
0319 }
0320
0321 break;
0322 case l1t::TypeETMHF: {
0323 myCout << " Condition type: "
0324 << "TypeETMHF" << std::endl;
0325 }
0326
0327 break;
0328 case l1t::TypeHTMHF: {
0329 myCout << " Condition type: "
0330 << "TypeHTMHF" << std::endl;
0331 }
0332
0333 break;
0334 case l1t::TypeTowerCount: {
0335 myCout << " Condition type: "
0336 << "TypeTowerCount" << std::endl;
0337 }
0338
0339 break;
0340 case l1t::TypeMinBiasHFP0: {
0341 myCout << " Condition type: "
0342 << "TypeMinBiasHFP0" << std::endl;
0343 }
0344
0345 break;
0346 case l1t::TypeMinBiasHFM0: {
0347 myCout << " Condition type: "
0348 << "TypeMinBiasHFM0" << std::endl;
0349 }
0350
0351 break;
0352 case l1t::TypeMinBiasHFP1: {
0353 myCout << " Condition type: "
0354 << "TypeMinBiasHFP1" << std::endl;
0355 }
0356
0357 break;
0358 case l1t::TypeMinBiasHFM1: {
0359 myCout << " Condition type: "
0360 << "TypeMinBiasHFM1" << std::endl;
0361 }
0362
0363 break;
0364 case l1t::TypeETTem: {
0365 myCout << " Condition type: "
0366 << "TypeETTem" << std::endl;
0367 }
0368
0369 break;
0370 case l1t::TypeAsymEt: {
0371 myCout << " Condition type: "
0372 << "TypeAsymEt" << std::endl;
0373 }
0374
0375 break;
0376 case l1t::TypeAsymHt: {
0377 myCout << " Condition type: "
0378 << "TypeAsymHt" << std::endl;
0379 }
0380
0381 break;
0382 case l1t::TypeAsymEtHF: {
0383 myCout << " Condition type: "
0384 << "TypeAsymEtHF" << std::endl;
0385 }
0386
0387 break;
0388 case l1t::TypeAsymHtHF: {
0389 myCout << " Condition type: "
0390 << "TypeAsymHtHF" << std::endl;
0391 }
0392
0393 break;
0394 case l1t::TypeCent0: {
0395 myCout << " Condition type: "
0396 << "TypeCent0" << std::endl;
0397 }
0398
0399 break;
0400 case l1t::TypeCent1: {
0401 myCout << " Condition type: "
0402 << "TypeCent1" << std::endl;
0403 }
0404
0405 break;
0406 case l1t::TypeCent2: {
0407 myCout << " Condition type: "
0408 << "TypeCent2" << std::endl;
0409 }
0410
0411 break;
0412 case l1t::TypeCent3: {
0413 myCout << " Condition type: "
0414 << "TypeCent3" << std::endl;
0415 }
0416
0417 break;
0418 case l1t::TypeCent4: {
0419 myCout << " Condition type: "
0420 << "TypeCent4" << std::endl;
0421 }
0422
0423 break;
0424 case l1t::TypeCent5: {
0425 myCout << " Condition type: "
0426 << "TypeCent5" << std::endl;
0427 }
0428
0429 break;
0430 case l1t::TypeCent6: {
0431 myCout << " Condition type: "
0432 << "TypeCent6" << std::endl;
0433 }
0434
0435 break;
0436 case l1t::TypeCent7: {
0437 myCout << " Condition type: "
0438 << "TypeCent7" << std::endl;
0439 }
0440
0441 break;
0442 case l1t::TypeExternal: {
0443 myCout << " Condition type: "
0444 << "TypeExternal" << std::endl;
0445 }
0446
0447 break;
0448 default: {
0449 myCout << " Condition type: " << m_condType << " - no such type defined. Check l1t::GtConditionType enum."
0450 << std::endl;
0451 } break;
0452 }
0453
0454 myCout << " Object types: ";
0455
0456 for (unsigned int i = 0; i < m_objectType.size(); ++i) {
0457 switch (m_objectType[i]) {
0458 case l1t::gtMu: {
0459 myCout << " Mu ";
0460 }
0461
0462 break;
0463 case l1t::gtMuShower: {
0464 myCout << " MuShower ";
0465 }
0466
0467 break;
0468 case l1t::gtEG: {
0469 myCout << " EG ";
0470 }
0471
0472 break;
0473
0474 case l1t::gtJet: {
0475 myCout << " Jet ";
0476 }
0477
0478 break;
0479
0480 case l1t::gtTau: {
0481 myCout << " Tau ";
0482 }
0483
0484 break;
0485 case l1t::gtETM: {
0486 myCout << " ETM ";
0487 }
0488
0489 break;
0490 case l1t::gtETT: {
0491 myCout << " ETT ";
0492 }
0493
0494 break;
0495 case l1t::gtHTT: {
0496 myCout << " HTT ";
0497 }
0498
0499 break;
0500 case l1t::gtHTM: {
0501 myCout << " HTM ";
0502 }
0503
0504 break;
0505
0506 case l1t::gtETMHF: {
0507 myCout << " ETMHF ";
0508 }
0509
0510 break;
0511 case l1t::gtHTMHF: {
0512 myCout << " HTMHF ";
0513 }
0514
0515 break;
0516 case l1t::gtTowerCount: {
0517 myCout << " TowerCount ";
0518 }
0519
0520 break;
0521 case l1t::gtMinBiasHFP0: {
0522 myCout << " MinBiasHFP0 ";
0523 }
0524
0525 break;
0526 case l1t::gtMinBiasHFM0: {
0527 myCout << " MinBiasHFM0 ";
0528 }
0529
0530 break;
0531 case l1t::gtMinBiasHFP1: {
0532 myCout << " MinBiasHFP1 ";
0533 }
0534
0535 break;
0536 case l1t::gtMinBiasHFM1: {
0537 myCout << " MinBiasHFM1 ";
0538 }
0539
0540 break;
0541 case l1t::gtETTem: {
0542 myCout << " ETTem ";
0543 }
0544
0545 break;
0546 case l1t::gtAsymmetryEt: {
0547 myCout << " AsymmetryEt ";
0548 }
0549
0550 break;
0551 case l1t::gtAsymmetryHt: {
0552 myCout << " AsymmetryHt ";
0553 }
0554
0555 break;
0556 case l1t::gtAsymmetryEtHF: {
0557 myCout << " AsymmetryEtHF ";
0558 }
0559
0560 break;
0561 case l1t::gtAsymmetryHtHF: {
0562 myCout << " AsymmetryHtHF ";
0563 }
0564
0565 break;
0566 case l1t::gtCentrality0: {
0567 myCout << " Centrality0 ";
0568 }
0569
0570 break;
0571 case l1t::gtCentrality1: {
0572 myCout << " Centrality1 ";
0573 }
0574
0575 break;
0576 case l1t::gtCentrality2: {
0577 myCout << " Centrality2 ";
0578 }
0579
0580 break;
0581 case l1t::gtCentrality3: {
0582 myCout << " Centrality3 ";
0583 }
0584
0585 break;
0586 case l1t::gtCentrality4: {
0587 myCout << " Centrality4 ";
0588 }
0589
0590 break;
0591 case l1t::gtCentrality5: {
0592 myCout << " Centrality5 ";
0593 }
0594
0595 break;
0596 case l1t::gtCentrality6: {
0597 myCout << " Centrality6 ";
0598 }
0599
0600 break;
0601 case l1t::gtCentrality7: {
0602 myCout << " Centrality7 ";
0603 }
0604
0605 break;
0606
0607 case l1t::gtExternal: {
0608 myCout << " External ";
0609 }
0610
0611 break;
0612 default: {
0613 myCout << " Unknown type " << m_objectType[i];
0614 } break;
0615 }
0616 }
0617
0618 myCout << std::endl;
0619
0620 myCout << " \" >= \" flag: " << m_condGEq << std::endl;
0621
0622 myCout << " Condition chip: " << m_condChipNr;
0623
0624 if (m_condChipNr < 0) {
0625 myCout << " - not properly initialized! ";
0626 }
0627
0628 myCout << std::endl;
0629
0630 myCout << " Relative BX: " << m_condRelativeBx << std::endl;
0631 }
0632
0633
0634 std::ostream& operator<<(std::ostream& os, const GlobalCondition& result) {
0635 result.print(os);
0636 return os;
0637 }