68 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;
121 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> Analyze (HLTOverallSummary) <<<" << std::endl;
143 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> BeginRun (HLTOverallSummary) <<<" << std::endl;
144 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> "<< run.
id() << std::endl;
154 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> EndRun (HLTOverallSummary) <<<" << std::endl;
157 LogInfo (
"HLTMuonVal") <<
"No dqmstore... skipping processing step" << endl;
161 std::vector<string> histoNameVector;
166 float defaultValueIfNotFound = 1.0;
168 dbe_->setCurrentFolder(
"HLT/EventInfo/reportSummaryContent");
175 muonQualityBit =
dbe_->get(
"HLT_Muon");
177 if (!muonQualityBit) {
178 LogInfo (
"HLTMuonVal") <<
"Can't find muonQuality bit... making a bit, setting it to zero" << endl;
180 muonQualityBit =
dbe_->bookFloat(
"HLT_Muon");
181 muonQualityBit->
Fill(defaultValueIfNotFound);
186 eleQualityBit =
dbe_->get(
"HLT_Electron");
188 if (!eleQualityBit) {
189 LogInfo (
"HLTMuonVal") <<
"Can't find eleQuality bit... making a bit, setting it to zero" << endl;
191 eleQualityBit =
dbe_->bookFloat(
"HLT_Electron");
192 eleQualityBit->
Fill(defaultValueIfNotFound);
196 photonQualityBit =
dbe_->get(
"HLT_Photon");
198 if (!photonQualityBit) {
199 LogInfo (
"HLTMuonVal") <<
"Can't find photonQuality bit... making a bit, setting it to zero" << endl;
201 photonQualityBit =
dbe_->bookFloat(
"HLT_Photon");
202 photonQualityBit->
Fill(defaultValueIfNotFound);
208 dbe_->setCurrentFolder(
"HLT/EventInfo");
214 MonitorElement* reportSummaryMap =
dbe_->book2D(
"reportSummaryMap",
"HLT: ReportSummaryMap",3,-0.5,2.5,1,-0.5,0.5);
215 MonitorElement* CertificationSummaryMap =
dbe_->book2D(
"certificationSummaryMap",
"HLT: CertificationSummaryMap",3,-0.5,2.5,1,-0.5,0.5);
217 TH2 * reportSummaryMapTH2 = reportSummaryMap->
getTH2F();
219 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
220 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
221 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
223 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
226 TH2 * CertificationSummaryMapTH2 = CertificationSummaryMap->
getTH2F();
228 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
229 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
230 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
231 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
243 float hltOverallValue = 1.0;
245 if ( (photonValue > 0.99)
246 && (electronValue > 0.99)
247 && (muonValue > 0.99) ) {
249 hltOverallValue = 1.0;
253 hltOverallValue = 0.0;
257 hltQualityBit->
Fill(hltOverallValue);
259 unsigned int hltSummaryValue = 0x0;
261 unsigned int ELECTRON_MASK = 0x1;
262 unsigned int PHOTON_MASK = 0x2;
263 unsigned int MUON_MASK = 0x4;
265 if (electronValue > 0.99) hltSummaryValue = hltSummaryValue | ELECTRON_MASK;
266 if (photonValue > 0.99) hltSummaryValue = hltSummaryValue | PHOTON_MASK;
267 if (muonValue > 0.99) hltSummaryValue = hltSummaryValue | MUON_MASK;
269 hltQualitySummaryWord->
Fill(hltSummaryValue);
271 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1,1), muonValue);
272 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2,1), electronValue);
273 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3,1), photonValue);
275 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1,1), muonValue);
276 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2,1), electronValue);
277 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3,1), photonValue);
void endRun(const edm::Run &, const edm::EventSetup &) override
double getFloatValue() const
void analyze(const edm::Event &, const edm::EventSetup &) override
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
void beginRun(const edm::Run &, const edm::EventSetup &) override
~HLTOverallSummary() override
edm::ParameterSet parameters_
HLTOverallSummary(const edm::ParameterSet &pset)