447 const std::string scaleSetName = gtScales.getScalesName();
448 LogDebug(
"L1TGlobal") <<
" L1 Menu Scales -- Set Name: " << scaleSetName << std::endl;
465 LogDebug(
"L1TGlobal") <<
"Size corrMuon " << corrMuon.size() <<
"\nSize corrCalo " << corrCalo.size()
466 <<
"\nSize corrSums " << corrEnergySum.size() << std::endl;
480 for (std::vector<ConditionMap>::const_iterator itCondOnChip = conditionMap.begin();
481 itCondOnChip != conditionMap.end();
487 for (
CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
489 switch ((itCond->second)->condCategory()) {
492 const int ifMuEtaNumberBits = 0;
498 muCondition->evaluateConditionStoreResult(iBxInEvent);
501 cMapResults[itCond->first] = muCondition;
504 std::ostringstream myCout;
505 muCondition->print(myCout);
507 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
514 const int ifCaloEtaNumberBits = 0;
517 new CaloCondition(itCond->second,
this, nrL1EG, nrL1Jet, nrL1Tau, ifCaloEtaNumberBits);
521 caloCondition->evaluateConditionStoreResult(iBxInEvent);
523 cMapResults[itCond->first] = caloCondition;
526 std::ostringstream myCout;
527 caloCondition->print(myCout);
529 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
538 eSumCondition->evaluateConditionStoreResult(iBxInEvent);
540 cMapResults[itCond->first] = eSumCondition;
543 std::ostringstream myCout;
544 eSumCondition->print(myCout);
546 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
556 extCondition->evaluateConditionStoreResult(iBxInEvent);
558 cMapResults[itCond->first] = extCondition;
561 std::ostringstream myCout;
562 extCondition->print(myCout);
564 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
571 const CorrelationTemplate* corrTemplate = static_cast<const CorrelationTemplate*>(itCond->second);
574 const int cond0Ind = corrTemplate->
cond0Index();
575 const int cond1Ind = corrTemplate->
cond1Index();
581 int cond0NrL1Objects = 0;
582 int cond1NrL1Objects = 0;
583 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
586 switch (cond0Categ) {
588 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
591 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
594 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
601 switch (cond1Categ) {
603 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
606 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
609 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
619 correlationCond->setScales(>Scales);
620 correlationCond->evaluateConditionStoreResult(iBxInEvent);
622 cMapResults[itCond->first] = correlationCond;
625 std::ostringstream myCout;
626 correlationCond->print(myCout);
628 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
637 static_cast<const CorrelationThreeBodyTemplate*>(itCond->second);
641 const int cond0Ind = corrTemplate->
cond0Index();
642 const int cond1Ind = corrTemplate->
cond1Index();
643 const int cond2Ind = corrTemplate->
cond2Index();
650 int cond0NrL1Objects = 0;
651 int cond1NrL1Objects = 0;
652 int cond2NrL1Objects = 0;
653 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects " << cond0NrL1Objects <<
" cond1NrL1Objects "
654 << cond1NrL1Objects <<
" cond2NrL1Objects " << cond2NrL1Objects << std::endl;
656 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
658 LogDebug(
"L1TGlobal") <<
"No muon0 to evaluate three-body correlation condition";
661 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
663 LogDebug(
"L1TGlobal") <<
"No muon1 to evaluate three-body correlation condition";
666 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
668 LogDebug(
"L1TGlobal") <<
"No muon2 to evaluate three-body correlation condition";
674 correlationThreeBodyCond->setVerbosity(
m_verbosity);
675 correlationThreeBodyCond->setScales(>Scales);
676 correlationThreeBodyCond->evaluateConditionStoreResult(iBxInEvent);
677 cMapResults[itCond->first] = correlationThreeBodyCond;
680 std::ostringstream myCout;
681 correlationThreeBodyCond->print(myCout);
683 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
691 static_cast<const CorrelationWithOverlapRemovalTemplate*>(itCond->second);
695 const int cond0Ind = corrTemplate->
cond0Index();
696 const int cond1Ind = corrTemplate->
cond1Index();
697 const int cond2Ind = corrTemplate->
cond2Index();
704 int cond0NrL1Objects = 0;
705 int cond1NrL1Objects = 0;
706 int cond2NrL1Objects = 0;
707 LogDebug(
"L1TGlobal") <<
" cond0NrL1Objects" << cond0NrL1Objects <<
" cond1NrL1Objects " << cond1NrL1Objects
708 <<
" cond2NrL1Objects " << cond2NrL1Objects << std::endl;
710 switch (cond0Categ) {
712 cond0Condition = &((corrMuon[iChip])[cond0Ind]);
715 cond0Condition = &((corrCalo[iChip])[cond0Ind]);
718 cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
725 switch (cond1Categ) {
727 cond1Condition = &((corrMuon[iChip])[cond1Ind]);
730 cond1Condition = &((corrCalo[iChip])[cond1Ind]);
733 cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
740 switch (cond2Categ) {
742 cond2Condition = &((corrMuon[iChip])[cond2Ind]);
745 cond2Condition = &((corrCalo[iChip])[cond2Ind]);
748 cond2Condition = &((corrEnergySum[iChip])[cond2Ind]);
759 correlationCondWOR->setScales(>Scales);
760 correlationCondWOR->evaluateConditionStoreResult(iBxInEvent);
762 cMapResults[itCond->first] = correlationCondWOR;
765 std::ostringstream myCout;
766 correlationCondWOR->print(myCout);
768 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
789 std::vector<GlobalObjectMap> objMapVec;
790 if (produceL1GtObjectMapRecord && (iBxInEvent == 0))
791 objMapVec.reserve(numberPhysTriggers);
793 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
797 int algBitNumber = (itAlgo->second).algoBitNumber();
798 bool algResult = gtAlg.gtAlgoResult();
800 LogDebug(
"L1TGlobal") <<
" ===> for iBxInEvent = " << iBxInEvent <<
":\t algBitName = " << itAlgo->first
801 <<
",\t algBitNumber = " << algBitNumber <<
",\t algResult = " << algResult << std::endl;
810 std::ostringstream myCout;
811 (itAlgo->second).
print(myCout);
814 LogTrace(
"L1TGlobal") << myCout.str() << std::endl;
818 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
819 std::vector<L1TObjectTypeInCond> otypes;
820 for (
auto iop = gtAlg.operandTokenVector().begin(); iop != gtAlg.operandTokenVector().end(); ++iop) {
825 for (
auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
827 auto match = imap->find(iop->tokenName);
829 if (
match != imap->end()) {
835 for (
auto itype =
otype.begin(); itype !=
otype.end(); itype++) {
841 edm::LogWarning(
"L1TGlobal") <<
"\n Failed to find match for operand token " << iop->tokenName <<
"\n";
843 otypes.push_back(
otype);
859 std::ostringstream myCout1;
860 objMap.
print(myCout1);
862 LogTrace(
"L1TGlobal") << myCout1.str() << std::endl;
865 objMapVec.push_back(objMap);
870 if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
871 gtObjectMapRecord->swapGtObjectMap(objMapVec);
877 for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator itCondOnChip =
m_conditionResultMaps.begin();
881 delete itCond->second;
882 itCond->second =
nullptr;