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);
207 if (prescaleEvt_<1)
return;
208 if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0)
return;
210 if(verbose_)
cout <<
"DQMOfflineHLTEventInfoClient::analyze" << endl;
218 float summarySum = 0;
219 float reportSummary = 0;
221 dbe_->setCurrentFolder(
"HLT/EventInfo/reportSummaryContents");
223 if(HLT_Muon) reportSummaryContent_.push_back(HLT_Muon);
226 if(HLT_Electron) reportSummaryContent_.push_back(HLT_Electron);
229 if(HLT_Photon) reportSummaryContent_.push_back(HLT_Photon);
232 if(HLT_Tau) reportSummaryContent_.push_back(HLT_Tau);
235 int nSubsystems = reportSummaryContent_.size();
237 for (
int m = 0;
m < nSubsystems;
m++) {
238 summarySum += (reportSummaryContent_[
m])->getFloatValue();
242 if(nSubsystems > 0) {
243 reportSummary = summarySum / nSubsystems;;
249 reportSummary_->Fill(reportSummary);
250 CertificationSummary_->Fill(reportSummary);
255 float electronValue = 1;
256 if(HLT_Electron) electronValue = HLT_Electron->
getFloatValue();
258 float photonValue = 1;
264 reportSummaryMap_->setBinContent(1,1,muonValue);
265 reportSummaryMap_->setBinContent(1,2,electronValue);
266 reportSummaryMap_->setBinContent(1,3,photonValue);
267 reportSummaryMap_->setBinContent(1,4,1);
268 reportSummaryMap_->setBinContent(1,5,1);
269 reportSummaryMap_->setBinContent(1,6,tauValue);
271 CertificationSummaryMap_->setBinContent(1,1,muonValue);
272 CertificationSummaryMap_->setBinContent(1,2,electronValue);
273 CertificationSummaryMap_->setBinContent(1,3,photonValue);
274 CertificationSummaryMap_->setBinContent(1,4,1);
275 CertificationSummaryMap_->setBinContent(1,5,1);
276 CertificationSummaryMap_->setBinContent(1,6,tauValue);
static AlgebraicMatrix initialize()
double getFloatValue() const
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
BeginRun.
void endRun(const edm::Run &r, const edm::EventSetup &c) override
EndRun.
DQMOfflineHLTEventInfoClient(const edm::ParameterSet &ps)
Constructor.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Fake Analyze.
void beginJob() override
BeginJob.
void endJob() override
Endjob.
~DQMOfflineHLTEventInfoClient() override
Destructor.