444 const std::string scaleSetName = gtScales.getScalesName();
445 LogDebug(
"L1TGlobal") <<
" L1 Menu Scales -- Set Name: " << scaleSetName << std::endl;
462 LogDebug(
"L1TGlobal") <<
"Size corrMuon " << corrMuon.size() <<
"\nSize corrCalo " << corrCalo.size()
463 <<
"\nSize corrSums " << corrEnergySum.size() << std::endl;
477 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
478 itCondOnChip != conditionMap.end();
484 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
486 switch ((itCond->second)->condCategory()) {
489 const int ifMuEtaNumberBits = 0;
495 muCondition->evaluateConditionStoreResult(iBxInEvent);
498 cMapResults[itCond->first] = muCondition;
501 std::ostringstream myCout;
502 muCondition->print(myCout);
504 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
511 const int ifCaloEtaNumberBits = 0;
514 new CaloCondition(itCond->second,
this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
518 caloCondition->evaluateConditionStoreResult(iBxInEvent);
520 cMapResults[itCond->first] = caloCondition;
523 std::ostringstream myCout;
524 caloCondition->print(myCout);
526 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
535 eSumCondition->evaluateConditionStoreResult(iBxInEvent);
537 cMapResults[itCond->first] = eSumCondition;
540 std::ostringstream myCout;
541 eSumCondition->print(myCout);
543 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
553 extCondition->evaluateConditionStoreResult(iBxInEvent);
555 cMapResults[itCond->first] = extCondition;
558 std::ostringstream myCout;
559 extCondition->print(myCout);
561 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
568 const CorrelationTemplate* corrTemplate = static_cast<const CorrelationTemplate*>(itCond->second);
571 const int cond0Ind = corrTemplate->
cond0Index();
572 const int cond1Ind = corrTemplate->
cond1Index();
578 int cond0NrL1Objects = 0;
579 int cond1NrL1Objects = 0;
580 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
583 switch (cond0Categ) {
585 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
588 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
591 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
598 switch (cond1Categ) {
600 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
603 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
606 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
616 correlationCond->setScales(>Scales);
617 correlationCond->evaluateConditionStoreResult(iBxInEvent);
619 cMapResults[itCond->first] = correlationCond;
622 std::ostringstream myCout;
623 correlationCond->print(myCout);
625 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
634 static_cast<const CorrelationThreeBodyTemplate*>(itCond->second);
638 const int cond0Ind = corrTemplate->
cond0Index();
639 const int cond1Ind = corrTemplate->
cond1Index();
640 const int cond2Ind = corrTemplate->
cond2Index();
647 int cond0NrL1Objects = 0;
648 int cond1NrL1Objects = 0;
649 int cond2NrL1Objects = 0;
650 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects " << cond0NrL1Objects <<
" cond1NrL1Objects "
651 << cond1NrL1Objects <<
" cond2NrL1Objects " << cond2NrL1Objects << std::endl;
653 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
655 LogDebug(
"L1TGlobal") <<
"No muon0 to evaluate three-body correlation condition";
658 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
660 LogDebug(
"L1TGlobal") <<
"No muon1 to evaluate three-body correlation condition";
663 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
665 LogDebug(
"L1TGlobal") <<
"No muon2 to evaluate three-body correlation condition";
671 correlationThreeBodyCond->setVerbosity(
m_verbosity);
672 correlationThreeBodyCond->setScales(>Scales);
673 correlationThreeBodyCond->evaluateConditionStoreResult(iBxInEvent);
674 cMapResults[itCond->first] = correlationThreeBodyCond;
677 std::ostringstream myCout;
678 correlationThreeBodyCond->print(myCout);
680 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
688 static_cast<const CorrelationWithOverlapRemovalTemplate*>(itCond->second);
692 const int cond0Ind = corrTemplate->
cond0Index();
693 const int cond1Ind = corrTemplate->
cond1Index();
694 const int cond2Ind = corrTemplate->
cond2Index();
701 int cond0NrL1Objects = 0;
702 int cond1NrL1Objects = 0;
703 int cond2NrL1Objects = 0;
704 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
705 <<
" cond2NrL1Objects " << cond2NrL1Objects << std::endl;
707 switch (cond0Categ) {
709 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
712 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
715 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
722 switch (cond1Categ) {
724 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
727 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
730 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
737 switch (cond2Categ) {
739 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
742 cond2Condition = &((corrCalo[iChip])[cond2Ind]);
745 cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
756 correlationCondWOR->setScales(>Scales);
757 correlationCondWOR->evaluateConditionStoreResult(iBxInEvent);
759 cMapResults[itCond->first] = correlationCondWOR;
762 std::ostringstream myCout;
763 correlationCondWOR->print(myCout);
765 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
786 std::vector<GlobalObjectMap> objMapVec;
787 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
788 objMapVec.reserve(numberPhysTriggers);
790 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
794 int algBitNumber = (itAlgo->second).algoBitNumber();
795 bool algResult = gtAlg.gtAlgoResult();
797 LogDebug(
"L1TGlobal") <<
" ===> for iBxInEvent = " << iBxInEvent <<
":\t algBitName = " << itAlgo->first
798 <<
",\t algBitNumber = " << algBitNumber <<
",\t algResult = " << algResult << std::endl;
807 std::ostringstream myCout;
808 (itAlgo->second).
print(myCout);
811 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
815 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
816 std::vector<L1TObjectTypeInCond> otypes;
817 for (
auto iop = gtAlg.operandTokenVector().begin(); iop != gtAlg.operandTokenVector().end(); ++iop) {
822 for (
auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
824 auto match = imap->find(iop->tokenName);
826 if (
match != imap->end()) {
832 for (
auto itype =
otype.begin(); itype !=
otype.end(); itype++) {
838 edm::LogWarning(
"L1TGlobal") <<
"\n Failed to find match for operand token " << iop->tokenName <<
"\n";
840 otypes.push_back(
otype);
856 std::ostringstream myCout1;
857 objMap.
print(myCout1);
859 LogTrace(
"L1TGlobal") << myCout1.str() << std::endl;
862 objMapVec.push_back(objMap);
867 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
868 gtObjectMapRecord->swapGtObjectMap(objMapVec);
874 for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip =
m_conditionResultMaps.begin();
878 delete itCond->second;
879 itCond->second =
nullptr;