CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 beginRun (const std::vector< const HLTTauDQMPath * > &pathObjects)
 
 HLTTauDQMPathSummaryPlotter (const edm::ParameterSet &pset, bool doRefAnalysis, const std::string &dqmBaseFolder, double hltMatchDr)
 
 ~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_
 
bool runValid_
 

Additional Inherited Members

- Private Member Functions inherited from HLTTauDQMPlotter
 HLTTauDQMPlotter (const edm::ParameterSet &pset, 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 ( const edm::ParameterSet pset,
bool  doRefAnalysis,
const std::string &  dqmBaseFolder,
double  hltMatchDr 
)

Definition at line 4 of file HLTTauDQMPathSummaryPlotter.cc.

4  :
5  HLTTauDQMPlotter(pset, dqmBaseFolder),
6  hltMatchDr_(hltMatchDr),
7  doRefAnalysis_(doRefAnalysis)
8 {}
HLTTauDQMPlotter(const edm::ParameterSet &pset, const std::string &dqmBaseFolder)
HLTTauDQMPathSummaryPlotter::~HLTTauDQMPathSummaryPlotter ( )

Definition at line 10 of file HLTTauDQMPathSummaryPlotter.cc.

10  {
11 }

Member Function Documentation

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

Definition at line 41 of file HLTTauDQMPathSummaryPlotter.cc.

References accepted_events, all_events, HLTTauDQMOfflineObjects::clear(), doRefAnalysis_, MonitorElement::Fill(), HLTTauDQMPath::filtersSize(), HLTTauDQMPath::fired(), HLTTauDQMPath::getFilterObjects(), HLTTauDQMPath::goodOfflineEvent(), hltMatchDr_, i, HLTTauDQMPath::offlineMatching(), getHLTPrescaleColumns::path, and pathObjects_.

41  {
42  if(doRefAnalysis_) {
43  std::vector<HLTTauDQMPath::Object> triggerObjs;
44  std::vector<HLTTauDQMPath::Object> matchedTriggerObjs;
45  HLTTauDQMOfflineObjects matchedOfflineObjs;
46 
47  for(size_t i=0; i<pathObjects_.size(); ++i) {
48  const HLTTauDQMPath *path = pathObjects_[i];
49  const int lastFilter = path->filtersSize()-1;
50 
51  if(path->goodOfflineEvent(lastFilter, refCollection)) {
52  all_events->Fill(i+0.5);
53  }
54  if(path->fired(triggerResults)) {
55  triggerObjs.clear();
56  matchedTriggerObjs.clear();
57  matchedOfflineObjs.clear();
58  path->getFilterObjects(triggerEvent, lastFilter, triggerObjs);
59  if(path->offlineMatching(lastFilter, triggerObjs, refCollection, hltMatchDr_, matchedTriggerObjs, matchedOfflineObjs)) {
60  accepted_events->Fill(i+0.5);
61  }
62  }
63  }
64  }
65  else {
66  for(size_t i=0; i<pathObjects_.size(); ++i) {
67  const HLTTauDQMPath *path = pathObjects_[i];
68  all_events->Fill(i+0.5);
69  if(path->fired(triggerResults)) {
70  accepted_events->Fill(i+0.5);
71  }
72  }
73  }
74 }
int i
Definition: DBlmapReader.cc:9
bool goodOfflineEvent(size_t i, const HLTTauDQMOfflineObjects &offlineObjects) const
void Fill(long long x)
void getFilterObjects(const trigger::TriggerEvent &triggerEvent, size_t i, std::vector< Object > &retval) const
std::vector< const HLTTauDQMPath * > pathObjects_
size_t filtersSize() const
Definition: HLTTauDQMPath.h:50
bool offlineMatching(size_t i, const std::vector< Object > &triggerObjects, const HLTTauDQMOfflineObjects &offlineObjects, double dR, std::vector< Object > &matchedTriggerObjects, HLTTauDQMOfflineObjects &matchedOfflineObjects) const
bool fired(const edm::TriggerResults &triggerResults) const
void HLTTauDQMPathSummaryPlotter::beginRun ( const std::vector< const HLTTauDQMPath * > &  pathObjects)

Definition at line 13 of file HLTTauDQMPathSummaryPlotter.cc.

References accepted_events, all_events, DQMStore::book1D(), HLTTauDQMPlotter::configValid_, i, edm::Service< T >::isAvailable(), pathObjects_, DQMStore::removeContents(), HLTTauDQMPlotter::runValid_, MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), and HLTTauDQMPlotter::triggerTag().

13  {
14  if(!configValid_)
15  return;
16 
17  pathObjects_ = pathObjects;
18 
20  if (store.isAvailable()) {
21  //Create the histograms
22  store->setCurrentFolder(triggerTag()+"/helpers");
23  store->removeContents();
24 
25  all_events = store->book1D("RefEvents", "All events", pathObjects_.size(), 0, pathObjects_.size());
26  accepted_events = store->book1D("PathTriggerBits","Accepted Events per Path;;entries", pathObjects_.size(), 0, pathObjects_.size());
27  for(size_t i=0; i<pathObjects_.size(); ++i) {
28  all_events->setBinLabel(i+1, pathObjects_[i]->getPathName());
29  accepted_events->setBinLabel(i+1, pathObjects_[i]->getPathName());
30  }
31 
32  store->setCurrentFolder(triggerTag());
33  store->removeContents();
34  runValid_ = true;
35  }
36  else {
37  runValid_ = false;
38  }
39 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
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
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2764
std::vector< const HLTTauDQMPath * > pathObjects_
bool isAvailable() const
Definition: Service.h:46
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584

Member Data Documentation

MonitorElement* HLTTauDQMPathSummaryPlotter::accepted_events
private

Definition at line 35 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and beginRun().

MonitorElement* HLTTauDQMPathSummaryPlotter::all_events
private

Definition at line 34 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and beginRun().

const bool HLTTauDQMPathSummaryPlotter::doRefAnalysis_
private

Definition at line 30 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze().

const double HLTTauDQMPathSummaryPlotter::hltMatchDr_
private

Definition at line 29 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze().

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

Definition at line 32 of file HLTTauDQMPathSummaryPlotter.h.

Referenced by analyze(), and beginRun().