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 (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 17 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) {}

◆ ~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 30 of file HLTTauDQMPathSummaryPlotter.cc.

32  {
33  if (doRefAnalysis_) {
34  std::vector<HLTTauDQMPath::Object> triggerObjs;
35  std::vector<HLTTauDQMPath::Object> matchedTriggerObjs;
36  HLTTauDQMOfflineObjects matchedOfflineObjs;
37 
38  for (size_t i = 0; i < pathObjects_.size(); ++i) {
39  const HLTTauDQMPath* path = pathObjects_[i];
40  const int lastFilter = path->filtersSize() - 1;
41 
42  if (path->goodOfflineEvent(lastFilter, refCollection)) {
43  all_events->Fill(i + 0.5);
44  }
45  if (path->fired(triggerResults)) {
46  triggerObjs.clear();
47  matchedTriggerObjs.clear();
48  matchedOfflineObjs.clear();
49  path->getFilterObjects(triggerEvent, lastFilter, triggerObjs);
50  if (path->offlineMatching(
51  lastFilter, triggerObjs, refCollection, hltMatchDr_, matchedTriggerObjs, matchedOfflineObjs)) {
52  accepted_events->Fill(i + 0.5);
53  }
54  }
55  }
56  } else {
57  for (size_t i = 0; i < pathObjects_.size(); ++i) {
58  const HLTTauDQMPath* path = pathObjects_[i];
59  all_events->Fill(i + 0.5);
60  if (path->fired(triggerResults)) {
61  accepted_events->Fill(i + 0.5);
62  }
63  }
64  }
65 }

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.

◆ bookHistograms()

void HLTTauDQMPathSummaryPlotter::bookHistograms ( DQMStore::IBooker iBooker)

Definition at line 12 of file HLTTauDQMPathSummaryPlotter.cc.

12  {
13  if (!isValid() || pathObjects_.empty())
14  return;
15 
16  //Create the histograms
17  iBooker.setCurrentFolder(triggerTag() + "/helpers");
18 
19  all_events = iBooker.book1D("RefEvents", "All events", pathObjects_.size(), 0, pathObjects_.size());
20  accepted_events = iBooker.book1D(
21  "PathTriggerBits", "Accepted Events per Path;;entries", pathObjects_.size(), 0, pathObjects_.size());
22  for (size_t i = 0; i < pathObjects_.size(); ++i) {
23  all_events->setBinLabel(i + 1, pathObjects_[i]->getPathName());
24  accepted_events->setBinLabel(i + 1, pathObjects_[i]->getPathName());
25  }
26 
27  iBooker.setCurrentFolder(triggerTag());
28 }

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

◆ isValid()

bool HLTTauDQMPlotter::isValid
inline

Definition at line 39 of file HLTTauDQMPlotter.h.

39 { return configValid_; }

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

◆ setPathObjects()

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

Definition at line 27 of file HLTTauDQMPathSummaryPlotter.h.

27 { pathObjects_ = pathObjects; }

References pathObjects_.

Member Data Documentation

◆ accepted_events

MonitorElement* HLTTauDQMPathSummaryPlotter::accepted_events
private

Definition at line 41 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and bookHistograms().

◆ all_events

MonitorElement* HLTTauDQMPathSummaryPlotter::all_events
private

Definition at line 40 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and bookHistograms().

◆ doRefAnalysis_

const bool HLTTauDQMPathSummaryPlotter::doRefAnalysis_
private

Definition at line 36 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze().

◆ hltMatchDr_

const double HLTTauDQMPathSummaryPlotter::hltMatchDr_
private

Definition at line 35 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze().

◆ pathObjects_

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

Definition at line 38 of file HLTTauDQMPathSummaryPlotter.h.

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

HLTTauDQMOfflineObjects::clear
void clear()
Definition: HLTTauDQMPlotter.h:19
mps_fire.i
i
Definition: mps_fire.py:355
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
HLTTauDQMPlotter::HLTTauDQMPlotter
HLTTauDQMPlotter(const edm::ParameterSet &pset, std::string dqmBaseFolder)
Definition: HLTTauDQMPlotter.cc:7
HLTTauDQMPathSummaryPlotter::accepted_events
MonitorElement * accepted_events
Definition: HLTTauDQMPathSummaryPlotter.h:41
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HLTTauDQMPathSummaryPlotter::all_events
MonitorElement * all_events
Definition: HLTTauDQMPathSummaryPlotter.h:40
HLTTauDQMOfflineObjects
Definition: HLTTauDQMPlotter.h:18
HLTTauDQMPlotter::triggerTag
const std::string & triggerTag() const
Definition: HLTTauDQMPlotter.h:44
HLTTauDQMPath
Definition: HLTTauDQMPath.h:22
HLTTauDQMPathSummaryPlotter::hltMatchDr_
const double hltMatchDr_
Definition: HLTTauDQMPathSummaryPlotter.h:35
dqm::impl::MonitorElement::setBinLabel
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)
Definition: MonitorElement.cc:771
HLTTauDQMPlotter::isValid
bool isValid() const
Definition: HLTTauDQMPlotter.h:39
PDWG_DiPhoton_SD_cff.triggerEvent
triggerEvent
Definition: PDWG_DiPhoton_SD_cff.py:39
HLTTauDQMPathSummaryPlotter::doRefAnalysis_
const bool doRefAnalysis_
Definition: HLTTauDQMPathSummaryPlotter.h:36
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
HLTTauDQMPathSummaryPlotter::pathObjects_
std::vector< const HLTTauDQMPath * > pathObjects_
Definition: HLTTauDQMPathSummaryPlotter.h:38
HLTTauDQMPlotter::configValid_
bool configValid_
Definition: HLTTauDQMPlotter.h:51
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27