784 std::vector<edm::Ref<T>> recoecalcands;
793 triggerObj->
filterIndex(
dqm->theHLTCollectionLabels[
n]),
dqm->theHLTOutputTypes[
n], recoecalcands);
797 std::vector<edm::Ref<T>> isocands;
799 if (!isocands.empty()) {
800 for (
unsigned int i = 0;
i < isocands.size();
i++)
801 recoecalcands.push_back(isocands[
i]);
805 if (recoecalcands.empty()) {
809 if (recoecalcands.size() >=
dqm->reqNum)
810 dqm->totalreco->Fill(
n + 0.5);
816 for (
unsigned int j = 0;
j < recoecalcands.size();
j++) {
817 if (!(recoecalcands.at(
j).isAvailable())) {
818 edm::LogError(
"EmDQMReco") <<
"Event content inconsistent: TriggerEventWithRefs contains "
821 <<
"invalid refs for: " <<
dqm->theHLTCollectionLabels[
n].label();
832 for (
unsigned int i = 0;
i < recoecalcands.size();
i++) {
833 dqm->standardHist[
n].fill(recoecalcands[
i]->
p4());
839 if (
n + 1 <
dqm->numOfHLTCollectionLabels) {
840 if (
dqm->plotiso[
n + 1]) {
847 depMap->find(recoecalcands[
i]);
848 if (mapi != depMap->end()) {
849 dqm->etahistiso[
n + 1]->Fill(recoecalcands[
i]->
eta(), mapi->val);
850 dqm->ethistiso[
n + 1]->Fill(recoecalcands[
i]->
et(), mapi->val);
851 dqm->phiHistIso[
n + 1]->Fill(recoecalcands[
i]->
phi(), mapi->val);
863 if (plotReco ==
true) {
864 for (
unsigned int i = 0;
i <
dqm->recocut_;
i++) {
868 float closestRecoDeltaR = 1000.;
869 int closestRecoEcalCandIndex = -1;
870 for (
unsigned int j = 0;
j < recoecalcands.size();
j++) {
871 float deltaR =
DeltaR(recoecalcands[
j]->momentum(), currentRecoParticleMomentum);
873 if (
deltaR < closestRecoDeltaR) {
874 closestRecoDeltaR =
deltaR;
875 closestRecoEcalCandIndex =
j;
881 if (closestRecoEcalCandIndex >= 0) {
889 dqm->histHltObjMatchToReco[
n].fill(recoecalcands[closestRecoEcalCandIndex]->
p4());
892 if (
n + 1 <
dqm->numOfHLTCollectionLabels) {
893 if (
dqm->plotiso[
n + 1]) {
900 depMap->find(recoecalcands[closestRecoEcalCandIndex]);
901 if (mapi != depMap->end()) {
902 dqm->histEtaIsoOfHltObjMatchToReco[
n + 1]->Fill(recoecalcands[closestRecoEcalCandIndex]->
eta(),
904 dqm->histEtIsoOfHltObjMatchToReco[
n + 1]->Fill(recoecalcands[closestRecoEcalCandIndex]->
et(),
906 dqm->histPhiIsoOfHltObjMatchToReco[
n + 1]->Fill(recoecalcands[closestRecoEcalCandIndex]->
phi(),
919 unsigned int mtachedRecoParts = 0;
920 float minrecodist = 0.3;
923 for (
unsigned int i = 0;
i <
dqm->recocut_;
i++) {
925 bool matchThis =
false;
927 unsigned int closest = 0;
928 double closestDr = 1000.;
929 for (
unsigned int trigOb = 0; trigOb < recoecalcands.size(); trigOb++) {
930 double dr =
DeltaR(recoecalcands[trigOb]->momentum(), candDir);
931 if (
dr < closestDr) {
935 if (closestDr > minrecodist) {
948 dqm->histMatchReco[
n].fill(sortedReco[
i].
p4());
954 dqm->histMatchRecoMonPath[
n].fill(sortedReco[
i].
p4());
960 if (
n + 1 <
dqm->numOfHLTCollectionLabels) {
961 if (
dqm->plotiso[
n + 1]) {
968 depMapReco->find(recoecalcands[closest]);
969 if (mapi != depMapReco->end()) {
970 dqm->etahistisomatchreco[
n + 1]->Fill(sortedReco[
i].
eta(), mapi->val);
971 dqm->ethistisomatchreco[
n + 1]->Fill(sortedReco[
i].
et(), mapi->val);
972 dqm->phiHistIsoMatchReco[
n + 1]->Fill(sortedReco[
i].
eta(), mapi->val);
980 if (mtachedRecoParts >=
dqm->reqNum)
981 dqm->totalmatchreco->Fill(
n + 0.5);