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:
36  // DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
38 
39  std::vector<std::string> eleHLTFilterNames_; //names of the filters monitored using electrons to make plots for
40  std::vector<std::string> eleHLTFilterNames2Leg_;
41  std::vector<std::string> eleTightLooseTrigNames_;
42  std::vector<std::string> phoHLTFilterNames_; //names of the filters monitored using photons to make plots for
43  std::vector<std::string> phoHLTFilterNames2Leg_;
44  std::vector<std::string> phoTightLooseTrigNames_;
45 
46  std::vector<std::string> eleN1EffVars_;
47  std::vector<std::string> eleSingleEffVars_;
48  std::vector<std::string> eleEffTags_;
49 
50  std::vector<std::string> phoN1EffVars_;
51  std::vector<std::string> phoSingleEffVars_;
52  std::vector<std::string> phoEffTags_;
53 
54  std::vector<std::string> eleTrigTPEffVsVars_;
55  std::vector<std::string> phoTrigTPEffVsVars_;
56  std::vector<std::string> eleLooseTightTrigEffVsVars_;
57  std::vector<std::string> phoLooseTightTrigEffVsVars_;
58 
59  std::vector<std::string> eleHLTvOfflineVars_;
60  std::vector<std::string> phoHLTvOfflineVars_;
61 
65 
67  bool isSetup_;
69 
70 public:
71  explicit EgHLTOfflineClient(const edm::ParameterSet&);
72  ~EgHLTOfflineClient() override;
73 
74  // virtual void beginJob();
75  // virtual void analyze(const edm::Event&, const edm::EventSetup&); //dummy
76  // virtual void endJob();
77  void beginRun(const edm::Run& run, const edm::EventSetup& c) override;
78  // virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
79 
80  // virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& context){}
81  // DQM Client Diagnostic
82  // virtual void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,const edm::EventSetup& c);
83  void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override; //performed in the endJob
86  edm::LuminosityBlock const&,
87  edm::EventSetup const&) override; //performed in the endLumi
88 
89  //at somepoint these all may migrate to a helper class
91  const std::string& baseName,
92  const std::string& region,
93  const std::vector<std::string>& varNames,
96 
98  const std::string& baseName,
99  const std::string& region,
100  const std::vector<std::string>& varNames,
103 
104  void createLooseTightTrigEff(const std::vector<std::string>& tightLooseTrigNames,
105  const std::string& region,
106  const std::vector<std::string>& vsVarNames,
107  const std::string& objName,
110 
112  const std::string& region,
113  const std::vector<std::string>& vsVarNames,
114  const std::string& objName,
117 
119  const std::string& region,
120  const std::vector<std::string>& vsVarNames,
121  const std::string& objName,
124 
125  void createTrigTagProbeEffHists2Leg(const std::string& filterNameLeg1,
126  const std::string& filterNameLeg2,
127  const std::string& region,
128  const std::vector<std::string>& vsVarNames,
129  const std::string& objName,
132 
134  const std::string& baseName,
135  const std::string& region,
136  const std::vector<std::string>& varNames,
139 
141  const std::string& name,
142  const std::string& title,
143  const MonitorElement* numer,
144  const MonitorElement* denom,
147 
149  const std::string& name,
150  const std::string& title,
151  const MonitorElement* pass,
152  const MonitorElement* all,
155 
157  const std::string& name,
158  const std::string& title,
159  const MonitorElement* pass,
160  const MonitorElement* fail,
163 
165  const std::string& name,
166  const std::string& title,
167  const MonitorElement* pass,
168  const MonitorElement* fail,
169  const MonitorElement* tagtag,
172 
174  const std::string& name,
175  const std::string& title,
176  const MonitorElement* Leg1Eff,
177  const MonitorElement* Leg2NotLeg1Source,
178  const MonitorElement* all,
181 
182 private:
183  void runClient_(DQMStore::IBooker&, DQMStore::IGetter&); //master function which runs the client
184 };
185 
186 #endif
DQMEDHarvester.h
EgHLTOfflineClient::eleHLTvOfflineVars_
std::vector< std::string > eleHLTvOfflineVars_
Definition: EgHLTOfflineClient.h:59
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
EgHLTOfflineClient::phoHLTFilterNames2Leg_
std::vector< std::string > phoHLTFilterNames2Leg_
Definition: EgHLTOfflineClient.h:43
makePileupJSON.denom
denom
Definition: makePileupJSON.py:146
EgHLTOfflineClient::makeEffMonElemFromPassAndFail
MonitorElement * makeEffMonElemFromPassAndFail(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *fail, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:616
EgHLTOfflineClient::runClientEndLumiBlock_
bool runClientEndLumiBlock_
Definition: EgHLTOfflineClient.h:62
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
EgHLTOfflineClient::createHLTvsOfflineHists
void createHLTvsOfflineHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:169
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
EgHLTOfflineClient::createTrigTagProbeEffHists2Leg
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 &)
Definition: EgHLTOfflineClient.cc:395
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
EgHLTOfflineClient::runClientEndRun_
bool runClientEndRun_
Definition: EgHLTOfflineClient.h:63
EgHLTOfflineClient::createSingleEffHists
void createSingleEffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:270
EgHLTOfflineClient::filterInactiveTriggers_
bool filterInactiveTriggers_
Definition: EgHLTOfflineClient.h:66
EgHLTOfflineClient::phoHLTvOfflineVars_
std::vector< std::string > phoHLTvOfflineVars_
Definition: EgHLTOfflineClient.h:60
EgHLTOfflineClient::makeEffMonElemFromPassAndFailAndTagTag
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 &)
Definition: EgHLTOfflineClient.cc:519
EgHLTOfflineClient::eleN1EffVars_
std::vector< std::string > eleN1EffVars_
Definition: EgHLTOfflineClient.h:46
EgHLTOfflineClient::isSetup_
bool isSetup_
Definition: EgHLTOfflineClient.h:67
EgHLTOfflineClient::hltTag_
std::string hltTag_
Definition: EgHLTOfflineClient.h:68
EgHLTOfflineClient::EgHLTOfflineClient
EgHLTOfflineClient(const edm::ParameterSet &)
Definition: EgHLTOfflineClient.cc:20
EgHLTOfflineClient::eleLooseTightTrigEffVsVars_
std::vector< std::string > eleLooseTightTrigEffVsVars_
Definition: EgHLTOfflineClient.h:56
EgHLTOfflineClient::phoSingleEffVars_
std::vector< std::string > phoSingleEffVars_
Definition: EgHLTOfflineClient.h:51
EgHLTOfflineClient::makeEffMonElem2Leg
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 &)
Definition: EgHLTOfflineClient.cc:564
EgHLTOfflineClient::~EgHLTOfflineClient
~EgHLTOfflineClient() override
EgHLTOfflineClient::FillHLTvsOfflineHist
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: EgHLTOfflineClient.cc:212
EgHLTOfflineClient::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: EgHLTOfflineClient.cc:59
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
EgHLTOfflineClient::eleEffTags_
std::vector< std::string > eleEffTags_
Definition: EgHLTOfflineClient.h:48
EgHLTOfflineClient::eleSingleEffVars_
std::vector< std::string > eleSingleEffVars_
Definition: EgHLTOfflineClient.h:47
edm::ParameterSet
Definition: ParameterSet.h:47
EgHLTOfflineClient::phoN1EffVars_
std::vector< std::string > phoN1EffVars_
Definition: EgHLTOfflineClient.h:50
EgHLTOfflineClient::phoHLTFilterNames_
std::vector< std::string > phoHLTFilterNames_
Definition: EgHLTOfflineClient.h:42
EgHLTOfflineClient::phoLooseTightTrigEffVsVars_
std::vector< std::string > phoLooseTightTrigEffVsVars_
Definition: EgHLTOfflineClient.h:57
EgHLTOfflineClient::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: EgHLTOfflineClient.cc:54
EgHLTOfflineClient::makeEffMonElemFromPassAndAll
MonitorElement * makeEffMonElemFromPassAndAll(const std::string &filterName, const std::string &name, const std::string &title, const MonitorElement *pass, const MonitorElement *all, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:491
EgHLTOfflineClient::createTrigTagProbeEffHistsNewAlgo
void createTrigTagProbeEffHistsNewAlgo(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:338
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
EgHLTOfflineClient::createTrigTagProbeEffHists
void createTrigTagProbeEffHists(const std::string &filterName, const std::string &region, const std::vector< std::string > &vsVarNames, const std::string &objName, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:298
edm::EventSetup
Definition: EventSetup.h:58
boostedTaus_cff.objName
objName
Definition: boostedTaus_cff.py:68
EgHLTOfflineClient::eleTrigTPEffVsVars_
std::vector< std::string > eleTrigTPEffVsVars_
Definition: EgHLTOfflineClient.h:54
EgHLTOfflineClient::eleHLTFilterNames_
std::vector< std::string > eleHLTFilterNames_
Definition: EgHLTOfflineClient.h:39
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EgHLTOfflineClient::eleTightLooseTrigNames_
std::vector< std::string > eleTightLooseTrigNames_
Definition: EgHLTOfflineClient.h:41
pdwgDoubleElectron_cfi.filterName
filterName
Definition: pdwgDoubleElectron_cfi.py:7
DQMEDHarvester
Definition: DQMEDHarvester.py:1
EgHLTOfflineClient
Definition: EgHLTOfflineClient.h:34
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
EgHLTOfflineClient::eleHLTFilterNames2Leg_
std::vector< std::string > eleHLTFilterNames2Leg_
Definition: EgHLTOfflineClient.h:40
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EgHLTOfflineClient::phoTrigTPEffVsVars_
std::vector< std::string > phoTrigTPEffVsVars_
Definition: EgHLTOfflineClient.h:55
dqm::implementation::IBooker
Definition: DQMStore.h:43
EgHLTOfflineClient::createLooseTightTrigEff
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 &)
Definition: EgHLTOfflineClient.cc:446
varNames
constexpr const char * varNames[]
Definition: PulseShapeFitOOTPileupCorrection.cc:110
EgHLTOfflineClient::runClient_
void runClient_(DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:91
EgHLTOfflineClient::phoTightLooseTrigNames_
std::vector< std::string > phoTightLooseTrigNames_
Definition: EgHLTOfflineClient.h:44
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
EgHLTOfflineClient::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: EgHLTOfflineClient.cc:83
EgHLTOfflineClient::runClientEndJob_
bool runClientEndJob_
Definition: EgHLTOfflineClient.h:64
EgHLTOfflineClient::dirName_
std::string dirName_
Definition: EgHLTOfflineClient.h:37
EgHLTOfflineClient::createN1EffHists
void createN1EffHists(const std::string &filterName, const std::string &baseName, const std::string &region, const std::vector< std::string > &varNames, DQMStore::IBooker &, DQMStore::IGetter &)
Definition: EgHLTOfflineClient.cc:240
EgHLTOfflineClient::phoEffTags_
std::vector< std::string > phoEffTags_
Definition: EgHLTOfflineClient.h:52