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_; }
147  void setLabel(std::string labelName) { filterName_ = std::move(labelName); }
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;
183  // MonitorElement* n_pixel_hits_;
184  // MonitorElement* n_total_hits_;
185 
186  private:
193  };
194 
195  class PathInfoCollection : public std::vector<PathInfo> {
196  public:
198  std::vector<PathInfo>::iterator find(const std::string& pathName) { return std::find(begin(), end(), pathName); }
199  };
200 
202 };
203 
204 using namespace edm;
205 using namespace reco;
206 using namespace std;
207 using namespace trigger;
208 
210  : dirname_(iConfig.getUntrackedParameter("dirname", std::string("HLT/BTV/"))),
211  processname_(iConfig.getParameter<std::string>("processname")),
212  verbose_(iConfig.getUntrackedParameter<bool>("verbose", false)),
213  triggerSummaryLabel_(iConfig.getParameter<edm::InputTag>("triggerSummaryLabel")),
214  triggerResultsLabel_(iConfig.getParameter<edm::InputTag>("triggerResultsLabel")),
215  turnon_threshold_loose_(iConfig.getParameter<double>("turnon_threshold_loose")),
216  turnon_threshold_medium_(iConfig.getParameter<double>("turnon_threshold_medium")),
217  turnon_threshold_tight_(iConfig.getParameter<double>("turnon_threshold_tight")),
218  offlineDiscrTokenb_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("offlineDiscrLabelb"))),
219  offlineDiscrTokenbb_(
220  consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("offlineDiscrLabelbb"))),
221  offlineIPToken_(consumes<View<BaseTagInfo>>(iConfig.getParameter<edm::InputTag>("offlineIPLabel"))),
222 
223  hltFastPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltFastPVLabel"))),
224  hltPFPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltPFPVLabel"))),
225  hltCaloPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltCaloPVLabel"))),
226  offlinePVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("offlinePVLabel"))),
227  triggerResultsToken(consumes<edm::TriggerResults>(triggerResultsLabel_)),
228  triggerResultsFUToken(consumes<edm::TriggerResults>(
229  edm::InputTag(triggerResultsLabel_.label(), triggerResultsLabel_.instance(), std::string("FU")))),
230  triggerSummaryToken(consumes<trigger::TriggerEvent>(triggerSummaryLabel_)),
231  triggerSummaryFUToken(consumes<trigger::TriggerEvent>(
232  edm::InputTag(triggerSummaryLabel_.label(), triggerSummaryLabel_.instance(), std::string("FU")))),
233  shallowTagInfosTokenCalo_(
234  consumes<vector<reco::ShallowTagInfo>>(edm::InputTag("hltDeepCombinedSecondaryVertexBJetTagsInfosCalo"))),
235  shallowTagInfosTokenPf_(
236  consumes<vector<reco::ShallowTagInfo>>(edm::InputTag("hltDeepCombinedSecondaryVertexBJetTagsInfos"))),
237  SVTagInfosTokenCalo_(consumes<std::vector<reco::SecondaryVertexTagInfo>>(
238  edm::InputTag("hltInclusiveSecondaryVertexFinderTagInfos"))),
239  SVTagInfosTokenPf_(consumes<std::vector<SVTagInfo>>(edm::InputTag("hltDeepSecondaryVertexTagInfosPF"))),
240  caloTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("onlineDiscrLabelCalo"))),
241  pfTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("onlineDiscrLabelPF"))),
242  minDecayLength_(iConfig.getParameter<double>("minDecayLength")),
243  maxDecayLength_(iConfig.getParameter<double>("maxDecayLength")),
244  minJetDistance_(iConfig.getParameter<double>("minJetDistance")),
245  maxJetDistance_(iConfig.getParameter<double>("maxJetDistance")),
246  dRTrackMatch_(iConfig.getParameter<double>("dRTrackMatch")) {
247  std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet>>("pathPairs");
248  for (const auto& path : paths) {
249  custompathnamepairs_.push_back(
250  make_pair(path.getParameter<std::string>("pathname"), path.getParameter<std::string>("pathtype")));
251  }
252 }
253 
255 
257  bool changed = true;
258  if (!hltConfig_.init(run, c, processname_, changed)) {
259  LogDebug("BTVHLTOfflineSource") << "HLTConfigProvider failed to initialize.";
260  }
261 
262  for (unsigned int idx = 0; idx != hltConfig_.size(); ++idx) {
263  const auto& pathname = hltConfig_.triggerName(idx);
264 
265  for (const auto& custompathnamepair : custompathnamepairs_) {
266  if (pathname.find(custompathnamepair.first) != std::string::npos) {
267  hltPathsAll_.push_back(PathInfo(1, pathname, "dummy", processname_, 0, custompathnamepair.second));
268  }
269  }
270  }
271 }
272 
276  if (!triggerResults.isValid()) {
278  if (!triggerResults.isValid()) {
279  edm::LogInfo("BTVHLTOfflineSource") << "TriggerResults not found, skipping event";
280  return;
281  }
282  }
283 
284  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
285 
287  iEvent.getByToken(triggerSummaryToken, triggerObj);
288  if (!triggerObj.isValid()) {
289  iEvent.getByToken(triggerSummaryFUToken, triggerObj);
290  if (!triggerObj.isValid()) {
291  edm::LogInfo("BTVHLTOfflineSource") << "TriggerEvent not found, skipping event";
292  return;
293  }
294  }
295 
297  iEvent.getByToken(caloTagsToken_, caloTags);
298 
300  iEvent.getByToken(pfTagsToken_, pfTags);
301 
302  Handle<reco::VertexCollection> VertexHandler;
303 
304  Handle<reco::JetTagCollection> offlineJetTagHandlerb;
305  iEvent.getByToken(offlineDiscrTokenb_, offlineJetTagHandlerb);
306 
307  Handle<reco::JetTagCollection> offlineJetTagHandlerbb;
308  iEvent.getByToken(offlineDiscrTokenbb_, offlineJetTagHandlerbb);
309 
310  Handle<View<BaseTagInfo>> offlineIPTagHandle;
311  iEvent.getByToken(offlineIPToken_, offlineIPTagHandle);
312 
313  Handle<reco::VertexCollection> offlineVertexHandler;
314  iEvent.getByToken(offlinePVToken_, offlineVertexHandler);
315 
316  if (verbose_ && iEvent.id().event() % 10000 == 0)
317  cout << "Run = " << iEvent.id().run() << ", LS = " << iEvent.luminosityBlock()
318  << ", Event = " << iEvent.id().event() << endl;
319 
320  if (!triggerResults.isValid())
321  return;
322 
323  edm::Handle<std::vector<SVTagInfo>> jetSVTagsCollPF;
325 
326  for (auto& v : hltPathsAll_) {
327  unsigned index = triggerNames.triggerIndex(v.getPath());
328  if (!(index < triggerNames.size())) {
329  edm::LogInfo("BTVHLTOfflineSource") << "Path " << v.getPath() << " not in menu, skipping event";
330  continue;
331  }
332 
333  if (!triggerResults->accept(index)) {
334  edm::LogInfo("BTVHLTOfflineSource") << "Path " << v.getPath() << " not accepted, skipping event";
335  continue;
336  }
337 
338  if (v.getTriggerType() == "PF") {
339  iEvent.getByToken(SVTagInfosTokenPf_, jetSVTagsCollPF);
340  } else {
341  iEvent.getByToken(SVTagInfosTokenCalo_, jetSVTagsCollCalo);
342  }
343 
344  // PF and Calo btagging
345  if ((v.getTriggerType() == "PF" && pfTags.isValid()) ||
346  (v.getTriggerType() == "Calo" && caloTags.isValid() && !caloTags->empty())) {
347  const auto& iter = (v.getTriggerType() == "PF") ? pfTags->begin() : caloTags->begin();
348 
349  float Discr_online = iter->second;
350  if (Discr_online < 0)
351  Discr_online = -0.05;
352 
353  v.Discr->Fill(Discr_online);
354  v.Pt->Fill(iter->first->pt());
355  v.Eta->Fill(iter->first->eta());
356 
357  if (offlineJetTagHandlerb.isValid()) {
358  for (auto const& iterOffb : *offlineJetTagHandlerb) {
359  float DR = reco::deltaR(iterOffb.first->eta(), iterOffb.first->phi(), iter->first->eta(), iter->first->phi());
360  if (DR < 0.3) {
361  float Discr_offline = iterOffb.second;
362 
363  // offline probb and probbb must be added (if probbb isn't specified, it'll just use probb)
364  if (offlineJetTagHandlerbb.isValid()) {
365  for (auto const& iterOffbb : *offlineJetTagHandlerbb) {
366  DR = reco::deltaR(
367  iterOffbb.first->eta(), iterOffbb.first->phi(), iter->first->eta(), iter->first->phi());
368  if (DR < 0.3) {
369  Discr_offline += iterOffbb.second;
370  break;
371  }
372  }
373  }
374 
375  if (Discr_offline < 0)
376  Discr_offline = -0.05;
377  v.Discr_HLTvsRECO->Fill(Discr_online, Discr_offline);
378  v.Discr_HLTMinusRECO->Fill(Discr_online - Discr_offline);
379 
380  v.Discr_turnon_loose.denominator->Fill(Discr_offline);
381  v.Discr_turnon_medium.denominator->Fill(Discr_offline);
382  v.Discr_turnon_tight.denominator->Fill(Discr_offline);
383 
384  if (Discr_online > turnon_threshold_loose_)
385  v.Discr_turnon_loose.numerator->Fill(Discr_offline);
386  if (Discr_online > turnon_threshold_medium_)
387  v.Discr_turnon_medium.numerator->Fill(Discr_offline);
388  if (Discr_online > turnon_threshold_tight_)
389  v.Discr_turnon_tight.numerator->Fill(Discr_offline);
390 
391  break;
392  }
393  }
394  }
395 
396  bool pfSVTagCollValid = (v.getTriggerType() == "PF" && jetSVTagsCollPF.isValid());
397  bool caloSVTagCollValid = (v.getTriggerType() == "Calo" && jetSVTagsCollCalo.isValid());
398  if (offlineIPTagHandle.isValid() && (pfSVTagCollValid || caloSVTagCollValid)) {
399  std::vector<float> offlineIP3D;
400  std::vector<float> offlineIP3DSig;
401  std::vector<const reco::Track*> offlineTracks = getOfflineBTagTracks(
402  iter->first->eta(), iter->first->phi(), offlineIPTagHandle, offlineIP3D, offlineIP3DSig);
403  std::vector<const reco::Track*> onlineTracks;
404  std::vector<float> onlineIP3D;
405  std::vector<float> onlineIP3DSig;
406  if (pfSVTagCollValid)
407  onlineTracks = getOnlineBTagTracks<SVTagInfo>(
408  iter->first->eta(), iter->first->phi(), jetSVTagsCollPF, onlineIP3D, onlineIP3DSig);
409  if (caloSVTagCollValid)
410  onlineTracks = getOnlineBTagTracks<reco::SecondaryVertexTagInfo>(
411  iter->first->eta(), iter->first->phi(), jetSVTagsCollCalo, onlineIP3D, onlineIP3DSig);
412 
413  for (unsigned int iOffTrk = 0; iOffTrk < offlineTracks.size(); ++iOffTrk) {
414  const reco::Track* offTrk = offlineTracks.at(iOffTrk);
415  bool hasMatch = false;
416  float offTrkEta = offTrk->eta();
417  float offTrkPhi = offTrk->phi();
418 
419  for (const reco::Track* onTrk : onlineTracks) {
420  float DR = reco::deltaR(offTrkEta, offTrkPhi, onTrk->eta(), onTrk->phi());
421  if (DR < dRTrackMatch_) {
422  hasMatch = true;
423  }
424  }
425 
426  float offTrkPt = offTrk->pt();
427  v.OnlineTrkEff_Pt.denominator->Fill(offTrkPt);
428  if (hasMatch)
429  v.OnlineTrkEff_Pt.numerator->Fill(offTrkPt);
430 
431  v.OnlineTrkEff_Eta.denominator->Fill(offTrkEta);
432  if (hasMatch)
433  v.OnlineTrkEff_Eta.numerator->Fill(offTrkEta);
434 
435  v.OnlineTrkEff_3d_ip_distance.denominator->Fill(offlineIP3D.at(iOffTrk));
436  if (hasMatch)
437  v.OnlineTrkEff_3d_ip_distance.numerator->Fill(offlineIP3D.at(iOffTrk));
438 
439  v.OnlineTrkEff_3d_ip_sig.denominator->Fill(offlineIP3DSig.at(iOffTrk));
440  if (hasMatch)
441  v.OnlineTrkEff_3d_ip_sig.numerator->Fill(offlineIP3DSig.at(iOffTrk));
442  }
443 
444  for (unsigned int iOnTrk = 0; iOnTrk < onlineTracks.size(); ++iOnTrk) {
445  const reco::Track* onTrk = onlineTracks.at(iOnTrk);
446  bool hasMatch = false;
447  float onTrkEta = onTrk->eta();
448  float onTrkPhi = onTrk->phi();
449 
450  for (const reco::Track* offTrk : offlineTracks) {
451  float DR = reco::deltaR(onTrkEta, onTrkPhi, offTrk->eta(), offTrk->phi());
452  if (DR < dRTrackMatch_) {
453  hasMatch = true;
454  }
455  }
456 
457  float onTrkPt = onTrk->pt();
458  v.OnlineTrkFake_Pt.denominator->Fill(onTrkPt);
459  if (!hasMatch)
460  v.OnlineTrkFake_Pt.numerator->Fill(onTrkPt);
461 
462  v.OnlineTrkFake_Eta.denominator->Fill(onTrkEta);
463  if (!hasMatch)
464  v.OnlineTrkFake_Eta.numerator->Fill(onTrkEta);
465 
466  v.OnlineTrkFake_3d_ip_distance.denominator->Fill(onlineIP3D.at(iOnTrk));
467  if (!hasMatch)
468  v.OnlineTrkFake_3d_ip_distance.numerator->Fill(onlineIP3D.at(iOnTrk));
469 
470  v.OnlineTrkFake_3d_ip_sig.denominator->Fill(onlineIP3DSig.at(iOnTrk));
471  if (!hasMatch)
472  v.OnlineTrkFake_3d_ip_sig.numerator->Fill(onlineIP3DSig.at(iOnTrk));
473  }
474  }
475 
476  if (v.getTriggerType() == "PF") {
477  iEvent.getByToken(hltPFPVToken_, VertexHandler);
478  } else {
479  iEvent.getByToken(hltFastPVToken_, VertexHandler);
480  }
481  if (VertexHandler.isValid()) {
482  v.PVz->Fill(VertexHandler->begin()->z());
483  if (offlineVertexHandler.isValid()) {
484  v.PVz_HLTMinusRECO->Fill(VertexHandler->begin()->z() - offlineVertexHandler->begin()->z());
485  }
486  }
487  } // caloTagsValid
488 
489  // specific to Calo b-tagging
490  if (caloTags.isValid() && v.getTriggerType() == "Calo" && !caloTags->empty()) {
491  iEvent.getByToken(hltCaloPVToken_, VertexHandler);
492  if (VertexHandler.isValid()) {
493  v.fastPVz->Fill(VertexHandler->begin()->z());
494  if (offlineVertexHandler.isValid()) {
495  v.fastPVz_HLTMinusRECO->Fill(VertexHandler->begin()->z() - offlineVertexHandler->begin()->z());
496  }
497  }
498  }
499 
500  // additional plots from tag info collections
502 
504  iEvent.getByToken(shallowTagInfosTokenCalo_, shallowTagInfosCalo);
505 
507  iEvent.getByToken(shallowTagInfosTokenPf_, shallowTagInfosPf);
508 
509  // 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;
510  // iEvent.getByToken(caloTagInfosToken_, caloTagInfos);
511 
512  // 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;
513  // iEvent.getByToken(pfTagInfosToken_, pfTagInfos);
514 
515  // first try to get info from shallowTagInfos ...
516  if ((v.getTriggerType() == "PF" && shallowTagInfosPf.isValid()) ||
517  (v.getTriggerType() == "Calo" && shallowTagInfosCalo.isValid())) {
518  const auto& shallowTagInfoCollection = (v.getTriggerType() == "PF") ? shallowTagInfosPf : shallowTagInfosCalo;
519  for (const auto& shallowTagInfo : *shallowTagInfoCollection) {
520  const auto& tagVars = shallowTagInfo.taggingVariables();
521 
522  // n secondary vertices and n selected tracks
523  for (const auto& tagVar : tagVars.getList(reco::btau::jetNSecondaryVertices, false)) {
524  v.n_vtx->Fill(tagVar);
525  }
526  for (const auto& tagVar : tagVars.getList(reco::btau::jetNSelectedTracks, false)) {
527  v.n_sel_tracks->Fill(tagVar);
528  }
529 
530  // impact parameter
531  const auto& trackSip3dVal = tagVars.getList(reco::btau::trackSip3dVal, false);
532  const auto& trackSip3dSig = tagVars.getList(reco::btau::trackSip3dSig, false);
533  for (unsigned i_trk = 0; i_trk < trackSip3dVal.size(); i_trk++) {
534  float val = trackSip3dVal[i_trk];
535  float sig = trackSip3dSig[i_trk];
536  v.h_3d_ip_distance->Fill(val);
537  v.h_3d_ip_error->Fill(val / sig);
538  v.h_3d_ip_sig->Fill(sig);
539  }
540 
541  // vertex mass and tracks per vertex
542  for (const auto& tagVar : tagVars.getList(reco::btau::vertexMass, false)) {
543  v.vtx_mass->Fill(tagVar);
544  }
545  for (const auto& tagVar : tagVars.getList(reco::btau::vertexNTracks, false)) {
546  v.n_vtx_trks->Fill(tagVar);
547  }
548 
549  // // track N total/pixel hits
550  // for (const auto & tagVar : tagVars.getList(reco::btau::trackNPixelHits, false)) {
551  // v.n_pixel_hits->Fill(tagVar);}
552  // for (const auto & tagVar : tagVars.getList(reco::btau::trackNTotalHits, false)) {
553  // v.n_total_hits->Fill(tagVar);}
554  }
555  }
556 
557  // ... otherwise from usual tag infos.
558  // else
559  // if ( (v.getTriggerType() == "PF" && pfTagInfos.isValid())
560  // || (v.getTriggerType() == "Calo" && caloTagInfos.isValid()) )
561  // {
562  // const auto & DiscrTagInfoCollection = (v.getTriggerType() == "PF") ? pfTagInfos : caloTagInfos;
563 
564  // // loop over secondary vertex tag infos
565  // for (const auto & DiscrTagInfo : *DiscrTagInfoCollection) {
566  // v.n_vtx->Fill(DiscrTagInfo.nVertexCandidates());
567  // v.n_sel_tracks->Fill(DiscrTagInfo.nSelectedTracks());
568 
569  // // loop over selected tracks in each tag info
570  // for (unsigned i_trk=0; i_trk < DiscrTagInfo.nSelectedTracks(); i_trk++) {
571  // const auto & ip3d = DiscrTagInfo.trackIPData(i_trk).ip3d;
572  // v.h_3d_ip_distance->Fill(ip3d.value());
573  // v.h_3d_ip_error->Fill(ip3d.error());
574  // v.h_3d_ip_sig->Fill(ip3d.significance());
575  // }
576 
577  // // loop over vertex candidates in each tag info
578  // for (unsigned i_sv=0; i_sv < DiscrTagInfo.nVertexCandidates(); i_sv++) {
579  // const auto & sv = DiscrTagInfo.secondaryVertex(i_sv);
580  // v.vtx_mass->Fill(sv.p4().mass());
581  // v.n_vtx_trks->Fill(sv.nTracks());
582 
583  // // loop over tracks for number of pixel and total hits
584  // const auto & trkIPTagInfo = DiscrTagInfo.trackIPTagInfoRef().get();
585  // for (const auto & trk : trkIPTagInfo->selectedTracks()) {
586  // v.n_pixel_hits->Fill(trk.get()->hitPattern().numberOfValidPixelHits());
587  // v.n_total_hits->Fill(trk.get()->hitPattern().numberOfValidHits());
588  // }
589  // }
590  // }
591  // }
592  }
593 }
594 
595 std::vector<const reco::Track*> BTVHLTOfflineSource::getOfflineBTagTracks(float hltJetEta,
596  float hltJetPhi,
597  Handle<View<BaseTagInfo>> offlineIPTagHandle,
598  std::vector<float>& offlineIP3D,
599  std::vector<float>& offlineIP3DSig) {
600  std::vector<const reco::Track*> offlineTracks;
601 
602  for (auto const& iterOffIP : *offlineIPTagHandle) {
603  float DR = reco::deltaR(iterOffIP.jet()->eta(), iterOffIP.jet()->phi(), hltJetEta, hltJetPhi);
604 
605  if (DR > 0.3)
606  continue;
607 
609  dynamic_cast<const reco::IPTagInfo<vector<reco::CandidatePtr>, reco::JetTagInfo>*>(&iterOffIP);
610 
611  if (!tagInfo) {
612  throw cms::Exception("Configuration")
613  << "BTagPerformanceAnalyzer: Extended TagInfo not of type TrackIPTagInfo. " << std::endl;
614  }
615 
616  const GlobalPoint pv(tagInfo->primaryVertex()->position().x(),
617  tagInfo->primaryVertex()->position().y(),
618  tagInfo->primaryVertex()->position().z());
619 
620  const std::vector<reco::btag::TrackIPData>& ip = tagInfo->impactParameterData();
621 
622  std::vector<std::size_t> sortedIndices = tagInfo->sortedIndexes(reco::btag::IP2DSig);
623  std::vector<reco::CandidatePtr> sortedTracks = tagInfo->sortedTracks(sortedIndices);
624  std::vector<std::size_t> selectedIndices;
625  vector<reco::CandidatePtr> selectedTracks;
626  for (unsigned int n = 0; n != sortedIndices.size(); ++n) {
627  double decayLength = (ip[sortedIndices[n]].closestToJetAxis - pv).mag();
628  double jetDistance = ip[sortedIndices[n]].distanceToJetAxis.value();
629  if (decayLength > minDecayLength_ && decayLength < maxDecayLength_ && fabs(jetDistance) >= minJetDistance_ &&
630  fabs(jetDistance) < maxJetDistance_) {
631  selectedIndices.push_back(sortedIndices[n]);
632  selectedTracks.push_back(sortedTracks[n]);
633  }
634  }
635 
636  for (unsigned int n = 0; n != selectedIndices.size(); ++n) {
638  offlineTracks.push_back(track);
639  offlineIP3D.push_back(ip[n].ip3d.value());
640  offlineIP3DSig.push_back(ip[n].ip3d.significance());
641  }
642  }
643  return offlineTracks;
644 }
645 
646 template <class Base>
647 std::vector<const reco::Track*> BTVHLTOfflineSource::getOnlineBTagTracks(float hltJetEta,
648  float hltJetPhi,
649  edm::Handle<std::vector<Base>> jetSVTagsColl,
650  std::vector<float>& onlineIP3D,
651  std::vector<float>& onlineIP3DSig) {
652  std::vector<const reco::Track*> onlineTracks;
653 
654  for (auto iterTI = jetSVTagsColl->begin(); iterTI != jetSVTagsColl->end(); ++iterTI) {
655  float DR = reco::deltaR(iterTI->jet()->eta(), iterTI->jet()->phi(), hltJetEta, hltJetPhi);
656  if (DR > 0.3)
657  continue;
658 
659  const auto& ipInfo = *(iterTI->trackIPTagInfoRef().get());
660  const std::vector<reco::btag::TrackIPData>& ip = ipInfo.impactParameterData();
661 
662  unsigned int trackSize = ipInfo.selectedTracks().size();
663  for (unsigned int itt = 0; itt < trackSize; ++itt) {
664  const auto ptrackRef = (ipInfo.selectedTracks()[itt]); //TrackRef or
665  const reco::Track* ptrackPtr = reco::btag::toTrack(ptrackRef);
666  onlineTracks.push_back(ptrackPtr);
667  onlineIP3D.push_back(ip[itt].ip3d.value());
668  onlineIP3DSig.push_back(ip[itt].ip3d.significance());
669  }
670  }
671  return onlineTracks;
672 }
673 
675  iBooker.setCurrentFolder(dirname_);
676  for (auto& v : hltPathsAll_) {
677  std::string trgPathName = HLTConfigProvider::removeVersion(v.getPath());
678  std::string subdirName = dirname_ + "/" + trgPathName + v.getTriggerType();
679  std::string trigPath = "(" + trgPathName + ")";
680  iBooker.setCurrentFolder(subdirName);
681 
682  std::string labelname("HLT");
683  std::string histoname(labelname + "");
684  std::string title(labelname + "");
685 
686  histoname = labelname + "_Discr";
687  title = labelname + "_Discr " + trigPath;
688  v.Discr = iBooker.book1D(histoname.c_str(), title.c_str(), 110, -0.1, 1);
689 
690  histoname = labelname + "_Pt";
691  title = labelname + "_Pt " + trigPath;
692  v.Pt = iBooker.book1D(histoname.c_str(), title.c_str(), 100, 0, 400);
693 
694  histoname = labelname + "_Eta";
695  title = labelname + "_Eta " + trigPath;
696  v.Eta = iBooker.book1D(histoname.c_str(), title.c_str(), 60, -3.0, 3.0);
697 
698  histoname = "HLTvsRECO_Discr";
699  title = "online discr vs offline discr " + trigPath;
700  v.Discr_HLTvsRECO = iBooker.book2D(histoname.c_str(), title.c_str(), 110, -0.1, 1, 110, -0.1, 1);
701 
702  histoname = "HLTMinusRECO_Discr";
703  title = "online discr minus offline discr " + trigPath;
704  v.Discr_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -1, 1);
705 
706  histoname = "Turnon_loose_Discr";
707  title = "turn-on with loose threshold " + trigPath;
708  v.bookME(iBooker, v.Discr_turnon_loose, histoname, title, 22, -0.1, 1.);
709 
710  histoname = "Turnon_medium_Discr";
711  title = "turn-on with medium threshold " + trigPath;
712  v.bookME(iBooker, v.Discr_turnon_medium, histoname, title, 22, -0.1, 1.);
713 
714  histoname = "Turnon_tight_Discr";
715  title = "turn-on with tight threshold " + trigPath;
716  v.bookME(iBooker, v.Discr_turnon_tight, histoname, title, 22, -0.1, 1.);
717 
718  histoname = labelname + "_PVz";
719  title = "online z(PV) " + trigPath;
720  v.PVz = iBooker.book1D(histoname.c_str(), title.c_str(), 80, -20, 20);
721 
722  histoname = labelname + "_fastPVz";
723  title = "online z(fastPV) " + trigPath;
724  v.fastPVz = iBooker.book1D(histoname.c_str(), title.c_str(), 80, -20, 20);
725 
726  histoname = "HLTMinusRECO_PVz";
727  title = "online z(PV) - offline z(PV) " + trigPath;
728  v.PVz_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 200, -0.5, 0.5);
729 
730  histoname = "HLTMinusRECO_fastPVz";
731  title = "online z(fastPV) - offline z(PV) " + trigPath;
732  v.fastPVz_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -2, 2);
733 
734  histoname = "n_vtx";
735  title = "N vertex candidates " + trigPath;
736  v.n_vtx = iBooker.book1D(histoname.c_str(), title.c_str(), 10, -0.5, 9.5);
737 
738  histoname = "vtx_mass";
739  title = "secondary vertex mass (GeV)" + trigPath;
740  v.vtx_mass = iBooker.book1D(histoname.c_str(), title.c_str(), 20, 0, 10);
741 
742  histoname = "n_vtx_trks";
743  title = "N tracks associated to secondary vertex" + trigPath;
744  v.n_vtx_trks = iBooker.book1D(histoname.c_str(), title.c_str(), 20, -0.5, 19.5);
745 
746  histoname = "n_sel_tracks";
747  title = "N selected tracks" + trigPath;
748  v.n_sel_tracks = iBooker.book1D(histoname.c_str(), title.c_str(), 25, -0.5, 24.5);
749 
750  histoname = "3d_ip_distance";
751  title = "3D IP distance of tracks (cm)" + trigPath;
752  v.h_3d_ip_distance = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -0.1, 0.1);
753 
754  histoname = "3d_ip_error";
755  title = "3D IP error of tracks (cm)" + trigPath;
756  v.h_3d_ip_error = iBooker.book1D(histoname.c_str(), title.c_str(), 40, 0., 0.1);
757 
758  histoname = "3d_ip_sig";
759  title = "3D IP significance of tracks (cm)" + trigPath;
760  v.h_3d_ip_sig = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -40, 40);
761 
762  histoname = "OnlineTrkEff_Pt";
763  title = "Relative Online Trk Efficiency vs Pt " + trigPath;
764  v.bookME(iBooker, v.OnlineTrkEff_Pt, histoname, title, 50, -0.5, 20.);
765 
766  histoname = "OnlineTrkEff_Eta";
767  title = "Relative Online Trk Efficiency vs Eta " + trigPath;
768  v.bookME(iBooker, v.OnlineTrkEff_Eta, histoname, title, 60, -3.0, 3.0);
769 
770  histoname = "OnlineTrkEff_3d_ip_distance";
771  title = "Relative Online Trk Efficiency vs IP3D " + trigPath;
772  v.bookME(iBooker, v.OnlineTrkEff_3d_ip_distance, histoname, title, 40, -0.1, 0.1);
773 
774  histoname = "OnlineTrkEff_3d_ip_sig";
775  title = "Relative Online Trk Efficiency vs IP3D significance " + trigPath;
776  v.bookME(iBooker, v.OnlineTrkEff_3d_ip_sig, histoname, title, 40, -40, 40);
777 
778  histoname = "OnlineTrkFake_Pt";
779  title = "Relative Online Trk Fake Rate vs Pt " + trigPath;
780  v.bookME(iBooker, v.OnlineTrkFake_Pt, histoname, title, 50, -0.5, 20.);
781 
782  histoname = "OnlineTrkFake_Eta";
783  title = "Relative Online Trk Fake Rate vs Eta " + trigPath;
784  v.bookME(iBooker, v.OnlineTrkFake_Eta, histoname, title, 60, -3.0, 3.0);
785 
786  histoname = "OnlineTrkFake_3d_ip_distance";
787  title = "Relative Online Trk Fake Rate vs IP3D " + trigPath;
788  v.bookME(iBooker, v.OnlineTrkFake_3d_ip_distance, histoname, title, 40, -0.1, 0.1);
789 
790  histoname = "OnlineTrkFake_3d_ip_sig";
791  title = "Relative Online Trk Fake Rate vs IP3D significance " + trigPath;
792  v.bookME(iBooker, v.OnlineTrkFake_3d_ip_sig, histoname, title, 40, -40, 40);
793 
794  // histoname = "n_pixel_hits";
795  // title = "N pixel hits"+trigPath;
796  // v.n_pixel_hits = iBooker.book1D(histoname.c_str(), title.c_str(), 16, -0.5, 15.5);
797 
798  // histoname = "n_total_hits";
799  // title = "N hits"+trigPath;
800  // v.n_total_hits = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -0.5, 39.5);
801  }
802 }
803 
804 // Define this as a plug-in
BTVHLTOfflineSource::getOfflineBTagTracks
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)
Definition: BTVHLTOfflineSource.cc:595
BTVHLTOfflineSource::caloTags
edm::Handle< reco::JetTagCollection > caloTags
Definition: BTVHLTOfflineSource.cc:110
reco::btau::jetNSelectedTracks
Definition: TaggingVariable.h:38
BTVHLTOfflineSource::custompathnamepairs_
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
Definition: BTVHLTOfflineSource.cc:79
BTVHLTOfflineSource::PathInfo::PVz
MonitorElement * PVz
Definition: BTVHLTOfflineSource.cc:164
BTVHLTOfflineSource::PathInfo::getLabel
const std::string getLabel() const
Definition: BTVHLTOfflineSource.cc:146
reco::ShallowTagInfo
Definition: ShallowTagInfo.h:12
JetTag.h
reco::IPTagInfo
Definition: IPTagInfo.h:48
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
electrons_cff.bool
bool
Definition: electrons_cff.py:366
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
BTVHLTOfflineSource::hltFastPVToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > hltFastPVToken_
Definition: BTVHLTOfflineSource.cc:92
BTVHLTOfflineSource::getOnlineBTagTracks
std::vector< const reco::Track * > getOnlineBTagTracks(float hltJetEta, float hltJetPhi, edm::Handle< std::vector< Base >> jetSVTagsColl, std::vector< float > &onlineIP3D, std::vector< float > &onlineIP3DSig)
Definition: BTVHLTOfflineSource.cc:647
MessageLogger.h
BTVHLTOfflineSource::PathInfo::fastPVz_HLTMinusRECO
MonitorElement * fastPVz_HLTMinusRECO
Definition: BTVHLTOfflineSource.cc:167
funct::false
false
Definition: Factorize.h:29
BTVHLTOfflineSource::offlineIPToken_
edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > offlineIPToken_
Definition: BTVHLTOfflineSource.cc:90
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
listHistos.decayLength
decayLength
Definition: listHistos.py:101
TriggerResults.h
BTVHLTOfflineSource_cfi.pathname
pathname
Definition: BTVHLTOfflineSource_cfi.py:35
edm::Run
Definition: Run.h:45
reco::btag::toTrack
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Definition: IPTagInfo.h:24
BTVHLTOfflineSource::hltConfig_
HLTConfigProvider hltConfig_
Definition: BTVHLTOfflineSource.cc:119
TriggerEvent.h
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
BTVHLTOfflineSource::triggerResultsLabel_
edm::InputTag triggerResultsLabel_
Definition: BTVHLTOfflineSource.cc:82
gather_cfg.cout
cout
Definition: gather_cfg.py:144
reco::TemplatedSecondaryVertexTagInfo
Definition: TemplatedSecondaryVertexTagInfo.h:47
reco::BaseTagInfo
Definition: BaseTagInfo.h:12
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
BTVHLTOfflineSource::PathInfo::processName_
std::string processName_
Definition: BTVHLTOfflineSource.cc:190
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
BTVHLTOfflineSource::PathInfo::triggerType_
std::string triggerType_
Definition: BTVHLTOfflineSource.cc:192
BTVHLTOfflineSource::PathInfo::OnlineTrkEff_3d_ip_distance
ObjME OnlineTrkEff_3d_ip_distance
Definition: BTVHLTOfflineSource.cc:177
BTVHLTOfflineSource::triggerSummaryLabel_
edm::InputTag triggerSummaryLabel_
Definition: BTVHLTOfflineSource.cc:81
BTVHLTOfflineSource::PathInfo::operator==
const bool operator==(const std::string &v) const
Definition: BTVHLTOfflineSource.cc:154
BTVHLTOfflineSource::PathInfo::OnlineTrkEff_3d_ip_sig
ObjME OnlineTrkEff_3d_ip_sig
Definition: BTVHLTOfflineSource.cc:178
TriggerTypeDefs.h
BTVHLTOfflineSource::pfTagsToken_
edm::EDGetTokenT< reco::JetTagCollection > pfTagsToken_
Definition: BTVHLTOfflineSource.cc:109
DQMStore.h
BTVHLTOfflineSource::BTVHLTOfflineSource
BTVHLTOfflineSource(const edm::ParameterSet &)
Definition: BTVHLTOfflineSource.cc:209
BTVHLTOfflineSource::PathInfo
Definition: BTVHLTOfflineSource.cc:121
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
BTVHLTOfflineSource::maxDecayLength_
float maxDecayLength_
Definition: BTVHLTOfflineSource.cc:114
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
findQualityFiles.v
v
Definition: findQualityFiles.py:179
BTVHLTOfflineSource::triggerSummaryFUToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
Definition: BTVHLTOfflineSource.cc:100
BTVHLTOfflineSource::PathInfo::h_3d_ip_sig
MonitorElement * h_3d_ip_sig
Definition: BTVHLTOfflineSource.cc:174
BTVHLTOfflineSource::PathInfo::fastPVz
MonitorElement * fastPVz
Definition: BTVHLTOfflineSource.cc:165
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
BTVHLTOfflineSource::SVTagInfosTokenCalo_
edm::EDGetTokenT< std::vector< reco::SecondaryVertexTagInfo > > SVTagInfosTokenCalo_
Definition: BTVHLTOfflineSource.cc:105
edm::Handle
Definition: AssociativeIterator.h:50
BTVHLTOfflineSource::PathInfo::OnlineTrkEff_Eta
ObjME OnlineTrkEff_Eta
Definition: BTVHLTOfflineSource.cc:176
BTVHLTOfflineSource::PathInfo::vtx_mass
MonitorElement * vtx_mass
Definition: BTVHLTOfflineSource.cc:169
BTVHLTOfflineSource::SVTagInfo
reco::TemplatedSecondaryVertexTagInfo< reco::CandIPTagInfo, reco::VertexCompositePtrCandidate > SVTagInfo
Definition: BTVHLTOfflineSource.cc:62
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
BTVHLTOfflineSource::PathInfo::OnlineTrkFake_Eta
ObjME OnlineTrkFake_Eta
Definition: BTVHLTOfflineSource.cc:180
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
BTVHLTOfflineSource::shallowTagInfosTokenPf_
edm::EDGetTokenT< std::vector< reco::ShallowTagInfo > > shallowTagInfosTokenPf_
Definition: BTVHLTOfflineSource.cc:103
BTVHLTOfflineSource::turnon_threshold_loose_
float turnon_threshold_loose_
Definition: BTVHLTOfflineSource.cc:84
MakerMacros.h
BTVHLTOfflineSource::minJetDistance_
float minJetDistance_
Definition: BTVHLTOfflineSource.cc:115
BTVHLTOfflineSource::PathInfo::setLabel
void setLabel(std::string labelName)
Definition: BTVHLTOfflineSource.cc:147
BTVHLTOfflineSource::PathInfo::getprescaleUsed
const int getprescaleUsed() const
Definition: BTVHLTOfflineSource.cc:149
Track.h
BTVHLTOfflineSource::PathInfo::PathInfo
PathInfo()
Definition: BTVHLTOfflineSource.cc:123
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
BTVHLTOfflineSource::PathInfo::prescaleUsed_
int prescaleUsed_
Definition: BTVHLTOfflineSource.cc:187
hltMonBTagIPClient_cfi.pathName
pathName
Definition: hltMonBTagIPClient_cfi.py:5
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
Service.h
SecondaryVertexTagInfo.h
BTVHLTOfflineSource::PathInfo::getTriggerType
const std::string getTriggerType() const
Definition: BTVHLTOfflineSource.cc:152
TriggerDQMBase.h
BTVHLTOfflineSource::PathInfo::Eta
MonitorElement * Eta
Definition: BTVHLTOfflineSource.cc:158
reco::JetTagInfo
Definition: JetTagInfo.h:9
mps_fire.end
end
Definition: mps_fire.py:242
BTVHLTOfflineSource::caloTagsToken_
edm::EDGetTokenT< reco::JetTagCollection > caloTagsToken_
Definition: BTVHLTOfflineSource.cc:108
reco::Track
Definition: Track.h:27
BTVHLTOfflineSource::PathInfo::~PathInfo
~PathInfo() override=default
BTVHLTOfflineSource::PathInfo::Discr
MonitorElement * Discr
Definition: BTVHLTOfflineSource.cc:156
BTVHLTOfflineSource::turnon_threshold_medium_
float turnon_threshold_medium_
Definition: BTVHLTOfflineSource.cc:85
BTVHLTOfflineSource::PathInfo::OnlineTrkFake_Pt
ObjME OnlineTrkFake_Pt
Definition: BTVHLTOfflineSource.cc:179
BTVHLTOfflineSource::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
Definition: BTVHLTOfflineSource.cc:674
Point3DBase< float, GlobalTag >
BTVHLTOfflineSource::dRTrackMatch_
float dRTrackMatch_
Definition: BTVHLTOfflineSource.cc:117
TriggerDQMBase
Definition: TriggerDQMBase.h:8
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
BTVHLTOfflineSource::PathInfoCollection
Definition: BTVHLTOfflineSource.cc:195
DQMEDAnalyzer.h
HLTConfigProvider::removeVersion
static const std::string removeVersion(const std::string &trigger)
Definition: HLTConfigProvider.cc:238
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
BTVHLTOfflineSource::PathInfo::getObjectType
const int getObjectType() const
Definition: BTVHLTOfflineSource.cc:151
BTVHLTOfflineSource::hltPathsAll_
PathInfoCollection hltPathsAll_
Definition: BTVHLTOfflineSource.cc:201
HLTConfigProvider::size
unsigned int size() const
number of trigger paths in trigger table
Definition: HLTConfigProvider.h:63
edm::AssociationVector
Definition: AssociationVector.h:67
DeltaR.h
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
edm::View
Definition: CaloClusterFwd.h:14
BTVHLTOfflineSource::minDecayLength_
float minDecayLength_
Definition: BTVHLTOfflineSource.cc:113
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
BTVHLTOfflineSource::triggerResultsToken
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
Definition: BTVHLTOfflineSource.cc:97
edm::ParameterSet
Definition: ParameterSet.h:47
BTVHLTOfflineSource::PathInfo::Discr_turnon_medium
ObjME Discr_turnon_medium
Definition: BTVHLTOfflineSource.cc:162
BTVHLTOfflineSource::PathInfo::objectType_
int objectType_
Definition: BTVHLTOfflineSource.cc:191
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
reco::btau::trackSip3dSig
Definition: TaggingVariable.h:57
reco::btau::jetNSecondaryVertices
Definition: TaggingVariable.h:72
BTVHLTOfflineSource::hltPFPVToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > hltPFPVToken_
Definition: BTVHLTOfflineSource.cc:93
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
electrons_cff.ip3d
ip3d
Definition: electrons_cff.py:357
BTVHLTOfflineSource::PathInfo::Discr_HLTMinusRECO
MonitorElement * Discr_HLTMinusRECO
Definition: BTVHLTOfflineSource.cc:160
TriggerNames.h
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
BTVHLTOfflineSource::PathInfo::Pt
MonitorElement * Pt
Definition: BTVHLTOfflineSource.cc:157
BTVHLTOfflineSource
Definition: BTVHLTOfflineSource.cc:48
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
BTVHLTOfflineSource::PathInfo::h_3d_ip_distance
MonitorElement * h_3d_ip_distance
Definition: BTVHLTOfflineSource.cc:172
edm::EventSetup
Definition: EventSetup.h:58
BTVHLTOfflineSource::PathInfo::pathName_
std::string pathName_
Definition: BTVHLTOfflineSource.cc:188
HLT_FULL_cff.triggerType
triggerType
Definition: HLT_FULL_cff.py:8756
BTVHLTOfflineSource::offlinePVToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > offlinePVToken_
Definition: BTVHLTOfflineSource.cc:95
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
HLTConfigProvider.h
BTVHLTOfflineSource::PathInfo::getProcess
const std::string getProcess() const
Definition: BTVHLTOfflineSource.cc:150
TriggerObject.h
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
reco::btau::trackSip3dVal
Definition: TaggingVariable.h:56
BTVHLTOfflineSource::processname_
std::string processname_
Definition: BTVHLTOfflineSource.cc:76
ShallowTagInfo.h
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
VertexFwd.h
pdwgDoubleElectron_cfi.filterName
filterName
Definition: pdwgDoubleElectron_cfi.py:7
BTVHLTOfflineSource::PathInfo::OnlineTrkFake_3d_ip_sig
ObjME OnlineTrkFake_3d_ip_sig
Definition: BTVHLTOfflineSource.cc:182
BTVHLTOfflineSource::PathInfoCollection::PathInfoCollection
PathInfoCollection()
Definition: BTVHLTOfflineSource.cc:197
BTVHLTOfflineSource::~BTVHLTOfflineSource
~BTVHLTOfflineSource() override
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
BTVHLTOfflineSource::PathInfoCollection::find
std::vector< PathInfo >::iterator find(const std::string &pathName)
Definition: BTVHLTOfflineSource.cc:198
BTVHLTOfflineSource::SVTagInfosTokenPf_
edm::EDGetTokenT< std::vector< SVTagInfo > > SVTagInfosTokenPf_
Definition: BTVHLTOfflineSource.cc:106
HLTConfigProvider
Definition: HLTConfigProvider.h:29
BTVHLTOfflineSource::triggerResultsFUToken
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
Definition: BTVHLTOfflineSource.cc:98
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
BTVHLTOfflineSource::PathInfo::n_vtx
MonitorElement * n_vtx
Definition: BTVHLTOfflineSource.cc:168
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
BTVHLTOfflineSource::shallowTagInfosTokenCalo_
edm::EDGetTokenT< std::vector< reco::ShallowTagInfo > > shallowTagInfosTokenCalo_
Definition: BTVHLTOfflineSource.cc:102
BTVHLTOfflineSource::PathInfo::Discr_HLTvsRECO
MonitorElement * Discr_HLTvsRECO
Definition: BTVHLTOfflineSource.cc:159
BTVHLTOfflineSource::PathInfo::filterName_
std::string filterName_
Definition: BTVHLTOfflineSource.cc:189
BTVHLTOfflineSource::PathInfo::getTag
const edm::InputTag getTag() const
Definition: BTVHLTOfflineSource.cc:153
dqm::implementation::IBooker::book2D
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:177
Exception
Definition: hltDiff.cc:245
edm::TriggerNames
Definition: TriggerNames.h:55
BTVHLTOfflineSource::PathInfo::PathInfo
PathInfo(const int prescaleUsed, const std::string &pathName, const std::string &filterName, const std::string &processName, const int type, const std::string &triggerType)
Definition: BTVHLTOfflineSource.cc:133
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BTVHLTOfflineSource::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: BTVHLTOfflineSource.cc:273
Skims_PA_cff.paths
paths
Definition: Skims_PA_cff.py:18
BTVHLTOfflineSource::PathInfo::PVz_HLTMinusRECO
MonitorElement * PVz_HLTMinusRECO
Definition: BTVHLTOfflineSource.cc:166
dumpRecoGeometry_cfg.tagInfo
tagInfo
Definition: dumpRecoGeometry_cfg.py:194
dqm::implementation::IBooker
Definition: DQMStore.h:43
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
BTVHLTOfflineSource::PathInfo::n_vtx_trks
MonitorElement * n_vtx_trks
Definition: BTVHLTOfflineSource.cc:170
BTVHLTOfflineSource::dqmBeginRun
void dqmBeginRun(edm::Run const &run, edm::EventSetup const &c) override
Definition: BTVHLTOfflineSource.cc:256
trigger
Definition: HLTPrescaleTableCond.h:8
HLTConfigProvider::triggerName
const std::string & triggerName(unsigned int triggerIndex) const
Definition: HLTConfigProvider.h:70
BTVHLTOfflineSource::offlineDiscrTokenbb_
edm::EDGetTokenT< reco::JetTagCollection > offlineDiscrTokenbb_
Definition: BTVHLTOfflineSource.cc:89
BTVHLTOfflineSource::dirname_
std::string dirname_
Definition: BTVHLTOfflineSource.cc:75
BTVHLTOfflineSource::PathInfo::getPath
const std::string getPath() const
Definition: BTVHLTOfflineSource.cc:148
BTVHLTOfflineSource::PathInfo::n_sel_tracks
MonitorElement * n_sel_tracks
Definition: BTVHLTOfflineSource.cc:171
BTVHLTOfflineSource::turnon_threshold_tight_
float turnon_threshold_tight_
Definition: BTVHLTOfflineSource.cc:86
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
ParameterSet.h
BTVHLTOfflineSource::verbose_
bool verbose_
Definition: BTVHLTOfflineSource.cc:77
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
BTVHLTOfflineSource::pfTags
edm::Handle< reco::JetTagCollection > pfTags
Definition: BTVHLTOfflineSource.cc:111
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
BTVHLTOfflineSource::PathInfo::Discr_turnon_loose
ObjME Discr_turnon_loose
Definition: BTVHLTOfflineSource.cc:161
BTVHLTOfflineSource::maxJetDistance_
float maxJetDistance_
Definition: BTVHLTOfflineSource.cc:116
edm::Event
Definition: Event.h:73
BTVHLTOfflineSource::PathInfo::OnlineTrkFake_3d_ip_distance
ObjME OnlineTrkFake_3d_ip_distance
Definition: BTVHLTOfflineSource.cc:181
BTVHLTOfflineSource::offlineDiscrTokenb_
edm::EDGetTokenT< reco::JetTagCollection > offlineDiscrTokenb_
Definition: BTVHLTOfflineSource.cc:88
edm::InputTag
Definition: InputTag.h:15
reco::btau::vertexMass
Definition: TaggingVariable.h:75
label
const char * label
Definition: PFTauDecayModeTools.cc:11
HigPhotonJetHLTOfflineSource_cfi.triggerResultsToken
triggerResultsToken
Definition: HigPhotonJetHLTOfflineSource_cfi.py:33
reco::btau::vertexNTracks
Definition: TaggingVariable.h:76
BTVHLTOfflineSource::triggerSummaryToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
Definition: BTVHLTOfflineSource.cc:99
edm::TriggerResults
Definition: TriggerResults.h:35
reco::Vertex
Definition: Vertex.h:35
BTVHLTOfflineSource::PathInfo::OnlineTrkEff_Pt
ObjME OnlineTrkEff_Pt
Definition: BTVHLTOfflineSource.cc:175
BTVHLTOfflineSource::hltCaloPVToken_
edm::EDGetTokenT< std::vector< reco::Vertex > > hltCaloPVToken_
Definition: BTVHLTOfflineSource.cc:94
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
reco::btag::IP2DSig
Definition: IPTagInfo.h:43
TrackCollections2monitor_cff.selectedTracks
selectedTracks
Definition: TrackCollections2monitor_cff.py:32
BTVHLTOfflineSource::PathInfo::h_3d_ip_error
MonitorElement * h_3d_ip_error
Definition: BTVHLTOfflineSource.cc:173
BTVHLTOfflineSource::PathInfo::Discr_turnon_tight
ObjME Discr_turnon_tight
Definition: BTVHLTOfflineSource.cc:163