test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
29 
30 #include <vector>
31 #include <string>
32 
33 class DQMStore;
34 class MonitorElement;
35 
36 
38 
39  private:
40  DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
42 
43  std::vector<std::string> eleHLTFilterNames_;//names of the filters monitored using electrons to make plots for
44  std::vector<std::string> eleHLTFilterNames2Leg_;
45  std::vector<std::string> eleTightLooseTrigNames_;
46  std::vector<std::string> phoHLTFilterNames_;//names of the filters monitored using photons to make plots for
47  std::vector<std::string> phoHLTFilterNames2Leg_;
48  std::vector<std::string> phoTightLooseTrigNames_;
49 
50 
51  std::vector<std::string> eleN1EffVars_;
52  std::vector<std::string> eleSingleEffVars_;
53  std::vector<std::string> eleEffTags_;
54 
55  std::vector<std::string> phoN1EffVars_;
56  std::vector<std::string> phoSingleEffVars_;
57  std::vector<std::string> phoEffTags_;
58 
59  std::vector<std::string> eleTrigTPEffVsVars_;
60  std::vector<std::string> phoTrigTPEffVsVars_;
61  std::vector<std::string> eleLooseTightTrigEffVsVars_;
62  std::vector<std::string> phoLooseTightTrigEffVsVars_;
63 
64  std::vector<std::string> eleHLTvOfflineVars_;
65  std::vector<std::string> phoHLTvOfflineVars_;
66 
70 
72  bool isSetup_;
74 
75 
76  //disabling copying/assignment (in theory this is copyable but lets not just in case)
78  EgHLTOfflineClient& operator=(const EgHLTOfflineClient& rhs){return *this;}
79 
80  public:
81  explicit EgHLTOfflineClient(const edm::ParameterSet& );
82  virtual ~EgHLTOfflineClient();
83 
84 
85  virtual void beginJob();
86  virtual void analyze(const edm::Event&, const edm::EventSetup&); //dummy
87  virtual void endJob();
88  virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
89  virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
90 
91 
92  virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& context){}
93  // DQM Client Diagnostic
94  virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& c);
95 
96  //at somepoint these all may migrate to a helper class
97  void createN1EffHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
98  void createSingleEffHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
99  void createLooseTightTrigEff(const std::vector<std::string>& tightLooseTrigNames,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
100  void createTrigTagProbeEffHists(const std::string& filterName,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
101  void createTrigTagProbeEffHistsNewAlgo(const std::string& filterName,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
102  void createTrigTagProbeEffHists2Leg(const std::string& filterNameLeg1,const std::string& filterNameLeg2,const std::string& region,const std::vector<std::string>& vsVarNames,const std::string& objName);
103  void createHLTvsOfflineHists(const std::string& filterName,const std::string& baseName,const std::string& region,const std::vector<std::string>& varNames);
105 
109  MonitorElement* makeEffMonElem2Leg(const std::string& filter,const std::string& name,const std::string& title,const MonitorElement* Leg1Eff,const MonitorElement* Leg2NotLeg1Source, const MonitorElement* all);
110 
111 private:
112  void runClient_(); //master function which runs the client
113 
114 };
115 
116 
117 
118 #endif
virtual void beginJob()
std::vector< std::string > eleHLTFilterNames_
std::vector< std::string > phoHLTFilterNames2Leg_
void createSingleEffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
std::vector< std::string > phoLooseTightTrigEffVsVars_
void createN1EffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
EgHLTOfflineClient(const EgHLTOfflineClient &rhs)
std::vector< std::string > phoTrigTPEffVsVars_
std::vector< std::string > eleTightLooseTrigNames_
MonitorElement * FillHLTvsOfflineHist(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *numer, const MonitorElement *denom)
std::vector< std::string > phoN1EffVars_
std::vector< std::string > eleHLTvOfflineVars_
void createTrigTagProbeEffHistsNewAlgo(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
std::vector< std::string > eleTrigTPEffVsVars_
EgHLTOfflineClient & operator=(const EgHLTOfflineClient &rhs)
std::vector< std::string > phoEffTags_
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< std::string > phoSingleEffVars_
MonitorElement * makeEffMonElemFromPassAndAll(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all)
void createTrigTagProbeEffHists(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
void createHLTvsOfflineHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * makeEffMonElemFromPassAndFail(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail)
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
virtual void endRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< std::string > eleN1EffVars_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > phoHLTvOfflineVars_
void createTrigTagProbeEffHists2Leg(const std::string &filterNameLeg1, const std::string &filterNameLeg2, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
std::vector< std::string > phoHLTFilterNames_
std::vector< std::string > eleLooseTightTrigEffVsVars_
std::vector< std::string > eleEffTags_
void createLooseTightTrigEff(const std::vector< std::string > &tightLooseTrigNames, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName)
MonitorElement * makeEffMonElem2Leg(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *Leg1Eff, const MonitorElement *Leg2NotLeg1Source, const MonitorElement *all)
MonitorElement * makeEffMonElemFromPassAndFailAndTagTag(const std::string &filter, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, const MonitorElement *tagtag)
Definition: Run.h:41
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< std::string > eleSingleEffVars_