CMS 3D CMS Logo

EgHLTOfflineClient.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFLINECLIENT
2 #define DQMOFFLINE_TRIGGER_EGHLTOFFLINECLIENT
3 
4 // -*- C++ -*-
5 //
6 // Package: EgammaHLTOfflineClient
7 // Class: EgammaHLTOffline
8 //
9 /*
10  Description: This is a DQM client meant to plot high-level HLT trigger
11  quantities as stored in the HLT results object TriggerResults for the Egamma triggers
12 
13  Notes:
14  Currently I would like to plot simple histograms of three seperate types of variables
15  1) global event quantities: eg nr of electrons
16  2) di-object quanities: transverse mass, di-electron mass
17  3) single object kinematic and id variables: eg et,eta,isolation
18 
19 */
20 //
21 // Original Author: Sam Harper
22 // Created: June 2008
23 //
24 //
25 //
26 
30 
31 #include <vector>
32 #include <string>
33 
35 private:
37 
38  std::vector<std::string> eleHLTFilterNames_; //names of the filters monitored using electrons to make plots for
39  std::vector<std::string> eleHLTFilterNames2Leg_;
40  std::vector<std::string> eleTightLooseTrigNames_;
41  std::vector<std::string> phoHLTFilterNames_; //names of the filters monitored using photons to make plots for
42  std::vector<std::string> phoHLTFilterNames2Leg_;
43  std::vector<std::string> phoTightLooseTrigNames_;
44 
45  std::vector<std::string> eleN1EffVars_;
46  std::vector<std::string> eleSingleEffVars_;
47  std::vector<std::string> eleEffTags_;
48 
49  std::vector<std::string> phoN1EffVars_;
50  std::vector<std::string> phoSingleEffVars_;
51  std::vector<std::string> phoEffTags_;
52 
53  std::vector<std::string> eleTrigTPEffVsVars_;
54  std::vector<std::string> phoTrigTPEffVsVars_;
55  std::vector<std::string> eleLooseTightTrigEffVsVars_;
56  std::vector<std::string> phoLooseTightTrigEffVsVars_;
57 
58  std::vector<std::string> eleHLTvOfflineVars_;
59  std::vector<std::string> phoHLTvOfflineVars_;
60 
64 
66  bool isSetup_;
68 
69 public:
70  explicit EgHLTOfflineClient(const edm::ParameterSet&);
71  ~EgHLTOfflineClient() override;
72 
73  void beginRun(const edm::Run& run, const edm::EventSetup& c) override;
74  // DQM Client Diagnostic
75  void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override; //performed in the endJob
78  edm::LuminosityBlock const&,
79  edm::EventSetup const&) override; //performed in the endLumi
80 
81  //at somepoint these all may migrate to a helper class
83  const std::string& baseName,
84  const std::string& region,
85  const std::vector<std::string>& varNames,
88 
90  const std::string& baseName,
91  const std::string& region,
92  const std::vector<std::string>& varNames,
95 
96  void createLooseTightTrigEff(const std::vector<std::string>& tightLooseTrigNames,
97  const std::string& region,
98  const std::vector<std::string>& vsVarNames,
99  const std::string& objName,
102 
104  const std::string& region,
105  const std::vector<std::string>& vsVarNames,
106  const std::string& objName,
109 
111  const std::string& region,
112  const std::vector<std::string>& vsVarNames,
113  const std::string& objName,
116 
117  void createTrigTagProbeEffHists2Leg(const std::string& filterNameLeg1,
118  const std::string& filterNameLeg2,
119  const std::string& region,
120  const std::vector<std::string>& vsVarNames,
121  const std::string& objName,
124 
126  const std::string& baseName,
127  const std::string& region,
128  const std::vector<std::string>& varNames,
131 
133  const std::string& name,
134  const std::string& title,
135  const MonitorElement* numer,
136  const MonitorElement* denom,
139 
141  const std::string& name,
142  const std::string& title,
143  const MonitorElement* pass,
144  const MonitorElement* all,
147 
149  const std::string& name,
150  const std::string& title,
151  const MonitorElement* pass,
152  const MonitorElement* fail,
155 
157  const std::string& name,
158  const std::string& title,
159  const MonitorElement* pass,
160  const MonitorElement* fail,
161  const MonitorElement* tagtag,
164 
166  const std::string& name,
167  const std::string& title,
168  const MonitorElement* Leg1Eff,
169  const MonitorElement* Leg2NotLeg1Source,
170  const MonitorElement* all,
173 
174 private:
175  void runClient_(DQMStore::IBooker&, DQMStore::IGetter&); //master function which runs the client
176 };
177 
178 #endif
void createTrigTagProbeEffHists(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName, DQMStore::IBooker &, DQMStore::IGetter &)
void createTrigTagProbeEffHistsNewAlgo(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName, DQMStore::IBooker &, DQMStore::IGetter &)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
MonitorElement * makeEffMonElemFromPassAndFailAndTagTag(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, const MonitorElement *tagtag, DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > eleHLTFilterNames_
std::vector< std::string > phoHLTFilterNames2Leg_
std::vector< std::string > phoLooseTightTrigEffVsVars_
constexpr char const * varNames[]
std::vector< std::string > phoTrigTPEffVsVars_
std::vector< std::string > eleTightLooseTrigNames_
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
std::vector< std::string > phoN1EffVars_
std::vector< std::string > eleHLTvOfflineVars_
std::vector< std::string > eleTrigTPEffVsVars_
void createSingleEffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames, DQMStore::IBooker &, DQMStore::IGetter &)
void createLooseTightTrigEff(const std::vector< std::string > &tightLooseTrigNames, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName, DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > phoEffTags_
MonitorElement * makeEffMonElemFromPassAndFail(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > phoSingleEffVars_
void createHLTvsOfflineHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames, DQMStore::IBooker &, DQMStore::IGetter &)
MonitorElement * makeEffMonElemFromPassAndAll(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all, DQMStore::IBooker &, DQMStore::IGetter &)
void runClient_(DQMStore::IBooker &, DQMStore::IGetter &)
void createTrigTagProbeEffHists2Leg(const std::string &filterNameLeg1, const std::string &filterNameLeg2, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName, DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > eleN1EffVars_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > phoHLTvOfflineVars_
std::vector< std::string > phoHLTFilterNames_
EgHLTOfflineClient(const edm::ParameterSet &)
std::vector< std::string > eleLooseTightTrigEffVsVars_
MonitorElement * makeEffMonElem2Leg(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *Leg1Eff, const MonitorElement *Leg2NotLeg1Source, const MonitorElement *all, DQMStore::IBooker &, DQMStore::IGetter &)
void createN1EffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames, DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > eleEffTags_
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
MonitorElement * FillHLTvsOfflineHist(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *numer, const MonitorElement *denom, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: Run.h:45
std::vector< std::string > eleHLTFilterNames2Leg_
~EgHLTOfflineClient() override
std::vector< std::string > eleSingleEffVars_