CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HeavyFlavorValidation.cc
Go to the documentation of this file.
1 
8 // Original Author: Zoltan Gecse
9 
10 #include <memory>
11 #include <initializer_list>
21 
37 
39 
42 
44 
45 #include "TLorentzVector.h"
46 
47 using namespace std;
48 using namespace edm;
49 using namespace reco;
50 using namespace l1extra;
51 using namespace trigger;
52 
53 class HeavyFlavorValidation : public DQMEDAnalyzer {
54 public:
55  explicit HeavyFlavorValidation(const edm::ParameterSet &);
56  ~HeavyFlavorValidation() override;
57 
58 protected:
59  void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override;
60  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
61  void analyze(const edm::Event &, const edm::EventSetup &) override;
62 
63 private:
64  int getMotherId(const Candidate *p);
65  void match(MonitorElement *me,
66  vector<LeafCandidate> &from,
67  vector<LeafCandidate> &to,
68  double deltaRMatchingCut,
69  vector<int> &map);
70  void myBook2D(DQMStore::IBooker &ibooker,
71  TString name,
72  vector<double> &xBins,
73  TString xLabel,
74  vector<double> &yBins,
75  TString yLabel,
76  TString title);
77  void myBook2D(DQMStore::IBooker &ibooker,
78  TString name,
79  vector<double> &xBins,
80  TString xLabel,
81  vector<double> &yBins,
82  TString yLabel) {
83  myBook2D(ibooker, name, xBins, xLabel, yBins, yLabel, name);
84  }
85  void myBookProfile2D(DQMStore::IBooker &ibooker,
86  TString name,
87  vector<double> &xBins,
88  TString xLabel,
89  vector<double> &yBins,
90  TString yLabel,
91  TString title);
93  TString name,
94  vector<double> &xBins,
95  TString xLabel,
96  vector<double> &yBins,
97  TString yLabel) {
98  myBookProfile2D(ibooker, name, xBins, xLabel, yBins, yLabel, name);
99  }
100  void myBook1D(DQMStore::IBooker &ibooker, TString name, vector<double> &xBins, TString label, TString title);
101  void myBook1D(DQMStore::IBooker &ibooker, TString name, vector<double> &xBins, TString label) {
102  myBook1D(ibooker, name, xBins, label, name);
103  }
104 
114  int getFilterLevel(const std::string &moduleName, const HLTConfigProvider &hltConfig);
115 
116  string dqmFolder;
119 
128 
129  vector<int> motherIDs;
134  vector<double> deltaEtaBins;
135  vector<double> deltaPhiBins;
136  vector<double> muonPtBins;
137  vector<double> muonEtaBins;
138  vector<double> muonPhiBins;
139  vector<double> dimuonPtBins;
140  vector<double> dimuonEtaBins;
141  vector<double> dimuonDRBins;
142  map<TString, MonitorElement *> ME;
143  vector<pair<string, int> > filterNamesLevels;
144  const double muonMass;
145 };
146 
148  : //get parameters
149  dqmFolder(pset.getUntrackedParameter<string>("DQMFolder")),
150  triggerProcessName(pset.getUntrackedParameter<string>("TriggerProcessName")),
151  triggerPathName(pset.getUntrackedParameter<string>("TriggerPathName")),
152  motherIDs(pset.getUntrackedParameter<vector<int> >("MotherIDs")),
153  genGlobDeltaRMatchingCut(pset.getUntrackedParameter<double>("GenGlobDeltaRMatchingCut")),
154  globL1DeltaRMatchingCut(pset.getUntrackedParameter<double>("GlobL1DeltaRMatchingCut")),
155  globL2DeltaRMatchingCut(pset.getUntrackedParameter<double>("GlobL2DeltaRMatchingCut")),
156  globL3DeltaRMatchingCut(pset.getUntrackedParameter<double>("GlobL3DeltaRMatchingCut")),
157  deltaEtaBins(pset.getUntrackedParameter<vector<double> >("DeltaEtaBins")),
158  deltaPhiBins(pset.getUntrackedParameter<vector<double> >("DeltaPhiBins")),
159  muonPtBins(pset.getUntrackedParameter<vector<double> >("MuonPtBins")),
160  muonEtaBins(pset.getUntrackedParameter<vector<double> >("MuonEtaBins")),
161  muonPhiBins(pset.getUntrackedParameter<vector<double> >("MuonPhiBins")),
162  dimuonPtBins(pset.getUntrackedParameter<vector<double> >("DimuonPtBins")),
163  dimuonEtaBins(pset.getUntrackedParameter<vector<double> >("DimuonEtaBins")),
164  dimuonDRBins(pset.getUntrackedParameter<vector<double> >("DimuonDRBins")),
165  muonMass(0.106) {
166  triggerSummaryRAWTag = consumes<TriggerEventWithRefs>(
167  InputTag(pset.getUntrackedParameter<string>("TriggerSummaryRAW"), "", triggerProcessName));
169  consumes<TriggerEvent>(InputTag(pset.getUntrackedParameter<string>("TriggerSummaryAOD"), "", triggerProcessName));
170  triggerResultsTag = InputTag(pset.getUntrackedParameter<string>("TriggerResults"), "", triggerProcessName);
171  triggerResultsToken = consumes<TriggerResults>(triggerResultsTag);
172  recoMuonsTag = pset.getParameter<InputTag>("RecoMuons");
173  recoMuonsToken = consumes<MuonCollection>(recoMuonsTag);
174  genParticlesTag = pset.getParameter<InputTag>("GenParticles");
175  genParticlesToken = consumes<GenParticleCollection>(genParticlesTag);
176 }
177 
179  //discover HLT configuration
181  bool isChanged;
182  if (hltConfig.init(iRun, iSetup, triggerProcessName, isChanged)) {
183  LogDebug("HLTriggerOfflineHeavyFlavor")
184  << "Successfully initialized HLTConfigProvider with process name: " << triggerProcessName << endl;
185  } else {
186  LogWarning("HLTriggerOfflineHeavyFlavor")
187  << "Could not initialize HLTConfigProvider with process name: " << triggerProcessName << endl;
188  return;
189  }
190  vector<string> triggerNames = hltConfig.triggerNames();
191  for (const auto &trigName : triggerNames) {
192  // TString triggerName = trigName;
193  if (trigName.find(triggerPathName) != std::string::npos) {
194  vector<string> moduleNames = hltConfig.moduleLabels(trigName);
195  for (const auto &moduleName : moduleNames) {
196  const int level = getFilterLevel(moduleName, hltConfig);
197  if (level > 0) {
198  filterNamesLevels.push_back({moduleName, level});
199  }
200  }
201  break;
202  }
203  }
204 
205  if (filterNamesLevels.empty()) {
206  LogDebug("HLTriggerOfflineHeavyFlavor") << "Bad Trigger Path: " << triggerPathName << endl;
207  return;
208  } else {
210  str.reserve(
211  512); // avoid too many realloctions in the following loop (allows for filter names with roughly 100 chars each)
212  for (const auto &filters : filterNamesLevels)
213  str = str + " " + filters.first;
214  LogDebug("HLTriggerOfflineHeavyFlavor") << "Trigger Path: " << triggerPathName << " has filters:" << str;
215  }
216 }
217 
219  edm::Run const &iRun,
220  edm::EventSetup const &iSetup) {
221  ibooker.cd();
223 
224  // create Monitor Elements
225  // Eta Pt Single
226  myBook2D(ibooker, "genMuon_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
227  myBook2D(ibooker, "globMuon_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
228  myBook2D(ibooker, "globMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
229 
230  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
231  myBook2D(ibooker,
232  TString::Format("filt%dMuon_recoEtaPt", int(i + 1)),
233  muonEtaBins,
234  "#mu eta",
235  muonPtBins,
236  " #mu pT (GeV)",
238  }
239  myBook2D(ibooker, "pathMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)", triggerPathName);
240  myBook2D(ibooker, "resultMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
241  // Eta Pt Single Resolution
242  myBookProfile2D(ibooker, "resGlobGen_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
243  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
244  myBookProfile2D(ibooker,
245  TString::Format("resFilt%dGlob_recoEtaPt", int(i + 1)),
246  muonEtaBins,
247  "#mu eta",
248  muonPtBins,
249  " #mu pT (GeV)",
251  }
253  ibooker, "resPathGlob_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)", triggerPathName);
254  // Eta Pt Double
255  myBook2D(ibooker, "genDimuon_genEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
256  myBook2D(ibooker, "globDimuon_genEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
257  myBook2D(ibooker, "globDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
258  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
259  myBook2D(ibooker,
260  TString::Format("filt%dDimuon_recoEtaPt", int(i + 1)),
262  "#mu#mu eta",
263  dimuonPtBins,
264  " #mu#mu pT (GeV)",
266  }
267  myBook2D(
268  ibooker, "pathDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)", triggerPathName);
269  myBook2D(ibooker, "resultDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
270  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
271  myBook2D(ibooker,
272  TString::Format("diFilt%dDimuon_recoEtaPt", int(i + 1)),
274  "#mu#mu eta",
275  dimuonPtBins,
276  " #mu#mu pT (GeV)",
278  }
279  myBook2D(
280  ibooker, "diPathDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)", triggerPathName);
281  // Eta Phi Single
282  myBook2D(ibooker, "genMuon_genEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
283  myBook2D(ibooker, "globMuon_genEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
284  myBook2D(ibooker, "globMuon_recoEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
285  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
286  myBook2D(ibooker,
287  TString::Format("filt%dMuon_recoEtaPhi", int(i + 1)),
288  muonEtaBins,
289  "#mu eta",
290  muonPhiBins,
291  "#mu phi",
293  }
294  myBook2D(ibooker, "pathMuon_recoEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi", triggerPathName);
295  myBook2D(ibooker, "resultMuon_recoEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
296  // Rap Pt Double
297  myBook2D(ibooker, "genDimuon_genRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
298  myBook2D(ibooker, "globDimuon_genRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
299  myBook2D(ibooker, "globDimuon_recoRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
300  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
301  myBook2D(ibooker,
302  TString::Format("filt%dDimuon_recoRapPt", int(i + 1)),
304  "#mu#mu rapidity",
305  dimuonPtBins,
306  " #mu#mu pT (GeV)",
308  }
309  myBook2D(ibooker,
310  "pathDimuon_recoRapPt",
312  "#mu#mu rapidity",
313  dimuonPtBins,
314  " #mu#mu pT (GeV)",
316  myBook2D(ibooker, "resultDimuon_recoRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
317  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
318  myBook2D(ibooker,
319  TString::Format("diFilt%dDimuon_recoRapPt", int(i + 1)),
321  "#mu#mu rapidity",
322  dimuonPtBins,
323  " #mu#mu pT (GeV)",
325  }
326  myBook2D(ibooker,
327  "diPathDimuon_recoRapPt",
329  "#mu#mu rapidity",
330  dimuonPtBins,
331  " #mu#mu pT (GeV)",
333  // Pt DR Double
334  myBook2D(ibooker, "genDimuon_genPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
335  myBook2D(ibooker, "globDimuon_genPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
336  myBook2D(ibooker, "globDimuon_recoPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
337  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
338  myBook2D(ibooker,
339  TString::Format("filt%dDimuon_recoPtDR", int(i + 1)),
340  dimuonPtBins,
341  " #mu#mu pT (GeV)",
342  dimuonDRBins,
343  "#mu#mu #Delta R at IP",
345  }
346  myBook2D(ibooker,
347  "pathDimuon_recoPtDR",
348  dimuonPtBins,
349  " #mu#mu pT (GeV)",
350  dimuonDRBins,
351  "#mu#mu #Delta R at IP",
353  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
354  myBook2D(ibooker,
355  TString::Format("diFilt%dDimuon_recoPtDR", int(i + 1)),
356  dimuonPtBins,
357  " #mu#mu pT (GeV)",
358  dimuonDRBins,
359  "#mu#mu #Delta R at IP",
361  }
362  myBook2D(ibooker,
363  "diPathDimuon_recoPtDR",
364  dimuonPtBins,
365  " #mu#mu pT (GeV)",
366  dimuonDRBins,
367  "#mu#mu #Delta R at IP",
369  myBook2D(ibooker, "resultDimuon_recoPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
370  // Pt DRpos Double
371  myBook2D(ibooker, "globDimuon_recoPtDRpos", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS");
372  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
373  myBook2D(ibooker,
374  TString::Format("filt%dDimuon_recoPtDRpos", int(i + 1)),
375  dimuonPtBins,
376  " #mu#mu pT (GeV)",
377  dimuonDRBins,
378  "#mu#mu #Delta R in MS",
380  }
381  myBook2D(ibooker,
382  "pathDimuon_recoPtDRpos",
383  dimuonPtBins,
384  " #mu#mu pT (GeV)",
385  dimuonDRBins,
386  "#mu#mu #Delta R in MS",
388  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
389  myBook2D(ibooker,
390  TString::Format("diFilt%dDimuon_recoPtDRpos", int(i + 1)),
391  dimuonPtBins,
392  " #mu#mu pT (GeV)",
393  dimuonDRBins,
394  "#mu#mu #Delta R in MS",
396  }
397  myBook2D(ibooker,
398  "diPathDimuon_recoPtDRpos",
399  dimuonPtBins,
400  " #mu#mu pT (GeV)",
401  dimuonDRBins,
402  "#mu#mu #Delta R in MS",
404  myBook2D(
405  ibooker, "resultDimuon_recoPtDRpos", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS");
406 
407  // Matching
408  myBook2D(ibooker, "globGen_deltaEtaDeltaPhi", deltaEtaBins, "#Delta eta", deltaPhiBins, "#Delta phi");
409  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
410  myBook2D(ibooker,
411  TString::Format("filt%dGlob_deltaEtaDeltaPhi", int(i + 1)),
412  deltaEtaBins,
413  "#Delta eta",
414  deltaPhiBins,
415  "#Delta phi",
417  }
418  myBook2D(
419  ibooker, "pathGlob_deltaEtaDeltaPhi", deltaEtaBins, "#Delta eta", deltaPhiBins, "#Delta phi", triggerPathName);
420  // Size of containers
421  vector<double> sizeBins;
422  sizeBins.push_back(10);
423  sizeBins.push_back(0);
424  sizeBins.push_back(10);
425  myBook1D(ibooker, "genMuon_size", sizeBins, "container size");
426  myBook1D(ibooker, "globMuon_size", sizeBins, "container size");
427  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
428  myBook1D(
429  ibooker, TString::Format("filt%dMuon_size", int(i + 1)), sizeBins, "container size", filterNamesLevels[i].first);
430  }
431  myBook1D(ibooker, "pathMuon_size", sizeBins, "container size", triggerPathName);
432 }
433 
435  if (filterNamesLevels.empty()) {
436  return;
437  }
438  //access the containers and create LeafCandidate copies
439  vector<LeafCandidate> genMuons;
441  iEvent.getByToken(genParticlesToken, genParticles);
442  if (genParticles.isValid()) {
443  for (GenParticleCollection::const_iterator p = genParticles->begin(); p != genParticles->end(); ++p) {
444  if (p->status() == 1 && std::abs(p->pdgId()) == 13 &&
445  (find(motherIDs.begin(), motherIDs.end(), -1) != motherIDs.end() ||
446  find(motherIDs.begin(), motherIDs.end(), getMotherId(&(*p))) != motherIDs.end())) {
447  genMuons.push_back(*p);
448  }
449  }
450  } else {
451  LogDebug("HLTriggerOfflineHeavyFlavor") << "Could not access GenParticleCollection" << endl;
452  }
453  sort(genMuons.begin(), genMuons.end(), GreaterByPt<LeafCandidate>());
454  ME["genMuon_size"]->Fill(genMuons.size());
455  LogDebug("HLTriggerOfflineHeavyFlavor")
456  << "GenParticleCollection from " << genParticlesTag << " has size: " << genMuons.size() << endl;
457 
458  vector<LeafCandidate> globMuons;
459  vector<LeafCandidate> globMuons_position;
460  Handle<MuonCollection> recoMuonsHandle;
461  iEvent.getByToken(recoMuonsToken, recoMuonsHandle);
462  if (recoMuonsHandle.isValid()) {
463  for (MuonCollection::const_iterator p = recoMuonsHandle->begin(); p != recoMuonsHandle->end(); ++p) {
464  if (p->isGlobalMuon()) {
465  globMuons.push_back(*p);
466  globMuons_position.push_back(LeafCandidate(p->charge(),
467  math::XYZTLorentzVector(p->outerTrack()->innerPosition().x(),
468  p->outerTrack()->innerPosition().y(),
469  p->outerTrack()->innerPosition().z(),
470  0.)));
471  }
472  }
473  } else {
474  LogDebug("HLTriggerOfflineHeavyFlavor") << "Could not access reco Muons" << endl;
475  }
476  ME["globMuon_size"]->Fill(globMuons.size());
477  LogDebug("HLTriggerOfflineHeavyFlavor")
478  << "Global Muons from " << recoMuonsTag << " has size: " << globMuons.size() << endl;
479 
480  // access RAW trigger event
481  vector<vector<LeafCandidate> > muonsAtFilter;
482  vector<vector<LeafCandidate> > muonPositionsAtFilter;
483  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
484  muonsAtFilter.push_back(vector<LeafCandidate>());
485  muonPositionsAtFilter.push_back(vector<LeafCandidate>());
486  }
487  Handle<TriggerEventWithRefs> rawTriggerEvent;
488  iEvent.getByToken(triggerSummaryRAWTag, rawTriggerEvent);
489  if (rawTriggerEvent.isValid()) {
490  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
491  size_t index = rawTriggerEvent->filterIndex(InputTag(filterNamesLevels[i].first, "", triggerProcessName));
492  if (index < rawTriggerEvent->size()) {
493  if (filterNamesLevels[i].second == 1) {
494  vector<L1MuonParticleRef> l1Cands;
495  rawTriggerEvent->getObjects(index, TriggerL1Mu, l1Cands);
496  for (size_t j = 0; j < l1Cands.size(); j++) {
497  muonsAtFilter[i].push_back(*l1Cands[j]);
498  }
499  } else {
500  vector<RecoChargedCandidateRef> hltCands;
501  rawTriggerEvent->getObjects(index, TriggerMuon, hltCands);
502  for (size_t j = 0; j < hltCands.size(); j++) {
503  muonsAtFilter[i].push_back(*hltCands[j]);
504  if (filterNamesLevels[i].second == 2) {
505  muonPositionsAtFilter[i].push_back(
506  LeafCandidate(hltCands[j]->charge(),
507  math::XYZTLorentzVector(hltCands[j]->track()->innerPosition().x(),
508  hltCands[j]->track()->innerPosition().y(),
509  hltCands[j]->track()->innerPosition().z(),
510  0.)));
511  }
512  }
513  }
514  }
515  ME[TString::Format("filt%dMuon_size", int(i + 1))]->Fill(muonsAtFilter[i].size());
516  LogDebug("HLTriggerOfflineHeavyFlavor")
517  << "Filter \"" << filterNamesLevels[i].first << "\" has " << muonsAtFilter[i].size() << " muons" << endl;
518  }
519  } else {
520  LogDebug("HLTriggerOfflineHeavyFlavor") << "Could not access RAWTriggerEvent" << endl;
521  }
522 
523  // access AOD trigger event
524  vector<LeafCandidate> pathMuons;
525  Handle<TriggerEvent> aodTriggerEvent;
526  iEvent.getByToken(triggerSummaryAODTag, aodTriggerEvent);
527  if (aodTriggerEvent.isValid()) {
528  TriggerObjectCollection allObjects = aodTriggerEvent->getObjects();
529  for (int i = 0; i < aodTriggerEvent->sizeFilters(); i++) {
530  if (aodTriggerEvent->filterTag(i) == InputTag((filterNamesLevels.end() - 1)->first, "", triggerProcessName)) {
531  Keys keys = aodTriggerEvent->filterKeys(i);
532  for (size_t j = 0; j < keys.size(); j++) {
533  pathMuons.push_back(LeafCandidate(
534  allObjects[keys[j]].id() > 0 ? 1 : -1,
536  allObjects[keys[j]].pt(), allObjects[keys[j]].eta(), allObjects[keys[j]].phi(), muonMass)));
537  }
538  }
539  }
540  ME["pathMuon_size"]->Fill(pathMuons.size());
541  LogDebug("HLTriggerOfflineHeavyFlavor")
542  << "Path \"" << triggerPathName << "\" has " << pathMuons.size() << " muons at last filter \""
543  << (filterNamesLevels.end() - 1)->first << "\"" << endl;
544  } else {
545  LogDebug("HLTriggerOfflineHeavyFlavor") << "Could not access AODTriggerEvent" << endl;
546  }
547 
548  // access Trigger Results
549  bool triggerFired = false;
551  iEvent.getByToken(triggerResultsToken, triggerResults);
552  if (triggerResults.isValid()) {
553  LogDebug("HLTriggerOfflineHeavyFlavor") << "Successfully initialized " << triggerResultsTag << endl;
554  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*triggerResults);
555  bool hlt_exists = false;
556  for (unsigned int i = 0; i != triggerNames.size(); i++) {
557  TString hlt_name = triggerNames.triggerName(i);
558  if (hlt_name.Contains(triggerPathName)) {
559  triggerFired = triggerResults->accept(i);
560  hlt_exists = true;
561  break;
562  }
563  }
564  if (!hlt_exists) {
565  LogDebug("HLTriggerOfflineHeavyFlavor") << triggerResultsTag << " has no trigger: " << triggerPathName << endl;
566  }
567  } else {
568  LogDebug("HLTriggerOfflineHeavyFlavor") << "Could not initialize " << triggerResultsTag << endl;
569  }
570 
571  //create matching maps
572  vector<int> glob_gen(genMuons.size(), -1);
573  match(ME["globGen_deltaEtaDeltaPhi"], genMuons, globMuons, genGlobDeltaRMatchingCut, glob_gen);
574  vector<vector<int> > filt_glob;
575  for (size_t i = 0; i < filterNamesLevels.size(); i++) {
576  filt_glob.push_back(vector<int>(globMuons.size(), -1));
577  if (filterNamesLevels[i].second == 1) {
578  match(ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi", int(i + 1))],
579  globMuons_position,
580  muonsAtFilter[i],
582  filt_glob[i]);
583  } else if (filterNamesLevels[i].second == 2) {
584  match(ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi", int(i + 1))],
585  globMuons_position,
586  muonPositionsAtFilter[i],
588  filt_glob[i]);
589  } else if (filterNamesLevels[i].second > 2) {
590  match(ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi", int(i + 1))],
591  globMuons,
592  muonsAtFilter[i],
594  filt_glob[i]);
595  }
596  }
597  vector<int> path_glob(globMuons.size(), -1);
598  if ((filterNamesLevels.end() - 1)->second == 1) {
599  match(ME["pathGlob_deltaEtaDeltaPhi"], globMuons_position, pathMuons, globL1DeltaRMatchingCut, path_glob);
600  } else if ((filterNamesLevels.end() - 1)->second == 2) {
601  match(ME["pathGlob_deltaEtaDeltaPhi"], globMuons, pathMuons, globL2DeltaRMatchingCut, path_glob);
602  } else if ((filterNamesLevels.end() - 1)->second > 2) {
603  match(ME["pathGlob_deltaEtaDeltaPhi"], globMuons, pathMuons, globL3DeltaRMatchingCut, path_glob);
604  }
605 
606  //fill histos
607  bool first = true;
608  for (size_t i = 0; i < genMuons.size(); i++) {
609  ME["genMuon_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt());
610  ME["genMuon_genEtaPhi"]->Fill(genMuons[i].eta(), genMuons[i].phi());
611  if (glob_gen[i] != -1) {
612  ME["resGlobGen_genEtaPt"]->Fill(
613  genMuons[i].eta(), genMuons[i].pt(), (globMuons[glob_gen[i]].pt() - genMuons[i].pt()) / genMuons[i].pt());
614  ME["globMuon_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt());
615  ME["globMuon_genEtaPhi"]->Fill(genMuons[i].eta(), genMuons[i].phi());
616  ME["globMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
617  ME["globMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
618  for (size_t f = 0; f < filterNamesLevels.size(); f++) {
619  if (filt_glob[f][glob_gen[i]] != -1) {
620  ME[TString::Format("resFilt%dGlob_recoEtaPt", int(f + 1))]->Fill(
621  globMuons[glob_gen[i]].eta(),
622  globMuons[glob_gen[i]].pt(),
623  (muonsAtFilter[f][filt_glob[f][glob_gen[i]]].pt() - globMuons[glob_gen[i]].pt()) /
624  globMuons[glob_gen[i]].pt());
625  ME[TString::Format("filt%dMuon_recoEtaPt", int(f + 1))]->Fill(globMuons[glob_gen[i]].eta(),
626  globMuons[glob_gen[i]].pt());
627  ME[TString::Format("filt%dMuon_recoEtaPhi", int(f + 1))]->Fill(globMuons[glob_gen[i]].eta(),
628  globMuons[glob_gen[i]].phi());
629  } else {
630  break;
631  }
632  }
633  if (path_glob[glob_gen[i]] != -1) {
634  ME["resPathGlob_recoEtaPt"]->Fill(
635  globMuons[glob_gen[i]].eta(),
636  globMuons[glob_gen[i]].pt(),
637  (pathMuons[path_glob[glob_gen[i]]].pt() - globMuons[glob_gen[i]].pt()) / globMuons[glob_gen[i]].pt());
638  ME["pathMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
639  ME["pathMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
640  }
641  //highest pt muon
642  if (first) {
643  first = false;
644  if (triggerFired) {
645  ME["resultMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
646  ME["resultMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
647  }
648  }
649  }
650  }
651 
652  //fill dimuon histograms (highest pT, opposite charge)
653  int secondMuon = 0;
654  for (size_t j = 1; j < genMuons.size(); j++) {
655  if (genMuons[0].charge() * genMuons[j].charge() == -1) {
656  secondMuon = j;
657  break;
658  }
659  }
660  if (secondMuon > 0) {
661  //two generated
662  double genDimuonPt = (genMuons[0].p4() + genMuons[secondMuon].p4()).pt();
663  double genDimuonEta = (genMuons[0].p4() + genMuons[secondMuon].p4()).eta();
664  double genDimuonRap = (genMuons[0].p4() + genMuons[secondMuon].p4()).Rapidity();
665  double genDimuonDR = deltaR<LeafCandidate, LeafCandidate>(genMuons[0], genMuons[secondMuon]);
666  bool highPt = genMuons[0].pt() > 7. && genMuons[secondMuon].pt() > 7;
667  ME["genDimuon_genEtaPt"]->Fill(genDimuonEta, genDimuonPt);
668  ME["genDimuon_genRapPt"]->Fill(genDimuonRap, genDimuonPt);
669  if (highPt)
670  ME["genDimuon_genPtDR"]->Fill(genDimuonPt, genDimuonDR);
671  //two global
672  if (glob_gen[0] != -1 && glob_gen[secondMuon] != -1) {
673  ME["globDimuon_genEtaPt"]->Fill(genDimuonEta, genDimuonPt);
674  ME["globDimuon_genRapPt"]->Fill(genDimuonRap, genDimuonPt);
675  if (highPt)
676  ME["globDimuon_genPtDR"]->Fill(genDimuonPt, genDimuonDR);
677  double globDimuonPt = (globMuons[glob_gen[0]].p4() + globMuons[glob_gen[secondMuon]].p4()).pt();
678  double globDimuonEta = (globMuons[glob_gen[0]].p4() + globMuons[glob_gen[secondMuon]].p4()).eta();
679  double globDimuonRap = (globMuons[glob_gen[0]].p4() + globMuons[glob_gen[secondMuon]].p4()).Rapidity();
680  double globDimuonDR =
681  deltaR<LeafCandidate, LeafCandidate>(globMuons[glob_gen[0]], globMuons[glob_gen[secondMuon]]);
682  double globDimuonDRpos = deltaR<LeafCandidate, LeafCandidate>(globMuons_position[glob_gen[0]],
683  globMuons_position[glob_gen[secondMuon]]);
684  ME["globDimuon_recoEtaPt"]->Fill(globDimuonEta, globDimuonPt);
685  ME["globDimuon_recoRapPt"]->Fill(globDimuonRap, globDimuonPt);
686  if (highPt)
687  ME["globDimuon_recoPtDR"]->Fill(globDimuonPt, globDimuonDR);
688  if (highPt)
689  ME["globDimuon_recoPtDRpos"]->Fill(globDimuonPt, globDimuonDRpos);
690  //two filter objects
691  for (size_t f = 0; f < filterNamesLevels.size(); f++) {
692  if (filt_glob[f][glob_gen[0]] != -1 && filt_glob[f][glob_gen[secondMuon]] != -1) {
693  ME[TString::Format("diFilt%dDimuon_recoEtaPt", int(f + 1))]->Fill(globDimuonEta, globDimuonPt);
694  ME[TString::Format("diFilt%dDimuon_recoRapPt", int(f + 1))]->Fill(globDimuonRap, globDimuonPt);
695  if (highPt)
696  ME[TString::Format("diFilt%dDimuon_recoPtDR", int(f + 1))]->Fill(globDimuonPt, globDimuonDR);
697  if (highPt)
698  ME[TString::Format("diFilt%dDimuon_recoPtDRpos", int(f + 1))]->Fill(globDimuonPt, globDimuonDRpos);
699  } else {
700  break;
701  }
702  }
703  //one filter object
704  for (size_t f = 0; f < filterNamesLevels.size(); f++) {
705  if (filt_glob[f][glob_gen[0]] != -1 || filt_glob[f][glob_gen[secondMuon]] != -1) {
706  ME[TString::Format("filt%dDimuon_recoEtaPt", int(f + 1))]->Fill(globDimuonEta, globDimuonPt);
707  ME[TString::Format("filt%dDimuon_recoRapPt", int(f + 1))]->Fill(globDimuonRap, globDimuonPt);
708  if (highPt)
709  ME[TString::Format("filt%dDimuon_recoPtDR", int(f + 1))]->Fill(globDimuonPt, globDimuonDR);
710  if (highPt)
711  ME[TString::Format("filt%dDimuon_recoPtDRpos", int(f + 1))]->Fill(globDimuonPt, globDimuonDRpos);
712  } else {
713  break;
714  }
715  }
716  //two path objects
717  if (path_glob[glob_gen[0]] != -1 && path_glob[glob_gen[secondMuon]] != -1) {
718  ME["diPathDimuon_recoEtaPt"]->Fill(globDimuonEta, globDimuonPt);
719  ME["diPathDimuon_recoRapPt"]->Fill(globDimuonRap, globDimuonPt);
720  if (highPt)
721  ME["diPathDimuon_recoPtDR"]->Fill(globDimuonPt, globDimuonDR);
722  if (highPt)
723  ME["diPathDimuon_recoPtDRpos"]->Fill(globDimuonPt, globDimuonDRpos);
724  }
725  //one path object
726  if (path_glob[glob_gen[0]] != -1 || path_glob[glob_gen[secondMuon]] != -1) {
727  ME["pathDimuon_recoEtaPt"]->Fill(globDimuonEta, globDimuonPt);
728  ME["pathDimuon_recoRapPt"]->Fill(globDimuonRap, globDimuonPt);
729  if (highPt)
730  ME["pathDimuon_recoPtDR"]->Fill(globDimuonPt, globDimuonDR);
731  if (highPt)
732  ME["pathDimuon_recoPtDRpos"]->Fill(globDimuonPt, globDimuonDRpos);
733  }
734  //trigger result
735  if (triggerFired) {
736  ME["resultDimuon_recoEtaPt"]->Fill(globDimuonEta, globDimuonPt);
737  ME["resultDimuon_recoRapPt"]->Fill(globDimuonRap, globDimuonPt);
738  if (highPt)
739  ME["resultDimuon_recoPtDR"]->Fill(globDimuonPt, globDimuonDR);
740  if (highPt)
741  ME["resultDimuon_recoPtDRpos"]->Fill(globDimuonPt, globDimuonDRpos);
742  }
743  }
744  }
745 }
746 
748  const Candidate *mother = p->mother();
749  if (mother) {
750  if (mother->pdgId() == p->pdgId()) {
751  return getMotherId(mother);
752  } else {
753  return mother->pdgId();
754  }
755  } else {
756  return 0;
757  }
758 }
759 
761  vector<LeafCandidate> &from,
762  vector<LeafCandidate> &to,
763  double dRMatchingCut,
764  vector<int> &map) {
765  vector<double> dR(from.size());
766  for (size_t i = 0; i < from.size(); i++) {
767  map[i] = -1;
768  dR[i] = 10.;
769  //find closest
770  for (size_t j = 0; j < to.size(); j++) {
771  double dRtmp = deltaR<double>(from[i].eta(), from[i].phi(), to[j].eta(), to[j].phi());
772  if (dRtmp < dR[i]) {
773  dR[i] = dRtmp;
774  map[i] = j;
775  }
776  }
777  //fill matching histo
778  if (map[i] != -1) {
779  me->Fill(to[map[i]].eta() - from[i].eta(), deltaPhi<double>(to[map[i]].phi(), from[i].phi()));
780  }
781  //apply matching cut
782  if (dR[i] > dRMatchingCut) {
783  map[i] = -1;
784  }
785  //remove duplication
786  if (map[i] != -1) {
787  for (size_t k = 0; k < i; k++) {
788  if (map[k] != -1 && map[i] == map[k]) {
789  if (dR[i] < dR[k]) {
790  map[k] = -1;
791  } else {
792  map[i] = -1;
793  }
794  break;
795  }
796  }
797  }
798  }
799 }
800 
802  TString name,
803  vector<double> &ptBins,
804  TString ptLabel,
805  vector<double> &etaBins,
806  TString etaLabel,
807  TString title) {
808  // dqmStore->setCurrentFolder(dqmFolder+"/"+folder);
809  int ptN = ptBins.size() == 3 ? (int)ptBins[0] + 1 : ptBins.size();
810  Double_t *pt = new Double_t[ptN];
811  for (int i = 0; i < ptN; i++) {
812  pt[i] = ptBins.size() == 3 ? ptBins[1] + i * (ptBins[2] - ptBins[1]) / ptBins[0] : ptBins[i];
813  }
814  int etaN = etaBins.size() == 3 ? (int)etaBins[0] + 1 : etaBins.size();
815  Double_t *eta = new Double_t[etaN];
816  for (int i = 0; i < etaN; i++) {
817  eta[i] = etaBins.size() == 3 ? etaBins[1] + i * (etaBins[2] - etaBins[1]) / etaBins[0] : etaBins[i];
818  }
819  TH2F *h = new TH2F(name, name, ptN - 1, pt, etaN - 1, eta);
820  h->SetXTitle(ptLabel);
821  h->SetYTitle(etaLabel);
822  h->SetTitle(title);
823  ME[name] = ibooker.book2D(name.Data(), h);
824  delete h;
825 }
826 
828  TString name,
829  vector<double> &ptBins,
830  TString ptLabel,
831  vector<double> &etaBins,
832  TString etaLabel,
833  TString title) {
834  // dqmStore->setCurrentFolder(dqmFolder+"/"+folder);
835  int ptN = ptBins.size() == 3 ? (int)ptBins[0] + 1 : ptBins.size();
836  Double_t *pt = new Double_t[ptN];
837  for (int i = 0; i < ptN; i++) {
838  pt[i] = ptBins.size() == 3 ? ptBins[1] + i * (ptBins[2] - ptBins[1]) / ptBins[0] : ptBins[i];
839  }
840  int etaN = etaBins.size() == 3 ? (int)etaBins[0] + 1 : etaBins.size();
841  Double_t *eta = new Double_t[etaN];
842  for (int i = 0; i < etaN; i++) {
843  eta[i] = etaBins.size() == 3 ? etaBins[1] + i * (etaBins[2] - etaBins[1]) / etaBins[0] : etaBins[i];
844  }
845  TProfile2D *h = new TProfile2D(name, name, ptN - 1, pt, etaN - 1, eta);
846  h->SetXTitle(ptLabel);
847  h->SetYTitle(etaLabel);
848  h->SetTitle(title);
849  ME[name] = ibooker.bookProfile2D(name.Data(), h);
850  delete h;
851 }
852 
854  DQMStore::IBooker &ibooker, TString name, vector<double> &bins, TString label, TString title) {
855  // dqmStore->setCurrentFolder(dqmFolder+"/"+folder);
856  int binsN = bins.size() == 3 ? (int)bins[0] + 1 : bins.size();
857  Double_t *myBins = new Double_t[binsN];
858  for (int i = 0; i < binsN; i++) {
859  myBins[i] = bins.size() == 3 ? bins[1] + i * (bins[2] - bins[1]) / bins[0] : bins[i];
860  }
861  TH1F *h = new TH1F(name, name, binsN - 1, myBins);
862  h->SetXTitle(label);
863  h->SetTitle(title);
864  ME[name] = ibooker.book1D(name.Data(), h);
865  delete h;
866 }
867 
869  // helper lambda to check if a string contains a substring
870  const auto contains = [](const std::string &s, const std::string &sub) -> bool {
871  return s.find(sub) != std::string::npos;
872  };
873 
874  // helper lambda to check if a string contains any of a list of substrings
875  const auto containsAny = [](const std::string &s, const std::vector<std::string> &subs) -> bool {
876  for (const auto &sub : subs) {
877  if (s.find(sub) != std::string::npos)
878  return true;
879  }
880  return false;
881  };
882 
883  // helper lambda to check if string s is any of the strings in vector ms
884  const auto isAnyOf = [](const std::string &s, const std::vector<std::string> &ms) -> bool {
885  for (const auto &m : ms) {
886  if (s == m)
887  return true;
888  }
889  return false;
890  };
891 
892  // tmadlener, 20.08.2017:
893  // define the valid module names for the different "levels", to add a little bit more stability
894  // to the checking compared to just doing some name matching.
895  // Note, that the name matching is not completely remved, since at level 4 and 5 some of the
896  // valid modules are the same, so that the name matching is still needed.
897  // With the current definition this yields the exact same levels as before, but weeds out some
898  // of the "false" positives at level 3 (naming matches also to some HLTMuonL1TFilter modules due to
899  // the 'forIterL3' in the name)
900  const std::string l1Filter = "HLTMuonL1TFilter";
901  const std::string l2Filter = "HLTMuonL2FromL1TPreFilter";
902  const std::vector<std::string> l3Filters = {"HLTMuonDimuonL3Filter", "HLTMuonL3PreFilter"};
903  const std::vector<std::string> l4Filters = {
904  "HLTDisplacedmumuFilter", "HLTDiMuonGlbTrkFilter", "HLTMuonTrackMassFilter"};
905  const std::vector<std::string> l5Filters = {"HLTmumutkFilter", "HLT2MuonMuonDZ", "HLTDisplacedmumuFilter"};
906 
907  if (contains(moduleName, "Filter") && hltConfig.moduleEDMType(moduleName) == "EDFilter") {
908  if (contains(moduleName, "L1") && !contains(moduleName, "ForIterL3") &&
909  hltConfig.moduleType(moduleName) == l1Filter) {
910  return 1;
911  }
912  if (contains(moduleName, "L2") && hltConfig.moduleType(moduleName) == l2Filter) {
913  return 2;
914  }
915  if (contains(moduleName, "L3") && isAnyOf(hltConfig.moduleType(moduleName), l3Filters)) {
916  return 3;
917  }
918  if (containsAny(moduleName, {"DisplacedmumuFilter", "DiMuon", "MuonL3Filtered", "TrackMassFiltered"}) &&
919  isAnyOf(hltConfig.moduleType(moduleName), l4Filters)) {
920  return 4;
921  }
922  if (containsAny(moduleName, {"Vertex", "Dz"}) && isAnyOf(hltConfig.moduleType(moduleName), l5Filters)) {
923  return 5;
924  }
925  }
926 
927  return -1;
928 }
929 
931 
932 //define this as a plug-in
std::size_t size() const
Definition: TriggerNames.cc:59
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:476
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
void myBook2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel, TString title)
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
enum start value shifted to 81 so as to avoid clashes with PDG codes
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
int getFilterLevel(const std::string &moduleName, const HLTConfigProvider &hltConfig)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
EDGetTokenT< TriggerEvent > triggerSummaryAODTag
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:275
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void Fill(long long x)
U second(std::pair< T, U > const &p)
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Definition: ME.h:11
void myBookProfile2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel, TString title)
tuple l1Filter
Definition: l1Filter_cfi.py:3
char const * label
int getMotherId(const Candidate *p)
int iEvent
Definition: GenABIO.cc:224
void match(MonitorElement *me, vector< LeafCandidate > &from, vector< LeafCandidate > &to, double deltaRMatchingCut, vector< int > &map)
EDGetTokenT< TriggerEventWithRefs > triggerSummaryRAWTag
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void myBook1D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString label, TString title)
static std::string const triggerResults
Definition: EdmProvDump.cc:44
bool isValid() const
Definition: HandleBase.h:70
HeavyFlavorValidation(const edm::ParameterSet &)
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
virtual int pdgId() const =0
PDG identifier.
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
void myBook2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel)
EDGetTokenT< MuonCollection > recoMuonsToken
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:50
std::vector< size_type > Keys
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
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:212
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EDGetTokenT< GenParticleCollection > genParticlesToken
void myBookProfile2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
tuple level
Definition: testEve_cfg.py:47
void myBook1D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString label)
EDGetTokenT< TriggerResults > triggerResultsToken
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
map< TString, MonitorElement * > ME
vector< pair< string, int > > filterNamesLevels
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define str(s)
tuple size
Write out results.
Definition: Run.h:45
#define LogDebug(id)