CMS 3D CMS Logo

BTVHLTOfflineSource.cc
Go to the documentation of this file.
1 /*
2  BTVHLTOffline DQM code
3 */
4 //
5 // Originally created by: Anne-Catherine Le Bihan
6 // June 2015
7 // John Alison <johnalison@cmu.edu>
8 // June 2020
9 // Following the structure used in JetMetHLTOfflineSource
10 
11 // system include files
12 #include <fstream>
13 #include <iostream>
14 #include <memory>
15 #include <sstream>
16 #include <string>
17 #include <utility>
18 #include <vector>
19 #include <unistd.h>
20 #include <cmath>
21 #include <iostream>
22 
23 // user include files
44 
45 #include "TMath.h"
46 #include "TPRegexp.h"
47 
49 public:
50  explicit BTVHLTOfflineSource(const edm::ParameterSet&);
51  ~BTVHLTOfflineSource() override;
52 
53 private:
54  void analyze(const edm::Event&, const edm::EventSetup&) override;
55 
56  std::vector<const reco::Track*> getOfflineBTagTracks(float hltJetEta,
57  float hltJetPhi,
58  edm::Handle<edm::View<reco::BaseTagInfo>> offlineIPTagHandle,
59  std::vector<float>& offlineIP3D,
60  std::vector<float>& offlineIP3DSig);
61 
63 
64  template <class Base>
65  std::vector<const reco::Track*> getOnlineBTagTracks(float hltJetEta,
66  float hltJetPhi,
67  edm::Handle<std::vector<Base>> jetSVTagsColl,
68  std::vector<float>& onlineIP3D,
69  std::vector<float>& onlineIP3DSig);
70 
71  void bookHistograms(DQMStore::IBooker&, edm::Run const& run, edm::EventSetup const& c) override;
72 
73  void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;
74 
77  bool verbose_;
78 
79  std::vector<std::pair<std::string, std::string>> custompathnamepairs_;
80 
83 
90 
93 
96 
101 
103 
105 
108 
114 
116 
117  class PathInfo : public TriggerDQMBase {
118  public:
120  : prescaleUsed_(-1),
121  pathName_("unset"),
122  filterName_("unset"),
123  processName_("unset"),
124  objectType_(-1),
125  triggerType_("unset") {}
126 
127  ~PathInfo() override = default;
128 
129  PathInfo(const int prescaleUsed,
130  const std::string& pathName,
131  const std::string& filterName,
132  const std::string& processName,
133  const int type,
134  const std::string& triggerType)
135  : prescaleUsed_(prescaleUsed),
139  objectType_(type),
141 
142  const std::string getLabel() const { return filterName_; }
144  const std::string getPath() const { return pathName_; }
145  const int getprescaleUsed() const { return prescaleUsed_; }
146  const std::string getProcess() const { return processName_; }
147  const int getObjectType() const { return objectType_; }
148  const std::string getTriggerType() const { return triggerType_; }
150  const bool operator==(const std::string& v) const { return v == pathName_; }
151 
152  MonitorElement* Discr = nullptr;
153  MonitorElement* Pt = nullptr;
154  MonitorElement* Eta = nullptr;
169  MonitorElement* PVz = nullptr;
173  MonitorElement* n_vtx = nullptr;
180 
181  //NEW
194 
203 
210 
219  // MonitorElement* n_pixel_hits_;
220  // MonitorElement* n_total_hits_;
221 
222  private:
229  };
230 
231  class PathInfoCollection : public std::vector<PathInfo> {
232  public:
234  std::vector<PathInfo>::iterator find(const std::string& pathName) { return std::find(begin(), end(), pathName); }
235  };
236 
238 };
239 
240 using namespace edm;
241 using namespace reco;
242 using namespace std;
243 using namespace trigger;
244 
246  : dirname_(iConfig.getUntrackedParameter("dirname", std::string("HLT/BTV/"))),
247  processname_(iConfig.getParameter<std::string>("processname")),
248  verbose_(iConfig.getUntrackedParameter<bool>("verbose", false)),
249  triggerSummaryLabel_(iConfig.getParameter<edm::InputTag>("triggerSummaryLabel")),
250  triggerResultsLabel_(iConfig.getParameter<edm::InputTag>("triggerResultsLabel")),
251  turnon_threshold_loose_(iConfig.getParameter<double>("turnon_threshold_loose")),
252  turnon_threshold_medium_(iConfig.getParameter<double>("turnon_threshold_medium")),
253  turnon_threshold_tight_(iConfig.getParameter<double>("turnon_threshold_tight")),
254  turnon_threshold_offline_loose_(iConfig.getParameter<double>("turnon_threshold_offline_loose")),
255  turnon_threshold_offline_medium_(iConfig.getParameter<double>("turnon_threshold_offline_medium")),
256  turnon_threshold_offline_tight_(iConfig.getParameter<double>("turnon_threshold_offline_tight")),
257  offlineDiscrTokenb_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("offlineDiscrLabelb"))),
258  offlineIPToken_(consumes<View<BaseTagInfo>>(iConfig.getParameter<edm::InputTag>("offlineIPLabel"))),
259 
260  hltPFPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltPFPVLabel"))),
261  offlinePVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("offlinePVLabel"))),
262  triggerResultsToken(consumes<edm::TriggerResults>(triggerResultsLabel_)),
263  triggerResultsFUToken(consumes<edm::TriggerResults>(
264  edm::InputTag(triggerResultsLabel_.label(), triggerResultsLabel_.instance(), std::string("FU")))),
265  triggerSummaryToken(consumes<trigger::TriggerEvent>(triggerSummaryLabel_)),
266  triggerSummaryFUToken(consumes<trigger::TriggerEvent>(
267  edm::InputTag(triggerSummaryLabel_.label(), triggerSummaryLabel_.instance(), std::string("FU")))),
268  shallowTagInfosTokenPf_(
269  consumes<vector<reco::ShallowTagInfo>>(edm::InputTag("hltDeepCombinedSecondaryVertexBJetTagsInfos"))),
270  SVTagInfosTokenPf_(consumes<std::vector<SVTagInfo>>(edm::InputTag("hltDeepSecondaryVertexTagInfosPF"))),
271  pfTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("onlineDiscrLabelPF"))),
272  minDecayLength_(iConfig.getParameter<double>("minDecayLength")),
273  maxDecayLength_(iConfig.getParameter<double>("maxDecayLength")),
274  minJetDistance_(iConfig.getParameter<double>("minJetDistance")),
275  maxJetDistance_(iConfig.getParameter<double>("maxJetDistance")),
276  dRTrackMatch_(iConfig.getParameter<double>("dRTrackMatch")) {
277  std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet>>("pathPairs");
278  for (const auto& path : paths) {
279  custompathnamepairs_.push_back(
280  make_pair(path.getParameter<std::string>("pathname"), path.getParameter<std::string>("pathtype")));
281  }
282 }
283 
285 
287  bool changed = true;
288  if (!hltConfig_.init(run, c, processname_, changed)) {
289  LogDebug("BTVHLTOfflineSource") << "HLTConfigProvider failed to initialize.";
290  }
291 
292  for (unsigned int idx = 0; idx != hltConfig_.size(); ++idx) {
293  const auto& pathname = hltConfig_.triggerName(idx);
294 
295  for (const auto& custompathnamepair : custompathnamepairs_) {
296  if (pathname.find(custompathnamepair.first) != std::string::npos) {
297  hltPathsAll_.push_back(PathInfo(1, pathname, "dummy", processname_, 0, custompathnamepair.second));
298  }
299  }
300  }
301 }
302 
306  if (!triggerResults.isValid()) {
308  if (!triggerResults.isValid()) {
309  edm::LogInfo("BTVHLTOfflineSource") << "TriggerResults not found, skipping event";
310  return;
311  }
312  }
313 
314  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
315 
317  iEvent.getByToken(triggerSummaryToken, triggerObj);
318  if (!triggerObj.isValid()) {
319  iEvent.getByToken(triggerSummaryFUToken, triggerObj);
320  if (!triggerObj.isValid()) {
321  edm::LogInfo("BTVHLTOfflineSource") << "TriggerEvent not found, skipping event";
322  return;
323  }
324  }
325 
327  iEvent.getByToken(pfTagsToken_, pfTags);
328 
329  Handle<reco::VertexCollection> VertexHandler;
330 
331  Handle<reco::JetTagCollection> offlineJetTagHandlerb;
332  iEvent.getByToken(offlineDiscrTokenb_, offlineJetTagHandlerb);
333 
334  Handle<View<BaseTagInfo>> offlineIPTagHandle;
335  iEvent.getByToken(offlineIPToken_, offlineIPTagHandle);
336 
337  Handle<reco::VertexCollection> offlineVertexHandler;
338  iEvent.getByToken(offlinePVToken_, offlineVertexHandler);
339 
340  if (verbose_ && iEvent.id().event() % 10000 == 0)
341  cout << "Run = " << iEvent.id().run() << ", LS = " << iEvent.luminosityBlock()
342  << ", Event = " << iEvent.id().event() << endl;
343 
344  if (!triggerResults.isValid())
345  return;
346 
347  edm::Handle<std::vector<SVTagInfo>> jetSVTagsCollPF;
348 
349  for (auto& v : hltPathsAll_) {
350  unsigned index = triggerNames.triggerIndex(v.getPath());
351  if (!(index < triggerNames.size())) {
352  edm::LogInfo("BTVHLTOfflineSource") << "Path " << v.getPath() << " not in menu, skipping event";
353  continue;
354  }
355 
356  if (!triggerResults->accept(index)) {
357  edm::LogInfo("BTVHLTOfflineSource") << "Path " << v.getPath() << " not accepted, skipping event";
358  continue;
359  }
360 
361  iEvent.getByToken(SVTagInfosTokenPf_, jetSVTagsCollPF);
362 
363  // PF btagging
364  if (v.getTriggerType() == "PF" && pfTags.isValid()) {
365  const auto& iter = pfTags->begin();
366 
367  float Discr_online = iter->second;
368  if (Discr_online < 0)
369  Discr_online = -0.05;
370 
371  v.Discr->Fill(Discr_online);
372  v.Pt->Fill(iter->first->pt());
373  v.Eta->Fill(iter->first->eta());
374 
375  if (offlineJetTagHandlerb.isValid()) {
376  for (auto const& iterOffb : *offlineJetTagHandlerb) {
377  float DR = reco::deltaR(iterOffb.first->eta(), iterOffb.first->phi(), iter->first->eta(), iter->first->phi());
378  if (DR < 0.3) {
379  float Discr_offline = iterOffb.second;
380  float Pt_offline = iterOffb.first->pt();
381  float Eta_offline = iterOffb.first->eta();
382  float Phi_offline = iterOffb.first->phi();
383 
384  if (Discr_offline < 0)
385  Discr_offline = -0.05;
386  v.Discr_HLTvsRECO->Fill(Discr_online, Discr_offline);
387  v.Discr_HLTMinusRECO->Fill(Discr_online - Discr_offline);
388 
389  v.Discr_turnon_loose.denominator->Fill(Discr_offline);
390  v.Discr_turnon_medium.denominator->Fill(Discr_offline);
391  v.Discr_turnon_tight.denominator->Fill(Discr_offline);
392 
393  if (Discr_online > turnon_threshold_loose_)
394  v.Discr_turnon_loose.numerator->Fill(Discr_offline);
395  if (Discr_online > turnon_threshold_medium_)
396  v.Discr_turnon_medium.numerator->Fill(Discr_offline);
397  if (Discr_online > turnon_threshold_tight_)
398  v.Discr_turnon_tight.numerator->Fill(Discr_offline);
399 
400  if (Discr_offline > turnon_threshold_offline_loose_) {
401  v.Pt_turnon_loose.denominator->Fill(Pt_offline);
402  v.Eta_turnon_loose.denominator->Fill(Eta_offline);
403  v.Phi_turnon_loose.denominator->Fill(Phi_offline);
404  if (Discr_online > turnon_threshold_loose_) {
405  v.Pt_turnon_loose.numerator->Fill(Pt_offline);
406  v.Eta_turnon_loose.numerator->Fill(Eta_offline);
407  v.Phi_turnon_loose.numerator->Fill(Phi_offline);
408  }
409  }
410  if (Discr_offline > turnon_threshold_offline_medium_) {
411  v.Pt_turnon_medium.denominator->Fill(Pt_offline);
412  v.Eta_turnon_medium.denominator->Fill(Eta_offline);
413  v.Phi_turnon_medium.denominator->Fill(Phi_offline);
414  if (Discr_online > turnon_threshold_medium_) {
415  v.Pt_turnon_medium.numerator->Fill(Pt_offline);
416  v.Eta_turnon_medium.numerator->Fill(Eta_offline);
417  v.Phi_turnon_medium.numerator->Fill(Phi_offline);
418  }
419  }
420  if (Discr_offline > turnon_threshold_offline_tight_) {
421  v.Pt_turnon_tight.denominator->Fill(Pt_offline);
422  v.Eta_turnon_tight.denominator->Fill(Eta_offline);
423  v.Phi_turnon_tight.denominator->Fill(Phi_offline);
424  if (Discr_online > turnon_threshold_tight_) {
425  v.Pt_turnon_tight.numerator->Fill(Pt_offline);
426  v.Eta_turnon_tight.numerator->Fill(Eta_offline);
427  v.Phi_turnon_tight.numerator->Fill(Phi_offline);
428  }
429  }
430 
431  break;
432  }
433  }
434  }
435 
436  bool pfSVTagCollValid = (v.getTriggerType() == "PF" && jetSVTagsCollPF.isValid());
437  if (offlineIPTagHandle.isValid() && pfSVTagCollValid) {
438  std::vector<float> offlineIP3D;
439  std::vector<float> offlineIP3DSig;
440  std::vector<const reco::Track*> offlineTracks = getOfflineBTagTracks(
441  iter->first->eta(), iter->first->phi(), offlineIPTagHandle, offlineIP3D, offlineIP3DSig);
442  std::vector<const reco::Track*> onlineTracks;
443  std::vector<float> onlineIP3D;
444  std::vector<float> onlineIP3DSig;
445  if (pfSVTagCollValid)
446  onlineTracks = getOnlineBTagTracks<SVTagInfo>(
447  iter->first->eta(), iter->first->phi(), jetSVTagsCollPF, onlineIP3D, onlineIP3DSig);
448 
449  for (unsigned int iOffTrk = 0; iOffTrk < offlineTracks.size(); ++iOffTrk) {
450  const reco::Track* offTrk = offlineTracks.at(iOffTrk);
451  bool hasMatch = false;
452  float offTrkEta = offTrk->eta();
453  float offTrkPhi = offTrk->phi();
454 
455  for (const reco::Track* onTrk : onlineTracks) {
456  float DR = reco::deltaR(offTrkEta, offTrkPhi, onTrk->eta(), onTrk->phi());
457  if (DR < dRTrackMatch_) {
458  hasMatch = true;
459  }
460  }
461 
462  float offTrkPt = offTrk->pt();
463  v.OnlineTrkEff_Pt.denominator->Fill(offTrkPt);
464  if (hasMatch)
465  v.OnlineTrkEff_Pt.numerator->Fill(offTrkPt);
466 
467  v.OnlineTrkEff_Eta.denominator->Fill(offTrkEta);
468  if (hasMatch)
469  v.OnlineTrkEff_Eta.numerator->Fill(offTrkEta);
470 
471  v.OnlineTrkEff_3d_ip_distance.denominator->Fill(offlineIP3D.at(iOffTrk));
472  if (hasMatch)
473  v.OnlineTrkEff_3d_ip_distance.numerator->Fill(offlineIP3D.at(iOffTrk));
474 
475  v.OnlineTrkEff_3d_ip_sig.denominator->Fill(offlineIP3DSig.at(iOffTrk));
476  if (hasMatch)
477  v.OnlineTrkEff_3d_ip_sig.numerator->Fill(offlineIP3DSig.at(iOffTrk));
478  }
479 
480  for (unsigned int iOnTrk = 0; iOnTrk < onlineTracks.size(); ++iOnTrk) {
481  const reco::Track* onTrk = onlineTracks.at(iOnTrk);
482  bool hasMatch = false;
483  float onTrkEta = onTrk->eta();
484  float onTrkPhi = onTrk->phi();
485 
486  for (const reco::Track* offTrk : offlineTracks) {
487  float DR = reco::deltaR(onTrkEta, onTrkPhi, offTrk->eta(), offTrk->phi());
488  if (DR < dRTrackMatch_) {
489  hasMatch = true;
490  }
491  }
492 
493  float onTrkPt = onTrk->pt();
494  v.OnlineTrkFake_Pt.denominator->Fill(onTrkPt);
495  if (!hasMatch)
496  v.OnlineTrkFake_Pt.numerator->Fill(onTrkPt);
497 
498  v.OnlineTrkFake_Eta.denominator->Fill(onTrkEta);
499  if (!hasMatch)
500  v.OnlineTrkFake_Eta.numerator->Fill(onTrkEta);
501 
502  v.OnlineTrkFake_3d_ip_distance.denominator->Fill(onlineIP3D.at(iOnTrk));
503  if (!hasMatch)
504  v.OnlineTrkFake_3d_ip_distance.numerator->Fill(onlineIP3D.at(iOnTrk));
505 
506  v.OnlineTrkFake_3d_ip_sig.denominator->Fill(onlineIP3DSig.at(iOnTrk));
507  if (!hasMatch)
508  v.OnlineTrkFake_3d_ip_sig.numerator->Fill(onlineIP3DSig.at(iOnTrk));
509  }
510  }
511 
512  iEvent.getByToken(hltPFPVToken_, VertexHandler);
513  if (VertexHandler.isValid()) {
514  v.PVz->Fill(VertexHandler->begin()->z());
515  if (offlineVertexHandler.isValid()) {
516  v.PVz_HLTMinusRECO->Fill(VertexHandler->begin()->z() - offlineVertexHandler->begin()->z());
517  }
518  }
519  } // PFTagsValid
520 
521  // additional plots from tag info collections
523 
525  iEvent.getByToken(shallowTagInfosTokenPf_, shallowTagInfosPf);
526 
527  // edm::Handle<std::vector<reco::TemplatedSecondaryVertexTagInfo<reco::IPTagInfo<edm::RefVector<std::vector<reco::Track>, reco::Track, edm::refhelper::FindUsingAdvance<std::vector<reco::Track>, reco::Track> >, reco::JTATagInfo>, reco::Vertex> > > caloTagInfos;
528  // iEvent.getByToken(caloTagInfosToken_, caloTagInfos);
529 
530  // edm::Handle<std::vector<reco::TemplatedSecondaryVertexTagInfo<reco::IPTagInfo<edm::RefVector<std::vector<reco::Track>, reco::Track, edm::refhelper::FindUsingAdvance<std::vector<reco::Track>, reco::Track> >, reco::JTATagInfo>, reco::Vertex> > > pfTagInfos;
531  // iEvent.getByToken(pfTagInfosToken_, pfTagInfos);
532 
533  // first try to get info from shallowTagInfos ...
534  if (v.getTriggerType() == "PF" && shallowTagInfosPf.isValid()) {
535  const auto& shallowTagInfoCollection = shallowTagInfosPf;
536  for (const auto& shallowTagInfo : *shallowTagInfoCollection) {
537  const auto& tagVars = shallowTagInfo.taggingVariables();
538 
539  // n secondary vertices and n selected tracks
540  for (const auto& tagVar : tagVars.getList(reco::btau::jetNSecondaryVertices, false)) {
541  v.h_jetNSecondaryVertices->Fill(tagVar);
542  v.n_vtx->Fill(tagVar);
543  }
544 
545  for (const auto& tagVar : tagVars.getList(reco::btau::jetNSelectedTracks, false)) {
546  v.n_sel_tracks->Fill(tagVar);
547  v.h_jetNSelectedTracks->Fill(tagVar);
548  }
549 
550  for (const auto& tagVar : tagVars.getList(reco::btau::jetPt, false)) {
551  v.h_jet_pt->Fill(tagVar);
552  }
553 
554  for (const auto& tagVar : tagVars.getList(reco::btau::jetEta, false)) {
555  v.h_jet_eta->Fill(tagVar);
556  }
557 
558  for (const auto& tagVar : tagVars.getList(reco::btau::trackSumJetEtRatio, false)) {
559  v.h_trackSumJetEtRatio->Fill(tagVar);
560  }
561 
562  for (const auto& tagVar : tagVars.getList(reco::btau::trackSumJetDeltaR, false)) {
563  v.h_trackSumJetDeltaR->Fill(tagVar);
564  }
565 
566  for (const auto& tagVar : tagVars.getList(reco::btau::vertexCategory, false)) {
567  v.h_vertexCategory->Fill(tagVar);
568  }
569 
570  for (const auto& tagVar : tagVars.getList(reco::btau::trackSip2dValAboveCharm, false)) {
571  v.h_trackSip2dValAboveCharm->Fill(tagVar);
572  }
573 
574  for (const auto& tagVar : tagVars.getList(reco::btau::trackSip2dSigAboveCharm, false)) {
575  v.h_trackSip2dSigAboveCharm->Fill(tagVar);
576  }
577 
578  for (const auto& tagVar : tagVars.getList(reco::btau::trackSip3dValAboveCharm, false)) {
579  v.h_trackSip3dValAboveCharm->Fill(tagVar);
580  }
581 
582  for (const auto& tagVar : tagVars.getList(reco::btau::trackSip3dSigAboveCharm, false)) {
583  v.h_trackSip3dSigAboveCharm->Fill(tagVar);
584  }
585 
586  for (const auto& tagVar : tagVars.getList(reco::btau::jetNTracksEtaRel, false)) {
587  v.h_jetNTracksEtaRel->Fill(tagVar);
588  }
589 
590  // impact parameter
591  // and new info
592  const auto& trackSip3dVal = tagVars.getList(reco::btau::trackSip3dVal, false);
593  const auto& trackSip3dSig = tagVars.getList(reco::btau::trackSip3dSig, false);
594  const auto& trackJetDistVal = tagVars.getList(reco::btau::trackJetDistVal, false);
595  const auto& trackPtRel = tagVars.getList(reco::btau::trackPtRel, false);
596  const auto& trackSip2dSig = tagVars.getList(reco::btau::trackSip2dSig, false);
597  const auto& trackDeltaR = tagVars.getList(reco::btau::trackDeltaR, false);
598  const auto& trackPtRatio = tagVars.getList(reco::btau::trackPtRatio, false);
599  const auto& trackDecayLenVal = tagVars.getList(reco::btau::trackDecayLenVal, false);
600  const auto& trackEtaRel = tagVars.getList(reco::btau::trackEtaRel, false);
601 
602  for (unsigned i_trk = 0; i_trk < trackEtaRel.size(); i_trk++) {
603  v.h_trackEtaRel->Fill(trackEtaRel[i_trk]);
604  }
605 
606  for (unsigned i_trk = 0; i_trk < trackJetDistVal.size(); i_trk++) {
607  v.h_trackJetDistVal->Fill(trackJetDistVal[i_trk]);
608  }
609 
610  for (unsigned i_trk = 0; i_trk < trackPtRel.size(); i_trk++) {
611  v.h_trackPtRel->Fill(trackPtRel[i_trk]);
612  }
613 
614  for (unsigned i_trk = 0; i_trk < trackDeltaR.size(); i_trk++) {
615  v.h_trackDeltaR->Fill(trackDeltaR[i_trk]);
616  }
617 
618  for (unsigned i_trk = 0; i_trk < trackPtRatio.size(); i_trk++) {
619  v.h_trackPtRatio->Fill(trackPtRatio[i_trk]);
620  }
621 
622  for (unsigned i_trk = 0; i_trk < trackDecayLenVal.size(); i_trk++) {
623  v.h_trackDecayLenVal->Fill(trackDecayLenVal[i_trk]);
624  }
625 
626  for (unsigned i_trk = 0; i_trk < trackSip3dVal.size(); i_trk++) {
627  float val = trackSip3dVal[i_trk];
628  float sig = trackSip3dSig[i_trk];
629  v.h_3d_ip_distance->Fill(val);
630  v.h_3d_ip_error->Fill(val / sig);
631  v.h_3d_ip_sig->Fill(sig);
632 
633  v.h_trackSip2dSig->Fill(trackSip2dSig[i_trk]);
634  }
635 
636  // vertex mass and tracks per vertex
637  for (const auto& tagVar : tagVars.getList(reco::btau::vertexMass, false)) {
638  v.vtx_mass->Fill(tagVar);
639  }
640  for (const auto& tagVar : tagVars.getList(reco::btau::vertexNTracks, false)) {
641  v.n_vtx_trks->Fill(tagVar);
642  }
643 
644  for (const auto& tagVar : tagVars.getList(reco::btau::vertexEnergyRatio, false)) {
645  v.h_vertexEnergyRatio->Fill(tagVar);
646  }
647 
648  for (const auto& tagVar : tagVars.getList(reco::btau::vertexJetDeltaR, false)) {
649  v.h_vertexJetDeltaR->Fill(tagVar);
650  }
651 
652  for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance2dVal, false)) {
653  v.h_flightDistance2dVal->Fill(tagVar);
654  }
655 
656  for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance2dSig, false)) {
657  v.h_flightDistance2dSig->Fill(tagVar);
658  }
659 
660  for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance3dVal, false)) {
661  v.h_flightDistance3dVal->Fill(tagVar);
662  }
663 
664  for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance3dSig, false)) {
665  v.h_flightDistance3dSig->Fill(tagVar);
666  }
667 
668  // // track N total/pixel hits
669  // for (const auto & tagVar : tagVars.getList(reco::btau::trackNPixelHits, false)) {
670  // v.n_pixel_hits->Fill(tagVar);}
671  // for (const auto & tagVar : tagVars.getList(reco::btau::trackNTotalHits, false)) {
672  // v.n_total_hits->Fill(tagVar);}
673  }
674  }
675 
676  // ... otherwise from usual tag infos.
677  // else
678  // if ( (v.getTriggerType() == "PF" && pfTagInfos.isValid())
679  // || (v.getTriggerType() == "Calo" && caloTagInfos.isValid()) )
680  // {
681  // const auto & DiscrTagInfoCollection = (v.getTriggerType() == "PF") ? pfTagInfos : caloTagInfos;
682 
683  // // loop over secondary vertex tag infos
684  // for (const auto & DiscrTagInfo : *DiscrTagInfoCollection) {
685  // v.n_vtx->Fill(DiscrTagInfo.nVertexCandidates());
686  // v.n_sel_tracks->Fill(DiscrTagInfo.nSelectedTracks());
687 
688  // // loop over selected tracks in each tag info
689  // for (unsigned i_trk=0; i_trk < DiscrTagInfo.nSelectedTracks(); i_trk++) {
690  // const auto & ip3d = DiscrTagInfo.trackIPData(i_trk).ip3d;
691  // v.h_3d_ip_distance->Fill(ip3d.value());
692  // v.h_3d_ip_error->Fill(ip3d.error());
693  // v.h_3d_ip_sig->Fill(ip3d.significance());
694  // }
695 
696  // // loop over vertex candidates in each tag info
697  // for (unsigned i_sv=0; i_sv < DiscrTagInfo.nVertexCandidates(); i_sv++) {
698  // const auto & sv = DiscrTagInfo.secondaryVertex(i_sv);
699  // v.vtx_mass->Fill(sv.p4().mass());
700  // v.n_vtx_trks->Fill(sv.nTracks());
701 
702  // // loop over tracks for number of pixel and total hits
703  // const auto & trkIPTagInfo = DiscrTagInfo.trackIPTagInfoRef().get();
704  // for (const auto & trk : trkIPTagInfo->selectedTracks()) {
705  // v.n_pixel_hits->Fill(trk.get()->hitPattern().numberOfValidPixelHits());
706  // v.n_total_hits->Fill(trk.get()->hitPattern().numberOfValidHits());
707  // }
708  // }
709  // }
710  // }
711  } //end paths loop
712 }
713 
714 std::vector<const reco::Track*> BTVHLTOfflineSource::getOfflineBTagTracks(float hltJetEta,
715  float hltJetPhi,
716  Handle<View<BaseTagInfo>> offlineIPTagHandle,
717  std::vector<float>& offlineIP3D,
718  std::vector<float>& offlineIP3DSig) {
719  std::vector<const reco::Track*> offlineTracks;
720 
721  for (auto const& iterOffIP : *offlineIPTagHandle) {
722  float DR = reco::deltaR(iterOffIP.jet()->eta(), iterOffIP.jet()->phi(), hltJetEta, hltJetPhi);
723 
724  if (DR > 0.3)
725  continue;
726 
728  dynamic_cast<const reco::IPTagInfo<vector<reco::CandidatePtr>, reco::JetTagInfo>*>(&iterOffIP);
729 
730  if (!tagInfo) {
731  throw cms::Exception("Configuration")
732  << "BTagPerformanceAnalyzer: Extended TagInfo not of type TrackIPTagInfo. " << std::endl;
733  }
734 
735  const GlobalPoint pv(tagInfo->primaryVertex()->position().x(),
736  tagInfo->primaryVertex()->position().y(),
737  tagInfo->primaryVertex()->position().z());
738 
739  const std::vector<reco::btag::TrackIPData>& ip = tagInfo->impactParameterData();
740 
741  std::vector<std::size_t> sortedIndices = tagInfo->sortedIndexes(reco::btag::IP2DSig);
742  std::vector<reco::CandidatePtr> sortedTracks = tagInfo->sortedTracks(sortedIndices);
743  std::vector<std::size_t> selectedIndices;
744  vector<reco::CandidatePtr> selectedTracks;
745  for (unsigned int n = 0; n != sortedIndices.size(); ++n) {
746  double decayLength = (ip[sortedIndices[n]].closestToJetAxis - pv).mag();
747  double jetDistance = ip[sortedIndices[n]].distanceToJetAxis.value();
748  if (decayLength > minDecayLength_ && decayLength < maxDecayLength_ && fabs(jetDistance) >= minJetDistance_ &&
749  fabs(jetDistance) < maxJetDistance_) {
750  selectedIndices.push_back(sortedIndices[n]);
751  selectedTracks.push_back(sortedTracks[n]);
752  }
753  }
754 
755  for (unsigned int n = 0; n != selectedIndices.size(); ++n) {
757  offlineTracks.push_back(track);
758  offlineIP3D.push_back(ip[n].ip3d.value());
759  offlineIP3DSig.push_back(ip[n].ip3d.significance());
760  }
761  }
762  return offlineTracks;
763 }
764 
765 template <class Base>
766 std::vector<const reco::Track*> BTVHLTOfflineSource::getOnlineBTagTracks(float hltJetEta,
767  float hltJetPhi,
768  edm::Handle<std::vector<Base>> jetSVTagsColl,
769  std::vector<float>& onlineIP3D,
770  std::vector<float>& onlineIP3DSig) {
771  std::vector<const reco::Track*> onlineTracks;
772 
773  for (auto iterTI = jetSVTagsColl->begin(); iterTI != jetSVTagsColl->end(); ++iterTI) {
774  float DR = reco::deltaR(iterTI->jet()->eta(), iterTI->jet()->phi(), hltJetEta, hltJetPhi);
775  if (DR > 0.3)
776  continue;
777 
778  const auto& ipInfo = *(iterTI->trackIPTagInfoRef().get());
779  const std::vector<reco::btag::TrackIPData>& ip = ipInfo.impactParameterData();
780 
781  unsigned int trackSize = ipInfo.selectedTracks().size();
782  for (unsigned int itt = 0; itt < trackSize; ++itt) {
783  const auto ptrackRef = (ipInfo.selectedTracks()[itt]);
784 
785  if (ptrackRef.isAvailable()) {
786  const reco::Track* ptrackPtr = reco::btag::toTrack(ptrackRef);
787  onlineTracks.push_back(ptrackPtr);
788  onlineIP3D.push_back(ip[itt].ip3d.value());
789  onlineIP3DSig.push_back(ip[itt].ip3d.significance());
790  }
791  }
792  }
793  return onlineTracks;
794 }
795 
797  iBooker.setCurrentFolder(dirname_);
798  for (auto& v : hltPathsAll_) {
799  std::string trgPathName = HLTConfigProvider::removeVersion(v.getPath());
800  std::string subdirName = dirname_ + "/" + trgPathName + v.getTriggerType();
801  std::string trigPath = "(" + trgPathName + ")";
802  iBooker.setCurrentFolder(subdirName);
803 
804  std::string labelname("HLT");
805  std::string histoname(labelname + "");
806  std::string title(labelname + "");
807 
808  histoname = labelname + "_Discr";
809  title = labelname + "_Discr " + trigPath;
810  v.Discr = iBooker.book1D(histoname.c_str(), title.c_str(), 110, -0.1, 1);
811 
812  histoname = labelname + "_Pt";
813  title = labelname + "_Pt " + trigPath;
814  v.Pt = iBooker.book1D(histoname.c_str(), title.c_str(), 100, 0, 400);
815 
816  histoname = labelname + "_Eta";
817  title = labelname + "_Eta " + trigPath;
818  v.Eta = iBooker.book1D(histoname.c_str(), title.c_str(), 60, -3.0, 3.0);
819 
820  histoname = "HLTvsRECO_Discr";
821  title = "online discr vs offline discr " + trigPath;
822  v.Discr_HLTvsRECO = iBooker.book2D(histoname.c_str(), title.c_str(), 110, -0.1, 1, 110, -0.1, 1);
823 
824  histoname = "HLTMinusRECO_Discr";
825  title = "online discr minus offline discr " + trigPath;
826  v.Discr_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -1, 1);
827 
828  histoname = "Turnon_loose_Discr";
829  title = "turn-on with loose threshold " + trigPath;
830  v.bookME(iBooker, v.Discr_turnon_loose, histoname, title, 22, -0.1, 1.);
831 
832  histoname = "Turnon_medium_Discr";
833  title = "turn-on with medium threshold " + trigPath;
834  v.bookME(iBooker, v.Discr_turnon_medium, histoname, title, 22, -0.1, 1.);
835 
836  histoname = "Turnon_tight_Discr";
837  title = "turn-on with tight threshold " + trigPath;
838  v.bookME(iBooker, v.Discr_turnon_tight, histoname, title, 22, -0.1, 1.);
839 
840  histoname = "Turnon_loose_Pt";
841  title = "turn-on with loose threshold " + trigPath;
842  v.bookME(iBooker, v.Pt_turnon_loose, histoname, title, 50, 0., 500.);
843 
844  histoname = "Turnon_medium_Pt";
845  title = "turn-on with medium threshold " + trigPath;
846  v.bookME(iBooker, v.Pt_turnon_medium, histoname, title, 50, 0., 500.);
847 
848  histoname = "Turnon_tight_Pt";
849  title = "turn-on with tight threshold " + trigPath;
850  v.bookME(iBooker, v.Pt_turnon_tight, histoname, title, 50, 0., 500.);
851 
852  histoname = "Turnon_loose_Eta";
853  title = "turn-on with loose threshold " + trigPath;
854  v.bookME(iBooker, v.Eta_turnon_loose, histoname, title, 60, -3., 3.);
855 
856  histoname = "Turnon_medium_Eta";
857  title = "turn-on with medium threshold " + trigPath;
858  v.bookME(iBooker, v.Eta_turnon_medium, histoname, title, 60, -3., 3.);
859 
860  histoname = "Turnon_tight_Eta";
861  title = "turn-on with tight threshold " + trigPath;
862  v.bookME(iBooker, v.Eta_turnon_tight, histoname, title, 60, -3., 3.);
863 
864  histoname = "Turnon_loose_Phi";
865  title = "turn-on with loose threshold " + trigPath;
866  v.bookME(iBooker, v.Phi_turnon_loose, histoname, title, 60, -3., 3.);
867 
868  histoname = "Turnon_medium_Phi";
869  title = "turn-on with medium threshold " + trigPath;
870  v.bookME(iBooker, v.Phi_turnon_medium, histoname, title, 60, -3., 3.);
871 
872  histoname = "Turnon_tight_Phi";
873  title = "turn-on with tight threshold " + trigPath;
874  v.bookME(iBooker, v.Phi_turnon_tight, histoname, title, 60, -3., 3.);
875 
876  histoname = labelname + "_PVz";
877  title = "online z(PV) " + trigPath;
878  v.PVz = iBooker.book1D(histoname.c_str(), title.c_str(), 80, -20, 20);
879 
880  histoname = labelname + "_fastPVz";
881  title = "online z(fastPV) " + trigPath;
882  v.fastPVz = iBooker.book1D(histoname.c_str(), title.c_str(), 80, -20, 20);
883 
884  histoname = "HLTMinusRECO_PVz";
885  title = "online z(PV) - offline z(PV) " + trigPath;
886  v.PVz_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 200, -0.5, 0.5);
887 
888  histoname = "HLTMinusRECO_fastPVz";
889  title = "online z(fastPV) - offline z(PV) " + trigPath;
890  v.fastPVz_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -2, 2);
891 
892  histoname = "n_vtx";
893  title = "N vertex candidates " + trigPath;
894  v.n_vtx = iBooker.book1D(histoname.c_str(), title.c_str(), 10, -0.5, 9.5);
895 
896  histoname = "vtx_mass";
897  title = "secondary vertex mass (GeV)" + trigPath;
898  v.vtx_mass = iBooker.book1D(histoname.c_str(), title.c_str(), 20, 0, 10);
899 
900  histoname = "n_vtx_trks";
901  title = "N tracks associated to secondary vertex" + trigPath;
902  v.n_vtx_trks = iBooker.book1D(histoname.c_str(), title.c_str(), 20, -0.5, 19.5);
903 
904  histoname = "n_sel_tracks";
905  title = "N selected tracks" + trigPath;
906  v.n_sel_tracks = iBooker.book1D(histoname.c_str(), title.c_str(), 25, -0.5, 24.5);
907 
908  histoname = "3d_ip_distance";
909  title = "3D IP distance of tracks (cm)" + trigPath;
910  v.h_3d_ip_distance = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -0.1, 0.1);
911 
912  histoname = "3d_ip_error";
913  title = "3D IP error of tracks (cm)" + trigPath;
914  v.h_3d_ip_error = iBooker.book1D(histoname.c_str(), title.c_str(), 40, 0., 0.1);
915 
916  histoname = "3d_ip_sig";
917  title = "3D IP significance of tracks (cm)" + trigPath;
918  v.h_3d_ip_sig = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -40, 40);
919 
920  //new
921  histoname = "jetNSecondaryVertices";
922  title = "jet N Secondary Vertices" + trigPath;
923  v.h_jetNSecondaryVertices = iBooker.book1D(histoname.c_str(), title.c_str(), 10, -0.5, 9.5);
924 
925  histoname = "jet_pt";
926  title = "jet pt" + trigPath;
927  v.h_jet_pt = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 100);
928 
929  histoname = "jet_eta";
930  title = "jet eta" + trigPath;
931  v.h_jet_eta = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -2.5, 2.5);
932 
933  histoname = "trackSumJetEtRatio";
934  title = "trackSumJetEtRatio" + trigPath;
935  v.h_trackSumJetEtRatio = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 1.5);
936 
937  histoname = "trackSip2dValAboveCharm";
938  title = "trackSip2dSigAboveCharm" + trigPath;
939  v.h_trackSip2dSigAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.2, 0.2);
940 
941  histoname = "trackSip2dSigAboveCharm";
942  title = "trackSip2dSigAboveCharm" + trigPath;
943  v.h_trackSip2dValAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -50, 50);
944 
945  histoname = "trackSip3dValAboveCharm";
946  title = "trackSip3dValAboveCharm" + trigPath;
947  v.h_trackSip3dValAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.2, 0.2);
948 
949  histoname = "trackSip3dSigAboveCharm";
950  title = "trackSip3dSigAboveCharm" + trigPath;
951  v.h_trackSip3dSigAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -50, 50);
952 
953  histoname = "jetNSelectedTracks";
954  title = "jet N Selected Tracks" + trigPath;
955  v.h_jetNSelectedTracks = iBooker.book1D(histoname.c_str(), title.c_str(), 42, -1.5, 40.5);
956 
957  histoname = "jetNTracksEtaRel";
958  title = "jetNTracksEtaRel" + trigPath;
959  v.h_jetNTracksEtaRel = iBooker.book1D(histoname.c_str(), title.c_str(), 42, -1.5, 40.5);
960 
961  histoname = "vertexCategory";
962  title = "vertex category" + trigPath;
963  v.h_vertexCategory = iBooker.book1D(histoname.c_str(), title.c_str(), 4, -1.5, 2.5);
964 
965  histoname = "trackSumJetDeltaR";
966  title = "trackSumJetDeltaR" + trigPath;
967  v.h_trackSumJetDeltaR = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 0.35);
968 
969  //new 2 below
970  histoname = "trackJetDistVal";
971  title = "trackJetDistVal" + trigPath;
972  v.h_trackJetDistVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -1, 0.01);
973 
974  histoname = "trackPtRel";
975  title = "track pt rel" + trigPath;
976  v.h_trackPtRel = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 7);
977 
978  histoname = "trackDeltaR";
979  title = "trackDeltaR" + trigPath;
980  v.h_trackDeltaR = iBooker.book1D(histoname.c_str(), title.c_str(), 160, -0.05, .47);
981 
982  histoname = "trackPtRatio";
983  title = "trackPtRatio" + trigPath;
984  v.h_trackPtRatio = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.01, 0.3);
985 
986  histoname = "trackSip2dSig";
987  title = "trackSip2dSig" + trigPath;
988  v.h_trackSip2dSig = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -55, 55);
989 
990  histoname = "trackDecayLenVal";
991  title = "trackDecayLenVal" + trigPath;
992  v.h_trackDecayLenVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 22);
993 
994  histoname = "trackEtaRel";
995  title = "trackEtaRel" + trigPath;
996  v.h_trackEtaRel = iBooker.book1D(histoname.c_str(), title.c_str(), 31, 0, 30);
997 
998  //new 3 below
999  histoname = "vertexEnergyRatio";
1000  title = "vertexEnergyRatio" + trigPath;
1001  v.h_vertexEnergyRatio = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 3);
1002 
1003  histoname = "vertexJetDeltaR";
1004  title = "vertexJetDeltaR" + trigPath;
1005  v.h_vertexJetDeltaR = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.01, 0.4);
1006 
1007  histoname = "flightDistance2dVal";
1008  title = "flightDistance2dVal" + trigPath;
1009  v.h_flightDistance2dVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 5);
1010 
1011  histoname = "flightDistance2dSig";
1012  title = "flightDistance2dSig" + trigPath;
1013  v.h_flightDistance2dSig = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -10, 150);
1014 
1015  histoname = "flightDistance3dVal";
1016  title = "flightDistance3dVal" + trigPath;
1017  v.h_flightDistance3dVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 5);
1018 
1019  histoname = "flightDistance3dSig";
1020  title = "flightDistance3dSig" + trigPath;
1021  v.h_flightDistance3dSig = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -10, 150);
1022 
1023  //end new
1024 
1025  histoname = "OnlineTrkEff_Pt";
1026  title = "Relative Online Trk Efficiency vs Pt " + trigPath;
1027  v.bookME(iBooker, v.OnlineTrkEff_Pt, histoname, title, 50, -0.5, 20.);
1028 
1029  histoname = "OnlineTrkEff_Eta";
1030  title = "Relative Online Trk Efficiency vs Eta " + trigPath;
1031  v.bookME(iBooker, v.OnlineTrkEff_Eta, histoname, title, 60, -3.0, 3.0);
1032 
1033  histoname = "OnlineTrkEff_3d_ip_distance";
1034  title = "Relative Online Trk Efficiency vs IP3D " + trigPath;
1035  v.bookME(iBooker, v.OnlineTrkEff_3d_ip_distance, histoname, title, 40, -0.1, 0.1);
1036 
1037  histoname = "OnlineTrkEff_3d_ip_sig";
1038  title = "Relative Online Trk Efficiency vs IP3D significance " + trigPath;
1039  v.bookME(iBooker, v.OnlineTrkEff_3d_ip_sig, histoname, title, 40, -40, 40);
1040 
1041  histoname = "OnlineTrkFake_Pt";
1042  title = "Relative Online Trk Fake Rate vs Pt " + trigPath;
1043  v.bookME(iBooker, v.OnlineTrkFake_Pt, histoname, title, 50, -0.5, 20.);
1044 
1045  histoname = "OnlineTrkFake_Eta";
1046  title = "Relative Online Trk Fake Rate vs Eta " + trigPath;
1047  v.bookME(iBooker, v.OnlineTrkFake_Eta, histoname, title, 60, -3.0, 3.0);
1048 
1049  histoname = "OnlineTrkFake_3d_ip_distance";
1050  title = "Relative Online Trk Fake Rate vs IP3D " + trigPath;
1051  v.bookME(iBooker, v.OnlineTrkFake_3d_ip_distance, histoname, title, 40, -0.1, 0.1);
1052 
1053  histoname = "OnlineTrkFake_3d_ip_sig";
1054  title = "Relative Online Trk Fake Rate vs IP3D significance " + trigPath;
1055  v.bookME(iBooker, v.OnlineTrkFake_3d_ip_sig, histoname, title, 40, -40, 40);
1056 
1057  // histoname = "n_pixel_hits";
1058  // title = "N pixel hits"+trigPath;
1059  // v.n_pixel_hits = iBooker.book1D(histoname.c_str(), title.c_str(), 16, -0.5, 15.5);
1060 
1061  // histoname = "n_total_hits";
1062  // title = "N hits"+trigPath;
1063  // v.n_total_hits = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -0.5, 39.5);
1064  }
1065 }
1066 
1067 // Define this as a plug-in
void analyze(const edm::Event &, const edm::EventSetup &) override
BTVHLTOfflineSource(const edm::ParameterSet &)
const std::string & triggerName(unsigned int triggerIndex) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< std::vector< SVTagInfo > > SVTagInfosTokenPf_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:26
const bool operator==(const std::string &v) const
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
static PFTauRenderPlugin instance
edm::EDGetTokenT< reco::JetTagCollection > pfTagsToken_
edm::EDGetTokenT< reco::JetTagCollection > offlineDiscrTokenb_
void setLabel(std::string labelName)
reco::TemplatedSecondaryVertexTagInfo< reco::CandIPTagInfo, reco::VertexCompositePtrCandidate > SVTagInfo
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Definition: IPTagInfo.h:24
static const std::string removeVersion(const std::string &trigger)
edm::EDGetTokenT< std::vector< reco::Vertex > > offlinePVToken_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
double pt() const
track transverse momentum
Definition: TrackBase.h:637
char const * label
std::vector< PathInfo >::iterator find(const std::string &pathName)
int iEvent
Definition: GenABIO.cc:224
edm::InputTag triggerResultsLabel_
edm::Handle< reco::JetTagCollection > pfTags
unsigned int size() const
number of trigger paths in trigger table
edm::InputTag triggerSummaryLabel_
const std::string getTriggerType() const
~PathInfo() override=default
def pv(vc)
Definition: MetAnalyzer.py:7
PathInfo(const int prescaleUsed, const std::string &pathName, const std::string &filterName, const std::string &processName, const int type, const std::string &triggerType)
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
PathInfoCollection hltPathsAll_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
~BTVHLTOfflineSource() override
static std::string const triggerResults
Definition: EdmProvDump.cc:47
const std::string getProcess() const
HLTConfigProvider hltConfig_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
Log< level::Info, false > LogInfo
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
labelName
Custom Jet reco ####.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
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:221
edm::EDGetTokenT< std::vector< reco::Vertex > > hltPFPVToken_
void dqmBeginRun(edm::Run const &run, edm::EventSetup const &c) override
bool isValid() const
Definition: HandleBase.h:70
std::vector< const reco::Track * > getOfflineBTagTracks(float hltJetEta, float hltJetPhi, edm::Handle< edm::View< reco::BaseTagInfo >> offlineIPTagHandle, std::vector< float > &offlineIP3D, std::vector< float > &offlineIP3DSig)
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
fixed size matrix
const std::string getPath() const
HLT enums.
edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > offlineIPToken_
edm::EDGetTokenT< std::vector< reco::ShallowTagInfo > > shallowTagInfosTokenPf_
const edm::InputTag getTag() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
const std::string getLabel() const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
std::vector< const reco::Track * > getOnlineBTagTracks(float hltJetEta, float hltJetPhi, edm::Handle< std::vector< Base >> jetSVTagsColl, std::vector< float > &onlineIP3D, std::vector< float > &onlineIP3DSig)
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
#define LogDebug(id)