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 }
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
bool isValid() const
void Fill(long long x)
HLTTauDQMPathSummaryPlotter(const edm::ParameterSet &pset, bool doRefAnalysis, const std::string &dqmBaseFolder, double hltMatchDr)
void bookHistograms(HistoWrapper &iWrapper, DQMStore::IBooker &iBooker)
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
static std::string const triggerResults
Definition: EdmProvDump.cc:44
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)
void analyze(const edm::TriggerResults &triggerResults, const trigger::TriggerEvent &triggerEvent, const HLTTauDQMOfflineObjects &refCollection)
const std::string & triggerTag() const