CMS 3D CMS Logo

EmDQM.cc
Go to the documentation of this file.
1 // Header file for this //
5 
6 using namespace ROOT::Math::VectorUtil;
7 
9 // Constructor //
11 EmDQM::EmDQM(const edm::ParameterSet &pset_) : pset(pset_) {
12  // are we running in automatic configuration mode with the HLTConfigProvider
13  // or with a per path python config file
14  autoConfMode_ = pset.getUntrackedParameter<bool>("autoConfMode", false);
15 
16  // set global parameters
17  triggerObject_ = pset_.getParameter<edm::InputTag>("triggerobject");
18  verbosity_ = pset_.getUntrackedParameter<unsigned int>("verbosity", 0);
19  genEtaAcc_ = pset.getParameter<double>("genEtaAcc");
20  genEtAcc_ = pset.getParameter<double>("genEtAcc");
21  ptMax_ = pset.getUntrackedParameter<double>("PtMax", 1000.);
22  ptMin_ = pset.getUntrackedParameter<double>("PtMin", 0.);
23  etaMax_ = pset.getUntrackedParameter<double>("EtaMax", 2.7);
24  phiMax_ = pset.getUntrackedParameter<double>("PhiMax", 3.15);
25  nbins_ = pset.getUntrackedParameter<unsigned int>("Nbins", 40);
26  eta2DMax_ = pset.getUntrackedParameter<double>("Eta2DMax", 2.8);
27  phi2DMax_ = pset.getUntrackedParameter<double>("Phi2DMax", 3.2);
28  nbins2D_ = pset.getUntrackedParameter<unsigned int>("Nbins2D", 16);
29  minEtForEtaEffPlot_ = pset.getUntrackedParameter<unsigned int>("minEtForEtaEffPlot", 15);
30  useHumanReadableHistTitles_ = pset.getUntrackedParameter<bool>("useHumanReadableHistTitles", false);
31  mcMatchedOnly_ = pset.getUntrackedParameter<bool>("mcMatchedOnly", true);
32  noPhiPlots_ = pset.getUntrackedParameter<bool>("noPhiPlots", true);
33  noIsolationPlots_ = pset.getUntrackedParameter<bool>("noIsolationPlots", true);
34 
35  if (!autoConfMode_) {
36  paramSets.push_back(pset);
37  isData_ = false;
38  } else {
39  isData_ = pset.getParameter<bool>("isData");
40  }
41 
47 
48  // consumes
49  genParticles_token = consumes<edm::View<reco::Candidate>>(edm::InputTag("genParticles"));
50  triggerObject_token = consumes<trigger::TriggerEventWithRefs>(triggerObject_);
51  hltResults_token = consumes<edm::TriggerResults>(edm::InputTag("TriggerResults", "", triggerObject_.process()));
52  if (autoConfMode_) {
53  gencutColl_fidWenu_token = mayConsume<edm::View<reco::Candidate>>(edm::InputTag("fiducialWenu"));
54  gencutColl_fidZee_token = mayConsume<edm::View<reco::Candidate>>(edm::InputTag("fiducialZee"));
55  gencutColl_fidTripleEle_token = mayConsume<edm::View<reco::Candidate>>(edm::InputTag("fiducialTripleEle"));
56  gencutColl_fidGammaJet_token = mayConsume<edm::View<reco::Candidate>>(edm::InputTag("fiducialGammaJet"));
57  gencutColl_fidDiGamma_token = mayConsume<edm::View<reco::Candidate>>(edm::InputTag("fiducialDiGamma"));
58  } else {
60  consumes<edm::View<reco::Candidate>>(pset.getParameter<edm::InputTag>("cutcollection"));
61  }
62 }
63 
64 void EmDQM::dqmBeginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) {
65  bool changed(true);
66  if (hltConfig_.init(iRun, iSetup, triggerObject_.process(), changed)) {
67  // if init returns TRUE, initialisation has succeeded!
68 
69  if (autoConfMode_) {
70  if (verbosity_ >= OUTPUT_ALL) {
71  // Output general information on the menu
72  edm::LogPrint("EmDQM") << "inited=" << hltConfig_.inited();
73  edm::LogPrint("EmDQM") << "changed=" << hltConfig_.changed();
74  edm::LogPrint("EmDQM") << "processName=" << hltConfig_.processName();
75  edm::LogPrint("EmDQM") << "tableName=" << hltConfig_.tableName();
76  edm::LogPrint("EmDQM") << "size=" << hltConfig_.size();
77  edm::LogInfo("EmDQM") << "The following filter types are not analyzed: \n"
78  << "\tHLTGlobalSumsMET\n"
79  << "\tHLTHtMhtFilter\n"
80  << "\tHLTMhtFilter\n"
81  << "\tHLTJetTag\n"
82  << "\tHLT1CaloJet\n"
83  << "\tHLT1CaloMET\n"
84  << "\tHLT1CaloBJet\n"
85  << "\tHLT1Tau\n"
86  << "\tHLT1PFTau\n"
87  << "\tPFTauSelector\n"
88  << "\tHLT1PFJet\n"
89  << "\tHLTPFJetCollectionsFilter\n"
90  << "\tHLTPFJetCollectionsVBFFilter\n"
91  << "\tHLTPFJetTag\n"
92  << "\tEtMinCaloJetSelector\n"
93  << "\tEtMinPFJetSelector\n"
94  << "\tLargestEtCaloJetSelector\n"
95  << "\tLargestEtPFJetSelector\n"
96  << "\tHLTEgammaTriggerFilterObjectWrapper\n"
97  << "\tHLTEgammaDoubleLegCombFilter\n"
98  << "\tHLT2ElectronTau\n"
99  << "\tHLT2ElectronMET\n"
100  << "\tHLT2ElectronPFTau\n"
101  << "\tHLTPMMassFilter\n"
102  << "\tHLTHcalTowerFilter\n"
103  << "\tHLT1Photon\n"
104  << "\tHLTRFilter\n"
105  << "\tHLTRHemisphere\n"
106  << "\tHLTElectronPFMTFilter\n"
107  << "\tPrimaryVertexObjectFilter\n"
108  << "\tHLTEgammaAllCombMassFilter\n"
109  << "\tHLTMuon*\n";
110  }
111 
112  // All electron and photon paths
113  std::vector<std::vector<std::string>> egammaPaths = findEgammaPaths();
114  // std::cout << "Found " << egammaPaths[TYPE_SINGLE_ELE].size() << "
115  // single electron paths" << std::endl; std::cout << "Found " <<
116  // egammaPaths[TYPE_DOUBLE_ELE].size() << " double electron paths" <<
117  // std::endl; std::cout << "Found " << egammaPaths[TYPE_TRIPLE_ELE].size()
118  // << " triple electron paths" << std::endl; std::cout << "Found " <<
119  // egammaPaths[TYPE_SINGLE_PHOTON].size() << " single photon paths" <<
120  // std::endl; std::cout << "Found " <<
121  // egammaPaths[TYPE_DOUBLE_PHOTON].size() << " double photon paths" <<
122  // std::endl;
123 
124  std::vector<std::string> filterModules;
125 
126  for (unsigned int j = 0; j < egammaPaths.size(); j++) {
127  if (verbosity_ >= OUTPUT_ALL) {
128  switch (j) {
129  case TYPE_SINGLE_ELE:
130  edm::LogPrint("EmDQM") << "////////////////////////////////////////"
131  "/\nSingle electron paths: ";
132  break;
133  case TYPE_DOUBLE_ELE:
134  edm::LogPrint("EmDQM") << "////////////////////////////////////////"
135  "/\nDouble electron paths: ";
136  break;
137  case TYPE_TRIPLE_ELE:
138  edm::LogPrint("EmDQM") << "////////////////////////////////////////"
139  "/\nTriple electron paths: ";
140  break;
141  case TYPE_SINGLE_PHOTON:
142  edm::LogPrint("EmDQM") << "////////////////////////////////////////"
143  "/\nSingle photon paths: ";
144  break;
145  case TYPE_DOUBLE_PHOTON:
146  edm::LogPrint("EmDQM") << "////////////////////////////////////////"
147  "/\nDouble photon paths: ";
148  break;
149  }
150  }
151 
152  for (unsigned int i = 0; i < egammaPaths.at(j).size(); i++) {
153  // get pathname of this trigger
154  const std::string pathName = egammaPaths.at(j).at(i);
155  if (verbosity_ >= OUTPUT_ALL)
156  edm::LogPrint("EmDQM") << "Path: " << pathName;
157 
158  // get filters of the current path
159  filterModules = getFilterModules(pathName);
160 
161  //--------------------
162  edm::ParameterSet paramSet;
163 
164  paramSet.addUntrackedParameter("pathIndex", hltConfig_.triggerIndex(pathName));
165  paramSet.addParameter("@module_label", hltConfig_.removeVersion(pathName) + "_DQM");
166  // paramSet.addParameter("@module_label", pathName + "_DQM");
167 
168  // plotting parameters (untracked because they don't affect the
169  // physics)
171  if (genEtMin >= 0) {
172  paramSet.addUntrackedParameter("genEtMin", genEtMin);
173  } else {
175  edm::LogWarning("EmDQM") << "Pathname: '" << pathName
176  << "': Unable to determine a minimum Et. Will not include "
177  "this path in the validation.";
178  continue;
179  }
180 
181  // set the x axis of the et plots to some reasonable value based
182  // on the primary et cut determined from the path name
183  double ptMax = ptMax_;
184  double ptMin = ptMin_;
185  if (ptMax < (1.2 * genEtMin)) {
186  paramSet.addUntrackedParameter<double>("PtMax", (10 * ceil(0.12 * genEtMin)));
187  paramSet.addUntrackedParameter<double>("PtMin", (10 * ceil(0.12 * genEtMin) - ptMax + ptMin));
188  } else {
189  paramSet.addUntrackedParameter<double>("PtMax", ptMax);
190  paramSet.addUntrackedParameter<double>("PtMin", ptMin);
191  }
192 
193  // preselction cuts
194  switch (j) {
195  case TYPE_SINGLE_ELE:
196  paramSet.addParameter<unsigned>("reqNum", 1);
197  paramSet.addParameter<int>("pdgGen", 11);
198  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialWenu"));
199  paramSet.addParameter<int>("cutnum", 1);
200  break;
201  case TYPE_DOUBLE_ELE:
202  paramSet.addParameter<unsigned>("reqNum", 2);
203  paramSet.addParameter<int>("pdgGen", 11);
204  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialZee"));
205  paramSet.addParameter<int>("cutnum", 2);
206  break;
207  case TYPE_TRIPLE_ELE:
208  paramSet.addParameter<unsigned>("reqNum", 3);
209  paramSet.addParameter<int>("pdgGen", 11);
210  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialTripleEle"));
211  paramSet.addParameter<int>("cutnum", 3);
212  break;
213  case TYPE_SINGLE_PHOTON:
214  paramSet.addParameter<unsigned>("reqNum", 1);
215  paramSet.addParameter<int>("pdgGen", 22);
216  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialGammaJet"));
217  paramSet.addParameter<int>("cutnum", 1);
218  break;
219  case TYPE_DOUBLE_PHOTON:
220  paramSet.addParameter<unsigned>("reqNum", 2);
221  paramSet.addParameter<int>("pdgGen", 22);
222  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("fiducialDiGamma"));
223  paramSet.addParameter<int>("cutnum", 2);
224  }
225  //--------------------
226 
227  // TODO: extend this
228  if (isData_)
229  paramSet.addParameter<edm::InputTag>("cutcollection", edm::InputTag("gsfElectrons"));
230 
231  std::vector<edm::ParameterSet> filterVPSet;
232  edm::ParameterSet filterPSet;
234 
235  // loop over filtermodules of current trigger path
236  for (std::vector<std::string>::iterator filter = filterModules.begin(); filter != filterModules.end();
237  ++filter) {
238  std::string moduleType = hltConfig_.modulePSet(*filter).getParameter<std::string>("@module_type");
239  moduleLabel = hltConfig_.modulePSet(*filter).getParameter<std::string>("@module_label");
240 
241  // first check if it is a filter we are not interrested in
242  if (moduleType == "Pythia6GeneratorFilter" || moduleType == "HLTTriggerTypeFilter" ||
243  moduleType == "HLTLevel1Activity" || moduleType == "HLTPrescaler" || moduleType == "HLTBool")
244  continue;
245 
246  // now check for the known filter types
247  if (moduleType == "HLTLevel1GTSeed") {
248  filterPSet = makePSetForL1SeedFilter(moduleLabel);
249  } else if (moduleType == "HLTEgammaL1MatchFilterRegional") {
251  } else if (moduleType == "HLTEgammaEtFilter") {
252  filterPSet = makePSetForEtFilter(moduleLabel);
253  } else if (moduleType == "HLTElectronOneOEMinusOneOPFilterRegional") {
255  } else if (moduleType == "HLTElectronPixelMatchFilter") {
257  } else if (moduleType == "HLTEgammaGenericFilter") {
259  } else if (moduleType == "HLTEgammaGenericQuadraticFilter") {
261  } else if (moduleType == "HLTElectronGenericFilter") {
263  } else if (moduleType == "HLTEgammaDoubleEtDeltaPhiFilter") {
265  } else if (moduleType == "HLTGlobalSumsMET" || moduleType == "HLTHtMhtFilter" ||
266  moduleType == "HLTMhtFilter" || moduleType == "HLTJetTag" || moduleType == "HLT1CaloJet" ||
267  moduleType == "HLT1CaloMET" || moduleType == "HLT1CaloBJet" || moduleType == "HLT1Tau" ||
268  moduleType == "HLT1PFTau" || moduleType == "PFTauSelector" || moduleType == "HLT1PFJet" ||
269  moduleType == "HLTPFJetCollectionsFilter" || moduleType == "HLTPFJetCollectionsVBFFilter" ||
270  moduleType == "HLTPFJetTag" || moduleType == "EtMinCaloJetSelector" ||
271  moduleType == "EtMinPFJetSelector" || moduleType == "LargestEtCaloJetSelector" ||
272  moduleType == "LargestEtPFJetSelector" ||
273  moduleType == "HLTEgammaTriggerFilterObjectWrapper" // 'fake' filter
274  || moduleType == "HLTEgammaDoubleLegCombFilter" // filter does not put
275  // anything in
276  // TriggerEventWithRefs
277  || moduleType == "HLT2ElectronMET" || moduleType == "HLT2ElectronTau" ||
278  moduleType == "HLT2ElectronPFTau" || moduleType == "HLTPMMassFilter" ||
279  moduleType == "HLTHcalTowerFilter" || moduleType == "HLT1Photon" || moduleType == "HLTRFilter" ||
280  moduleType == "HLTRHemisphere" || moduleType == "HLTElectronPFMTFilter" ||
281  moduleType == "PrimaryVertexObjectFilter" || moduleType == "HLTEgammaAllCombMassFilter" ||
282  moduleType.find("HLTMuon") != std::string::npos)
283  continue;
284  else {
286  edm::LogWarning("EmDQM") << "No parameter set for filter '" << moduleLabel << "' with filter type '"
287  << moduleType << "' added. Module will not be analyzed.";
288  continue;
289  }
290 
291  // something went wrong when the parameter set is empty.
292  if (!filterPSet.empty()) {
293  if (!hltConfig_.modulePSet(moduleLabel).exists("saveTags")) {
294  // make sure that 'theHLTOutputTypes' before an unseeded filter
295  // in a photon path is set to trigger::TriggerPhoton this is
296  // coupled to the parameter 'saveTag = true'
297  if (moduleLabel.find("Unseeded") != std::string::npos &&
299  filterVPSet.back().addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
300  }
301  }
302  // if ncandcut is -1 (when parsing for the number of particles in
303  // the name of the L1seed filter fails), fall back to setting
304  // ncandcut to the number of particles needed for the given path.
305  if (filterPSet.getParameter<int>("ncandcut") < 0) {
306  edm::LogPrint("EmDQM") << "No number of candidates for filter " << moduleLabel << " found. Set to "
307  << paramSet.getParameter<int>("cutnum") << ", determined from path name.";
308  filterPSet.addParameter<int>("ncandcut", paramSet.getParameter<int>("cutnum"));
309  } else if (filterPSet.getParameter<int>("ncandcut") > paramSet.getParameter<int>("cutnum")) {
310  edm::LogInfo("EmDQM") << "Changed required number of candidates from "
311  << paramSet.getParameter<int>("cutnum") << " to "
312  << filterPSet.getParameter<int>("ncandcut") << " for filter " << moduleLabel;
313  paramSet.addParameter<int>("cutnum", filterPSet.getParameter<int>("ncandcut"));
314  paramSet.addParameter<unsigned>("reqNum", (unsigned)filterPSet.getParameter<int>("ncandcut"));
315  }
316 
317  filterVPSet.push_back(filterPSet);
318  } else
319  break;
320 
321  } // end loop over filter modules of current trigger path
322 
323  // do not include this path when an empty filterPSet is detected.
324  if (!filterPSet.empty()) {
325  std::string lastModuleName = filterPSet.getParameter<edm::InputTag>("HLTCollectionLabels").label();
326  if (!hltConfig_.modulePSet(lastModuleName).exists("saveTags")) {
327  // make sure that 'theHLTOutputTypes' of the last filter of a
328  // photon path is set to trigger::TriggerPhoton this is coupled to
329  // the parameter 'saveTag = true'
330  if ((j == TYPE_SINGLE_PHOTON || j == TYPE_DOUBLE_PHOTON) && pathName.rfind("Ele") == std::string::npos) {
331  filterVPSet.back().addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
332  }
333  }
334  paramSet.addParameter<std::vector<edm::ParameterSet>>("filters", filterVPSet);
335  } else {
336  if (verbosity_ >= OUTPUT_ALL)
337  edm::LogPrint("EmDQM") << "Will not include this path in the validation due to "
338  "errors while generating the parameter set.";
339  continue;
340  }
341 
342  // dump generated parameter set
343  // std::cout << paramSet.dump() << std::endl;
344 
345  paramSets.push_back(paramSet);
346  } // loop over all paths of this analysis type
347 
348  } // loop over analysis types (single ele etc.)
349  }
350 
353 
355  // loop over all the trigger path parameter sets
357  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt) {
360  }
361 
362  if (changed) {
363  // The HLT config has actually changed wrt the previous Run, hence rebook
364  // your histograms or do anything else dependent on the revised HLT config
365  }
366  } else {
367  // if init returns FALSE, initialisation has NOT succeeded, which indicates
368  // a problem with the file and/or code and needs to be investigated!
369  if (verbosity_ >= OUTPUT_ERRORS)
370  edm::LogError("EmDQM") << " HLT config extraction failure with process name '" << triggerObject_.process()
371  << "'.";
372  // In this case, all access methods will return empty values!
373  }
374 }
375 
376 void EmDQM::bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &iRun, edm::EventSetup const &iSetup) {
378  // loop over all the trigger path parameter sets
380  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end(); ++psetIt) {
381  SetVarsFromPSet(psetIt);
382 
383  iBooker.setCurrentFolder(dirname_);
384 
386  // Set up Histogram of Effiency vs Step. //
387  // theHLTCollectionLabels is a vector of InputTags //
388  // from the configuration file. //
390  // Et & eta distributions
391  std::vector<MonitorElement *> etahist;
392  std::vector<MonitorElement *> phihist;
393  std::vector<MonitorElement *> ethist;
394  std::vector<MonitorElement *> etahistmatch;
395  std::vector<MonitorElement *> phihistmatch;
396  std::vector<MonitorElement *> ethistmatch;
397  std::vector<MonitorElement *> histEtOfHltObjMatchToGen;
398  std::vector<MonitorElement *> histEtaOfHltObjMatchToGen;
399  std::vector<MonitorElement *> histPhiOfHltObjMatchToGen;
400  std::vector<MonitorElement *> etaphihist;
401  std::vector<MonitorElement *> etaphihistmatch;
402  std::vector<MonitorElement *> histEtaPhiOfHltObjMatchToGen;
403  // Plots of efficiency per step
405  MonitorElement *totalmatch;
406  // generator histograms
407  MonitorElement *etgen;
408  MonitorElement *etagen;
409  MonitorElement *phigen;
410  MonitorElement *etaphigen;
411 
412  std::string histName = "total_eff";
413  std::string histTitle = "total events passing";
414  if (!mcMatchedOnly_) {
415  // This plot will have bins equal to 2+(number of
416  // HLTCollectionLabels in the config file)
417  total = iBooker.book1D(
418  histName.c_str(), histTitle.c_str(), numOfHLTCollectionLabels + 2, 0, numOfHLTCollectionLabels + 2);
419  total->setBinLabel(numOfHLTCollectionLabels + 1, "Total");
420  total->setBinLabel(numOfHLTCollectionLabels + 2, "Gen");
421  for (unsigned int u = 0; u < numOfHLTCollectionLabels; u++) {
422  total->setBinLabel(u + 1, theHLTCollectionLabels[u].label());
423  }
424  }
425 
426  histName = "total_eff_MC_matched";
427  histTitle = "total events passing (mc matched)";
428  totalmatch = iBooker.book1D(
429  histName.c_str(), histTitle.c_str(), numOfHLTCollectionLabels + 2, 0, numOfHLTCollectionLabels + 2);
430  totalmatch->setBinLabel(numOfHLTCollectionLabels + 1, "Total");
431  totalmatch->setBinLabel(numOfHLTCollectionLabels + 2, "Gen");
432  for (unsigned int u = 0; u < numOfHLTCollectionLabels; u++) {
433  totalmatch->setBinLabel(u + 1, theHLTCollectionLabels[u].label());
434  }
435 
436  MonitorElement *tmphisto;
437  // MonitorElement* tmpiso;
438 
440  // Set up generator-level histograms //
442  std::string pdgIdString;
443  switch (pdgGen) {
444  case 11:
445  pdgIdString = "Electron";
446  break;
447  case 22:
448  pdgIdString = "Photon";
449  break;
450  default:
451  pdgIdString = "Particle";
452  }
453 
454  histName = "gen_et";
455  histTitle = "E_{T} of " + pdgIdString + "s";
456  etgen = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, plotPtMin, plotPtMax);
457  histName = "gen_eta";
458  histTitle = "#eta of " + pdgIdString + "s ";
459  etagen = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -etaMax_, etaMax_);
460  histName = "gen_phi";
461  histTitle = "#phi of " + pdgIdString + "s ";
462  if (!noPhiPlots_)
463  phigen = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -phiMax_, phiMax_);
464  histName = "gen_etaphi";
465  histTitle = "#eta-#phi of " + pdgIdString + "s ";
466  etaphigen = iBooker.book2D(
467  histName.c_str(), histTitle.c_str(), nbins2D_ - 2, -eta2DMax_, eta2DMax_, nbins2D_, -phi2DMax_, phi2DMax_);
469  // Set up histograms of HLT objects //
471  // Determine what strings to use for histogram titles
472  std::vector<std::string> HltHistTitle;
474  HltHistTitle = theHLTCollectionHumanNames;
475  } else {
476  for (unsigned int i = 0; i < numOfHLTCollectionLabels; i++) {
477  HltHistTitle.push_back(theHLTCollectionLabels[i].label());
478  }
479  }
480 
481  for (unsigned int i = 0; i < numOfHLTCollectionLabels; i++) {
482  if (!mcMatchedOnly_) {
483  // Et distribution of HLT objects passing filter i
484  histName = theHLTCollectionLabels[i].label() + "et_all";
485  histTitle = HltHistTitle[i] + " Et (ALL)";
486  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, plotPtMin, plotPtMax);
487  ethist.push_back(tmphisto);
488 
489  // Eta distribution of HLT objects passing filter i
490  histName = theHLTCollectionLabels[i].label() + "eta_all";
491  histTitle = HltHistTitle[i] + " #eta (ALL)";
492  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -etaMax_, etaMax_);
493  etahist.push_back(tmphisto);
494 
495  if (!noPhiPlots_) {
496  // Phi distribution of HLT objects passing filter i
497  histName = theHLTCollectionLabels[i].label() + "phi_all";
498  histTitle = HltHistTitle[i] + " #phi (ALL)";
499  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -phiMax_, phiMax_);
500  phihist.push_back(tmphisto);
501  }
502 
503  histName = theHLTCollectionLabels[i].label() + "etaphi_all";
504  histTitle = HltHistTitle[i] + " #eta-#phi (ALL)";
505  tmphisto = iBooker.book2D(
506  histName.c_str(), histTitle.c_str(), nbins2D_ - 2, -eta2DMax_, eta2DMax_, nbins2D_, -phi2DMax_, phi2DMax_);
507  etaphihist.push_back(tmphisto);
508 
509  // Et distribution of HLT object that is closest delta-R match to sorted
510  // gen particle(s)
511  histName = theHLTCollectionLabels[i].label() + "et";
512  histTitle = HltHistTitle[i] + " Et";
513  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, plotPtMin, plotPtMax);
514  histEtOfHltObjMatchToGen.push_back(tmphisto);
515 
516  // eta distribution of HLT object that is closest delta-R match to
517  // sorted gen particle(s)
518  histName = theHLTCollectionLabels[i].label() + "eta";
519  histTitle = HltHistTitle[i] + " eta";
520  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -etaMax_, etaMax_);
521  histEtaOfHltObjMatchToGen.push_back(tmphisto);
522 
523  if (!noPhiPlots_) {
524  // phi distribution of HLT object that is closest delta-R match to
525  // sorted gen particle(s)
526  histName = theHLTCollectionLabels[i].label() + "phi";
527  histTitle = HltHistTitle[i] + " phi";
528  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -phiMax_, phiMax_);
529  histPhiOfHltObjMatchToGen.push_back(tmphisto);
530  }
531 
532  histName = theHLTCollectionLabels[i].label() + "etaphi";
533  histTitle = HltHistTitle[i] + " eta-phi";
534  tmphisto = iBooker.book2D(
535  histName.c_str(), histTitle.c_str(), nbins2D_ - 2, -eta2DMax_, eta2DMax_, nbins2D_, -phi2DMax_, phi2DMax_);
536  histEtaPhiOfHltObjMatchToGen.push_back(tmphisto);
537  }
538 
539  // Et distribution of gen object matching HLT object passing filter i
540  histName = theHLTCollectionLabels[i].label() + "et_MC_matched";
541  histTitle = HltHistTitle[i] + " Et (MC matched)";
542  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, plotPtMin, plotPtMax);
543  ethistmatch.push_back(tmphisto);
544 
545  // Eta distribution of gen object matching HLT object passing filter i
546  histName = theHLTCollectionLabels[i].label() + "eta_MC_matched";
547  histTitle = HltHistTitle[i] + " #eta (MC matched)";
548  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -etaMax_, etaMax_);
549  etahistmatch.push_back(tmphisto);
550 
551  if (!noPhiPlots_) {
552  // Phi distribution of gen object matching HLT object passing filter i
553  histName = theHLTCollectionLabels[i].label() + "phi_MC_matched";
554  histTitle = HltHistTitle[i] + " #phi (MC matched)";
555  tmphisto = iBooker.book1D(histName.c_str(), histTitle.c_str(), nbins_, -phiMax_, phiMax_);
556  phihistmatch.push_back(tmphisto);
557  }
558 
559  histName = theHLTCollectionLabels[i].label() + "etaphi_MC_matched";
560  histTitle = HltHistTitle[i] + " #eta-#phi (MC matched)";
561  tmphisto = iBooker.book2D(
562  histName.c_str(), histTitle.c_str(), nbins2D_ - 2, -eta2DMax_, eta2DMax_, nbins2D_, -phi2DMax_, phi2DMax_);
563  etaphihistmatch.push_back(tmphisto);
564  }
565 
566  // Et & eta distributions
567  etahists.push_back(etahist);
568  phihists.push_back(phihist);
569  ethists.push_back(ethist);
570  etahistmatchs.push_back(etahistmatch);
571  phihistmatchs.push_back(phihistmatch);
572  ethistmatchs.push_back(ethistmatch);
573  histEtOfHltObjMatchToGens.push_back(histEtOfHltObjMatchToGen);
574  histEtaOfHltObjMatchToGens.push_back(histEtaOfHltObjMatchToGen);
575  histPhiOfHltObjMatchToGens.push_back(histPhiOfHltObjMatchToGen);
576  etaphihists.push_back(etaphihist);
577  etaphihistmatchs.push_back(etaphihistmatch);
578  histEtaPhiOfHltObjMatchToGens.push_back(histEtaPhiOfHltObjMatchToGen);
579  // commented out because uses data not included in HTLDEBUG and uses
580  // Isolation distributions
581  // etahistisos.push_back(etahistiso);
582  // phihistisos.push_back(phihistiso);
583  // ethistisos.push_back(ethistiso);
584  // etahistisomatchs.push_back(etahistisomatch);
585  // phihistisomatchs.push_back(phihistisomatch);
586  // ethistisomatchs.push_back(ethistisomatch);
587  // histEtIsoOfHltObjMatchToGens.push_back(histEtIsoOfHltObjMatchToGen);
588  // histEtaIsoOfHltObjMatchToGens.push_back(histEtaIsoOfHltObjMatchToGen);
589  // histPhiIsoOfHltObjMatchToGens.push_back(histPhiIsoOfHltObjMatchToGen);
590 
591  totals.push_back(total);
592  totalmatchs.push_back(totalmatch);
593  etgens.push_back(etgen);
594  etagens.push_back(etagen);
595  phigens.push_back(phigen);
596  etaphigens.push_back(etaphigen);
597  }
598 }
599 
601 // Destructor //
605 
608  // Decide if this was an event of interest. //
609  // Did the highest energy particles happen //
610  // to have |eta| < 2.5 ? Then continue. //
613  event.getByToken(genParticles_token, genParticles);
614  if (!genParticles.isValid()) {
616  edm::LogWarning("EmDQM") << "genParticles invalid.";
617  return false;
618  }
619 
620  std::vector<reco::LeafCandidate> allSortedGenParticles;
621 
622  for (edm::View<reco::Candidate>::const_iterator currentGenParticle = genParticles->begin();
623  currentGenParticle != genParticles->end();
624  currentGenParticle++) {
625  // TODO: do we need to check the states here again ?
626  // in principle, there should collections produced with the python
627  // configuration (other than 'genParticles') which fulfill these criteria
628  if (!(abs((*currentGenParticle).pdgId()) == pdgGen && (*currentGenParticle).status() == 1 &&
629  (*currentGenParticle).et() > 2.0))
630  continue;
631 
632  reco::LeafCandidate tmpcand(*(currentGenParticle));
633 
634  if (tmpcand.et() < plotEtMin)
635  continue;
636 
637  allSortedGenParticles.push_back(tmpcand);
638  }
639 
640  std::sort(allSortedGenParticles.begin(), allSortedGenParticles.end(), pTGenComparator_);
641 
642  // return false if not enough particles found
643  if (allSortedGenParticles.size() < gencut_)
644  return false;
645 
646  // additional check (this might be legacy code and we need to check
647  // whether this should not be removed ?)
648 
649  // We now have a sorted collection of all generated particles
650  // with pdgId = pdgGen.
651  // Loop over them to see if the top gen particles have eta within acceptance
652  // bool keepEvent = true;
653  for (unsigned int i = 0; i < gencut_; i++) {
654  bool inECALgap = fabs(allSortedGenParticles[i].eta()) > 1.4442 && fabs(allSortedGenParticles[i].eta()) < 1.556;
655  if ((fabs(allSortedGenParticles[i].eta()) > genEtaAcc_) || inECALgap) {
656  // edm::LogWarning("EmDQM") << "Throwing event away. Gen particle with
657  // pdgId="<< allSortedGenParticles[i].pdgId() <<"; et="<<
658  // allSortedGenParticles[i].et() <<"; and eta="<<
659  // allSortedGenParticles[i].eta() <<" beyond acceptance.";
660  return false;
661  }
662  }
663 
664  // all tests passed
665  return true;
666 }
668 
670  // note that this code is very similar to the one in
671  // checkGeneratedParticlesRequirement(..) and hopefully can be merged with it
672  // at some point in the future
673 
674  edm::Handle<edm::View<reco::Candidate>> referenceParticles;
675  // get the right data according to the trigger path currently looked at
676  if (autoConfMode_) {
677  switch (reqNum) {
678  case 1:
679  if (pdgGen == 11)
680  event.getByToken(gencutColl_fidWenu_token, referenceParticles);
681  else
682  event.getByToken(gencutColl_fidGammaJet_token, referenceParticles);
683  break;
684  case 2:
685  if (pdgGen == 11)
686  event.getByToken(gencutColl_fidZee_token, referenceParticles);
687  else
688  event.getByToken(gencutColl_fidDiGamma_token, referenceParticles);
689  break;
690  case 3:
691  event.getByToken(gencutColl_fidTripleEle_token, referenceParticles);
692  break;
693  }
694  } else {
695  event.getByToken(gencutColl_manualConf_token, referenceParticles);
696  }
697  if (!referenceParticles.isValid()) {
699  edm::LogWarning("EmDQM") << "referenceParticles invalid.";
700  return false;
701  }
702 
703  std::vector<const reco::Candidate *> allSortedReferenceParticles;
704 
705  for (edm::View<reco::Candidate>::const_iterator currentReferenceParticle = referenceParticles->begin();
706  currentReferenceParticle != referenceParticles->end();
707  currentReferenceParticle++) {
708  if (currentReferenceParticle->et() <= 2.0)
709  continue;
710 
711  // Note that for determining the overall efficiency,
712  // we should only allow
713  //
714  // HOWEVER: for turn-on curves, we need to let
715  // more electrons pass
716  if (currentReferenceParticle->et() < plotEtMin)
717  continue;
718 
719  // TODO: instead of filling a new vector we could simply count here...
720  allSortedReferenceParticles.push_back(&(*currentReferenceParticle));
721  }
722 
723  // std::sort(allSortedReferenceParticles.begin(),
724  // allSortedReferenceParticles.end(),pTComparator_);
725 
726  // return false if not enough particles found
727  return allSortedReferenceParticles.size() >= gencut_;
728 }
729 
731 // method called to for each event //
734  // loop over all the trigger path parameter sets
735  unsigned int vPos = 0;
736  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end();
737  ++psetIt, ++vPos) {
738  SetVarsFromPSet(psetIt);
739  // get the set forthe current path
742 
744  // Check if there's enough gen particles //
745  // of interest //
747  // get the right data according to the trigger path currently looked at
749  if (autoConfMode_) {
750  switch (reqNum) {
751  case 1:
752  if (pdgGen == 11)
753  event.getByToken(gencutColl_fidWenu_token, cutCounter);
754  else
755  event.getByToken(gencutColl_fidGammaJet_token, cutCounter);
756  break;
757  case 2:
758  if (pdgGen == 11)
759  event.getByToken(gencutColl_fidZee_token, cutCounter);
760  else
761  event.getByToken(gencutColl_fidDiGamma_token, cutCounter);
762  break;
763  case 3:
764  event.getByToken(gencutColl_fidTripleEle_token, cutCounter);
765  break;
766  }
767  } else {
768  event.getByToken(gencutColl_manualConf_token, cutCounter);
769  }
770  if (cutCounter->size() < (unsigned int)gencut_) {
771  // edm::LogWarning("EmDQM") << "Less than "<< gencut_ <<" gen particles
772  // with pdgId=" << pdgGen;
773  continue;
774  }
775 
776  // fill L1 and HLT info
777  // get objects possed by each filter
779  event.getByToken(triggerObject_token, triggerObj);
780  if (!triggerObj.isValid()) {
782  edm::LogWarning("EmDQM") << "parameter triggerobject (" << triggerObject_
783  << ") does not corresond to a valid TriggerEventWithRefs product. "
784  "Please check especially the process name (e.g. when running "
785  "over reprocessed datasets)";
786  continue;
787  }
788 
789  // Were enough high energy gen particles found?
790  if (event.isRealData()) {
791  // running validation on data.
792  // TODO: we should check that the entire
793  // run is on the same type (all data or
794  // all MC). Otherwise one gets
795  // uninterpretable results...
797  continue;
798  } else { // MC
799  // if no, throw event away
801  continue;
802  }
803 
804  // It was an event worth keeping. Continue.
805 
807  // Fill the bin labeled "Total" //
808  // This will be the number of events looked at. //
810  if (!mcMatchedOnly_)
811  totals.at(vPos)->Fill(numOfHLTCollectionLabels + 0.5);
812  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels + 0.5);
813 
815  // Fill generator info //
817  // the gencut_ highest Et generator objects of the preselected type are our
818  // matches
819 
820  std::vector<reco::Particle> sortedGen;
821  for (edm::View<reco::Candidate>::const_iterator genpart = cutCounter->begin(); genpart != cutCounter->end();
822  genpart++) {
823  reco::Particle tmpcand(genpart->charge(), genpart->p4(), genpart->vertex(), genpart->pdgId(), genpart->status());
824  if (tmpcand.et() >= plotEtMin) {
825  sortedGen.push_back(tmpcand);
826  }
827  }
828  std::sort(sortedGen.begin(), sortedGen.end(), pTComparator_);
829 
830  // Now the collection of gen particles is sorted by pt.
831  // So, remove all particles from the collection so that we
832  // only have the top "1 thru gencut_" particles in it
833  if (sortedGen.size() < gencut_) {
834  continue;
835  }
836  sortedGen.erase(sortedGen.begin() + gencut_, sortedGen.end());
837 
838  for (unsigned int i = 0; i < gencut_; i++) {
839  etgens.at(vPos)->Fill(sortedGen[i].et()); // validity has been implicitily checked by the
840  // cut on gencut_ above
841  if (sortedGen[i].et() > minEtForEtaEffPlot_) {
842  etagens.at(vPos)->Fill(sortedGen[i].eta());
843  if (!noPhiPlots_)
844  phigens.at(vPos)->Fill(sortedGen[i].phi());
845  etaphigens.at(vPos)->Fill(sortedGen[i].eta(), sortedGen[i].phi());
846  }
847  } // END of loop over Generated particles
848  if (gencut_ >= reqNum && !mcMatchedOnly_)
849  totals.at(vPos)->Fill(numOfHLTCollectionLabels +
850  1.5); // this isn't really needed anymore keep for backward comp.
851  if (gencut_ >= reqNum)
852  totalmatchs.at(vPos)->Fill(numOfHLTCollectionLabels +
853  1.5); // this isn't really needed anymore keep for backward comp.
854 
855  bool accepted = true; // flags that the event has been accepted by all filters before
857  event.getByToken(hltResults_token, hltResults);
859  // Loop over filter modules //
861  for (unsigned int n = 0; n < numOfHLTCollectionLabels; n++) {
862  // check that there are not less sortedGen particles than nCandCut
863  // requires for this filter
864  if (sortedGen.size() < nCandCuts.at(n)) {
865  if (verbosity_ >= OUTPUT_ERRORS)
866  edm::LogError("EmDQM") << "There are less generated particles than the module '"
867  << theHLTCollectionLabels[n].label() << "' requires.";
868  continue;
869  }
870  std::vector<reco::Particle> sortedGenForFilter(sortedGen);
871  sortedGenForFilter.erase(sortedGenForFilter.begin() + nCandCuts.at(n), sortedGenForFilter.end());
872 
873  // Fill only if this filter was run.
874  if (pathIndex != 0 &&
876  break;
877  // These numbers are from the Parameter Set, such as:
878  // theHLTOutputTypes = cms.uint32(100)
879  switch (theHLTOutputTypes[n]) {
880  case trigger::TriggerL1NoIsoEG: // Non-isolated Level 1
881  histoFillerL1NonIso->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
882  break;
883  case trigger::TriggerL1IsoEG: // Isolated Level 1
884  histoFillerL1Iso->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
885  break;
886  case trigger::TriggerPhoton: // Photon
887  histoFillerPho->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
888  break;
889  case trigger::TriggerElectron: // Electron
890  histoFillerEle->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
891  break;
892  case trigger::TriggerCluster: // TriggerCluster
893  histoFillerClu->fillHistos(triggerObj, event, vPos, n, sortedGenForFilter, accepted);
894  break;
895  default:
896  throw(cms::Exception("Release Validation Error") << "HLT output type not implemented: theHLTOutputTypes[n]");
897  }
898  } // END of loop over filter modules
899 
900  // earse the dummy and fill with real set
903  }
904 }
905 
907 // fillHistos //
908 // Called by analyze method. //
910 template <class T>
912  const edm::Event &iEvent,
913  unsigned int vPos,
914  unsigned int n,
915  std::vector<reco::Particle> &sortedGen,
916  bool &accepted) {
917  std::vector<edm::Ref<T>> recoecalcands;
918  if ((triggerObj->filterIndex(dqm->theHLTCollectionLabels[n]) >= triggerObj->size())) { // only process if available
919  dqm->hltCollectionLabelsMissed.insert(dqm->theHLTCollectionLabels[n].encode());
920  accepted = false;
921  return;
922  }
923 
924  dqm->hltCollectionLabelsFound.insert(dqm->theHLTCollectionLabels[n].encode());
925 
927  // Retrieve saved filter objects //
929  triggerObj->getObjects(
930  triggerObj->filterIndex(dqm->theHLTCollectionLabels[n]), dqm->theHLTOutputTypes[n], recoecalcands);
931  // Danger: special case, L1 non-isolated
932  // needs to be merged with L1 iso
933  if (dqm->theHLTOutputTypes[n] == trigger::TriggerL1NoIsoEG) {
934  std::vector<edm::Ref<T>> isocands;
935  triggerObj->getObjects(triggerObj->filterIndex(dqm->theHLTCollectionLabels[n]), trigger::TriggerL1IsoEG, isocands);
936  if (!isocands.empty()) {
937  for (unsigned int i = 0; i < isocands.size(); i++)
938  recoecalcands.push_back(isocands[i]);
939  }
940  } // END of if theHLTOutputTypes == 82
941 
942  if (recoecalcands.empty()) { // stop if no object passed the previous filter
943  accepted = false;
944  return;
945  }
946 
947  // if (recoecalcands.size() >= reqNum )
948  if (recoecalcands.size() >= dqm->nCandCuts.at(n) && !dqm->mcMatchedOnly_)
949  dqm->totals.at(vPos)->Fill(n + 0.5);
950 
952  // check for validity //
953  // prevents crash in CMSSW_3_1_0_pre6 //
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 "
962  "the event.";
963  return;
964  }
965  }
966 
967  if (!dqm->mcMatchedOnly_) {
969  // Loop over the Generated Particles, and find the //
970  // closest HLT object match. //
972  // for (unsigned int i=0; i < gencut_; i++) {
973  for (unsigned int i = 0; i < dqm->nCandCuts.at(n); i++) {
974  math::XYZVector currentGenParticleMomentum = sortedGen[i].momentum();
975 
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);
980 
981  if (deltaR < closestDeltaR) {
982  closestDeltaR = deltaR;
983  closestEcalCandIndex = j;
984  }
985  }
986 
987  // If an HLT object was found within some delta-R
988  // of this gen particle, store it in a histogram
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());
996  } // END of if closestEcalCandIndex >= 0
997  }
998 
1000  // Loop over all HLT objects in this filter step, and //
1001  // fill histograms. //
1003  // bool foundAllMatches = false;
1004  // unsigned int numOfHLTobjectsMatched = 0;
1005  for (unsigned int i = 0; i < recoecalcands.size(); i++) {
1007  // float closestGenParticleDr = 99.0;
1008  // for(unsigned int j =0; j < gencut_; j++) {
1009  // math::XYZVector currentGenParticle = sortedGen[j].momentum();
1010 
1011  // double currentDeltaR =
1012  // DeltaR(recoecalcands[i]->momentum(),currentGenParticle); if (
1013  // currentDeltaR < closestGenParticleDr ) {
1014  // closestGenParticleDr = currentDeltaR;
1015  // }
1016  //}
1019  // if ( !(fabs(closestGenParticleDr < 0.3)) ) continue;
1020 
1021  // numOfHLTobjectsMatched++;
1022  // if (numOfHLTobjectsMatched >= gencut_) foundAllMatches=true;
1023 
1024  // Fill HLT object histograms
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());
1030  }
1031  }
1032 
1034  // Fill mc matched objects into histograms //
1036  unsigned int matchedMcParts = 0;
1037  float mindist = 0.3;
1038  if (n == 0)
1039  mindist = 0.5; // low L1-resolution => allow wider matching
1040  for (unsigned int i = 0; i < dqm->nCandCuts.at(n); ++i) {
1041  // match generator candidate
1042  bool matchThis = false;
1043  math::XYZVector candDir = sortedGen[i].momentum();
1044  // unsigned int closest = 0;
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) {
1049  closestDr = dr;
1050  // closest = trigOb;
1051  }
1052  if (closestDr > mindist) { // it's not really a "match" if it's that far away
1053  // closest = -1;
1054  } else {
1055  matchedMcParts++;
1056  matchThis = true;
1057  }
1058  }
1059  if (!matchThis) {
1060  accepted = false;
1061  continue; // only plot matched candidates
1062  }
1063  // fill coordinates of mc particle matching trigger object
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());
1070  }
1071  }
1072  // fill total mc matched efficiency
1073 
1074  if (matchedMcParts >= dqm->nCandCuts.at(n) && accepted == true)
1075  dqm->totalmatchs.at(vPos)->Fill(n + 0.5);
1076 }
1077 
1078 void EmDQM::dqmEndRun(edm::Run const &iRun, edm::EventSetup const &iSetup) {
1079  // loop over all the trigger path parameter sets
1080  unsigned int vPos = 0;
1081  for (std::vector<edm::ParameterSet>::iterator psetIt = paramSets.begin(); psetIt != paramSets.end();
1082  ++psetIt, ++vPos) {
1083  SetVarsFromPSet(psetIt);
1084 
1085  // print information about hltCollectionLabels which were not found
1086  // (but only those which were never found)
1087 
1088  // check which ones were never found
1089  std::vector<std::string> labelsNeverFound;
1090 
1091  for (const auto &tag : hltCollectionLabelsMissedPerPath.at(vPos)) {
1092  auto atag = edm::InputTag(tag);
1093  if ((hltCollectionLabelsFoundPerPath.at(vPos)).count(atag.encode()) == 0)
1094  // never found
1095  labelsNeverFound.push_back(atag.encode());
1096 
1097  } // loop over all tags which were missed at least once
1098 
1099  if (labelsNeverFound.empty())
1100  continue;
1101 
1102  std::sort(labelsNeverFound.begin(), labelsNeverFound.end());
1103 
1104  // there was at least one label which was never found
1105  // (note that this could also be because the corresponding
1106  // trigger path slowly fades out to zero efficiency)
1107  if (verbosity_ >= OUTPUT_WARNINGS)
1108  edm::LogWarning("EmDQM") << "There were some HLTCollectionLabels which were never found:";
1109 
1110  for (auto const &tag : labelsNeverFound) {
1111  if (verbosity_ >= OUTPUT_ALL)
1112  edm::LogPrint("EmDQM") << " " << tag;
1113  }
1114  }
1115 }
1116 
1117 // returns count of non-overlapping occurrences of 'sub' in 'str'
1119  if (sub.length() == 0)
1120  return 0;
1121  int count = 0;
1122  for (size_t offset = str.find(sub); offset != std::string::npos; offset = str.find(sub, offset + sub.length())) {
1123  ++count;
1124  }
1125  return count;
1126 }
1127 
1128 //----------------------------------------------------------------------
1129 // find egamma trigger paths from trigger name
1130 std::vector<std::vector<std::string>> EmDQM::findEgammaPaths() {
1131  std::vector<std::vector<std::string>> Paths(5);
1132  // Loop over all paths in the menu
1133  for (unsigned int i = 0; i < hltConfig_.size(); i++) {
1135 
1136  // Find electron and photon paths and classify them
1137  if (int(path.find("HLT_")) == 0) { // Path should start with 'HLT_'
1138 
1139  int scCount = countSubstring(path, "_SC");
1140  int eleCount = countSubstring(path, "Ele");
1141  int doubleEleCount = countSubstring(path, "DoubleEle");
1142  int doubleSCCount = countSubstring(path, "DiSC");
1143  int tripleEleCount = countSubstring(path, "TripleEle");
1144  int photonCount = countSubstring(path, "hoton");
1145  int doublePhotonCount = countSubstring(path, "DoublePhoton") + countSubstring(path, "Diphoton");
1146 
1147  int totEleCount = 2 * tripleEleCount + doubleEleCount + eleCount + scCount + 2 * doubleSCCount;
1148  int totPhotonCount = doublePhotonCount + photonCount;
1149 
1150  if (totEleCount + totPhotonCount < 1)
1151  continue;
1152  switch (totEleCount) {
1153  case 1:
1154  Paths[TYPE_SINGLE_ELE].push_back(path);
1155  // std::cout << "Electron \t" << path << std::endl;
1156  break;
1157  case 2:
1158  Paths[TYPE_DOUBLE_ELE].push_back(path);
1159  // std::cout << "DoubleElectron \t" << path << std::endl;
1160  break;
1161  case 3:
1162  Paths[TYPE_TRIPLE_ELE].push_back(path);
1163  // std::cout << "TripleElectron \t" << path << std::endl;
1164  break;
1165  }
1166 
1167  switch (totPhotonCount) {
1168  case 1:
1169  Paths[TYPE_SINGLE_PHOTON].push_back(path);
1170  // std::cout << "Photon \t\t" << path << std::endl;
1171  break;
1172  case 2:
1173  Paths[TYPE_DOUBLE_PHOTON].push_back(path);
1174  // std::cout << "DoublePhoton \t" << path << std::endl;
1175  break;
1176  }
1177  }
1178  // std::cout << i << " triggerName: " << path << " containing " <<
1179  // hltConfig_.size(i) << " modules."<< std::endl;
1180  }
1181  return Paths;
1182 }
1183 
1184 //----------------------------------------------------------------------
1185 // get the names of filters of a given path
1186 std::vector<std::string> EmDQM::getFilterModules(const std::string &path) {
1187  std::vector<std::string> filters;
1188 
1189  // std::cout << "Pathname: " << path << std::endl;
1190 
1191  // Loop over all modules in the path
1192  for (unsigned int i = 0; i < hltConfig_.size(path); i++) {
1194  std::string moduleType = hltConfig_.moduleType(module);
1195  std::string moduleEDMType = hltConfig_.moduleEDMType(module);
1196 
1197  // Find filters
1198  if (moduleEDMType == "EDFilter" ||
1199  moduleType.find("Filter") != std::string::npos) { // older samples may not have EDMType data
1200  // included
1201  filters.push_back(module);
1202  // std::cout << i << " moduleLabel: " << module << " moduleType: "
1203  // << moduleType << " moduleEDMType: " << moduleEDMType << std::endl;
1204  }
1205  }
1206  return filters;
1207 }
1208 
1209 //----------------------------------------------------------------------
1210 // get the primary Et cut from the trigger name
1212  double minEt = -1;
1213 
1214  boost::regex reg("^HLT_.*?(Ele|hoton|EG|SC)([[:digit:]]+).*");
1215 
1216  boost::smatch what;
1217  if (boost::regex_match(path, what, reg, boost::match_extra)) {
1218  minEt = boost::lexical_cast<double>(what[2]);
1219  }
1220 
1221  return minEt;
1222 }
1223 
1224 //----------------------------------------------------------------------
1225 
1227  // generates a PSet to analyze the behaviour of an L1 seed.
1228  //
1229  // moduleName is the name of the HLT module which filters
1230  // on the L1 seed.
1231  edm::ParameterSet retPSet;
1232 
1233  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1234  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1235  // edm::InputTag(moduleName, "", processName_));
1236  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1237  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1238  std::vector<edm::InputTag>(1, std::string("none")));
1239  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerL1NoIsoEG);
1240 
1241  // as HLTLevel1GTSeed has no parameter ncandcut we determine the value from
1242  // the name of the filter
1243 
1244  int orCount = countSubstring(moduleName, "OR") + countSubstring(moduleName, "Or");
1245  int egCount = countSubstring(moduleName, "EG");
1246  int dEgCount = countSubstring(moduleName, "DoubleEG");
1247  int tEgCount = countSubstring(moduleName, "TripleEG");
1248 
1249  int candCount = 2 * tEgCount + dEgCount + egCount;
1250  // if L1 is and OR of triggers try the assumption that all of them are similar
1251  // first and if not take the lowest number. If this is not successful, let the
1252  // path name decide
1253  if (orCount > 0 && candCount > 0) {
1254  if (egCount % (orCount + 1) == 0 && dEgCount % (orCount + 1) == 0 && tEgCount % (orCount + 1) == 0)
1255  candCount /= (orCount + 1);
1256  else if (egCount - dEgCount - tEgCount > 0)
1257  candCount = 1; // at least one singleEG present
1258  else if (dEgCount > 0)
1259  candCount = 2; // at least one doubleEG and no singleEG present
1260  else if (tEgCount > 0)
1261  candCount = 3; // only tripleEG present
1262  else
1263  candCount = -1;
1264  }
1265 
1266  switch (candCount) {
1267  case 0:
1268  retPSet.addParameter<int>("ncandcut", 0);
1269  break;
1270  case 1:
1271  retPSet.addParameter<int>("ncandcut", 1);
1272  break;
1273  case 2:
1274  retPSet.addParameter<int>("ncandcut", 2);
1275  break;
1276  case 3:
1277  retPSet.addParameter<int>("ncandcut", 3);
1278  break;
1279  default:
1280  retPSet.addParameter<int>("ncandcut", -1);
1281  }
1282 
1283  return retPSet;
1284 }
1285 
1286 //----------------------------------------------------------------------
1287 
1289  // generates a PSet to analyze the behaviour of L1 to supercluster match
1290  // filter.
1291  //
1292  // moduleName is the name of the HLT module which requires the match
1293  // between supercluster and L1 seed.
1294  //
1295  edm::ParameterSet retPSet;
1296 
1297  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1298  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1299  // edm::InputTag(moduleName, "", processName_));
1300  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1301  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1302  std::vector<edm::InputTag>(1, std::string("none")));
1303  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1304  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1305 
1306  return retPSet;
1307 }
1308 
1309 //----------------------------------------------------------------------
1310 
1312  edm::ParameterSet retPSet;
1313 
1314  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1315  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1316  // edm::InputTag(moduleName, "", processName_));
1317  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1318  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1319  std::vector<edm::InputTag>(1, std::string("none")));
1320  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1321  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1322 
1323  return retPSet;
1324 }
1325 
1326 //----------------------------------------------------------------------
1327 
1329  edm::ParameterSet retPSet;
1330 
1331  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1332  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1333  // edm::InputTag(moduleName, "", processName_));
1334  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1335  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1336  std::vector<edm::InputTag>(1, std::string("none")));
1337  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1338  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1339 
1340  return retPSet;
1341 }
1342 
1343 //----------------------------------------------------------------------
1344 
1346  edm::ParameterSet retPSet;
1347 
1348  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1349  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1350  // edm::InputTag(moduleName, "", processName_));
1351  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1352  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1353  std::vector<edm::InputTag>(1, std::string("none")));
1354  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1355  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1356 
1357  return retPSet;
1358 }
1359 
1360 //----------------------------------------------------------------------
1361 
1363  edm::ParameterSet retPSet;
1364 
1365  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1366  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1367  // edm::InputTag(moduleName, "", processName_));
1368  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1369  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections",
1370  std::vector<edm::InputTag>(1, std::string("none")));
1371  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1372  retPSet.addParameter<int>("ncandcut", 2);
1373 
1374  return retPSet;
1375 }
1376 
1377 //----------------------------------------------------------------------
1378 
1380  edm::ParameterSet retPSet;
1381 
1382  // example usages of HLTEgammaGenericFilter are:
1383  // R9 shape filter
1384  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1385  // cluster shape filter
1386  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1387  // Ecal isolation filter
1388  // hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter H/E
1389  // filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1390  // HCAL isolation filter
1391  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1392 
1393  // infer the type of filter by the type of the producer which
1394  // generates the collection used to cut on this
1396  // edm::InputTag nonIsoTag =
1397  // hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("");
1398  // std::cout
1399  // << "varTag.label " << varTag.label() << " nonIsoTag.label " <<
1400  // nonIsoTag.label() << std::endl;
1401 
1402  std::string inputType = hltConfig_.moduleType(varTag.label());
1403  // std::cout << "inputType " << inputType << " moduleName " << moduleName <<
1404  // std::endl;
1405 
1406  //--------------------
1407  // sanity check: non-isolated path should be produced by the
1408  // same type of module
1409 
1410  // first check that the non-iso tag is non-empty
1411  // if (nonIsoTag.label().empty()) {
1412  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" <<
1413  // moduleName << "' is empty."; return retPSet;
1414  //}
1415  // if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1416  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and
1417  // nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the
1418  // same for HLTEgammaGenericFilter '" << moduleName << "'."; return retPSet;
1419  //}
1420  //--------------------
1421 
1422  // parameter saveTag determines the output type
1424  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1425  else
1426  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1427 
1428  std::vector<edm::InputTag> isoCollections;
1429  isoCollections.push_back(varTag);
1430  // if (!nonIsoTag.label().empty())
1431  // isoCollections.push_back(nonIsoTag);
1432 
1433  //--------------------
1434  // the following cases seem to have identical PSets ?
1435  //--------------------
1436 
1437  if (inputType == "EgammaHLTR9Producer" || // R9 shape
1438  inputType == "EgammaHLTR9IDProducer" || // R9 ID
1439  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1440  inputType == "EgammaHLTEcalRecIsolationProducer" || // ecal isolation
1441  inputType == "EgammaHLTHcalIsolationProducersRegional" || // HCAL isolation and HE
1442  inputType == "EgammaHLTGsfTrackVarProducer" || // GSF track deta and dphi filter
1443  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation and
1444  // HE
1445  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation
1446  // filter
1447  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation
1448  // filter
1449  inputType == "EgammaHLTElectronTrackIsolationProducers" // Track isolation filter
1450  ) {
1451  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1452  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1453  // edm::InputTag(moduleName, "", processName_));
1454  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1455  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections", isoCollections);
1456  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1457 
1458  return retPSet;
1459  }
1460 
1461  if (verbosity_ >= OUTPUT_ERRORS)
1462  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericFilter '" << moduleName
1463  << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1464  return edm::ParameterSet();
1465 }
1466 
1467 //----------------------------------------------------------------------
1468 
1470  edm::ParameterSet retPSet;
1471 
1472  // example usages of HLTEgammaGenericFilter are:
1473  // R9 shape filter
1474  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolR9ShapeFilter
1475  // cluster shape filter
1476  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolClusterShapeFilter
1477  // Ecal isolation filter
1478  // hltL1NonIsoHLTNonIsoSingleElectronEt17TIghterEleIdIsolEcalIsolFilter H/E
1479  // filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHEFilter
1480  // HCAL isolation filter
1481  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolHcalIsolFilter
1482 
1483  // infer the type of filter by the type of the producer which
1484  // generates the collection used to cut on this
1486  // edm::InputTag nonIsoTag =
1487  // hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
1488  // std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " <<
1489  // nonIsoTag.label() << std::endl;
1490 
1491  std::string inputType = hltConfig_.moduleType(varTag.label());
1492  // std::cout << "inputType " << inputType << " moduleName " << moduleName <<
1493  // std::endl;
1494 
1495  //--------------------
1496  // sanity check: non-isolated path should be produced by the
1497  // same type of module
1498 
1499  // first check that the non-iso tag is non-empty
1500  // if (nonIsoTag.label().empty()) {
1501  // edm::LogError("EmDQM") << "nonIsoTag of HLTEgammaGenericFilter '" <<
1502  // moduleName << "' is empty."; return retPSet;
1503  //}
1504  // if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1505  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and
1506  // nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the
1507  // same for HLTEgammaGenericFilter '" << moduleName << "'."; return retPSet;
1508  //}
1509  //--------------------
1510 
1511  // parameter saveTag determines the output type
1513  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerPhoton);
1514  else
1515  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerCluster);
1516 
1517  std::vector<edm::InputTag> isoCollections;
1518  isoCollections.push_back(varTag);
1519  // if (!nonIsoTag.label().empty())
1520  // isoCollections.push_back(nonIsoTag);
1521 
1522  //--------------------
1523  // the following cases seem to have identical PSets ?
1524  //--------------------
1525 
1526  if (inputType == "EgammaHLTR9Producer" || // R9 shape
1527  inputType == "EgammaHLTR9IDProducer" || // R9 ID
1528  inputType == "EgammaHLTClusterShapeProducer" || // cluster shape
1529  inputType == "EgammaHLTEcalRecIsolationProducer" || // ecal isolation
1530  inputType == "EgammaHLTHcalIsolationProducersRegional" || // HCAL isolation and HE
1531  inputType == "EgammaHLTBcHcalIsolationProducersRegional" || // HCAL isolation and
1532  // HE
1533  inputType == "EgammaHLTEcalPFClusterIsolationProducer" || // ECAL PF isolation
1534  // filter
1535  inputType == "EgammaHLTHcalPFClusterIsolationProducer" || // HCAL PF isolation
1536  // filter
1537  inputType == "EgammaHLTPhotonTrackIsolationProducersRegional" // Photon track
1538  // isolation
1539  ) {
1540  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1541  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1542  // edm::InputTag(moduleName, "", processName_));
1543  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1544  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections", isoCollections);
1545  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1546 
1547  return retPSet;
1548  }
1549 
1550  if (verbosity_ >= OUTPUT_ERRORS)
1551  edm::LogError("EmDQM") << "Can't determine what the HLTEgammaGenericQuadraticFilter '" << moduleName
1552  << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1553  return edm::ParameterSet();
1554 }
1555 
1556 //----------------------------------------------------------------------
1557 
1559  edm::ParameterSet retPSet;
1560 
1561  // example usages of HLTElectronGenericFilter are:
1562  //
1563  // deta filter
1564  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDetaFilter dphi
1565  // filter hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolDphiFilter
1566  // track isolation
1567  // hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolTrackIsolFilter
1568 
1569  // infer the type of filter by the type of the producer which
1570  // generates the collection used to cut on this
1572  // edm::InputTag nonIsoTag =
1573  // hltConfig_.modulePSet(moduleName).getParameter<edm::InputTag>("nonIsoTag");
1574  // std::cout << "varTag.label " << varTag.label() << " nonIsoTag.label " <<
1575  // nonIsoTag.label() << std::endl;
1576 
1577  std::string inputType = hltConfig_.moduleType(varTag.label());
1578  // std::cout << "inputType iso " << inputType << " inputType noniso " <<
1579  // hltConfig_.moduleType(nonIsoTag.label()) << " moduleName " << moduleName <<
1580  // std::endl;
1581 
1582  //--------------------
1583  // sanity check: non-isolated path should be produced by the
1584  // same type of module
1585  // if (nonIsoTag.label().empty()) {
1586  // edm::LogError("EmDQM") << "nonIsoTag of HLTElectronGenericFilter '" <<
1587  // moduleName << "' is empty."; return retPSet;
1588  //}
1589  // if (inputType != hltConfig_.moduleType(nonIsoTag.label())) {
1590  // edm::LogError("EmDQM") << "C++ Type of varTag '" << inputType << "' and
1591  // nonIsoTag '" << hltConfig_.moduleType(nonIsoTag.label()) << "' are not the
1592  // same for HLTElectronGenericFilter '" << moduleName << "'."; return
1593  // retPSet;
1594  //}
1595  //--------------------
1596 
1597  // the type of object to look for seems to be the
1598  // same for all uses of HLTEgammaGenericFilter
1599  retPSet.addParameter<int>("theHLTOutputTypes", trigger::TriggerElectron);
1600 
1601  std::vector<edm::InputTag> isoCollections;
1602  isoCollections.push_back(varTag);
1603  // if (!nonIsoTag.label().empty())
1604  // isoCollections.push_back(nonIsoTag);
1605 
1606  //--------------------
1607  // the following cases seem to have identical PSets ?
1608  //--------------------
1609 
1610  // note that whether deta or dphi is used is determined from
1611  // the product instance (not the module label)
1612  if (inputType == "EgammaHLTElectronDetaDphiProducer" || // deta and dphi filter
1613  inputType == "EgammaHLTElectronTrackIsolationProducers" // track isolation
1614  ) {
1615  retPSet.addParameter<std::vector<double>>("PlotBounds", std::vector<double>(2, 0.0));
1616  // retPSet.addParameter<edm::InputTag>("HLTCollectionLabels",
1617  // edm::InputTag(moduleName, "", processName_));
1618  retPSet.addParameter<edm::InputTag>("HLTCollectionLabels", edm::InputTag(moduleName, "", triggerObject_.process()));
1619  retPSet.addParameter<std::vector<edm::InputTag>>("IsoCollections", isoCollections);
1620  retPSet.addParameter<int>("ncandcut", hltConfig_.modulePSet(moduleName).getParameter<int>("ncandcut"));
1621 
1622  return retPSet;
1623  }
1624 
1625  if (verbosity_ >= OUTPUT_ERRORS)
1626  edm::LogError("EmDQM") << "Can't determine what the HLTElectronGenericFilter '" << moduleName
1627  << "' should do: uses a collection produced by a module of C++ type '" << inputType << "'.";
1628  return edm::ParameterSet();
1629 }
1630 
1631 //----------------------------------------------------------------------
1632 
1633 void EmDQM::SetVarsFromPSet(std::vector<edm::ParameterSet>::iterator psetIt) {
1634  dirname_ = "HLT/HLTEgammaValidation/" + psetIt->getParameter<std::string>("@module_label");
1635 
1636  pathIndex = psetIt->getUntrackedParameter<unsigned int>("pathIndex", 0);
1637  // parameters for generator study
1638  reqNum = psetIt->getParameter<unsigned int>("reqNum");
1639  pdgGen = psetIt->getParameter<int>("pdgGen");
1640  // plotting parameters (untracked because they don't affect the physics)
1641  plotEtMin = psetIt->getUntrackedParameter<double>("genEtMin", 0.);
1642  plotPtMin = psetIt->getUntrackedParameter<double>("PtMin", 0.);
1643  plotPtMax = psetIt->getUntrackedParameter<double>("PtMax", 1000.);
1644 
1645  // preselction cuts
1646  gencutCollection_ = psetIt->getParameter<edm::InputTag>("cutcollection");
1647  gencut_ = psetIt->getParameter<int>("cutnum");
1648 
1650  // Read in the Vector of Parameter Sets. //
1651  // Information for each filter-step //
1653  std::vector<edm::ParameterSet> filters = psetIt->getParameter<std::vector<edm::ParameterSet>>("filters");
1654 
1655  // empty vectors of parameters from previous paths
1656  theHLTCollectionLabels.clear();
1657  theHLTOutputTypes.clear();
1659  plotBounds.clear();
1660  isoNames.clear();
1661  plotiso.clear();
1662  nCandCuts.clear();
1663 
1664  int i = 0;
1665  for (std::vector<edm::ParameterSet>::iterator filterconf = filters.begin(); filterconf != filters.end();
1666  filterconf++) {
1667  theHLTCollectionLabels.push_back(filterconf->getParameter<edm::InputTag>("HLTCollectionLabels"));
1668  theHLTOutputTypes.push_back(filterconf->getParameter<int>("theHLTOutputTypes"));
1669  // Grab the human-readable name, if it is not specified, use the Collection
1670  // Label
1671  theHLTCollectionHumanNames.push_back(
1672  filterconf->getUntrackedParameter<std::string>("HLTCollectionHumanName", theHLTCollectionLabels[i].label()));
1673 
1674  std::vector<double> bounds = filterconf->getParameter<std::vector<double>>("PlotBounds");
1675  // If the size of plot "bounds" vector != 2, abort
1676  assert(bounds.size() == 2);
1677  plotBounds.push_back(std::pair<double, double>(bounds[0], bounds[1]));
1678  isoNames.push_back(filterconf->getParameter<std::vector<edm::InputTag>>("IsoCollections"));
1679 
1680  // for (unsigned int i=0; i<isoNames.back().size(); i++) {
1681  // switch(theHLTOutputTypes.back()) {
1682  // case trigger::TriggerL1NoIsoEG:
1683  // histoFillerL1NonIso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection
1684  // , float>>>(isoNames.back()[i])); break;
1685  // case trigger::TriggerL1IsoEG: // Isolated Level 1
1686  // histoFillerL1Iso->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<l1extra::L1EmParticleCollection
1687  // , float>>>(isoNames.back()[i])); break;
1688  // case trigger::TriggerPhoton: // Photon
1689  // histoFillerPho->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection
1690  // , float>>>(isoNames.back()[i])); break;
1691  // case trigger::TriggerElectron: // Electron
1692  // histoFillerEle->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::ElectronCollection
1693  // , float>>>(isoNames.back()[i])); break;
1694  // case trigger::TriggerCluster: // TriggerCluster
1695  // histoFillerClu->isoNameTokens_.push_back(consumes<edm::AssociationMap<edm::OneToValue<reco::RecoEcalCandidateCollection
1696  // , float>>>(isoNames.back()[i])); break;
1697  // default:
1698  // throw(cms::Exception("Release Validation Error") << "HLT output type
1699  // not implemented: theHLTOutputTypes[n]" );
1700  // }
1701  //}
1702 
1703  // If the size of the isoNames vector is not greater than zero, abort
1704  assert(!isoNames.back().empty());
1705  if (isoNames.back().at(0).label() == "none") {
1706  plotiso.push_back(false);
1707  } else {
1708  if (!noIsolationPlots_)
1709  plotiso.push_back(true);
1710  else
1711  plotiso.push_back(false);
1712  }
1713  nCandCuts.push_back(filterconf->getParameter<int>("ncandcut"));
1714  i++;
1715  } // END of loop over parameter sets
1716 
1717  // Record number of HLTCollectionLabels
1719 }
1720 
1721 //----------------------------------------------------------------------
1722 
HLTConfigProvider::moduleIndex
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
Definition: HLTConfigProvider.h:96
EmDQM::hltResults_token
edm::EDGetTokenT< edm::TriggerResults > hltResults_token
Definition: EmDQM.h:227
EmDQM::genParticles_token
edm::EDGetTokenT< edm::View< reco::Candidate > > genParticles_token
Definition: EmDQM.h:225
EmDQM::totalmatchs
std::vector< MonitorElement * > totalmatchs
Definition: EmDQM.h:214
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
EmDQM::dqmEndRun
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override
Definition: EmDQM.cc:1078
HLTTauDQMOffline_cfi.Paths
Paths
Definition: HLTTauDQMOffline_cfi.py:93
EmDQM::verbosity_
unsigned int verbosity_
Definition: EmDQM.h:102
mps_fire.i
i
Definition: mps_fire.py:428
trigger::TriggerElectron
Definition: TriggerTypeDefs.h:78
filters
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
EmDQM::theHLTOutputTypes
std::vector< int > theHLTOutputTypes
Definition: EmDQM.h:163
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
getBeamSpotDB.atag
atag
Definition: getBeamSpotDB.py:123
HLTConfigProvider::moduleType
const std::string moduleType(const std::string &module) const
C++ class name of module.
Definition: HLTConfigProvider.h:104
EmDQM::plotBounds
std::vector< std::pair< double, double > > plotBounds
Definition: EmDQM.h:166
trigger::TriggerL1IsoEG
Definition: TriggerTypeDefs.h:32
EmDQM::dirname_
std::string dirname_
Definition: EmDQM.h:88
EmDQM::etgens
std::vector< MonitorElement * > etgens
Definition: EmDQM.h:216
EmDQM::gencutColl_fidZee_token
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidZee_token
Definition: EmDQM.h:229
EmDQM::etahists
std::vector< std::vector< MonitorElement * > > etahists
Definition: EmDQM.h:200
HLT_Ele8_CaloIdT_TrkIdVL_DQM_cfi.genEtMin
genEtMin
Definition: HLT_Ele8_CaloIdT_TrkIdVL_DQM_cfi.py:8
EmDQM::etahistmatchs
std::vector< std::vector< MonitorElement * > > etahistmatchs
Definition: EmDQM.h:203
PDWG_DiJetAODSkim_cff.hltResults
hltResults
Definition: PDWG_DiJetAODSkim_cff.py:7
reco::Particle
Definition: Particle.h:16
HistoFiller::fillHistos
void fillHistos(edm::Handle< trigger::TriggerEventWithRefs > &, const edm::Event &, unsigned int, unsigned int, std::vector< reco::Particle > &, bool &)
Definition: EmDQM.cc:911
EmDQM::makePSetForOneOEMinusOneOPFilter
edm::ParameterSet makePSetForOneOEMinusOneOPFilter(const std::string &)
Definition: EmDQM.cc:1328
edm::Run
Definition: Run.h:45
EmDQM::checkRecoParticlesRequirement
bool checkRecoParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:669
EmDQM::etaphigens
std::vector< MonitorElement * > etaphigens
Definition: EmDQM.h:219
EmDQM::makePSetForEgammaGenericFilter
edm::ParameterSet makePSetForEgammaGenericFilter(const std::string &)
Definition: EmDQM.cc:1379
EmDQM::etaphihists
std::vector< std::vector< MonitorElement * > > etaphihists
Definition: EmDQM.h:209
EmDQM::OUTPUT_ERRORS
static const unsigned OUTPUT_ERRORS
Definition: EmDQM.h:246
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
EmDQM::hltConfig_
HLTConfigProvider hltConfig_
The instance of the HLTConfigProvider as a data member.
Definition: EmDQM.h:135
EmDQM::numOfHLTCollectionLabels
unsigned int numOfHLTCollectionLabels
Definition: EmDQM.h:160
EmDQM::gencutColl_fidWenu_token
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidWenu_token
Definition: EmDQM.h:228
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
HistoFiller< reco::ElectronCollection >
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
EmDQM::hltCollectionLabelsMissedPerPath
std::vector< std::set< std::string > > hltCollectionLabelsMissedPerPath
Definition: EmDQM.h:193
cms::cuda::assert
assert(be >=bs)
EmDQM::pdgGen
int pdgGen
Definition: EmDQM.h:170
trigger::TriggerEventWithRefs::getObjects
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type
Definition: TriggerEventWithRefs.h:399
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
EmDQM::hltCollectionLabelsFound
std::set< std::string > hltCollectionLabelsFound
Definition: EmDQM.h:190
EmDQM::makePSetForElectronGenericFilter
edm::ParameterSet makePSetForElectronGenericFilter(const std::string &)
Definition: EmDQM.cc:1558
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EmDQM::findEgammaPaths
std::vector< std::vector< std::string > > findEgammaPaths()
Definition: EmDQM.cc:1130
EmDQM::plotEtMin
double plotEtMin
Definition: EmDQM.h:172
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
EmDQM::phiMax_
double phiMax_
Definition: EmDQM.h:109
EmDQM::hltCollectionLabelsFoundPerPath
std::vector< std::set< std::string > > hltCollectionLabelsFoundPerPath
Definition: EmDQM.h:189
EmDQM::histoFillerL1NonIso
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1NonIso
Definition: EmDQM.h:92
edm::Handle
Definition: AssociativeIterator.h:50
edm::ParameterSet::addUntrackedParameter
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:192
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HLTConfigProvider::inited
bool inited() const
Accessors (const methods)
Definition: HLTConfigProvider.h:49
HLTConfigProvider::moduleLabel
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
Definition: HLTConfigProvider.h:88
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
EmDQM::pTGenComparator_
GreaterByPt< reco::GenParticle > pTGenComparator_
Definition: EmDQM.h:222
EmDQM::noPhiPlots_
bool noPhiPlots_
Definition: EmDQM.h:117
EmDQM::OUTPUT_ALL
static const unsigned OUTPUT_ALL
Definition: EmDQM.h:248
EmDQM::plotPtMax
double plotPtMax
Definition: EmDQM.h:174
EmDQM::getFilterModules
std::vector< std::string > getFilterModules(const std::string &)
Definition: EmDQM.cc:1186
EmDQM::histEtaPhiOfHltObjMatchToGens
std::vector< std::vector< MonitorElement * > > histEtaPhiOfHltObjMatchToGens
Definition: EmDQM.h:211
EmDQM::theHLTCollectionLabels
std::vector< edm::InputTag > theHLTCollectionLabels
Definition: EmDQM.h:159
EmDQM::histoFillerL1Iso
HistoFiller< l1extra::L1EmParticleCollection > * histoFillerL1Iso
Definition: EmDQM.h:94
EmDQM::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: EmDQM.cc:64
EmDQM::histoFillerEle
HistoFiller< reco::ElectronCollection > * histoFillerEle
Definition: EmDQM.h:90
EmDQM::gencutColl_fidGammaJet_token
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidGammaJet_token
Definition: EmDQM.h:231
EmDQM::analyze
void analyze(const edm::Event &event, const edm::EventSetup &) override
Definition: EmDQM.cc:733
EmDQM::etagens
std::vector< MonitorElement * > etagens
Definition: EmDQM.h:217
EmDQM::gencut_
unsigned int gencut_
Definition: EmDQM.h:186
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
AlignmentTrackSelector_cfi.ptMax
ptMax
Definition: AlignmentTrackSelector_cfi.py:12
hltMonBTagIPClient_cfi.pathName
pathName
Definition: hltMonBTagIPClient_cfi.py:5
HLT_FULL_cff.varTag
varTag
Definition: HLT_FULL_cff.py:14992
HLTConfigProvider::saveTags
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
Definition: HLTConfigProvider.h:116
EmDQM::histPhiOfHltObjMatchToGens
std::vector< std::vector< MonitorElement * > > histPhiOfHltObjMatchToGens
Definition: EmDQM.h:208
PVValHelper::eta
Definition: PVValidationHelpers.h:70
EgHLTOffEleSelection_cfi.minEt
minEt
Definition: EgHLTOffEleSelection_cfi.py:10
EmDQM::TYPE_DOUBLE_PHOTON
static const unsigned TYPE_DOUBLE_PHOTON
Definition: EmDQM.h:241
str
#define str(s)
Definition: TestProcessor.cc:53
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
EmDQM::hltCollectionLabelsMissed
std::set< std::string > hltCollectionLabelsMissed
Definition: EmDQM.h:194
EmDQM::phihists
std::vector< std::vector< MonitorElement * > > phihists
Definition: EmDQM.h:201
EmDQM::SetVarsFromPSet
void SetVarsFromPSet(std::vector< edm::ParameterSet >::iterator)
Definition: EmDQM.cc:1633
HLTConfigProvider::moduleEDMType
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
Definition: HLTConfigProvider.h:107
EmDQM::pset
const edm::ParameterSet & pset
Definition: EmDQM.h:99
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
EmDQM::TYPE_SINGLE_PHOTON
static const unsigned TYPE_SINGLE_PHOTON
Definition: EmDQM.h:240
trigger::TriggerEventWithRefs::filterIndex
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
Definition: TriggerEventWithRefs.h:223
EmDQM::triggerObject_
edm::InputTag triggerObject_
Definition: EmDQM.h:101
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
HLTConfigProvider::removeVersion
static const std::string removeVersion(const std::string &trigger)
Definition: HLTConfigProvider.cc:238
EmDQM::histoFillerPho
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerPho
Definition: EmDQM.h:93
EmDQM::isoNames
std::vector< std::vector< edm::InputTag > > isoNames
Definition: EmDQM.h:165
EmDQM::makePSetForL1SeedFilter
edm::ParameterSet makePSetForL1SeedFilter(const std::string &)
Definition: EmDQM.cc:1226
HLTConfigProvider::size
unsigned int size() const
number of trigger paths in trigger table
Definition: HLTConfigProvider.h:63
EmDQM::histEtaOfHltObjMatchToGens
std::vector< std::vector< MonitorElement * > > histEtaOfHltObjMatchToGens
Definition: EmDQM.h:207
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
HLTConfigProvider::modulePSet
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: HLTConfigProvider.h:113
EmDQM::noIsolationPlots_
bool noIsolationPlots_
Definition: EmDQM.h:118
EmDQM::EmDQM
EmDQM(const edm::ParameterSet &pset)
Constructor.
Definition: EmDQM.cc:11
edm::ParameterSet
Definition: ParameterSet.h:47
EmDQM::gencutColl_fidTripleEle_token
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidTripleEle_token
Definition: EmDQM.h:230
EmDQM::nbins2D_
unsigned int nbins2D_
Definition: EmDQM.h:113
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
PVValHelper::phi
Definition: PVValidationHelpers.h:69
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
EmDQM::countSubstring
int countSubstring(const std::string &, const std::string &)
Definition: EmDQM.cc:1118
EmDQM::eta2DMax_
double eta2DMax_
Definition: EmDQM.h:111
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
EmDQM::nCandCuts
std::vector< unsigned int > nCandCuts
Definition: EmDQM.h:167
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
EmDQM::OUTPUT_WARNINGS
static const unsigned OUTPUT_WARNINGS
Definition: EmDQM.h:247
EmDQM::gencutCollection_
edm::InputTag gencutCollection_
Definition: EmDQM.h:182
EmDQM::phihistmatchs
std::vector< std::vector< MonitorElement * > > phihistmatchs
Definition: EmDQM.h:204
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalCalibMonitorClient_cfi.moduleName
moduleName
Definition: EcalCalibMonitorClient_cfi.py:17
EmDQM::totals
std::vector< MonitorElement * > totals
Definition: EmDQM.h:213
EmDQM::ptMin_
double ptMin_
Definition: EmDQM.h:107
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
HLTConfigProvider::tableName
const std::string & tableName() const
HLT ConfDB table name.
Definition: HLTConfigProvider.h:60
EmDQM::pathIndex
unsigned int pathIndex
Definition: EmDQM.h:158
EmDQM::isData_
bool isData_
Definition: EmDQM.h:105
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
HLTConfigProvider::processName
const std::string & processName() const
process name
Definition: HLTConfigProvider.h:54
edm::EventSetup
Definition: EventSetup.h:58
EmDQM::ethistmatchs
std::vector< std::vector< MonitorElement * > > ethistmatchs
Definition: EmDQM.h:205
electronAnalyzer_cfi.DeltaR
DeltaR
Definition: electronAnalyzer_cfi.py:33
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EmDQM::TYPE_DOUBLE_ELE
static const unsigned TYPE_DOUBLE_ELE
Definition: EmDQM.h:239
trigger::TriggerCluster
Definition: TriggerTypeDefs.h:88
EmDQM::plotPtMin
double plotPtMin
Definition: EmDQM.h:173
EmDQM::etaphihistmatchs
std::vector< std::vector< MonitorElement * > > etaphihistmatchs
Definition: EmDQM.h:210
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTConfigProvider::triggerIndex
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
Definition: HLTConfigProvider.h:73
EmDQM::histEtOfHltObjMatchToGens
std::vector< std::vector< MonitorElement * > > histEtOfHltObjMatchToGens
Definition: EmDQM.h:206
EmDQM::gencutColl_fidDiGamma_token
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_fidDiGamma_token
Definition: EmDQM.h:232
EmDQM::nbins_
unsigned int nbins_
Definition: EmDQM.h:110
EmDQM::makePSetForEgammaDoubleEtDeltaPhiFilter
edm::ParameterSet makePSetForEgammaDoubleEtDeltaPhiFilter(const std::string &)
Definition: EmDQM.cc:1362
callgraph.module
module
Definition: callgraph.py:61
trigger::TriggerEventWithRefs::size
size_type size() const
number of filters
Definition: TriggerEventWithRefs.h:215
DDAxes::phi
EmDQM::gencutColl_manualConf_token
edm::EDGetTokenT< edm::View< reco::Candidate > > gencutColl_manualConf_token
Definition: EmDQM.h:233
EmDQM::checkGeneratedParticlesRequirement
bool checkGeneratedParticlesRequirement(const edm::Event &event)
Definition: EmDQM.cc:606
reco::LeafCandidate::et
double et() const final
transverse energy
Definition: LeafCandidate.h:127
EmDQM::pTComparator_
GreaterByPt< reco::Particle > pTComparator_
Definition: EmDQM.h:221
EmDQM::phigens
std::vector< MonitorElement * > phigens
Definition: EmDQM.h:218
EmDQM::useHumanReadableHistTitles_
bool useHumanReadableHistTitles_
Definition: EmDQM.h:115
EmDQM::genEtaAcc_
double genEtaAcc_
Definition: EmDQM.h:103
trigger::TriggerL1NoIsoEG
Definition: TriggerTypeDefs.h:31
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
EmDQM::triggerObject_token
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerObject_token
Definition: EmDQM.h:226
EmDQM::reqNum
unsigned int reqNum
Definition: EmDQM.h:169
EmDQM::histoFillerClu
HistoFiller< reco::RecoEcalCandidateCollection > * histoFillerClu
Definition: EmDQM.h:91
EmDQM::makePSetForEtFilter
edm::ParameterSet makePSetForEtFilter(const std::string &)
Definition: EmDQM.cc:1311
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
EmDQM::mcMatchedOnly_
bool mcMatchedOnly_
Definition: EmDQM.h:116
EmDQM
Definition: EmDQM.h:66
HLTConfigProvider::changed
bool changed() const
changed?
Definition: HLTConfigProvider.h:51
EmDQM::ethists
std::vector< std::vector< MonitorElement * > > ethists
Definition: EmDQM.h:202
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EmDQM::plotiso
std::vector< bool > plotiso
Definition: EmDQM.h:164
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
EmDQM::paramSets
std::vector< edm::ParameterSet > paramSets
Definition: EmDQM.h:156
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
HLTConfigProvider::triggerName
const std::string & triggerName(unsigned int triggerIndex) const
Definition: HLTConfigProvider.h:70
EmDQM::phi2DMax_
double phi2DMax_
Definition: EmDQM.h:112
reco::LeafCandidate
Definition: LeafCandidate.h:16
EmDQM::genEtAcc_
double genEtAcc_
Definition: EmDQM.h:104
EmDQM::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EmDQM.cc:376
cms::Exception
Definition: Exception.h:70
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
dqm
Definition: DQMStore.h:18
trigger::TriggerPhoton
HLT.
Definition: TriggerTypeDefs.h:77
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
EmDQM::TYPE_TRIPLE_ELE
static const unsigned TYPE_TRIPLE_ELE
Definition: EmDQM.h:242
EmDQM::makePSetForPixelMatchFilter
edm::ParameterSet makePSetForPixelMatchFilter(const std::string &)
Definition: EmDQM.cc:1345
EmDQM::autoConfMode_
bool autoConfMode_
Definition: EmDQM.h:97
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EmDQM::etaMax_
double etaMax_
Definition: EmDQM.h:108
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::Event
Definition: Event.h:73
EmDQM::theHLTCollectionHumanNames
std::vector< std::string > theHLTCollectionHumanNames
Definition: EmDQM.h:161
EmDQM::getPrimaryEtCut
double getPrimaryEtCut(const std::string &)
Definition: EmDQM.cc:1211
EmDQM::TYPE_SINGLE_ELE
static const unsigned TYPE_SINGLE_ELE
Definition: EmDQM.h:238
EmDQM::makePSetForL1SeedToSuperClusterMatchFilter
edm::ParameterSet makePSetForL1SeedToSuperClusterMatchFilter(const std::string &)
Definition: EmDQM.cc:1288
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
EmDQM::ptMax_
double ptMax_
Definition: EmDQM.h:106
edm::ParameterSet::empty
bool empty() const
Definition: ParameterSet.h:201
EmDQM::~EmDQM
~EmDQM() override
Destructor.
Definition: EmDQM.cc:603
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
EmDQM.h
EmDQM::makePSetForEgammaGenericQuadraticFilter
edm::ParameterSet makePSetForEgammaGenericQuadraticFilter(const std::string &)
Definition: EmDQM.cc:1469
EmDQM::minEtForEtaEffPlot_
unsigned int minEtForEtaEffPlot_
Definition: EmDQM.h:114