File indexing completed on 2024-04-06 12:20:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1RetrieveL1Extra.h"
0017
0018
0019 #include <iostream>
0020 #include <memory>
0021 #include <string>
0022
0023
0024
0025 #include "FWCore/Framework/interface/MakerMacros.h"
0026 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0027
0028
0029 L1RetrieveL1Extra::L1RetrieveL1Extra(const edm::ParameterSet& paramSet, edm::ConsumesCollector&& iC)
0030 :
0031 m_tagL1ExtraMuon(paramSet.getParameter<edm::InputTag>("TagL1ExtraMuon")),
0032 m_tagL1ExtraIsoEG(paramSet.getParameter<edm::InputTag>("TagL1ExtraIsoEG")),
0033 m_tagL1ExtraNoIsoEG(paramSet.getParameter<edm::InputTag>("TagL1ExtraNoIsoEG")),
0034 m_tagL1ExtraCenJet(paramSet.getParameter<edm::InputTag>("TagL1ExtraCenJet")),
0035 m_tagL1ExtraForJet(paramSet.getParameter<edm::InputTag>("TagL1ExtraForJet")),
0036 m_tagL1ExtraTauJet(paramSet.getParameter<edm::InputTag>("TagL1ExtraTauJet")),
0037 m_tagL1ExtraEtMissMET(paramSet.getParameter<edm::InputTag>("TagL1ExtraEtMissMET")),
0038 m_tagL1ExtraEtMissHTM(paramSet.getParameter<edm::InputTag>("TagL1ExtraEtMissHTM")),
0039 m_tagL1ExtraHFRings(paramSet.getParameter<edm::InputTag>("TagL1ExtraHFRings")),
0040
0041
0042 m_validL1ExtraMuon(false),
0043 m_validL1ExtraIsoEG(false),
0044 m_validL1ExtraNoIsoEG(false),
0045 m_validL1ExtraCenJet(false),
0046 m_validL1ExtraForJet(false),
0047 m_validL1ExtraTauJet(false),
0048 m_validL1ExtraETT(false),
0049 m_validL1ExtraETM(false),
0050 m_validL1ExtraHTT(false),
0051 m_validL1ExtraHTM(false),
0052 m_validL1ExtraHfBitCounts(false),
0053 m_validL1ExtraHfRingEtSums(false),
0054
0055
0056 m_l1ExtraMuon(nullptr),
0057 m_l1ExtraIsoEG(nullptr),
0058 m_l1ExtraNoIsoEG(nullptr),
0059 m_l1ExtraCenJet(nullptr),
0060 m_l1ExtraForJet(nullptr),
0061 m_l1ExtraTauJet(nullptr),
0062 m_l1ExtraETT(nullptr),
0063 m_l1ExtraETM(nullptr),
0064 m_l1ExtraHTT(nullptr),
0065 m_l1ExtraHTM(nullptr),
0066 m_l1ExtraHfBitCounts(nullptr),
0067 m_l1ExtraHfRingEtSums(nullptr)
0068
0069
0070 {
0071 m_tagL1ExtraMuonTok = iC.consumes<l1extra::L1MuonParticleCollection>(m_tagL1ExtraMuon);
0072 m_tagL1ExtraIsoEGTok = iC.consumes<l1extra::L1EmParticleCollection>(m_tagL1ExtraIsoEG);
0073 m_tagL1ExtraNoIsoEGTok = iC.consumes<l1extra::L1EmParticleCollection>(m_tagL1ExtraNoIsoEG);
0074 m_tagL1ExtraCenJetTok = iC.consumes<l1extra::L1JetParticleCollection>(m_tagL1ExtraCenJet);
0075 m_tagL1ExtraForJetTok = iC.consumes<l1extra::L1JetParticleCollection>(m_tagL1ExtraForJet);
0076 m_tagL1ExtraTauJetTok = iC.consumes<l1extra::L1JetParticleCollection>(m_tagL1ExtraTauJet);
0077 m_tagL1ExtraEtMissMETTok = iC.consumes<l1extra::L1EtMissParticleCollection>(m_tagL1ExtraEtMissMET);
0078 m_tagL1ExtraEtMissHTMTok = iC.consumes<l1extra::L1EtMissParticleCollection>(m_tagL1ExtraEtMissHTM);
0079 m_tagL1ExtraHFRingsTok = iC.consumes<l1extra::L1HFRingsCollection>(m_tagL1ExtraHFRings);
0080
0081
0082 }
0083
0084
0085 L1RetrieveL1Extra::~L1RetrieveL1Extra() {
0086
0087 }
0088
0089 void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, const edm::EventSetup& evSetup) {
0090
0091 edm::Handle<l1extra::L1MuonParticleCollection> collL1ExtraMuon;
0092 iEvent.getByToken(m_tagL1ExtraMuonTok, collL1ExtraMuon);
0093
0094 if (collL1ExtraMuon.isValid()) {
0095 m_validL1ExtraMuon = true;
0096 m_l1ExtraMuon = collL1ExtraMuon.product();
0097 } else {
0098 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1MuonParticleCollection with input tag \n " << m_tagL1ExtraMuon
0099 << "\n not found in the event.\n"
0100 << "\n Return pointer 0 and false validity tag." << std::endl;
0101
0102 m_validL1ExtraMuon = false;
0103 m_l1ExtraMuon = nullptr;
0104 }
0105
0106
0107 edm::Handle<l1extra::L1EmParticleCollection> collL1ExtraIsoEG;
0108 iEvent.getByToken(m_tagL1ExtraIsoEGTok, collL1ExtraIsoEG);
0109
0110 if (collL1ExtraIsoEG.isValid()) {
0111 m_validL1ExtraIsoEG = true;
0112 m_l1ExtraIsoEG = collL1ExtraIsoEG.product();
0113 } else {
0114 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1EmParticleCollection with input tag \n " << m_tagL1ExtraIsoEG
0115 << "\n not found in the event.\n"
0116 << "\n Return pointer 0 and false validity tag." << std::endl;
0117
0118 m_validL1ExtraIsoEG = false;
0119 m_l1ExtraIsoEG = nullptr;
0120 }
0121
0122 edm::Handle<l1extra::L1EmParticleCollection> collL1ExtraNoIsoEG;
0123 iEvent.getByToken(m_tagL1ExtraNoIsoEGTok, collL1ExtraNoIsoEG);
0124
0125 if (collL1ExtraNoIsoEG.isValid()) {
0126 m_validL1ExtraNoIsoEG = true;
0127 m_l1ExtraNoIsoEG = collL1ExtraNoIsoEG.product();
0128 } else {
0129 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1EmParticleCollection with input tag \n " << m_tagL1ExtraNoIsoEG
0130 << "\n not found in the event.\n"
0131 << "\n Return pointer 0 and false validity tag." << std::endl;
0132
0133 m_validL1ExtraNoIsoEG = false;
0134 m_l1ExtraNoIsoEG = nullptr;
0135 }
0136
0137
0138 edm::Handle<l1extra::L1JetParticleCollection> collL1ExtraCenJet;
0139 iEvent.getByToken(m_tagL1ExtraCenJetTok, collL1ExtraCenJet);
0140
0141 if (collL1ExtraCenJet.isValid()) {
0142 m_validL1ExtraCenJet = true;
0143 m_l1ExtraCenJet = collL1ExtraCenJet.product();
0144 } else {
0145 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1JetParticleCollection with input tag \n " << m_tagL1ExtraCenJet
0146 << "\n not found in the event.\n"
0147 << "\n Return pointer 0 and false validity tag." << std::endl;
0148
0149 m_validL1ExtraCenJet = false;
0150 m_l1ExtraCenJet = nullptr;
0151 }
0152
0153 edm::Handle<l1extra::L1JetParticleCollection> collL1ExtraForJet;
0154 iEvent.getByToken(m_tagL1ExtraForJetTok, collL1ExtraForJet);
0155
0156 if (collL1ExtraForJet.isValid()) {
0157 m_validL1ExtraForJet = true;
0158 m_l1ExtraForJet = collL1ExtraForJet.product();
0159 } else {
0160 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1JetParticleCollection with input tag \n " << m_tagL1ExtraForJet
0161 << "\n not found in the event.\n"
0162 << "\n Return pointer 0 and false validity tag." << std::endl;
0163
0164 m_validL1ExtraForJet = false;
0165 m_l1ExtraForJet = nullptr;
0166 }
0167
0168 edm::Handle<l1extra::L1JetParticleCollection> collL1ExtraTauJet;
0169 iEvent.getByToken(m_tagL1ExtraTauJetTok, collL1ExtraTauJet);
0170
0171 if (collL1ExtraTauJet.isValid()) {
0172 m_validL1ExtraTauJet = true;
0173 m_l1ExtraTauJet = collL1ExtraTauJet.product();
0174 } else {
0175 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1JetParticleCollection with input tag \n " << m_tagL1ExtraTauJet
0176 << "\n not found in the event.\n"
0177 << "\n Return pointer 0 and false validity tag." << std::endl;
0178
0179 m_validL1ExtraTauJet = false;
0180 m_l1ExtraTauJet = nullptr;
0181 }
0182
0183
0184 edm::Handle<l1extra::L1EtMissParticleCollection> collL1ExtraEtMissMET;
0185 iEvent.getByToken(m_tagL1ExtraEtMissMETTok, collL1ExtraEtMissMET);
0186
0187 if (collL1ExtraEtMissMET.isValid()) {
0188 m_validL1ExtraETT = true;
0189 m_validL1ExtraETM = true;
0190 m_l1ExtraETT = collL1ExtraEtMissMET.product();
0191 m_l1ExtraETM = collL1ExtraEtMissMET.product();
0192 } else {
0193 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1EtMissParticleCollection with input tag \n "
0194 << m_tagL1ExtraEtMissMET << "\n not found in the event.\n"
0195 << "\n Return pointer 0 and false validity tag." << std::endl;
0196
0197 m_validL1ExtraETT = false;
0198 m_validL1ExtraETM = false;
0199 m_l1ExtraETT = nullptr;
0200 m_l1ExtraETM = nullptr;
0201 }
0202
0203 edm::Handle<l1extra::L1EtMissParticleCollection> collL1ExtraEtMissHTM;
0204 iEvent.getByToken(m_tagL1ExtraEtMissHTMTok, collL1ExtraEtMissHTM);
0205
0206 if (collL1ExtraEtMissHTM.isValid()) {
0207 m_validL1ExtraHTT = true;
0208 m_validL1ExtraHTM = true;
0209 m_l1ExtraHTT = collL1ExtraEtMissHTM.product();
0210 m_l1ExtraHTM = collL1ExtraEtMissHTM.product();
0211 } else {
0212 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1EtMissParticleCollection with input tag \n "
0213 << m_tagL1ExtraEtMissHTM << "\n not found in the event.\n"
0214 << "\n Return pointer 0 and false validity tag." << std::endl;
0215
0216 m_validL1ExtraHTT = false;
0217 m_validL1ExtraHTM = false;
0218 m_l1ExtraHTT = nullptr;
0219 m_l1ExtraHTM = nullptr;
0220 }
0221
0222
0223 edm::Handle<l1extra::L1HFRingsCollection> collL1ExtraHFRings;
0224 iEvent.getByToken(m_tagL1ExtraHFRingsTok, collL1ExtraHFRings);
0225
0226 if (collL1ExtraHFRings.isValid()) {
0227 m_validL1ExtraHfBitCounts = true;
0228 m_validL1ExtraHfRingEtSums = true;
0229 m_l1ExtraHfBitCounts = collL1ExtraHFRings.product();
0230 m_l1ExtraHfRingEtSums = collL1ExtraHFRings.product();
0231 } else {
0232 LogDebug("L1RetrieveL1Extra") << "\n l1extra::L1HFRingsCollection with input tag \n " << m_tagL1ExtraHFRings
0233 << "\n not found in the event.\n"
0234 << "\n Return pointer 0 and false validity tag." << std::endl;
0235
0236 m_validL1ExtraHfBitCounts = false;
0237 m_validL1ExtraHfRingEtSums = false;
0238 m_l1ExtraHfBitCounts = nullptr;
0239 m_l1ExtraHfRingEtSums = nullptr;
0240 }
0241 }
0242
0243
0244 const edm::InputTag L1RetrieveL1Extra::inputTagL1ExtraColl(const L1GtObject& gtObject) const {
0245 edm::InputTag emptyInputTag;
0246
0247 switch (gtObject) {
0248 case Mu: {
0249 return m_tagL1ExtraMuon;
0250 } break;
0251
0252 case NoIsoEG: {
0253 return m_tagL1ExtraNoIsoEG;
0254 } break;
0255
0256 case IsoEG: {
0257 return m_tagL1ExtraIsoEG;
0258 } break;
0259
0260 case CenJet: {
0261 return m_tagL1ExtraCenJet;
0262 } break;
0263
0264 case ForJet: {
0265 return m_tagL1ExtraForJet;
0266 } break;
0267
0268 case TauJet: {
0269 return m_tagL1ExtraTauJet;
0270 } break;
0271
0272 case ETM:
0273 case ETT: {
0274 return m_tagL1ExtraEtMissMET;
0275 } break;
0276
0277 case HTT:
0278 case HTM: {
0279 return m_tagL1ExtraEtMissHTM;
0280 } break;
0281
0282 case JetCounts: {
0283
0284 return emptyInputTag;
0285 } break;
0286
0287 case HfBitCounts:
0288 case HfRingEtSums: {
0289 return m_tagL1ExtraHFRings;
0290 } break;
0291
0292 case TechTrig: {
0293 return emptyInputTag;
0294 } break;
0295
0296 case Castor: {
0297 return emptyInputTag;
0298 } break;
0299
0300 case BPTX: {
0301 return emptyInputTag;
0302 } break;
0303
0304 case GtExternal: {
0305 return emptyInputTag;
0306 } break;
0307
0308 case ObjNull: {
0309 return emptyInputTag;
0310 } break;
0311
0312 default: {
0313 edm::LogInfo("L1GtObject") << "\n '" << gtObject << "' is not a recognized L1GtObject. ";
0314
0315 return emptyInputTag;
0316
0317 } break;
0318 }
0319
0320 return emptyInputTag;
0321 }
0322
0323 const bool L1RetrieveL1Extra::validL1ExtraColl(const L1GtObject& gtObject) const {
0324 switch (gtObject) {
0325 case Mu: {
0326 return m_validL1ExtraMuon;
0327 } break;
0328
0329 case NoIsoEG: {
0330 return m_validL1ExtraNoIsoEG;
0331 } break;
0332
0333 case IsoEG: {
0334 return m_validL1ExtraIsoEG;
0335 } break;
0336
0337 case CenJet: {
0338 return m_validL1ExtraCenJet;
0339 } break;
0340
0341 case ForJet: {
0342 return m_validL1ExtraForJet;
0343 } break;
0344
0345 case TauJet: {
0346 return m_validL1ExtraTauJet;
0347 } break;
0348
0349 case ETM: {
0350 return m_validL1ExtraETM;
0351 } break;
0352
0353 case ETT: {
0354 return m_validL1ExtraETT;
0355 } break;
0356
0357 case HTT: {
0358 return m_validL1ExtraHTT;
0359 } break;
0360
0361 case HTM: {
0362 return m_validL1ExtraHTM;
0363 } break;
0364
0365 case JetCounts: {
0366
0367 return false;
0368 } break;
0369
0370 case HfBitCounts: {
0371 return m_validL1ExtraHfBitCounts;
0372 } break;
0373
0374 case HfRingEtSums: {
0375 return m_validL1ExtraHfRingEtSums;
0376 } break;
0377
0378 case TechTrig: {
0379 return false;
0380 } break;
0381
0382 case Castor: {
0383 return false;
0384 } break;
0385
0386 case BPTX: {
0387 return false;
0388 } break;
0389
0390 case GtExternal: {
0391 return false;
0392 } break;
0393
0394 case ObjNull: {
0395 return false;
0396 } break;
0397
0398 default: {
0399 edm::LogInfo("L1GtObject") << "\n '" << gtObject << "' is not a recognized L1GtObject. ";
0400
0401 return false;
0402
0403 } break;
0404 }
0405
0406 return false;
0407 }
0408
0409 void L1RetrieveL1Extra::printL1Extra(std::ostream& oStr,
0410 const L1GtObject& gtObject,
0411 const bool checkBxInEvent,
0412 const int bxInEvent,
0413 const bool checkObjIndexInColl,
0414 const int objIndexInColl) const {
0415 if (!validL1ExtraColl(gtObject)) {
0416 oStr << "\n L1Extra collection for L1 GT object " << l1GtObjectEnumToString(gtObject)
0417 << " with collection input tag " << inputTagL1ExtraColl(gtObject) << " not valid." << std::endl;
0418 }
0419
0420 switch (gtObject) {
0421 case Mu: {
0422 oStr << "\n Mu collection\n" << std::endl;
0423
0424 int indexInColl = -1;
0425
0426 for (l1extra::L1MuonParticleCollection::const_iterator iterColl = m_l1ExtraMuon->begin();
0427 iterColl != m_l1ExtraMuon->end();
0428 ++iterColl) {
0429 if (checkBxInEvent) {
0430 if (iterColl->bx() != bxInEvent) {
0431 continue;
0432 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0433 } else {
0434 indexInColl++;
0435
0436 if (!checkObjIndexInColl) {
0437 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0438 << " PT = " << std::right << std::setw(6) << (iterColl->pt()) << " GeV"
0439 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0440 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0441 } else {
0442 if (objIndexInColl == indexInColl) {
0443 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0444 << " indexInColl = " << indexInColl << " PT = " << std::right << std::setw(6) << (iterColl->pt())
0445 << " GeV"
0446 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0447 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0448 }
0449 }
0450 }
0451 } else {
0452 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " PT = " << std::right
0453 << std::setw(6) << (iterColl->pt()) << " GeV"
0454 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0455 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0456 }
0457 }
0458
0459 } break;
0460
0461 case NoIsoEG: {
0462 oStr << "\n NoIsoEG collection\n" << std::endl;
0463
0464 int indexInColl = -1;
0465
0466 for (l1extra::L1EmParticleCollection::const_iterator iterColl = m_l1ExtraNoIsoEG->begin();
0467 iterColl != m_l1ExtraNoIsoEG->end();
0468 ++iterColl) {
0469 if (checkBxInEvent) {
0470 if (iterColl->bx() != bxInEvent) {
0471 continue;
0472 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0473 } else {
0474 indexInColl++;
0475
0476 if (!checkObjIndexInColl) {
0477 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0478 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0479 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0480 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0481 } else {
0482 if (objIndexInColl == indexInColl) {
0483 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0484 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0485 << " GeV"
0486 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0487 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0488 }
0489 }
0490 }
0491 } else {
0492 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0493 << std::setw(6) << (iterColl->et()) << " GeV"
0494 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0495 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0496 }
0497 }
0498 } break;
0499
0500 case IsoEG: {
0501 oStr << "\n IsoEG collection\n" << std::endl;
0502
0503 int indexInColl = -1;
0504
0505 for (l1extra::L1EmParticleCollection::const_iterator iterColl = m_l1ExtraIsoEG->begin();
0506 iterColl != m_l1ExtraIsoEG->end();
0507 ++iterColl) {
0508 if (checkBxInEvent) {
0509 if (iterColl->bx() != bxInEvent) {
0510 continue;
0511 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0512 } else {
0513 indexInColl++;
0514
0515 if (!checkObjIndexInColl) {
0516 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0517 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0518 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0519 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0520 } else {
0521 if (objIndexInColl == indexInColl) {
0522 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0523 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0524 << " GeV"
0525 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0526 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0527 }
0528 }
0529 }
0530 } else {
0531 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0532 << std::setw(6) << (iterColl->et()) << " GeV"
0533 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0534 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0535 }
0536 }
0537 } break;
0538
0539 case CenJet: {
0540 oStr << "\n CenJet collection\n" << std::endl;
0541
0542 int indexInColl = -1;
0543
0544 for (l1extra::L1JetParticleCollection::const_iterator iterColl = m_l1ExtraCenJet->begin();
0545 iterColl != m_l1ExtraCenJet->end();
0546 ++iterColl) {
0547 if (checkBxInEvent) {
0548 if (iterColl->bx() != bxInEvent) {
0549 continue;
0550 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0551 } else {
0552 indexInColl++;
0553
0554 if (!checkObjIndexInColl) {
0555 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0556 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0557 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0558 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0559 } else {
0560 if (objIndexInColl == indexInColl) {
0561 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0562 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0563 << " GeV"
0564 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0565 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0566 }
0567 }
0568 }
0569 } else {
0570 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0571 << std::setw(6) << (iterColl->et()) << " GeV"
0572 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0573 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0574 }
0575 }
0576 } break;
0577
0578 case ForJet: {
0579 oStr << "\n ForJet collection\n" << std::endl;
0580
0581 int indexInColl = -1;
0582
0583 for (l1extra::L1JetParticleCollection::const_iterator iterColl = m_l1ExtraForJet->begin();
0584 iterColl != m_l1ExtraForJet->end();
0585 ++iterColl) {
0586 if (checkBxInEvent) {
0587 if (iterColl->bx() != bxInEvent) {
0588 continue;
0589 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0590 } else {
0591 indexInColl++;
0592
0593 if (!checkObjIndexInColl) {
0594 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0595 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0596 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0597 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0598 } else {
0599 if (objIndexInColl == indexInColl) {
0600 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0601 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0602 << " GeV"
0603 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0604 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0605 }
0606 }
0607 }
0608 } else {
0609 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0610 << std::setw(6) << (iterColl->et()) << " GeV"
0611 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0612 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0613 }
0614 }
0615 } break;
0616
0617 case TauJet: {
0618 oStr << "\n TauJet collection\n" << std::endl;
0619
0620 int indexInColl = -1;
0621
0622 for (l1extra::L1JetParticleCollection::const_iterator iterColl = m_l1ExtraTauJet->begin();
0623 iterColl != m_l1ExtraTauJet->end();
0624 ++iterColl) {
0625 if (checkBxInEvent) {
0626 if (iterColl->bx() != bxInEvent) {
0627 continue;
0628 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0629 } else {
0630 indexInColl++;
0631
0632 if (!checkObjIndexInColl) {
0633 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0634 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0635 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0636 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0637 } else {
0638 if (objIndexInColl == indexInColl) {
0639 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0640 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0641 << " GeV"
0642 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0643 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0644 }
0645 }
0646 }
0647 } else {
0648 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0649 << std::setw(6) << (iterColl->et()) << " GeV"
0650 << " eta = " << std::right << std::setw(8) << (iterColl->eta()) << " phi = " << std::right
0651 << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0652 }
0653 }
0654 } break;
0655
0656 case ETM: {
0657 oStr << "\n ETM collection\n" << std::endl;
0658
0659 int indexInColl = -1;
0660
0661 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl = m_l1ExtraETM->begin();
0662 iterColl != m_l1ExtraETM->end();
0663 ++iterColl) {
0664 if (checkBxInEvent) {
0665 if (iterColl->bx() != bxInEvent) {
0666 continue;
0667 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0668 } else {
0669 indexInColl++;
0670
0671 if (!checkObjIndexInColl) {
0672 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0673 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0674 << " phi = " << std::right << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0675 } else {
0676 if (objIndexInColl == indexInColl) {
0677 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0678 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0679 << " GeV"
0680 << " phi = " << std::right << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0681 }
0682 }
0683 }
0684 } else {
0685 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0686 << std::setw(6) << (iterColl->et()) << " GeV"
0687 << " phi = " << std::right << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0688 }
0689 }
0690 } break;
0691
0692 case ETT: {
0693 oStr << "\n ETT collection\n" << std::endl;
0694
0695 int indexInColl = -1;
0696
0697 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl = m_l1ExtraETT->begin();
0698 iterColl != m_l1ExtraETT->end();
0699 ++iterColl) {
0700 if (checkBxInEvent) {
0701 if (iterColl->bx() != bxInEvent) {
0702 continue;
0703 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0704 } else {
0705 indexInColl++;
0706
0707 if (!checkObjIndexInColl) {
0708 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0709 << " ET = " << std::right << std::setw(6) << (iterColl->etTotal()) << " GeV" << std::endl;
0710 } else {
0711 if (objIndexInColl == indexInColl) {
0712 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0713 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6)
0714 << (iterColl->etTotal()) << " GeV" << std::endl;
0715 }
0716 }
0717 }
0718 } else {
0719 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0720 << std::setw(6) << (iterColl->etTotal()) << " GeV" << std::endl;
0721 }
0722 }
0723 } break;
0724
0725 case HTT: {
0726 oStr << "\n HTT collection\n" << std::endl;
0727
0728 int indexInColl = -1;
0729
0730 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl = m_l1ExtraHTT->begin();
0731 iterColl != m_l1ExtraHTT->end();
0732 ++iterColl) {
0733 if (checkBxInEvent) {
0734 if (iterColl->bx() != bxInEvent) {
0735 continue;
0736 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0737 } else {
0738 indexInColl++;
0739
0740 if (!checkObjIndexInColl) {
0741 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0742 << " ET = " << std::right << std::setw(6) << (iterColl->etTotal()) << " GeV" << std::endl;
0743 } else {
0744 if (objIndexInColl == indexInColl) {
0745 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0746 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6)
0747 << (iterColl->etTotal()) << " GeV" << std::endl;
0748 }
0749 }
0750 }
0751 } else {
0752 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0753 << std::setw(6) << (iterColl->etTotal()) << " GeV" << std::endl;
0754 }
0755 }
0756 } break;
0757
0758 case HTM: {
0759 oStr << "\n HTM collection\n" << std::endl;
0760
0761 int indexInColl = -1;
0762
0763 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl = m_l1ExtraHTM->begin();
0764 iterColl != m_l1ExtraHTM->end();
0765 ++iterColl) {
0766 if (checkBxInEvent) {
0767 if (iterColl->bx() != bxInEvent) {
0768 continue;
0769 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0770 } else {
0771 indexInColl++;
0772
0773 if (!checkObjIndexInColl) {
0774 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " indexInColl = " << indexInColl
0775 << " ET = " << std::right << std::setw(6) << (iterColl->et()) << " GeV"
0776 << " phi = " << std::right << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0777 } else {
0778 if (objIndexInColl == indexInColl) {
0779 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent
0780 << " indexInColl = " << indexInColl << " ET = " << std::right << std::setw(6) << (iterColl->et())
0781 << " GeV"
0782 << " phi = " << std::right << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0783 }
0784 }
0785 }
0786 } else {
0787 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " ET = " << std::right
0788 << std::setw(6) << (iterColl->et()) << " GeV"
0789 << " phi = " << std::right << std::setw(8) << (iterColl->phi()) << " rad" << std::endl;
0790 }
0791 }
0792 } break;
0793
0794 case JetCounts: {
0795
0796 } break;
0797
0798 case HfBitCounts: {
0799 oStr << "\n HfBitCounts collection\n" << std::endl;
0800
0801 for (l1extra::L1HFRingsCollection::const_iterator iterColl = m_l1ExtraHfBitCounts->begin();
0802 iterColl != m_l1ExtraHfBitCounts->end();
0803 ++iterColl) {
0804 if (checkBxInEvent) {
0805 if (iterColl->bx() != bxInEvent) {
0806 continue;
0807 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0808 } else {
0809 if (!checkObjIndexInColl) {
0810 for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
0811 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " count = " << iCount
0812 << " HF counts = " << (iterColl->hfBitCount((l1extra::L1HFRings::HFRingLabels)iCount))
0813 << std::endl;
0814 }
0815
0816 } else {
0817 for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
0818 if (objIndexInColl == iCount) {
0819 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " count = " << iCount
0820 << " HF counts = " << (iterColl->hfBitCount((l1extra::L1HFRings::HFRingLabels)iCount))
0821 << std::endl;
0822 }
0823 }
0824 }
0825 }
0826 } else {
0827 for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
0828 if (objIndexInColl == iCount) {
0829 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " count = " << iCount
0830 << " HF counts = " << (iterColl->hfBitCount((l1extra::L1HFRings::HFRingLabels)iCount)) << std::endl;
0831 }
0832 }
0833 }
0834 }
0835 } break;
0836
0837 case HfRingEtSums: {
0838 oStr << "\n HfRingEtSums collection\n" << std::endl;
0839
0840 for (l1extra::L1HFRingsCollection::const_iterator iterColl = m_l1ExtraHfRingEtSums->begin();
0841 iterColl != m_l1ExtraHfRingEtSums->end();
0842 ++iterColl) {
0843 if (checkBxInEvent) {
0844 if (iterColl->bx() != bxInEvent) {
0845 continue;
0846 oStr << "\n BxInEvent " << bxInEvent << ": collection not in the event" << std::endl;
0847 } else {
0848 if (!checkObjIndexInColl) {
0849 for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
0850 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " count = " << iCount
0851 << " HF ET sum = " << (iterColl->hfEtSum((l1extra::L1HFRings::HFRingLabels)iCount)) << " GeV"
0852 << std::endl;
0853 }
0854
0855 } else {
0856 for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
0857 if (objIndexInColl == iCount) {
0858 oStr << " bxInEvent = " << std::right << std::setw(2) << bxInEvent << " count = " << iCount
0859 << " HF ET sum = " << (iterColl->hfEtSum((l1extra::L1HFRings::HFRingLabels)iCount)) << " GeV"
0860 << std::endl;
0861 }
0862 }
0863 }
0864 }
0865 } else {
0866 for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
0867 if (objIndexInColl == iCount) {
0868 oStr << " bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) << " count = " << iCount
0869 << " HF ET sum = " << (iterColl->hfEtSum((l1extra::L1HFRings::HFRingLabels)iCount)) << " GeV"
0870 << std::endl;
0871 }
0872 }
0873 }
0874 }
0875 } break;
0876
0877 case TechTrig: {
0878
0879 } break;
0880
0881 case Castor: {
0882
0883 } break;
0884
0885 case BPTX: {
0886
0887 } break;
0888
0889 case GtExternal: {
0890
0891 } break;
0892
0893 case ObjNull: {
0894
0895 } break;
0896
0897 default: {
0898 edm::LogInfo("L1GtObject") << "\n '" << gtObject << "' is not a recognized L1GtObject. ";
0899
0900
0901
0902 } break;
0903 }
0904 }
0905
0906 void L1RetrieveL1Extra::printL1Extra(std::ostream& oStr, const L1GtObject& gtObject, const int bxInEvent) const {
0907 bool checkBxInEvent = true;
0908 bool checkObjIndexInColl = false;
0909 int objIndexInColl = -1;
0910
0911 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent, checkObjIndexInColl, objIndexInColl);
0912 }
0913
0914 void L1RetrieveL1Extra::printL1Extra(std::ostream& oStr, const L1GtObject& gtObject) const {
0915 bool checkBxInEvent = false;
0916 bool checkObjIndexInColl = false;
0917 int bxInEvent = 999;
0918 int objIndexInColl = -1;
0919
0920 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent, checkObjIndexInColl, objIndexInColl);
0921 }
0922
0923 void L1RetrieveL1Extra::printL1Extra(std::ostream& oStr, const int iBxInEvent) const {
0924 printL1Extra(oStr, Mu, iBxInEvent);
0925 printL1Extra(oStr, NoIsoEG, iBxInEvent);
0926 printL1Extra(oStr, IsoEG, iBxInEvent);
0927 printL1Extra(oStr, CenJet, iBxInEvent);
0928 printL1Extra(oStr, ForJet, iBxInEvent);
0929 printL1Extra(oStr, TauJet, iBxInEvent);
0930 printL1Extra(oStr, ETM, iBxInEvent);
0931 printL1Extra(oStr, ETT, iBxInEvent);
0932 printL1Extra(oStr, HTT, iBxInEvent);
0933 printL1Extra(oStr, HTM, iBxInEvent);
0934
0935 printL1Extra(oStr, HfBitCounts, iBxInEvent);
0936 printL1Extra(oStr, HfRingEtSums, iBxInEvent);
0937 }
0938
0939 void L1RetrieveL1Extra::printL1Extra(std::ostream& oStr) const {
0940 printL1Extra(oStr, Mu);
0941 printL1Extra(oStr, NoIsoEG);
0942 printL1Extra(oStr, IsoEG);
0943 printL1Extra(oStr, CenJet);
0944 printL1Extra(oStr, ForJet);
0945 printL1Extra(oStr, TauJet);
0946 printL1Extra(oStr, ETM);
0947 printL1Extra(oStr, ETT);
0948 printL1Extra(oStr, HTT);
0949 printL1Extra(oStr, HTM);
0950
0951 printL1Extra(oStr, HfBitCounts);
0952 printL1Extra(oStr, HfRingEtSums);
0953 }