CMS 3D CMS Logo

HLTTauDQMPathSummaryPlotter.cc
Go to the documentation of this file.
3 
5  bool doRefAnalysis,
6  const std::string& dqmBaseFolder,
7  double hltMatchDr)
8  : HLTTauDQMPlotter(pset, dqmBaseFolder), hltMatchDr_(hltMatchDr), doRefAnalysis_(doRefAnalysis) {}
9 
11 
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 }
36 
39  const HLTTauDQMOfflineObjects& refCollection) {
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 }
HLTTauDQMOfflineObjects::clear
void clear()
Definition: HLTTauDQMPlotter.h:19
mps_fire.i
i
Definition: mps_fire.py:428
HLTTauDQMPathSummaryPlotter::analyze
void analyze(const edm::TriggerResults &triggerResults, const trigger::TriggerEvent &triggerEvent, const HLTTauDQMOfflineObjects &refCollection)
Definition: HLTTauDQMPathSummaryPlotter.cc:37
HLTTauDQMPathSummaryPlotter::~HLTTauDQMPathSummaryPlotter
~HLTTauDQMPathSummaryPlotter()
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
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:17
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
HistoWrapper
Definition: HistoWrapper.h:13
HLTTauDQMPathSummaryPlotter.h
HLTTauDQMPath
Definition: HLTTauDQMPath.h:22
HLTTauDQMPathSummaryPlotter::hltMatchDr_
const double hltMatchDr_
Definition: HLTTauDQMPathSummaryPlotter.h:36
edm::ParameterSet
Definition: ParameterSet.h:47
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:762
HLTTauDQMPlotter::isValid
bool isValid() const
Definition: HLTTauDQMPlotter.h:39
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
HLTTauDQMPath.h
PDWG_DiPhoton_SD_cff.triggerEvent
triggerEvent
Definition: PDWG_DiPhoton_SD_cff.py:39
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTTauDQMPathSummaryPlotter::doRefAnalysis_
const bool doRefAnalysis_
Definition: HLTTauDQMPathSummaryPlotter.h:37
HLTTauDQMPlotter
Definition: HLTTauDQMPlotter.h:32
dqm::implementation::IBooker
Definition: DQMStore.h:43
HLTTauDQMPathSummaryPlotter::HLTTauDQMPathSummaryPlotter
HLTTauDQMPathSummaryPlotter(const edm::ParameterSet &pset, bool doRefAnalysis, const std::string &dqmBaseFolder, double hltMatchDr)
Definition: HLTTauDQMPathSummaryPlotter.cc:4
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
edm::TriggerResults
Definition: TriggerResults.h:35
HLTTauDQMPathSummaryPlotter::bookHistograms
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker)
Definition: HLTTauDQMPathSummaryPlotter.cc:12
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27