917 std::vector<edm::Ref<T>> recoecalcands;
919 dqm->hltCollectionLabelsMissed.insert(
dqm->theHLTCollectionLabels[
n].encode());
924 dqm->hltCollectionLabelsFound.insert(
dqm->theHLTCollectionLabels[
n].encode());
930 triggerObj->
filterIndex(
dqm->theHLTCollectionLabels[
n]),
dqm->theHLTOutputTypes[
n], recoecalcands);
934 std::vector<edm::Ref<T>> isocands;
936 if (!isocands.empty()) {
937 for (
unsigned int i = 0;
i < isocands.size();
i++)
938 recoecalcands.push_back(isocands[
i]);
942 if (recoecalcands.empty()) {
948 if (recoecalcands.size() >=
dqm->nCandCuts.at(
n) && !
dqm->mcMatchedOnly_)
949 dqm->totals.at(vPos)->Fill(
n + 0.5);
955 for (
unsigned int j = 0;
j < recoecalcands.size();
j++) {
956 if (!(recoecalcands.at(
j).isAvailable())) {
957 if (
dqm->verbosity_ >=
dqm->OUTPUT_ERRORS)
958 edm::LogError(
"EmDQMInvalidRefs") <<
"Event content inconsistent: TriggerEventWithRefs contains "
959 "invalid Refs. Invalid refs for: "
960 <<
dqm->theHLTCollectionLabels[
n].label()
961 <<
". The collection that this module uses may has been dropped in "
967 if (!
dqm->mcMatchedOnly_) {
973 for (
unsigned int i = 0;
i <
dqm->nCandCuts.at(
n);
i++) {
976 float closestDeltaR = 0.5;
977 int closestEcalCandIndex = -1;
978 for (
unsigned int j = 0;
j < recoecalcands.size();
j++) {
979 float deltaR =
DeltaR(recoecalcands[
j]->momentum(), currentGenParticleMomentum);
981 if (
deltaR < closestDeltaR) {
983 closestEcalCandIndex =
j;
989 if (closestEcalCandIndex >= 0) {
990 dqm->histEtOfHltObjMatchToGens.at(vPos).at(
n)->Fill(recoecalcands[closestEcalCandIndex]->
et());
991 dqm->histEtaOfHltObjMatchToGens.at(vPos).at(
n)->Fill(recoecalcands[closestEcalCandIndex]->
eta());
992 if (!
dqm->noPhiPlots_)
993 dqm->histPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill(recoecalcands[closestEcalCandIndex]->
phi());
994 dqm->histEtaPhiOfHltObjMatchToGens.at(vPos).at(
n)->Fill(recoecalcands[closestEcalCandIndex]->
eta(),
995 recoecalcands[closestEcalCandIndex]->
phi());
1005 for (
unsigned int i = 0;
i < recoecalcands.size();
i++) {
1025 dqm->ethists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
et());
1026 dqm->etahists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta());
1027 if (!
dqm->noPhiPlots_)
1028 dqm->phihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
phi());
1029 dqm->etaphihists.at(vPos).at(
n)->Fill(recoecalcands[
i]->
eta(), recoecalcands[
i]->
phi());
1036 unsigned int matchedMcParts = 0;
1037 float mindist = 0.3;
1040 for (
unsigned int i = 0;
i <
dqm->nCandCuts.at(
n); ++
i) {
1042 bool matchThis =
false;
1045 double closestDr = 1000.;
1046 for (
unsigned int trigOb = 0; trigOb < recoecalcands.size(); ++trigOb) {
1047 double dr =
DeltaR(recoecalcands[trigOb]->momentum(), candDir);
1048 if (
dr < closestDr) {
1052 if (closestDr > mindist) {
1064 dqm->ethistmatchs.at(vPos).at(
n)->Fill(sortedGen[
i].
et());
1065 if (sortedGen[
i].
et() >
dqm->minEtForEtaEffPlot_) {
1066 dqm->etahistmatchs.at(vPos).at(
n)->Fill(sortedGen[
i].
eta());
1067 if (!
dqm->noPhiPlots_)
1068 dqm->phihistmatchs.at(vPos).at(
n)->Fill(sortedGen[
i].
phi());
1069 dqm->etaphihistmatchs.at(vPos).at(
n)->Fill(sortedGen[
i].
eta(), sortedGen[
i].
phi());
1074 if (matchedMcParts >=
dqm->nCandCuts.at(
n) &&
accepted ==
true)
1075 dqm->totalmatchs.at(vPos)->Fill(
n + 0.5);