CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTMuonMatchAndPlot.cc
Go to the documentation of this file.
1 
7 
22 
23 #include <iostream>
24 
27 
28 using namespace std;
29 using namespace edm;
30 using namespace reco;
31 using namespace trigger;
32 using namespace l1extra;
33 
34 typedef std::vector<std::string> vstring;
35 
36 
39 
42  string hltPath,
43  const vector<string>& moduleLabels) :
44  hltProcessName_(pset.getParameter<string>("hltProcessName")),
45  destination_(pset.getUntrackedParameter<string>("destination")),
46  requiredTriggers_(pset.getUntrackedParameter<vstring>("requiredTriggers")),
47  targetParams_(pset.getParameterSet("targetParams")),
48  probeParams_(pset.getParameterSet("probeParams")),
49  hltPath_(hltPath),
50  moduleLabels_(moduleLabels),
51  hasTargetRecoCuts(targetParams_.exists("recoCuts")),
52  hasProbeRecoCuts(probeParams_.exists("recoCuts")),
53  targetMuonSelector_(targetParams_.getUntrackedParameter<string>("recoCuts", "")),
54  targetZ0Cut_(targetParams_.getUntrackedParameter<double>("z0Cut",0.)),
55  targetD0Cut_(targetParams_.getUntrackedParameter<double>("d0Cut",0.)),
56  probeMuonSelector_(probeParams_.getUntrackedParameter<string>("recoCuts", "")),
57  probeZ0Cut_(probeParams_.getUntrackedParameter<double>("z0Cut",0.)),
58  probeD0Cut_(probeParams_.getUntrackedParameter<double>("d0Cut",0.))
59 {
60 
61  // Create std::map<string, T> from ParameterSets.
62  fillMapFromPSet(inputTags_, pset, "inputTags");
63  fillMapFromPSet(binParams_, pset, "binParams");
64  fillMapFromPSet(plotCuts_, pset, "plotCuts");
65 
66  // Set HLT process name for TriggerResults and TriggerSummary.
67  InputTag & resTag = inputTags_["triggerResults"];
68  resTag = InputTag(resTag.label(), resTag.instance(), hltProcessName_);
69  InputTag & sumTag = inputTags_["triggerSummary"];
70  sumTag = InputTag(sumTag.label(), sumTag.instance(), hltProcessName_);
71 
72  // Prepare the DQMStore object.
74  dbe_->setVerbose(0);
75 
76  // Get the trigger level.
77  triggerLevel_ = "L3";
78  TPRegexp levelRegexp("L[1-3]");
79  size_t nModules = moduleLabels_.size();
80  TObjArray * levelArray = levelRegexp.MatchS(moduleLabels_[nModules - 1]);
81  if (levelArray->GetEntriesFast() > 0) {
82  triggerLevel_ = ((TObjString *)levelArray->At(0))->GetString();
83  }
84  delete levelArray;
85 
86  // Get the pT cut by parsing the name of the HLT path.
87  cutMinPt_ = 3;
88  TPRegexp ptRegexp("Mu([0-9]*)");
89  TObjArray * objArray = ptRegexp.MatchS(hltPath_);
90  if (objArray->GetEntriesFast() >= 2) {
91  TObjString * ptCutString = (TObjString *)objArray->At(1);
92  cutMinPt_ = atoi(ptCutString->GetString());
93  cutMinPt_ = ceil(cutMinPt_ * plotCuts_["minPtFactor"]);
94  }
95  delete objArray;
96 }
97 
99  const edm::EventSetup& iSetup)
100 {
101 
102  TPRegexp suffixPtCut("Mu[0-9]+$");
103 
104  string baseDir = destination_;
105  if (baseDir[baseDir.size() - 1] != '/') baseDir += '/';
106  string pathSansSuffix = hltPath_;
107  if (hltPath_.rfind("_v") < hltPath_.length())
108  pathSansSuffix = hltPath_.substr(0, hltPath_.rfind("_v"));
109  dbe_->setCurrentFolder(baseDir + pathSansSuffix);
110 
111  // Form is book1D(name, binningType, title) where 'binningType' is used
112  // to fetch the bin settings from binParams_.
113  book1D("deltaR", "deltaR", ";#Deltar(reco, HLT);");
114  book1D("hltPt", "pt", ";p_{T} of HLT object");
115  book1D("hltEta", "eta", ";#eta of HLT object");
116  book1D("hltPhi", "phi", ";#phi of HLT object");
117  book1D("resolutionEta", "resolutionEta", ";#eta^{reco}-#eta^{HLT};");
118  book1D("resolutionPhi", "resolutionPhi", ";#phi^{reco}-#phi^{HLT};");
119  book1D("resolutionPt", "resolutionRel",
120  ";(p_{T}^{reco}-p_{T}^{HLT})/|p_{T}^{reco}|;");
121 
122  for (size_t i = 0; i < 2; i++) {
123 
124  string suffix = EFFICIENCY_SUFFIXES[i];
125 
126  book1D("efficiencyEta_" + suffix, "eta", ";#eta;");
127  book1D("efficiencyPhi_" + suffix, "phi", ";#phi;");
128  book1D("efficiencyTurnOn_" + suffix, "pt", ";p_{T};");
129  book1D("efficiencyD0_" + suffix, "d0", ";d0;");
130  book1D("efficiencyZ0_" + suffix, "z0", ";z0;");
131  book1D("efficiencyCharge_" + suffix, "charge", ";charge;");
132  book1D("efficiencyVertex_" + suffix, "NVertex", ";NVertex;");
133 
134  book2D("efficiencyPhiVsEta_" + suffix, "etaCoarse", "phiCoarse",
135  ";#eta;#phi");
136 
137  book1D("fakerateEta_" + suffix, "eta", ";#eta;");
138  book1D("fakerateVertex_" + suffix, "NVertex", ";NVertex;");
139  book1D("fakeratePhi_" + suffix, "phi", ";#phi;");
140  book1D("fakerateTurnOn_" + suffix, "pt", ";p_{T};");
141 
142  book1D("massVsEtaZ_" + suffix, "etaCoarse", ";#eta");
143  book1D("massVsEtaJpsi_" + suffix, "etaCoarse", ";#eta");
144  book1D("massVsPtZ_" + suffix, "ptCoarse", ";p_{T}");
145  book1D("massVsPtJpsi_" + suffix, "ptCoarse", ";p_{T}");
146  book1D("massVsVertexZ_" + suffix, "NVertex", ";NVertex");
147  book1D("massVsVertexJpsi_" + suffix, "NVertex", ";NVertex");
148 
149  }
150 
151 }
152 
153 
154 
156  const edm::EventSetup& iSetup)
157 {
158 }
159 
160 
161 
163  const edm::EventSetup& iSetup)
164 
165 {
166 
167  // Get objects from the event.
169  iEvent.getByLabel(inputTags_["recoMuon"], allMuons);
170 
172  iEvent.getByLabel(inputTags_["beamSpot"], beamSpot);
173 
174  Handle<TriggerEvent> triggerSummary;
175  iEvent.getByLabel(inputTags_["triggerSummary"], triggerSummary);
177 
179  iEvent.getByLabel("offlinePrimaryVertices", vertices);
180 
181  //edm::Handle<GenParticleCollection> gen;
182  //iEvent.getByLabel("genParticles", gen);
183  //GenParticleCollection::const_iterator g_part;
184  //std::vector<const GenParticle *> gen_leptsp;
185  //std::vector<const GenParticle *> gen_momsp;
186 
187 
188  if(!triggerSummary.isValid())
189  {
190  edm::LogError("HLTMuonMatchAndPlot")<<"Missing triggerSummary with label " << inputTags_["triggerSummary"] <<std::endl;
191  return;
192  }
193  iEvent.getByLabel(inputTags_["triggerResults"], triggerResults);
194  if(!triggerResults.isValid())
195  {
196  edm::LogError("HLTMuonMatchAndPlot")<<"Missing triggerResults with label " << inputTags_["triggerResults"] <<std::endl;
197  return;
198  }
199 
200  /*
201  if(gen != 0) {
202  for(g_part = gen->begin(); g_part != gen->end(); g_part++){
203  if( abs(g_part->pdgId()) == 13) {
204  if(!( g_part->status() ==1 || (g_part->status() ==2 && abs(g_part->pdgId())==5))) continue;
205  bool GenMomExists (true);
206  bool GenGrMomExists(true);
207  if( g_part->pt() < 10.0 ) continue;
208  if( fabs(g_part->eta()) > 2.4 ) continue;
209  int gen_id= g_part->pdgId();
210  const GenParticle* gen_lept = &(*g_part);
211  // get mother of gen_lept
212  const GenParticle* gen_mom = static_cast<const GenParticle*> (gen_lept->mother());
213  if(gen_mom==NULL) GenMomExists=false;
214  int m_id=-999;
215  if(GenMomExists) m_id = gen_mom->pdgId();
216  if(m_id != gen_id || !GenMomExists);
217  else{
218  int id= m_id;
219  while(id == gen_id && GenMomExists){
220  gen_mom = static_cast<const GenParticle*> (gen_mom->mother());
221  if(gen_mom==NULL){
222  GenMomExists=false;
223  }
224  if(GenMomExists) id=gen_mom->pdgId();
225  }
226  }
227  if(GenMomExists) m_id = gen_mom->pdgId();
228  gen_leptsp.push_back(gen_lept);
229  gen_momsp.push_back(gen_mom);
230  }
231  }
232  }
233 
234 
235  std::vector<GenParticle> gen_lepts;
236  for(size_t i = 0; i < gen_leptsp.size(); i++) {
237  gen_lepts.push_back(*gen_leptsp[i]);
238  }
239 
240 
241  */
242 
243 
244 
245  // Throw out this event if it doesn't pass the required triggers.
246  for (size_t i = 0; i < requiredTriggers_.size(); i++) {
247  unsigned int triggerIndex = triggerResults->find(requiredTriggers_[i]);
248  if (triggerIndex < triggerResults->size() ||
249  !triggerResults->accept(triggerIndex))
250  return;
251  }
252 
253  // Select objects based on the configuration.
256  TriggerObjectCollection allTriggerObjects = triggerSummary->getObjects();
258  selectedTriggerObjects(allTriggerObjects, * triggerSummary, targetParams_);
259 
260  // Fill plots for HLT muons.
261  for (size_t i = 0; i < hltMuons.size(); i++) {
262  hists_["hltPt"]->Fill(hltMuons[i].pt());
263  hists_["hltEta"]->Fill(hltMuons[i].eta());
264  hists_["hltPhi"]->Fill(hltMuons[i].phi());
265  }
266 
267  // Find the best trigger object matches for the targetMuons.
268  vector<size_t> matches = matchByDeltaR(targetMuons, hltMuons,
269  plotCuts_[triggerLevel_ + "DeltaR"]);
270 
271 
272  // Fill plots for matched muons.
273  bool pairalreadyconsidered = false;
274  for (size_t i = 0; i < targetMuons.size(); i++) {
275 
276  Muon & muon = targetMuons[i];
277 
278  // Fill plots which are not efficiencies.
279  if (matches[i] < targetMuons.size()) {
280  TriggerObject & hltMuon = hltMuons[matches[i]];
281  double ptRes = (muon.pt() - hltMuon.pt()) / muon.pt();
282  double etaRes = muon.eta() - hltMuon.eta();
283  double phiRes = muon.phi() - hltMuon.phi();
284  hists_["resolutionEta"]->Fill(etaRes);
285  hists_["resolutionPhi"]->Fill(phiRes);
286  hists_["resolutionPt"]->Fill(ptRes);
287  hists_["deltaR"]->Fill(deltaR(muon, hltMuon));
288  }
289 
290  // Fill numerators and denominators for efficiency plots.
291  for (size_t j = 0; j < 2; j++) {
292 
293  string suffix = EFFICIENCY_SUFFIXES[j];
294 
295  // If no match was found, then the numerator plots don't get filled.
296  if (suffix == "numer" && matches[i] >= targetMuons.size()) continue;
297 
298  if (muon.pt() > cutMinPt_) {
299  hists_["efficiencyEta_" + suffix]->Fill(muon.eta());
300  hists_["efficiencyPhiVsEta_" + suffix]->Fill(muon.eta(), muon.phi());
301  }
302 
303  if (fabs(muon.eta()) < plotCuts_["maxEta"]) {
304  hists_["efficiencyTurnOn_" + suffix]->Fill(muon.pt());
305  }
306 
307  if (muon.pt() > cutMinPt_ && fabs(muon.eta()) < plotCuts_["maxEta"]) {
308  const Track * track = 0;
309  if (muon.isTrackerMuon()) track = & * muon.innerTrack();
310  else if (muon.isStandAloneMuon()) track = & * muon.outerTrack();
311  if (track) {
312  double d0 = track->dxy(beamSpot->position());
313  double z0 = track->dz(beamSpot->position());
314  hists_["efficiencyVertex_" + suffix]->Fill(vertices->size());
315  hists_["efficiencyPhi_" + suffix]->Fill(muon.phi());
316  hists_["efficiencyD0_" + suffix]->Fill(d0);
317  hists_["efficiencyZ0_" + suffix]->Fill(z0);
318  hists_["efficiencyCharge_" + suffix]->Fill(muon.charge());
319  }
320  }
321  }
322 
323  // Fill plots for tag and probe
324  // Muon cannot be a tag because doesn't match an hlt muon
325  if(matches[i] >= targetMuons.size()) continue;
326  for (size_t k = 0; k < targetMuons.size(); k++) {
327  if(k == i) continue;
328  if(muon.pt() < 20.0) continue;
329  Muon & theProbe = targetMuons[k];
330  if (muon.charge() != theProbe.charge() && !pairalreadyconsidered) {
331  double mass = (muon.p4() + theProbe.p4()).M();
332  if(mass > 60 && mass < 120) {
333  hists_["massVsEtaZ_denom"]->Fill(theProbe.eta());
334  hists_["massVsPtZ_denom"]->Fill(theProbe.pt());
335  hists_["massVsVertexZ_denom"]->Fill(vertices->size());
336  if(matches[k] < targetMuons.size()) {
337  hists_["massVsEtaZ_numer"]->Fill(theProbe.eta());
338  hists_["massVsPtZ_numer"]->Fill(theProbe.pt());
339  hists_["massVsVertexZ_numer"]->Fill(vertices->size());
340  }
341  pairalreadyconsidered = true;
342  }
343  if(mass > 1 && mass < 4) {
344  hists_["massVsEtaJpsi_denom"]->Fill(theProbe.eta());
345  hists_["massVsPtJpsi_denom"]->Fill(theProbe.pt());
346  hists_["massVsVertexJpsi_denom"]->Fill(vertices->size());
347  if(matches[k] < targetMuons.size()) {
348  hists_["massVsEtaJpsi_numer"]->Fill(theProbe.eta());
349  hists_["massVsPtJpsi_numer"]->Fill(theProbe.pt());
350  hists_["massVsVertexJpsi_numer"]->Fill(vertices->size());
351  }
352  pairalreadyconsidered = true;
353  }
354  }
355  } // End loop over denominator and numerator.
356  } // End loop over targetMuons.
357 
358  // Plot fake rates (efficiency for HLT objects to not get matched to RECO).
359  vector<size_t> hltMatches = matchByDeltaR(hltMuons, targetMuons,
360  plotCuts_[triggerLevel_ + "DeltaR"]);
361  for (size_t i = 0; i < hltMuons.size(); i++) {
362  TriggerObject & hltMuon = hltMuons[i];
363  bool isFake = hltMatches[i] > hltMuons.size();
364  for (size_t j = 0; j < 2; j++) {
365  string suffix = EFFICIENCY_SUFFIXES[j];
366  // If match is found, then numerator plots should not get filled
367  if (suffix == "numer" && ! isFake) continue;
368  hists_["fakerateVertex_" + suffix]->Fill(vertices->size());
369  hists_["fakerateEta_" + suffix]->Fill(hltMuon.eta());
370  hists_["fakeratePhi_" + suffix]->Fill(hltMuon.phi());
371  hists_["fakerateTurnOn_" + suffix]->Fill(hltMuon.pt());
372  } // End loop over numerator and denominator.
373  } // End loop over hltMuons.
374 
375 
376 } // End analyze() method.
377 
378 
379 
380 // Method to fill binning parameters from a vector of doubles.
381 void
382 HLTMuonMatchAndPlot::fillEdges(size_t & nBins, float * & edges,
383  const vector<double>& binning) {
384 
385  if (binning.size() < 3) {
386  LogWarning("HLTMuonVal") << "Invalid binning parameters!";
387  return;
388  }
389 
390  // Fixed-width binning.
391  if (binning.size() == 3) {
392  nBins = binning[0];
393  edges = new float[nBins + 1];
394  const double min = binning[1];
395  const double binwidth = (binning[2] - binning[1]) / nBins;
396  for (size_t i = 0; i <= nBins; i++) edges[i] = min + (binwidth * i);
397  }
398 
399  // Variable-width binning.
400  else {
401  nBins = binning.size() - 1;
402  edges = new float[nBins + 1];
403  for (size_t i = 0; i <= nBins; i++) edges[i] = binning[i];
404  }
405 
406 }
407 
408 
409 
410 // This is an unorthodox method of getting parameters, but cleaner in my mind
411 // It looks for parameter 'target' in the pset, and assumes that all entries
412 // have the same class (T), filling the values into a std::map.
413 template <class T>
414 void
416  const ParameterSet& pset, string target) {
417 
418  // Get the ParameterSet with name 'target' from 'pset'
419  ParameterSet targetPset;
420  if (pset.existsAs<ParameterSet>(target, true)) // target is tracked
421  targetPset = pset.getParameterSet(target);
422  else if (pset.existsAs<ParameterSet>(target, false)) // target is untracked
423  targetPset = pset.getUntrackedParameterSet(target);
424 
425  // Get the parameter names from targetPset
426  vector<string> names = targetPset.getParameterNames();
427  vector<string>::const_iterator iter;
428 
429  for (iter = names.begin(); iter != names.end(); ++iter) {
430  if (targetPset.existsAs<T>(* iter, true)) // target is tracked
431  m[* iter] = targetPset.getParameter<T>(* iter);
432  else if (targetPset.existsAs<T>(* iter, false)) // target is untracked
433  m[* iter] = targetPset.getUntrackedParameter<T>(* iter);
434  }
435 
436 }
437 
438 
439 
440 // A generic method to find the best deltaR matches from 2 collections.
441 template <class T1, class T2>
442 vector<size_t>
443 HLTMuonMatchAndPlot::matchByDeltaR(const vector<T1> & collection1,
444  const vector<T2> & collection2,
445  const double maxDeltaR) {
446 
447  const size_t n1 = collection1.size();
448  const size_t n2 = collection2.size();
449 
450  vector<size_t> result(n1, -1);
451  vector<vector<double> > deltaRMatrix(n1, vector<double>(n2, NOMATCH));
452 
453  for (size_t i = 0; i < n1; i++)
454  for (size_t j = 0; j < n2; j++) {
455  deltaRMatrix[i][j] = deltaR(collection1[i], collection2[j]);
456  }
457 
458  // Run through the matrix n1 times to make sure we've found all matches.
459  for (size_t k = 0; k < n1; k++) {
460  size_t i_min = -1;
461  size_t j_min = -1;
462  double minDeltaR = maxDeltaR;
463  // find the smallest deltaR
464  for (size_t i = 0; i < n1; i++)
465  for (size_t j = 0; j < n2; j++)
466  if (deltaRMatrix[i][j] < minDeltaR) {
467  i_min = i;
468  j_min = j;
469  minDeltaR = deltaRMatrix[i][j];
470  }
471  // If a match has been made, save it and make those candidates unavailable.
472  if (minDeltaR < maxDeltaR) {
473  result[i_min] = j_min;
474  deltaRMatrix[i_min] = vector<double>(n2, NOMATCH);
475  for (size_t i = 0; i < n1; i++)
476  deltaRMatrix[i][j_min] = NOMATCH;
477  }
478  }
479 
480  return result;
481 
482 }
483 
484 
485 
488  const BeamSpot & beamSpot,
489  bool hasRecoCuts,
490  const StringCutObjectSelector<reco::Muon> &selector,
491  double d0Cut, double z0Cut)
492 {
493  // If there is no selector (recoCuts does not exists), return an empty collection.
494  if (!hasRecoCuts)
495  return MuonCollection();
496 
497  MuonCollection reducedMuons(allMuons);
498  MuonCollection::iterator iter = reducedMuons.begin();
499  while (iter != reducedMuons.end()) {
500  const Track * track = 0;
501  if (iter->isTrackerMuon()) track = & * iter->innerTrack();
502  else if (iter->isStandAloneMuon()) track = & * iter->outerTrack();
503  if (track && selector(* iter) &&
504  fabs(track->dxy(beamSpot.position())) < d0Cut &&
505  fabs(track->dz(beamSpot.position())) < z0Cut)
506  ++iter;
507  else reducedMuons.erase(iter);
508  }
509 
510  return reducedMuons;
511 
512 }
513 
514 
515 
518  const TriggerObjectCollection & triggerObjects,
519  const TriggerEvent & triggerSummary,
520  const ParameterSet & pset)
521 {
522 
523  // If pset is empty, return an empty collection.
524  if (!pset.exists("hltCuts"))
525  return TriggerObjectCollection();
526 
528  (pset.getUntrackedParameter<string>("hltCuts"));
529 
530  InputTag filterTag(moduleLabels_[moduleLabels_.size() - 1], "",
532  size_t filterIndex = triggerSummary.filterIndex(filterTag);
533 
534  TriggerObjectCollection selectedObjects;
535 
536  if (filterIndex < triggerSummary.sizeFilters()) {
537  const Keys &keys = triggerSummary.filterKeys(filterIndex);
538  for (size_t j = 0; j < keys.size(); j++ ){
539  TriggerObject foundObject = triggerObjects[keys[j]];
540  if (selector(foundObject))
541  selectedObjects.push_back(foundObject);
542  }
543  }
544 
545  return selectedObjects;
546 
547 }
548 
549 
550 
551 void HLTMuonMatchAndPlot::book1D(string name, string binningType, string title)
552 {
553  /* Properly delete the array of floats that has been allocated on
554  * the heap by fillEdges. Avoid multiple copies and internal ROOT
555  * clones by simply creating the histograms directly in the DQMStore
556  * using the appropriate book1D method to handle the variable bins
557  * case. */
558 
559  size_t nBins;
560  float * edges = 0;
561  fillEdges(nBins, edges, binParams_[binningType]);
562 
563  hists_[name] = dbe_->book1D(name, title, nBins, edges);
564  if (hists_[name])
565  if (hists_[name]->getTH1F()->GetSumw2N())
566  hists_[name]->getTH1F()->Sumw2();
567 
568  if (edges)
569  delete [] edges;
570 }
571 
572 
573 
574 void
575 HLTMuonMatchAndPlot::book2D(string name, string binningTypeX,
576  string binningTypeY, string title)
577 {
578 
579  /* Properly delete the arrays of floats that have been allocated on
580  * the heap by fillEdges. Avoid multiple copies and internal ROOT
581  * clones by simply creating the histograms directly in the DQMStore
582  * using the appropriate book2D method to handle the variable bins
583  * case. */
584 
585  size_t nBinsX;
586  float * edgesX = 0;
587  fillEdges(nBinsX, edgesX, binParams_[binningTypeX]);
588 
589  size_t nBinsY;
590  float * edgesY = 0;
591  fillEdges(nBinsY, edgesY, binParams_[binningTypeY]);
592 
593  hists_[name] = dbe_->book2D(name.c_str(), title.c_str(),
594  nBinsX, edgesX, nBinsY, edgesY);
595  if (hists_[name])
596  if (hists_[name]->getTH2F()->GetSumw2N())
597  hists_[name]->getTH2F()->Sumw2();
598 
599  if (edgesX)
600  delete [] edgesX;
601  if (edgesY)
602  delete [] edgesY;
603 }
604 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
reco::MuonCollection selectedMuons(const reco::MuonCollection &, const reco::BeamSpot &, bool, const StringCutObjectSelector< reco::Muon > &, double, double)
int i
Definition: DBlmapReader.cc:9
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
StringCutObjectSelector< reco::Muon > probeMuonSelector_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
static const HistoName names[]
const std::string EFFICIENCY_SUFFIXES[2]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
vector< string > vstring
Definition: ExoticaDQM.cc:75
virtual TrackRef innerTrack() const
Definition: Muon.h:48
float phi() const
Definition: TriggerObject.h:58
edm::ParameterSet targetParams_
bool isTrackerMuon() const
Definition: Muon.h:219
ParameterSet const & getParameterSet(ParameterSetID const &id)
std::vector< std::string > moduleLabels_
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
bool exists(std::string const &parameterName) const
checks if a parameter exists
void book1D(std::string, std::string, std::string)
std::map< std::string, std::vector< double > > binParams_
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
std::map< std::string, MonitorElement * > hists_
float eta() const
Definition: TriggerObject.h:57
T eta() const
bool isStandAloneMuon() const
Definition: Muon.h:220
dictionary edges
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
std::vector< std::string > requiredTriggers_
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
const double NOMATCH
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
int iEvent
Definition: GenABIO.cc:243
void fillMapFromPSet(std::map< std::string, T > &, const edm::ParameterSet &, std::string)
void analyze(const edm::Event &, const edm::EventSetup &)
void beginRun(const edm::Run &, const edm::EventSetup &)
std::vector< size_t > matchByDeltaR(const std::vector< T1 > &, const std::vector< T2 > &, const double maxDeltaR=NOMATCH)
tuple result
Definition: query.py:137
int j
Definition: DBlmapReader.cc:9
tuple allMuons
Definition: allMuons_cfi.py:3
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
static std::string const triggerResults
Definition: EdmProvDump.cc:41
std::vector< std::string > getParameterNames() const
bool isValid() const
Definition: HandleBase.h:76
void book2D(std::string, std::string, std::string, std::string)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:51
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
int k[5][pyjets_maxn]
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:125
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
StringCutObjectSelector< reco::Muon > targetMuonSelector_
ParameterSet const & getParameterSet(std::string const &) const
virtual int charge() const GCC11_FINAL
electric charge
std::vector< size_type > Keys
std::map< std::string, edm::InputTag > inputTags_
std::string const & label() const
Definition: InputTag.h:42
trigger::TriggerObjectCollection selectedTriggerObjects(const trigger::TriggerObjectCollection &, const trigger::TriggerEvent &, const edm::ParameterSet &)
TH2F * getTH2F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
void endRun(const edm::Run &, const edm::EventSetup &)
const Point & position() const
position
Definition: BeamSpot.h:62
HLTMuonMatchAndPlot(const edm::ParameterSet &, std::string, const std::vector< std::string > &)
Constructor.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
virtual float pt() const GCC11_FINAL
transverse momentum
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:119
long double T
std::map< std::string, double > plotCuts_
std::string const & instance() const
Definition: InputTag.h:43
void fillEdges(size_t &nBins, float *&edges, const std::vector< double > &binning)
tuple size
Write out results.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
Definition: Run.h:41
Definition: DDAxes.h:10