782 std::vector<edm::Ref<T>> recoecalcands;
791 triggerObj->
filterIndex(
dqm->theHLTCollectionLabels[
n]),
dqm->theHLTOutputTypes[
n], recoecalcands);
795 std::vector<edm::Ref<T>> isocands;
797 if (!isocands.empty()) {
798 for (
unsigned int i = 0;
i < isocands.size();
i++)
799 recoecalcands.push_back(isocands[
i]);
803 if (recoecalcands.empty()) {
807 if (recoecalcands.size() >=
dqm->reqNum)
808 dqm->totalreco->Fill(
n + 0.5);
814 for (
unsigned int j = 0;
j < recoecalcands.size();
j++) {
815 if (!(recoecalcands.at(
j).isAvailable())) {
816 edm::LogError(
"EmDQMReco") <<
"Event content inconsistent: TriggerEventWithRefs contains " 819 <<
"invalid refs for: " <<
dqm->theHLTCollectionLabels[
n].label();
830 for (
unsigned int i = 0;
i < recoecalcands.size();
i++) {
831 dqm->standardHist[
n]->fill(recoecalcands[
i]->p4());
837 if (
n + 1 <
dqm->numOfHLTCollectionLabels) {
838 if (
dqm->plotiso[
n + 1]) {
845 depMap->find(recoecalcands[
i]);
846 if (mapi != depMap->end()) {
847 dqm->etahistiso[
n + 1]->Fill(recoecalcands[
i]->
eta(), mapi->val);
848 dqm->ethistiso[
n + 1]->Fill(recoecalcands[
i]->
et(), mapi->val);
849 dqm->phiHistIso[
n + 1]->Fill(recoecalcands[
i]->
phi(), mapi->val);
861 if (plotReco ==
true) {
862 for (
unsigned int i = 0;
i <
dqm->recocut_;
i++) {
866 float closestRecoDeltaR = 1000.;
867 int closestRecoEcalCandIndex = -1;
868 for (
unsigned int j = 0;
j < recoecalcands.size();
j++) {
869 float deltaR =
DeltaR(recoecalcands[
j]->momentum(), currentRecoParticleMomentum);
871 if (
deltaR < closestRecoDeltaR) {
872 closestRecoDeltaR =
deltaR;
873 closestRecoEcalCandIndex =
j;
879 if (closestRecoEcalCandIndex >= 0) {
887 dqm->histHltObjMatchToReco[
n]->fill(recoecalcands[closestRecoEcalCandIndex]->p4());
890 if (
n + 1 <
dqm->numOfHLTCollectionLabels) {
891 if (
dqm->plotiso[
n + 1]) {
898 depMap->find(recoecalcands[closestRecoEcalCandIndex]);
899 if (mapi != depMap->end()) {
900 dqm->histEtaIsoOfHltObjMatchToReco[
n + 1]->Fill(recoecalcands[closestRecoEcalCandIndex]->
eta(),
902 dqm->histEtIsoOfHltObjMatchToReco[
n + 1]->Fill(recoecalcands[closestRecoEcalCandIndex]->
et(),
904 dqm->histPhiIsoOfHltObjMatchToReco[
n + 1]->Fill(recoecalcands[closestRecoEcalCandIndex]->
phi(),
917 unsigned int mtachedRecoParts = 0;
918 float minrecodist = 0.3;
921 for (
unsigned int i = 0;
i <
dqm->recocut_;
i++) {
923 bool matchThis =
false;
925 unsigned int closest = 0;
926 double closestDr = 1000.;
927 for (
unsigned int trigOb = 0; trigOb < recoecalcands.size(); trigOb++) {
928 double dr =
DeltaR(recoecalcands[trigOb]->momentum(), candDir);
929 if (
dr < closestDr) {
933 if (closestDr > minrecodist) {
946 dqm->histMatchReco[
n]->fill(sortedReco[
i].p4());
952 dqm->histMatchRecoMonPath[
n]->fill(sortedReco[
i].p4());
958 if (
n + 1 <
dqm->numOfHLTCollectionLabels) {
959 if (
dqm->plotiso[
n + 1]) {
966 depMapReco->find(recoecalcands[closest]);
967 if (mapi != depMapReco->end()) {
968 dqm->etahistisomatchreco[
n + 1]->Fill(sortedReco[
i].
eta(), mapi->val);
969 dqm->ethistisomatchreco[
n + 1]->Fill(sortedReco[
i].
et(), mapi->val);
970 dqm->phiHistIsoMatchReco[
n + 1]->Fill(sortedReco[
i].
eta(), mapi->val);
978 if (mtachedRecoParts >=
dqm->reqNum)
979 dqm->totalmatchreco->Fill(
n + 0.5);
std::vector< edm::EDGetTokenT< edm::AssociationMap< edm::OneToValue< T, float > > > > isoNameTokens_
Log< level::Error, false > LogError
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
XYZVectorD XYZVector
spatial vector with cartesian internal representation
size_type size() const
number of filters
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type