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;
127 dbe_->setCurrentFolder(
"HLT/EventInfo");
130 reportSummary_ =
dbe_->get(
"HLT/EventInfo/reportSummary");
132 if ( reportSummary_ ) {
133 dbe_->removeElement(reportSummary_->getName());
136 reportSummary_ =
dbe_->bookFloat(
"reportSummary");
138 if (reportSummary_) reportSummary_->Fill(1);
141 CertificationSummary_ =
dbe_->get(
"HLT/EventInfo/CertificationSummary");
143 if ( CertificationSummary_ ) {
144 dbe_->removeElement(CertificationSummary_->getName());
147 CertificationSummary_ =
dbe_->bookFloat(
"CertificationSummary");
149 if (CertificationSummary_) CertificationSummary_->Fill(1);
152 if (reportSummary_) reportSummary_->Fill(1);
157 dbe_->setCurrentFolder(
"HLT/EventInfo");
159 reportSummaryMap_ =
dbe_->get(
"HLT/EventInfo/reportSummaryMap");
160 if ( reportSummaryMap_ ) {
161 dbe_->removeElement(reportSummaryMap_->getName());
165 reportSummaryMap_ =
dbe_->book2D(
"reportSummaryMap",
"reportSummaryMap", 1, 1, 2, 6, 1, 7);
166 reportSummaryMap_->setAxisTitle(
"", 1);
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_ ) {
179 dbe_->removeElement(CertificationSummaryMap_->getName());
183 CertificationSummaryMap_ =
dbe_->book2D(
"CertificationSummaryMap",
"CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
184 CertificationSummaryMap_->setAxisTitle(
"", 1);
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;
225 float reportSummary = 0;
227 dbe_->setCurrentFolder(
"HLT/EventInfo/reportSummaryContents");
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()
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
BeginRun.
void endRun(const edm::Run &r, const edm::EventSetup &c) override
EndRun.
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
DQM Client Diagnostic.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
DQMOfflineHLTEventInfoClient(const edm::ParameterSet &ps)
Constructor.
double getFloatValue(void) const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Fake Analyze.
void beginJob() override
BeginJob.
void endJob() override
Endjob.
~DQMOfflineHLTEventInfoClient() override
Destructor.