15 #include <TProfile2D.h>
95 if(verbose_)
cout <<
"[TriggerDQM]: ending... " << endl;
108 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
110 prescaleLS_ = parameters_.getUntrackedParameter<
int>(
"prescaleLS", -1);
111 if(verbose_)
cout <<
"DQM lumi section prescale = " << prescaleLS_ <<
" lumi section(s)"<< endl;
113 prescaleEvt_ = parameters_.getUntrackedParameter<
int>(
"prescaleEvt", -1);
114 if(verbose_)
cout <<
"DQM event prescale = " << prescaleEvt_ <<
" events(s)"<< endl;
123 if(verbose_)
cout <<
"[TriggerDQM]: Begin Job" << endl;
130 reportSummary_ =
dbe_->
get(
"HLT/EventInfo/reportSummary");
132 if ( reportSummary_ ) {
138 if (reportSummary_) reportSummary_->
Fill(1);
141 CertificationSummary_ =
dbe_->
get(
"HLT/EventInfo/CertificationSummary");
143 if ( CertificationSummary_ ) {
147 CertificationSummary_ =
dbe_->
bookFloat(
"CertificationSummary");
149 if (CertificationSummary_) CertificationSummary_->
Fill(1);
152 if (reportSummary_) reportSummary_->Fill(1);
159 reportSummaryMap_ =
dbe_->
get(
"HLT/EventInfo/reportSummaryMap");
160 if ( reportSummaryMap_ ) {
165 reportSummaryMap_ =
dbe_->
book2D(
"reportSummaryMap",
"reportSummaryMap", 1, 1, 2, 6, 1, 7);
167 reportSummaryMap_->setAxisTitle(
"", 2);
168 reportSummaryMap_->setBinLabel(1,
"Muon",2);
169 reportSummaryMap_->setBinLabel(2,
"Electron",2);
170 reportSummaryMap_->setBinLabel(3,
"Photon",2);
171 reportSummaryMap_->setBinLabel(4,
"JetMET",2);
172 reportSummaryMap_->setBinLabel(5,
"BJet",2);
173 reportSummaryMap_->setBinLabel(6,
"Tau",2);
174 reportSummaryMap_->setBinLabel(1,
" ",1);
177 CertificationSummaryMap_ =
dbe_->
get(
"HLT/EventInfo/CertificationSummaryMap");
178 if ( CertificationSummaryMap_ ) {
183 CertificationSummaryMap_ =
dbe_->
book2D(
"CertificationSummaryMap",
"CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
185 CertificationSummaryMap_->setAxisTitle(
"", 2);
186 CertificationSummaryMap_->setBinLabel(1,
"Muon",2);
187 CertificationSummaryMap_->setBinLabel(2,
"Electron",2);
188 CertificationSummaryMap_->setBinLabel(3,
"Photon",2);
189 CertificationSummaryMap_->setBinLabel(4,
"JetMET",2);
190 CertificationSummaryMap_->setBinLabel(5,
"BJet",2);
191 CertificationSummaryMap_->setBinLabel(6,
"Tau",2);
192 CertificationSummaryMap_->setBinLabel(1,
" ",1);
213 if (prescaleEvt_<1)
return;
214 if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0)
return;
216 if(verbose_)
cout <<
"DQMOfflineHLTEventInfoClient::analyze" << endl;
224 float summarySum = 0;
229 if(HLT_Muon) reportSummaryContent_.push_back(HLT_Muon);
232 if(HLT_Electron) reportSummaryContent_.push_back(HLT_Electron);
235 if(HLT_Photon) reportSummaryContent_.push_back(HLT_Photon);
238 if(HLT_Tau) reportSummaryContent_.push_back(HLT_Tau);
241 int nSubsystems = reportSummaryContent_.size();
243 for (
int m = 0;
m < nSubsystems;
m++) {
244 summarySum += (reportSummaryContent_[
m])->getFloatValue();
248 if(nSubsystems > 0) {
249 reportSummary = summarySum / nSubsystems;;
255 reportSummary_->
Fill(reportSummary);
256 CertificationSummary_->Fill(reportSummary);
261 float electronValue = 1;
262 if(HLT_Electron) electronValue = HLT_Electron->
getFloatValue();
264 float photonValue = 1;
270 reportSummaryMap_->setBinContent(1,1,muonValue);
271 reportSummaryMap_->setBinContent(1,2,electronValue);
272 reportSummaryMap_->setBinContent(1,3,photonValue);
273 reportSummaryMap_->setBinContent(1,4,1);
274 reportSummaryMap_->setBinContent(1,5,1);
275 reportSummaryMap_->setBinContent(1,6,tauValue);
277 CertificationSummaryMap_->setBinContent(1,1,muonValue);
278 CertificationSummaryMap_->setBinContent(1,2,electronValue);
279 CertificationSummaryMap_->setBinContent(1,3,photonValue);
280 CertificationSummaryMap_->setBinContent(1,4,1);
281 CertificationSummaryMap_->setBinContent(1,5,1);
282 CertificationSummaryMap_->setBinContent(1,6,tauValue);
static AlgebraicMatrix initialize()
MonitorElement * bookFloat(const char *name)
Book float.
DQMOfflineHLTEventInfoClient(const edm::ParameterSet &ps)
Constructor.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Fake Analyze.
void removeElement(const std::string &name)
double getFloatValue(void) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
virtual ~DQMOfflineHLTEventInfoClient()
Destructor.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
void setCurrentFolder(const std::string &fullpath)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)