27 #include "CLHEP/Random/RandFlat.h"
43 : muonSource_(iConfig.getParameter<edm::
InputTag>(
"muonSource")),
44 isoEmSource_(iConfig.getParameter<edm::
InputTag>(
"isolatedEmSource")),
45 nonIsoEmSource_(iConfig.getParameter<edm::
InputTag>(
"nonIsolatedEmSource")),
46 cenJetSource_(iConfig.getParameter<edm::
InputTag>(
"centralJetSource")),
47 forJetSource_(iConfig.getParameter<edm::
InputTag>(
"forwardJetSource")),
48 tauJetSource_(iConfig.getParameter<edm::
InputTag>(
"tauJetSource")),
49 etMissSource_(iConfig.getParameter<edm::
InputTag>(
"etMissSource")),
50 htMissSource_(iConfig.getParameter<edm::
InputTag>(
"htMissSource")) {
51 using namespace l1extra;
54 produces<L1ParticleMapCollection>();
55 produces<L1GlobalTriggerReadoutRecord>();
58 for (
int i = 0;
i < L1ParticleMap::kNumOfL1TriggerTypes; ++
i) {
260 iConfig.
getParameter<
double>(
"L1_IsoEG10_TauJet20_thresh1");
262 iConfig.
getParameter<
double>(
"L1_IsoEG10_TauJet20_thresh2");
265 iConfig.
getParameter<
double>(
"L1_IsoEG10_TauJet30_thresh1");
267 iConfig.
getParameter<
double>(
"L1_IsoEG10_TauJet30_thresh2");
302 iConfig.
getParameter<
double>(
"L1_TauJet40_HTT200_thresh2");
348 iConfig.
getParameter<
double>(
"L1_DoubleMu3_IsoEG5_thresh1");
350 iConfig.
getParameter<
double>(
"L1_DoubleMu3_IsoEG5_thresh2");
356 iConfig.
getParameter<
double>(
"L1_DoubleIsoEG5_Mu3_thresh1");
358 iConfig.
getParameter<
double>(
"L1_DoubleIsoEG5_Mu3_thresh2");
365 iConfig.
getParameter<
double>(
"L1_DoubleMu3_HTT200_thresh1");
367 iConfig.
getParameter<
double>(
"L1_DoubleMu3_HTT200_thresh2");
370 iConfig.
getParameter<
double>(
"L1_DoubleIsoEG5_HTT200_thresh1");
372 iConfig.
getParameter<
double>(
"L1_DoubleIsoEG5_HTT200_thresh2");
373 prescales_[L1ParticleMap::kDoubleIsoEG5_HTT200] = iConfig.
getParameter<
int>(
"L1_DoubleIsoEG5_HTT200_prescale");
375 iConfig.
getParameter<
double>(
"L1_DoubleEG10_HTT200_thresh1");
377 iConfig.
getParameter<
double>(
"L1_DoubleEG10_HTT200_thresh2");
378 prescales_[L1ParticleMap::kDoubleEG10_HTT200] = iConfig.
getParameter<
int>(
"L1_DoubleEG10_HTT200_prescale");
380 iConfig.
getParameter<
double>(
"L1_DoubleJet50_HTT200_thresh1");
382 iConfig.
getParameter<
double>(
"L1_DoubleJet50_HTT200_thresh2");
383 prescales_[L1ParticleMap::kDoubleJet50_HTT200] = iConfig.
getParameter<
int>(
"L1_DoubleJet50_HTT200_prescale");
385 iConfig.
getParameter<
double>(
"L1_DoubleTauJet40_HTT200_thresh1");
387 iConfig.
getParameter<
double>(
"L1_DoubleTauJet40_HTT200_thresh2");
388 prescales_[L1ParticleMap::kDoubleTauJet40_HTT200] = iConfig.
getParameter<
int>(
"L1_DoubleTauJet40_HTT200_prescale");
392 iConfig.
getParameter<
double>(
"L1_DoubleMu3_ETM20_thresh2");
395 iConfig.
getParameter<
double>(
"L1_DoubleIsoEG5_ETM20_thresh1");
397 iConfig.
getParameter<
double>(
"L1_DoubleIsoEG5_ETM20_thresh2");
398 prescales_[L1ParticleMap::kDoubleIsoEG5_ETM20] = iConfig.
getParameter<
int>(
"L1_DoubleIsoEG5_ETM20_prescale");
400 iConfig.
getParameter<
double>(
"L1_DoubleEG10_ETM20_thresh1");
402 iConfig.
getParameter<
double>(
"L1_DoubleEG10_ETM20_thresh2");
405 iConfig.
getParameter<
double>(
"L1_DoubleJet50_ETM20_thresh1");
407 iConfig.
getParameter<
double>(
"L1_DoubleJet50_ETM20_thresh2");
408 prescales_[L1ParticleMap::kDoubleJet50_ETM20] = iConfig.
getParameter<
int>(
"L1_DoubleJet50_ETM20_prescale");
410 iConfig.
getParameter<
double>(
"L1_DoubleTauJet40_ETM20_thresh1");
412 iConfig.
getParameter<
double>(
"L1_DoubleTauJet40_ETM20_thresh2");
413 prescales_[L1ParticleMap::kDoubleTauJet40_ETM20] = iConfig.
getParameter<
int>(
"L1_DoubleTauJet40_ETM20_prescale");
420 iConfig.
getParameter<
double>(
"L1_ExclusiveDoubleIsoEG4_thresh1");
422 iConfig.
getParameter<
double>(
"L1_ExclusiveDoubleIsoEG4_thresh2");
423 prescales_[L1ParticleMap::kExclusiveDoubleIsoEG4] = iConfig.
getParameter<
int>(
"L1_ExclusiveDoubleIsoEG4_prescale");
425 iConfig.
getParameter<
double>(
"L1_ExclusiveDoubleJet60_thresh");
426 prescales_[L1ParticleMap::kExclusiveDoubleJet60] = iConfig.
getParameter<
int>(
"L1_ExclusiveDoubleJet60_prescale");
428 iConfig.
getParameter<
double>(
"L1_ExclusiveJet25_Gap_Jet25_thresh");
429 prescales_[L1ParticleMap::kExclusiveJet25_Gap_Jet25] =
430 iConfig.
getParameter<
int>(
"L1_ExclusiveJet25_Gap_Jet25_prescale");
432 iConfig.
getParameter<
double>(
"L1_IsoEG10_Jet20_ForJet10_thresh1");
434 iConfig.
getParameter<
double>(
"L1_IsoEG10_Jet20_ForJet10_thresh2");
436 iConfig.
getParameter<
double>(
"L1_IsoEG10_Jet20_ForJet10_thresh3");
437 prescales_[L1ParticleMap::kIsoEG10_Jet20_ForJet10] = iConfig.
getParameter<
int>(
"L1_IsoEG10_Jet20_ForJet10_prescale");
499 using namespace reco;
500 using namespace l1extra;
530 double met = metHandle->etMiss();
531 double ht = mhtHandle->etTotal();
532 double ett = metHandle->etTotal();
563 L1MuonParticleCollection::const_iterator muItr = muHandle->begin();
564 L1MuonParticleCollection::const_iterator muEnd = muHandle->end();
566 for (
size_t i = 0; muItr != muEnd; ++muItr, ++
i) {
567 if (!muItr->gmtMuonCand().empty()) {
568 unsigned int qual = muItr->gmtMuonCand().quality();
570 if (qual == 4 || qual == 5 || qual == 6 || qual == 7) {
574 if (qual == 3 || qual == 5 || qual == 6 || qual == 7) {
581 bool globalDecision =
false;
582 std::vector<bool> decisionWord;
584 for (
int itrig = 0; itrig < L1ParticleMap::kNumOfL1TriggerTypes; ++itrig) {
585 bool decision =
false;
586 std::vector<L1ParticleMap::L1ObjectType> objectTypes;
591 L1ParticleMap::L1IndexComboVector combosTmp;
593 if (itrig == L1ParticleMap::kSingleMu3 || itrig == L1ParticleMap::kSingleMu5 ||
594 itrig == L1ParticleMap::kSingleMu7 || itrig == L1ParticleMap::kSingleMu10 ||
595 itrig == L1ParticleMap::kSingleMu14 || itrig == L1ParticleMap::kSingleMu20 ||
596 itrig == L1ParticleMap::kSingleMu25) {
600 }
else if (itrig == L1ParticleMap::kSingleIsoEG5 || itrig == L1ParticleMap::kSingleIsoEG8 ||
601 itrig == L1ParticleMap::kSingleIsoEG10 || itrig == L1ParticleMap::kSingleIsoEG12 ||
602 itrig == L1ParticleMap::kSingleIsoEG15 || itrig == L1ParticleMap::kSingleIsoEG20 ||
603 itrig == L1ParticleMap::kSingleIsoEG25) {
604 objectTypes.push_back(L1ParticleMap::kEM);
607 }
else if (itrig == L1ParticleMap::kSingleEG5 || itrig == L1ParticleMap::kSingleEG8 ||
608 itrig == L1ParticleMap::kSingleEG10 || itrig == L1ParticleMap::kSingleEG12 ||
609 itrig == L1ParticleMap::kSingleEG15 || itrig == L1ParticleMap::kSingleEG20 ||
610 itrig == L1ParticleMap::kSingleEG25) {
611 objectTypes.push_back(L1ParticleMap::kEM);
614 }
else if (itrig == L1ParticleMap::kSingleJet15 || itrig == L1ParticleMap::kSingleJet20 ||
615 itrig == L1ParticleMap::kSingleJet30 || itrig == L1ParticleMap::kSingleJet50 ||
616 itrig == L1ParticleMap::kSingleJet70 || itrig == L1ParticleMap::kSingleJet100 ||
617 itrig == L1ParticleMap::kSingleJet150 || itrig == L1ParticleMap::kSingleJet200) {
618 objectTypes.push_back(L1ParticleMap::kJet);
621 }
else if (itrig == L1ParticleMap::kSingleTauJet10 || itrig == L1ParticleMap::kSingleTauJet20 ||
622 itrig == L1ParticleMap::kSingleTauJet30 || itrig == L1ParticleMap::kSingleTauJet35 ||
623 itrig == L1ParticleMap::kSingleTauJet40 || itrig == L1ParticleMap::kSingleTauJet60 ||
624 itrig == L1ParticleMap::kSingleTauJet80 || itrig == L1ParticleMap::kSingleTauJet100) {
625 objectTypes.push_back(L1ParticleMap::kJet);
628 }
else if (itrig == L1ParticleMap::kHTT100 || itrig == L1ParticleMap::kHTT200 || itrig == L1ParticleMap::kHTT250 ||
629 itrig == L1ParticleMap::kHTT300 || itrig == L1ParticleMap::kHTT400 || itrig == L1ParticleMap::kHTT500) {
630 objectTypes.push_back(L1ParticleMap::kEtHad);
636 }
else if (itrig == L1ParticleMap::kETM10 || itrig == L1ParticleMap::kETM15 || itrig == L1ParticleMap::kETM20 ||
637 itrig == L1ParticleMap::kETM30 || itrig == L1ParticleMap::kETM40 || itrig == L1ParticleMap::kETM50 ||
638 itrig == L1ParticleMap::kETM60) {
639 objectTypes.push_back(L1ParticleMap::kEtMiss);
645 }
else if (itrig == L1ParticleMap::kETT60) {
646 objectTypes.push_back(L1ParticleMap::kEtTotal);
652 }
else if (itrig == L1ParticleMap::kDoubleMu3) {
657 inputMuonRefsDouble,
singleThresholds_[itrig], decision, outputMuonRefsTmp, combosTmp);
658 }
else if (itrig == L1ParticleMap::kDoubleIsoEG8 || itrig == L1ParticleMap::kDoubleIsoEG10) {
659 objectTypes.push_back(L1ParticleMap::kEM);
660 objectTypes.push_back(L1ParticleMap::kEM);
663 }
else if (itrig == L1ParticleMap::kDoubleEG5 || itrig == L1ParticleMap::kDoubleEG10 ||
664 itrig == L1ParticleMap::kDoubleEG15) {
665 objectTypes.push_back(L1ParticleMap::kEM);
666 objectTypes.push_back(L1ParticleMap::kEM);
669 inputRelaxedEmRefs,
singleThresholds_[itrig], decision, outputEmRefsTmp, combosTmp);
670 }
else if (itrig == L1ParticleMap::kDoubleJet70 || itrig == L1ParticleMap::kDoubleJet100) {
671 objectTypes.push_back(L1ParticleMap::kJet);
672 objectTypes.push_back(L1ParticleMap::kJet);
675 }
else if (itrig == L1ParticleMap::kDoubleTauJet20 || itrig == L1ParticleMap::kDoubleTauJet30 ||
676 itrig == L1ParticleMap::kDoubleTauJet35 || itrig == L1ParticleMap::kDoubleTauJet40) {
677 objectTypes.push_back(L1ParticleMap::kJet);
678 objectTypes.push_back(L1ParticleMap::kJet);
681 }
else if (itrig == L1ParticleMap::kMu3_IsoEG5 || itrig == L1ParticleMap::kMu5_IsoEG10) {
683 objectTypes.push_back(L1ParticleMap::kEM);
693 }
else if (itrig == L1ParticleMap::kMu3_EG12) {
695 objectTypes.push_back(L1ParticleMap::kEM);
705 }
else if (itrig == L1ParticleMap::kMu3_Jet15 || itrig == L1ParticleMap::kMu5_Jet15 ||
706 itrig == L1ParticleMap::kMu3_Jet70 || itrig == L1ParticleMap::kMu5_Jet20) {
708 objectTypes.push_back(L1ParticleMap::kJet);
718 }
else if (itrig == L1ParticleMap::kMu5_TauJet20 || itrig == L1ParticleMap::kMu5_TauJet30) {
720 objectTypes.push_back(L1ParticleMap::kJet);
730 }
else if (itrig == L1ParticleMap::kIsoEG10_EG10) {
731 objectTypes.push_back(L1ParticleMap::kEM);
732 objectTypes.push_back(L1ParticleMap::kEM);
741 }
else if (itrig == L1ParticleMap::kIsoEG10_Jet15 || itrig == L1ParticleMap::kIsoEG10_Jet30 ||
742 itrig == L1ParticleMap::kIsoEG10_Jet20 || itrig == L1ParticleMap::kIsoEG10_Jet70) {
743 objectTypes.push_back(L1ParticleMap::kEM);
744 objectTypes.push_back(L1ParticleMap::kJet);
754 }
else if (itrig == L1ParticleMap::kIsoEG10_TauJet20 || itrig == L1ParticleMap::kIsoEG10_TauJet30) {
755 objectTypes.push_back(L1ParticleMap::kEM);
756 objectTypes.push_back(L1ParticleMap::kJet);
766 }
else if (itrig == L1ParticleMap::kEG10_Jet15 || itrig == L1ParticleMap::kEG12_Jet20 ||
767 itrig == L1ParticleMap::kEG12_Jet70) {
768 objectTypes.push_back(L1ParticleMap::kEM);
769 objectTypes.push_back(L1ParticleMap::kJet);
779 }
else if (itrig == L1ParticleMap::kEG12_TauJet40) {
780 objectTypes.push_back(L1ParticleMap::kEM);
781 objectTypes.push_back(L1ParticleMap::kJet);
791 }
else if (itrig == L1ParticleMap::kJet70_TauJet40) {
792 objectTypes.push_back(L1ParticleMap::kJet);
793 objectTypes.push_back(L1ParticleMap::kJet);
802 }
else if (itrig == L1ParticleMap::kMu3_HTT200) {
804 objectTypes.push_back(L1ParticleMap::kEtHad);
813 }
else if (itrig == L1ParticleMap::kIsoEG10_HTT200) {
814 objectTypes.push_back(L1ParticleMap::kEM);
815 objectTypes.push_back(L1ParticleMap::kEtHad);
824 }
else if (itrig == L1ParticleMap::kEG12_HTT200) {
825 objectTypes.push_back(L1ParticleMap::kEM);
826 objectTypes.push_back(L1ParticleMap::kEtHad);
835 }
else if (itrig == L1ParticleMap::kJet70_HTT200) {
836 objectTypes.push_back(L1ParticleMap::kJet);
837 objectTypes.push_back(L1ParticleMap::kEtHad);
846 }
else if (itrig == L1ParticleMap::kTauJet40_HTT200) {
847 objectTypes.push_back(L1ParticleMap::kJet);
848 objectTypes.push_back(L1ParticleMap::kEtHad);
857 }
else if (itrig == L1ParticleMap::kMu3_ETM30) {
859 objectTypes.push_back(L1ParticleMap::kEtMiss);
868 }
else if (itrig == L1ParticleMap::kIsoEG10_ETM30) {
869 objectTypes.push_back(L1ParticleMap::kEM);
870 objectTypes.push_back(L1ParticleMap::kEtMiss);
879 }
else if (itrig == L1ParticleMap::kEG12_ETM30) {
880 objectTypes.push_back(L1ParticleMap::kEM);
881 objectTypes.push_back(L1ParticleMap::kEtMiss);
890 }
else if (itrig == L1ParticleMap::kJet70_ETM40) {
891 objectTypes.push_back(L1ParticleMap::kJet);
892 objectTypes.push_back(L1ParticleMap::kEtMiss);
901 }
else if (itrig == L1ParticleMap::kTauJet20_ETM20 || itrig == L1ParticleMap::kTauJet30_ETM30 ||
902 itrig == L1ParticleMap::kTauJet30_ETM40) {
903 objectTypes.push_back(L1ParticleMap::kJet);
904 objectTypes.push_back(L1ParticleMap::kEtMiss);
913 }
else if (itrig == L1ParticleMap::kHTT100_ETM30) {
914 objectTypes.push_back(L1ParticleMap::kEtHad);
915 objectTypes.push_back(L1ParticleMap::kEtMiss);
921 }
else if (itrig == L1ParticleMap::kTripleMu3) {
927 inputMuonRefsDouble,
singleThresholds_[itrig], decision, outputMuonRefsTmp, combosTmp);
928 }
else if (itrig == L1ParticleMap::kTripleIsoEG5) {
929 objectTypes.push_back(L1ParticleMap::kEM);
930 objectTypes.push_back(L1ParticleMap::kEM);
931 objectTypes.push_back(L1ParticleMap::kEM);
934 }
else if (itrig == L1ParticleMap::kTripleEG10) {
935 objectTypes.push_back(L1ParticleMap::kEM);
936 objectTypes.push_back(L1ParticleMap::kEM);
937 objectTypes.push_back(L1ParticleMap::kEM);
940 inputRelaxedEmRefs,
singleThresholds_[itrig], decision, outputEmRefsTmp, combosTmp);
941 }
else if (itrig == L1ParticleMap::kTripleJet50) {
942 objectTypes.push_back(L1ParticleMap::kJet);
943 objectTypes.push_back(L1ParticleMap::kJet);
944 objectTypes.push_back(L1ParticleMap::kJet);
947 }
else if (itrig == L1ParticleMap::kTripleTauJet40) {
948 objectTypes.push_back(L1ParticleMap::kJet);
949 objectTypes.push_back(L1ParticleMap::kJet);
950 objectTypes.push_back(L1ParticleMap::kJet);
953 }
else if (itrig == L1ParticleMap::kDoubleMu3_IsoEG5) {
956 objectTypes.push_back(L1ParticleMap::kEM);
966 }
else if (itrig == L1ParticleMap::kDoubleMu3_EG10) {
969 objectTypes.push_back(L1ParticleMap::kEM);
979 }
else if (itrig == L1ParticleMap::kDoubleIsoEG5_Mu3) {
980 objectTypes.push_back(L1ParticleMap::kEM);
981 objectTypes.push_back(L1ParticleMap::kEM);
992 }
else if (itrig == L1ParticleMap::kDoubleEG10_Mu3) {
993 objectTypes.push_back(L1ParticleMap::kEM);
994 objectTypes.push_back(L1ParticleMap::kEM);
1005 }
else if (itrig == L1ParticleMap::kDoubleMu3_HTT200) {
1008 objectTypes.push_back(L1ParticleMap::kEtHad);
1018 }
else if (itrig == L1ParticleMap::kDoubleIsoEG5_HTT200) {
1019 objectTypes.push_back(L1ParticleMap::kEM);
1020 objectTypes.push_back(L1ParticleMap::kEM);
1021 objectTypes.push_back(L1ParticleMap::kEtHad);
1031 }
else if (itrig == L1ParticleMap::kDoubleEG10_HTT200) {
1032 objectTypes.push_back(L1ParticleMap::kEM);
1033 objectTypes.push_back(L1ParticleMap::kEM);
1034 objectTypes.push_back(L1ParticleMap::kEtHad);
1044 }
else if (itrig == L1ParticleMap::kDoubleJet50_HTT200) {
1045 objectTypes.push_back(L1ParticleMap::kJet);
1046 objectTypes.push_back(L1ParticleMap::kJet);
1047 objectTypes.push_back(L1ParticleMap::kEtHad);
1057 }
else if (itrig == L1ParticleMap::kDoubleTauJet40_HTT200) {
1058 objectTypes.push_back(L1ParticleMap::kJet);
1059 objectTypes.push_back(L1ParticleMap::kJet);
1060 objectTypes.push_back(L1ParticleMap::kEtHad);
1070 }
else if (itrig == L1ParticleMap::kDoubleMu3_ETM20) {
1073 objectTypes.push_back(L1ParticleMap::kEtMiss);
1083 }
else if (itrig == L1ParticleMap::kDoubleIsoEG5_ETM20) {
1084 objectTypes.push_back(L1ParticleMap::kEM);
1085 objectTypes.push_back(L1ParticleMap::kEM);
1086 objectTypes.push_back(L1ParticleMap::kEtMiss);
1096 }
else if (itrig == L1ParticleMap::kDoubleEG10_ETM20) {
1097 objectTypes.push_back(L1ParticleMap::kEM);
1098 objectTypes.push_back(L1ParticleMap::kEM);
1099 objectTypes.push_back(L1ParticleMap::kEtMiss);
1109 }
else if (itrig == L1ParticleMap::kDoubleJet50_ETM20) {
1110 objectTypes.push_back(L1ParticleMap::kJet);
1111 objectTypes.push_back(L1ParticleMap::kJet);
1112 objectTypes.push_back(L1ParticleMap::kEtMiss);
1122 }
else if (itrig == L1ParticleMap::kDoubleTauJet40_ETM20) {
1123 objectTypes.push_back(L1ParticleMap::kJet);
1124 objectTypes.push_back(L1ParticleMap::kJet);
1125 objectTypes.push_back(L1ParticleMap::kEtMiss);
1135 }
else if (itrig == L1ParticleMap::kQuadJet30) {
1136 objectTypes.push_back(L1ParticleMap::kJet);
1137 objectTypes.push_back(L1ParticleMap::kJet);
1138 objectTypes.push_back(L1ParticleMap::kJet);
1139 objectTypes.push_back(L1ParticleMap::kJet);
1142 }
else if (itrig == L1ParticleMap::kExclusiveDoubleIsoEG4) {
1143 objectTypes.push_back(L1ParticleMap::kEM);
1144 objectTypes.push_back(L1ParticleMap::kEM);
1154 }
else if (itrig == L1ParticleMap::kExclusiveDoubleJet60) {
1155 objectTypes.push_back(L1ParticleMap::kJet);
1156 objectTypes.push_back(L1ParticleMap::kJet);
1158 if (inputJetRefs.size() == 2) {
1161 }
else if (itrig == L1ParticleMap::kExclusiveJet25_Gap_Jet25) {
1162 objectTypes.push_back(L1ParticleMap::kJet);
1163 objectTypes.push_back(L1ParticleMap::kJet);
1165 if (inputJetRefs.size() == 2) {
1168 }
else if (itrig == L1ParticleMap::kIsoEG10_Jet20_ForJet10) {
1169 objectTypes.push_back(L1ParticleMap::kEM);
1170 objectTypes.push_back(L1ParticleMap::kJet);
1177 inputCenJetTauJetRefs,
1185 }
else if (itrig == L1ParticleMap::kMinBias_HTT10) {
1186 objectTypes.push_back(L1ParticleMap::kEtHad);
1192 }
else if (itrig == L1ParticleMap::kZeroBias) {
1200 L1ParticleMap::L1IndexComboVector combos;
1205 double rand = CLHEP::RandFlat::shoot() * (double)
prescales_[itrig];
1209 outputEmRefs = outputEmRefsTmp;
1210 outputJetRefs = outputJetRefsTmp;
1211 outputMuonRefs = outputMuonRefsTmp;
1220 mapColl->push_back(
L1ParticleMap((L1ParticleMap::L1TriggerType)itrig,
1229 globalDecision = globalDecision || decision;
1230 decisionWord.push_back(decision);
1238 gtRecord->setDecision(globalDecision);
1239 gtRecord->setDecisionWord(decisionWord);
1245 template <
class TCollection>
1249 for (
size_t i = 0;
i < handle->size(); ++
i) {
1254 template <
class TCollection>
1256 const double &etThreshold,
1260 for (
size_t i = 0;
i < inputRefs.size(); ++
i) {
1261 if (inputRefs[
i].
get()->et() >= etThreshold) {
1263 outputRefs.push_back(inputRefs[
i]);
1268 template <
class TCollection>
1271 const double &etThreshold,
1275 bool combinedWithGlobalObject)
1279 for (
size_t i = 0;
i + 1 < inputRefs.size(); ++
i) {
1281 if (refi.
get()->et() >= etThreshold) {
1282 for (
size_t j =
i + 1;
j < inputRefs.size(); ++
j) {
1284 if (refj.
get()->et() >= etThreshold) {
1291 for (
size_t iout = 0; iout < outputRefs.size(); ++iout) {
1292 if (refi == outputRefs[iout]) {
1296 if (refj == outputRefs[iout]) {
1304 iInList = outputRefs.size();
1305 outputRefs.push_back(refi);
1309 jInList = outputRefs.size();
1310 outputRefs.push_back(refj);
1315 combo.push_back(iInList);
1316 combo.push_back(jInList);
1317 if (combinedWithGlobalObject)
1319 combos.push_back(combo);
1326 template <
class TCollection>
1329 const double &etThreshold,
1336 for (
size_t i = 0;
i + 2 < inputRefs.size(); ++
i) {
1338 if (refi.
get()->et() >= etThreshold) {
1339 for (
size_t j =
i + 1;
j + 1 < inputRefs.size(); ++
j) {
1341 if (refj.
get()->et() >= etThreshold) {
1342 for (
size_t k =
j + 1;
k < inputRefs.size(); ++
k) {
1344 if (refk.
get()->et() >= etThreshold) {
1352 for (
size_t iout = 0; iout < outputRefs.size(); ++iout) {
1353 if (refi == outputRefs[iout]) {
1357 if (refj == outputRefs[iout]) {
1361 if (refk == outputRefs[iout]) {
1369 iInList = outputRefs.size();
1370 outputRefs.push_back(refi);
1374 jInList = outputRefs.size();
1375 outputRefs.push_back(refj);
1379 kInList = outputRefs.size();
1380 outputRefs.push_back(refk);
1385 combo.push_back(iInList);
1386 combo.push_back(jInList);
1387 combo.push_back(kInList);
1388 combos.push_back(combo);
1397 template <
class TCollection1,
class TCollection2>
1401 const double &etThreshold1,
1402 const double &etThreshold2,
1410 for (
size_t i = 0;
i + 1 < inputRefs1.size(); ++
i) {
1412 if (refi.
get()->et() >= etThreshold1) {
1413 for (
size_t j =
i + 1;
j < inputRefs1.size(); ++
j) {
1415 if (refj.
get()->et() >= etThreshold1) {
1416 for (
size_t k = 0;
k < inputRefs2.size(); ++
k) {
1418 if (refk.
get()->et() >= etThreshold2) {
1426 for (
size_t iout = 0; iout < outputRefs1.size(); ++iout) {
1427 if (refi == outputRefs1[iout]) {
1431 if (refj == outputRefs1[iout]) {
1437 for (
size_t kout = 0; kout < outputRefs2.size(); ++kout) {
1438 if (refk == outputRefs2[kout]) {
1446 iInList = outputRefs1.size();
1447 outputRefs1.push_back(refi);
1451 jInList = outputRefs1.size();
1452 outputRefs1.push_back(refj);
1456 kInList = outputRefs2.size();
1457 outputRefs2.push_back(refk);
1462 combo.push_back(iInList);
1463 combo.push_back(jInList);
1464 combo.push_back(kInList);
1465 combos.push_back(combo);
1474 template <
class TCollection>
1477 const double &etThreshold,
1484 for (
size_t i = 0;
i + 3 < inputRefs.size(); ++
i) {
1486 if (refi.
get()->et() >= etThreshold) {
1487 for (
size_t j =
i + 1;
j + 2 < inputRefs.size(); ++
j) {
1489 if (refj.
get()->et() >= etThreshold) {
1490 for (
size_t k =
j + 1;
k + 1 < inputRefs.size(); ++
k) {
1492 if (refk.
get()->et() >= etThreshold) {
1493 for (
size_t p =
k + 1;
p < inputRefs.size(); ++
p) {
1495 if (refp.
get()->et() >= etThreshold) {
1504 for (
size_t iout = 0; iout < outputRefs.size(); ++iout) {
1505 if (refi == outputRefs[iout]) {
1509 if (refj == outputRefs[iout]) {
1513 if (refk == outputRefs[iout]) {
1517 if (refp == outputRefs[iout]) {
1525 iInList = outputRefs.size();
1526 outputRefs.push_back(refi);
1530 jInList = outputRefs.size();
1531 outputRefs.push_back(refj);
1535 kInList = outputRefs.size();
1536 outputRefs.push_back(refk);
1540 pInList = outputRefs.size();
1541 outputRefs.push_back(refp);
1546 combo.push_back(iInList);
1547 combo.push_back(jInList);
1548 combo.push_back(kInList);
1549 combo.push_back(pInList);
1550 combos.push_back(combo);
1561 template <
class TCollection1,
class TCollection2>
1565 const double &etThreshold1,
1566 const double &etThreshold2,
1572 for (
size_t i = 0;
i < inputRefs1.size(); ++
i) {
1574 if (refi.
get()->et() >= etThreshold1) {
1575 for (
size_t j = 0;
j < inputRefs2.size(); ++
j) {
1578 if (refj.
get()->et() >= etThreshold2) {
1584 for (
size_t iout = 0; iout < outputRefs1.size(); ++iout) {
1585 if (refi == outputRefs1[iout]) {
1591 for (
size_t jout = 0; jout < outputRefs2.size(); ++jout) {
1592 if (refj == outputRefs2[jout]) {
1600 iInList = outputRefs1.size();
1601 outputRefs1.push_back(refi);
1605 jInList = outputRefs2.size();
1606 outputRefs2.push_back(refj);
1611 combo.push_back(iInList);
1612 combo.push_back(jInList);
1613 combos.push_back(combo);
1620 template <
class TCollection>
1624 const double &etThreshold1,
1625 const double &etThreshold2,
1630 for (
size_t i = 0;
i < inputRefs1.size(); ++
i) {
1632 if (refi.
get()->et() >= etThreshold1) {
1633 for (
size_t j = 0;
j < inputRefs2.size(); ++
j) {
1636 if (refj.
get()->et() >= etThreshold2 && refi != refj) {
1642 for (
size_t iout = 0; iout < outputRefs.size(); ++iout) {
1643 if (refi == outputRefs[iout]) {
1649 for (
size_t jout = 0; jout < outputRefs.size(); ++jout) {
1650 if (refj == outputRefs[jout]) {
1658 iInList = outputRefs.size();
1659 outputRefs.push_back(refi);
1663 jInList = outputRefs.size();
1664 outputRefs.push_back(refj);
1669 combo.push_back(iInList);
1670 combo.push_back(jInList);
1671 combos.push_back(combo);
1681 const double &etThreshold1,
1682 const double &etThreshold2,
1688 for (
size_t i = 0;
i < inputRefs1.size(); ++
i) {
1690 if (refi.
get()->et() >= etThreshold1) {
1691 for (
size_t j = 0;
j < inputRefs2.size(); ++
j) {
1695 if (refj.
get()->et() >= etThreshold2 &&
1696 (refi.
get()->gctEmCand() ==
nullptr || refj.
get()->gctJetCand() ==
nullptr ||
1697 refi.
get()->gctEmCand()->regionId() != refj.
get()->gctJetCand()->regionId())) {
1703 for (
size_t iout = 0; iout < outputRefs1.size(); ++iout) {
1704 if (refi == outputRefs1[iout]) {
1710 for (
size_t jout = 0; jout < outputRefs2.size(); ++jout) {
1711 if (refj == outputRefs2[jout]) {
1719 iInList = outputRefs1.size();
1720 outputRefs1.push_back(refi);
1724 jInList = outputRefs2.size();
1725 outputRefs2.push_back(refj);
1730 combo.push_back(iInList);
1731 combo.push_back(jInList);
1732 combos.push_back(combo);
1741 const double &etThreshold,
1748 for (
size_t i = 0;
i + 1 < inputRefs.size(); ++
i) {
1750 if (refi.
get()->et() >= etThreshold) {
1751 for (
size_t j =
i + 1;
j < inputRefs.size(); ++
j) {
1753 if ((refj.
get()->et() >= etThreshold) && (((refi.
get()->eta() < 0.) && (refj.
get()->eta() > 0.)) ||
1754 ((refi.
get()->eta() > 0.) && (refj.
get()->eta() < 0.)))) {
1761 for (
size_t iout = 0; iout < outputRefs.size(); ++iout) {
1762 if (refi == outputRefs[iout]) {
1766 if (refj == outputRefs[iout]) {
1774 iInList = outputRefs.size();
1775 outputRefs.push_back(refi);
1779 jInList = outputRefs.size();
1780 outputRefs.push_back(refj);
1785 combo.push_back(iInList);
1786 combo.push_back(jInList);
1787 combos.push_back(combo);
1796 const double &etThreshold,
1802 for (
size_t k = 0;
k + 1 < inputRefs.size(); ++
k) {
1804 double etak = refk.
get()->eta();
1806 for (
size_t l =
k + 1;
l < inputRefs.size(); ++
l) {
1808 double etal = refl.
get()->eta();
1810 ((etak > 0 && etal < 0) || (etak < 0 && etal > 0))) {
1821 const double &etThreshold1,
1822 const double &etThreshold2,
1827 if (inputRefs1.size() == 2) {
1829 if (!inputRefs2.empty()) {
1830 for (
size_t j = 0;
j < inputRefs2.size(); ++
j) {
1831 if (inputRefs2[
j].
get()->gctJetCand()->regionId() == inputRefs1[0].get()->gctEmCand()->regionId())
1833 if (inputRefs2[
j].
get()->gctJetCand()->regionId() == inputRefs1[1].get()->gctEmCand()->regionId())
1835 if (inputRefs2[
j].
get()->et() > etThreshold2) {
edm::InputTag cenJetSource_
edm::InputTag tauJetSource_
edm::InputTag forJetSource_
void evaluateDoublePlusSingleObjectTrigger(const std::vector< edm::Ref< TCollection1 >> &inputRefs1, const std::vector< edm::Ref< TCollection2 >> &inputRefs2, const double &etThreshold1, const double &etThreshold2, bool &decision, std::vector< edm::Ref< TCollection1 >> &outputRefs1, std::vector< edm::Ref< TCollection2 >> &outputRefs2, l1extra::L1ParticleMap::L1IndexComboVector &combos)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::pair< double, double > doubleThresholds_[l1extra::L1ParticleMap::kNumOfL1TriggerTypes]
std::vector< unsigned int > L1IndexCombo
void evaluateSingleObjectTrigger(const std::vector< edm::Ref< TCollection >> &inputRefs, const double &etThreshold, bool &decision, std::vector< edm::Ref< TCollection >> &outputRefs)
edm::InputTag nonIsoEmSource_
void evaluateDoubleSameObjectTrigger(const std::vector< edm::Ref< TCollection >> &inputRefs, const double &etThreshold, bool &decision, std::vector< edm::Ref< TCollection >> &outputRefs, l1extra::L1ParticleMap::L1IndexComboVector &combos, bool combinedWithGlobalObject=false)
edm::InputTag muonSource_
void evaluateTripleSameObjectTrigger(const std::vector< edm::Ref< TCollection >> &inputRefs, const double &etThreshold, bool &decision, std::vector< edm::Ref< TCollection >> &outputRefs, l1extra::L1ParticleMap::L1IndexComboVector &combos)
void evaluateDoubleDifferentObjectSameTypeTrigger(const std::vector< edm::Ref< TCollection >> &inputRefs1, const std::vector< edm::Ref< TCollection >> &inputRefs2, const double &etThreshold1, const double &etThreshold2, bool &decision, std::vector< edm::Ref< TCollection >> &outputRefs, l1extra::L1ParticleMap::L1IndexComboVector &combos)
edm::InputTag isoEmSource_
void evaluateForwardRapidityGap(const l1extra::L1JetParticleVectorRef &inputRefs, const double &etThreshold, bool &decision)
void addToVectorRefs(const edm::Handle< TCollection > &handle, std::vector< edm::Ref< TCollection >> &vectorRefs)
void produce(edm::Event &, const edm::EventSetup &) override
static const int kDefault
U second(std::pair< T, U > const &p)
int prescaleCounters_[l1extra::L1ParticleMap::kNumOfL1TriggerTypes]
double singleThresholds_[l1extra::L1ParticleMap::kNumOfL1TriggerTypes]
void evaluateDoubleDifferentObjectTrigger(const std::vector< edm::Ref< TCollection1 >> &inputRefs1, const std::vector< edm::Ref< TCollection2 >> &inputRefs2, const double &etThreshold1, const double &etThreshold2, bool &decision, std::vector< edm::Ref< TCollection1 >> &outputRefs1, std::vector< edm::Ref< TCollection2 >> &outputRefs2, l1extra::L1ParticleMap::L1IndexComboVector &combos)
T const * get() const
Returns C++ pointer to the item.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
~L1ExtraParticleMapProd() override
void evaluateDoubleExclusiveIsoEG(const l1extra::L1EmParticleVectorRef &inputRefs1, const l1extra::L1JetParticleVectorRef &inputRefs2, const double &etThreshold1, const double &etThreshold2, bool &decision, l1extra::L1EmParticleVectorRef &outputRefs1, l1extra::L1ParticleMap::L1IndexComboVector &combos)
void evaluateDoubleDifferentCaloObjectTrigger(const l1extra::L1EmParticleVectorRef &inputRefs1, const l1extra::L1JetParticleVectorRef &inputRefs2, const double &etThreshold1, const double &etThreshold2, bool &decision, l1extra::L1EmParticleVectorRef &outputRefs1, l1extra::L1JetParticleVectorRef &outputRefs2, l1extra::L1ParticleMap::L1IndexComboVector &combos)
std::vector< L1IndexCombo > L1IndexComboVector
T getParameter(std::string const &) const
edm::InputTag htMissSource_
void evaluateQuadSameObjectTrigger(const std::vector< edm::Ref< TCollection >> &inputRefs, const double &etThreshold, bool &decision, std::vector< edm::Ref< TCollection >> &outputRefs, l1extra::L1ParticleMap::L1IndexComboVector &combos)
int prescales_[l1extra::L1ParticleMap::kNumOfL1TriggerTypes]
edm::InputTag etMissSource_
L1ExtraParticleMapProd(const edm::ParameterSet &)
void evaluateJetGapJetTrigger(const l1extra::L1JetParticleVectorRef &inputRefs, const double &etThreshold, bool &decision, l1extra::L1JetParticleVectorRef &outputRefs, l1extra::L1ParticleMap::L1IndexComboVector &combos)