CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HLTTauDQMPathSummaryPlotter Class Reference

#include <HLTTauDQMPathSummaryPlotter.h>

Inheritance diagram for HLTTauDQMPathSummaryPlotter:
HLTTauDQMPlotter

Public Member Functions

void analyze (const edm::TriggerResults &triggerResults, const trigger::TriggerEvent &triggerEvent, const HLTTauDQMOfflineObjects &refCollection)
 
void bookHistograms (HistoWrapper &iWrapper, DQMStore::IBooker &iBooker)
 
 HLTTauDQMPathSummaryPlotter (const edm::ParameterSet &pset, bool doRefAnalysis, const std::string &dqmBaseFolder, double hltMatchDr)
 
bool isValid () const
 
void setPathObjects (const std::vector< const HLTTauDQMPath *> &pathObjects)
 
 ~HLTTauDQMPathSummaryPlotter ()
 

Private Attributes

MonitorElementaccepted_events
 
MonitorElementall_events
 
const bool doRefAnalysis_
 
const double hltMatchDr_
 
std::vector< const HLTTauDQMPath * > pathObjects_
 
- Private Attributes inherited from HLTTauDQMPlotter
bool configValid_
 
std::string dqmFolder_
 
std::string dqmFullFolder_
 

Additional Inherited Members

- Private Types inherited from HLTTauDQMPlotter
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Private Member Functions inherited from HLTTauDQMPlotter
 HLTTauDQMPlotter (const edm::ParameterSet &pset, std::string dqmBaseFolder)
 
 HLTTauDQMPlotter (const std::string &dqmFolder, const std::string &dqmBaseFolder)
 
bool isValid () const
 
 ~HLTTauDQMPlotter ()
 
std::pair< bool, LVmatch (const LV &, const LVColl &, double)
 
const std::string & triggerTag () const
 

Detailed Description

Definition at line 18 of file HLTTauDQMPathSummaryPlotter.h.

Constructor & Destructor Documentation

◆ HLTTauDQMPathSummaryPlotter()

HLTTauDQMPathSummaryPlotter::HLTTauDQMPathSummaryPlotter ( const edm::ParameterSet pset,
bool  doRefAnalysis,
const std::string &  dqmBaseFolder,
double  hltMatchDr 
)

Definition at line 4 of file HLTTauDQMPathSummaryPlotter.cc.

8  : HLTTauDQMPlotter(pset, dqmBaseFolder), hltMatchDr_(hltMatchDr), doRefAnalysis_(doRefAnalysis) {}
HLTTauDQMPlotter(const edm::ParameterSet &pset, std::string dqmBaseFolder)

◆ ~HLTTauDQMPathSummaryPlotter()

HLTTauDQMPathSummaryPlotter::~HLTTauDQMPathSummaryPlotter ( )
default

Member Function Documentation

◆ analyze()

void HLTTauDQMPathSummaryPlotter::analyze ( const edm::TriggerResults triggerResults,
const trigger::TriggerEvent triggerEvent,
const HLTTauDQMOfflineObjects refCollection 
)

Definition at line 37 of file HLTTauDQMPathSummaryPlotter.cc.

References accepted_events, all_events, HLTTauDQMOfflineObjects::clear(), doRefAnalysis_, dqm::impl::MonitorElement::Fill(), hltMatchDr_, mps_fire::i, castor_dqm_sourceclient_file_cfg::path, pathObjects_, PDWG_DiPhoton_SD_cff::triggerEvent, and triggerResults.

39  {
40  if (doRefAnalysis_) {
41  std::vector<HLTTauDQMPath::Object> triggerObjs;
42  std::vector<HLTTauDQMPath::Object> matchedTriggerObjs;
43  HLTTauDQMOfflineObjects matchedOfflineObjs;
44 
45  for (size_t i = 0; i < pathObjects_.size(); ++i) {
46  const HLTTauDQMPath* path = pathObjects_[i];
47  const int lastFilter = path->filtersSize() - 1;
48 
49  if (path->goodOfflineEvent(lastFilter, refCollection)) {
50  if (all_events)
51  all_events->Fill(i + 0.5);
52  }
53  if (path->fired(triggerResults)) {
54  triggerObjs.clear();
55  matchedTriggerObjs.clear();
56  matchedOfflineObjs.clear();
57  path->getFilterObjects(triggerEvent, lastFilter, triggerObjs);
58  if (path->offlineMatching(
59  lastFilter, triggerObjs, refCollection, hltMatchDr_, matchedTriggerObjs, matchedOfflineObjs)) {
60  if (accepted_events)
61  accepted_events->Fill(i + 0.5);
62  }
63  }
64  }
65  } else {
66  for (size_t i = 0; i < pathObjects_.size(); ++i) {
67  const HLTTauDQMPath* path = pathObjects_[i];
68  if (all_events)
69  all_events->Fill(i + 0.5);
70  if (path->fired(triggerResults)) {
71  if (accepted_events)
72  accepted_events->Fill(i + 0.5);
73  }
74  }
75  }
76 }
void Fill(long long x)
std::vector< const HLTTauDQMPath * > pathObjects_
static std::string const triggerResults
Definition: EdmProvDump.cc:47

◆ bookHistograms()

void HLTTauDQMPathSummaryPlotter::bookHistograms ( HistoWrapper iWrapper,
DQMStore::IBooker iBooker 
)

Definition at line 12 of file HLTTauDQMPathSummaryPlotter.cc.

References accepted_events, all_events, HistoWrapper::book1D(), mps_fire::i, HLTTauDQMPlotter::isValid(), kVital, pathObjects_, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), and HLTTauDQMPlotter::triggerTag().

12  {
13  if (!isValid() || pathObjects_.empty())
14  return;
15 
16  //Create the histograms
17  iBooker.setCurrentFolder(triggerTag() + "/helpers");
18 
19  all_events = iWrapper.book1D(iBooker, "RefEvents", "All events", pathObjects_.size(), 0, pathObjects_.size(), kVital);
20  accepted_events = iWrapper.book1D(iBooker,
21  "PathTriggerBits",
22  "Accepted Events per Path;;entries",
23  pathObjects_.size(),
24  0,
25  pathObjects_.size(),
26  kVital);
27  for (size_t i = 0; i < pathObjects_.size(); ++i) {
28  if (all_events)
29  all_events->setBinLabel(i + 1, pathObjects_[i]->getPathName());
30  if (accepted_events)
31  accepted_events->setBinLabel(i + 1, pathObjects_[i]->getPathName());
32  }
33 
34  iBooker.setCurrentFolder(triggerTag());
35 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
bool isValid() const
std::vector< const HLTTauDQMPath * > pathObjects_
MonitorElement * book1D(DQMStore::IBooker &iBooker, TString const &name, TString const &title, int const nchX, double const lowX, double const highX, int level=kEverything)
Definition: HistoWrapper.cc:17
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
const std::string & triggerTag() const

◆ isValid()

bool HLTTauDQMPlotter::isValid
inline

Definition at line 39 of file HLTTauDQMPlotter.h.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

39 { return configValid_; }

◆ setPathObjects()

void HLTTauDQMPathSummaryPlotter::setPathObjects ( const std::vector< const HLTTauDQMPath *> &  pathObjects)
inline

Definition at line 28 of file HLTTauDQMPathSummaryPlotter.h.

References pathObjects_.

28 { pathObjects_ = pathObjects; }
std::vector< const HLTTauDQMPath * > pathObjects_

Member Data Documentation

◆ accepted_events

MonitorElement* HLTTauDQMPathSummaryPlotter::accepted_events
private

Definition at line 42 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and bookHistograms().

◆ all_events

MonitorElement* HLTTauDQMPathSummaryPlotter::all_events
private

Definition at line 41 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and bookHistograms().

◆ doRefAnalysis_

const bool HLTTauDQMPathSummaryPlotter::doRefAnalysis_
private

Definition at line 37 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze().

◆ hltMatchDr_

const double HLTTauDQMPathSummaryPlotter::hltMatchDr_
private

Definition at line 36 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze().

◆ pathObjects_

std::vector<const HLTTauDQMPath*> HLTTauDQMPathSummaryPlotter::pathObjects_
private

Definition at line 39 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), bookHistograms(), and setPathObjects().