68 virtual void endJob()
override ;
94 LogInfo (
"HLTMuonVal") <<
"Can't find DQMStore, no results will be saved"
101 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
103 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> Constructor (HLTOverallSummary) <<<" << endl;
123 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> Analyze (HLTOverallSummary) <<<" << std::endl;
145 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> BeginRun (HLTOverallSummary) <<<" << std::endl;
146 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> "<< run.
id() << std::endl;
156 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> EndRun (HLTOverallSummary) <<<" << std::endl;
159 LogInfo (
"HLTMuonVal") <<
"No dqmstore... skipping processing step" << endl;
163 std::vector<string> histoNameVector;
168 float defaultValueIfNotFound = 1.0;
170 dbe_->setCurrentFolder(
"HLT/EventInfo/reportSummaryContent");
177 muonQualityBit =
dbe_->get(
"HLT_Muon");
179 if (!muonQualityBit) {
180 LogInfo (
"HLTMuonVal") <<
"Can't find muonQuality bit... making a bit, setting it to zero" << endl;
182 muonQualityBit =
dbe_->bookFloat(
"HLT_Muon");
183 muonQualityBit->Fill(defaultValueIfNotFound);
188 eleQualityBit =
dbe_->get(
"HLT_Electron");
190 if (!eleQualityBit) {
191 LogInfo (
"HLTMuonVal") <<
"Can't find eleQuality bit... making a bit, setting it to zero" << endl;
193 eleQualityBit =
dbe_->bookFloat(
"HLT_Electron");
194 eleQualityBit->Fill(defaultValueIfNotFound);
198 photonQualityBit =
dbe_->get(
"HLT_Photon");
200 if (!photonQualityBit) {
201 LogInfo (
"HLTMuonVal") <<
"Can't find photonQuality bit... making a bit, setting it to zero" << endl;
203 photonQualityBit =
dbe_->bookFloat(
"HLT_Photon");
204 photonQualityBit->Fill(defaultValueIfNotFound);
210 dbe_->setCurrentFolder(
"HLT/EventInfo");
216 MonitorElement* reportSummaryMap =
dbe_->book2D(
"reportSummaryMap",
"HLT: ReportSummaryMap",3,-0.5,2.5,1,-0.5,0.5);
217 MonitorElement* CertificationSummaryMap =
dbe_->book2D(
"certificationSummaryMap",
"HLT: CertificationSummaryMap",3,-0.5,2.5,1,-0.5,0.5);
219 TH2 * reportSummaryMapTH2 = reportSummaryMap->getTH2F();
221 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
222 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
223 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
225 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
228 TH2 * CertificationSummaryMapTH2 = CertificationSummaryMap->getTH2F();
230 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
231 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
232 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
233 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
239 float photonValue = photonQualityBit->getFloatValue();
241 float electronValue = eleQualityBit->getFloatValue();
243 float muonValue = muonQualityBit->getFloatValue();
245 float hltOverallValue = 1.0;
247 if ( (photonValue > 0.99)
248 && (electronValue > 0.99)
249 && (muonValue > 0.99) ) {
251 hltOverallValue = 1.0;
255 hltOverallValue = 0.0;
259 hltQualityBit->Fill(hltOverallValue);
261 unsigned int hltSummaryValue = 0x0;
263 unsigned int ELECTRON_MASK = 0x1;
264 unsigned int PHOTON_MASK = 0x2;
265 unsigned int MUON_MASK = 0x4;
267 if (electronValue > 0.99) hltSummaryValue = hltSummaryValue | ELECTRON_MASK;
268 if (photonValue > 0.99) hltSummaryValue = hltSummaryValue | PHOTON_MASK;
269 if (muonValue > 0.99) hltSummaryValue = hltSummaryValue | MUON_MASK;
271 hltQualitySummaryWord->Fill(hltSummaryValue);
273 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1,1), muonValue);
274 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2,1), electronValue);
275 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3,1), photonValue);
277 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1,1), muonValue);
278 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2,1), electronValue);
279 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3,1), photonValue);
virtual void beginJob() override
virtual void endRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
edm::ParameterSet parameters_
HLTOverallSummary(const edm::ParameterSet &pset)
virtual void endJob() override