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