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

◆ ~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.

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 }

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 ( HistoWrapper iWrapper,
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 = 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 }

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().

◆ 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 28 of file HLTTauDQMPathSummaryPlotter.h.

28 { pathObjects_ = pathObjects; }

References 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().

HLTTauDQMOfflineObjects::clear
void clear()
Definition: HLTTauDQMPlotter.h:19
mps_fire.i
i
Definition: mps_fire.py:428
kVital
Definition: HistoWrapper.h:11
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
HLTTauDQMPlotter::HLTTauDQMPlotter
HLTTauDQMPlotter(const edm::ParameterSet &pset, std::string dqmBaseFolder)
Definition: HLTTauDQMPlotter.cc:7
HLTTauDQMPathSummaryPlotter::accepted_events
MonitorElement * accepted_events
Definition: HLTTauDQMPathSummaryPlotter.h:42
HistoWrapper::book1D
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:16
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HLTTauDQMPathSummaryPlotter::all_events
MonitorElement * all_events
Definition: HLTTauDQMPathSummaryPlotter.h:41
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:36
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:37
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:39
HLTTauDQMPlotter::configValid_
bool configValid_
Definition: HLTTauDQMPlotter.h:51
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27