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