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