79 LogInfo(
"HLTMuonVal") <<
"Can't find DQMStore, no results will be saved" << endl;
83 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
86 LogInfo(
"HLTMuonVal") <<
">>> Constructor (HLTOverallSummary) <<<" << endl;
100 LogInfo(
"HLTMuonVal") <<
">>> Analyze (HLTOverallSummary) <<<" << std::endl;
107 LogInfo(
"HLTMuonVal") <<
">>> BeginRun (HLTOverallSummary) <<<" << std::endl;
109 LogInfo(
"HLTMuonVal") <<
">>> " << run.
id() << std::endl;
116 LogInfo(
"HLTMuonVal") <<
">>> EndRun (HLTOverallSummary) <<<" << std::endl;
119 LogInfo(
"HLTMuonVal") <<
"No dqmstore... skipping processing step" << endl;
123 std::vector<string> histoNameVector;
127 float defaultValueIfNotFound = 1.0;
129 dbe_->setCurrentFolder(
"HLT/EventInfo/reportSummaryContent");
134 muonQualityBit =
dbe_->get(
"HLT_Muon");
136 if (!muonQualityBit) {
137 LogInfo(
"HLTMuonVal") <<
"Can't find muonQuality bit... making a bit, setting it to zero" << endl;
139 muonQualityBit =
dbe_->bookFloat(
"HLT_Muon");
140 muonQualityBit->Fill(defaultValueIfNotFound);
144 eleQualityBit =
dbe_->get(
"HLT_Electron");
146 if (!eleQualityBit) {
147 LogInfo(
"HLTMuonVal") <<
"Can't find eleQuality bit... making a bit, setting it to zero" << endl;
149 eleQualityBit =
dbe_->bookFloat(
"HLT_Electron");
150 eleQualityBit->Fill(defaultValueIfNotFound);
154 photonQualityBit =
dbe_->get(
"HLT_Photon");
156 if (!photonQualityBit) {
157 LogInfo(
"HLTMuonVal") <<
"Can't find photonQuality bit... making a bit, setting it to zero" << endl;
159 photonQualityBit =
dbe_->bookFloat(
"HLT_Photon");
160 photonQualityBit->Fill(defaultValueIfNotFound);
165 dbe_->setCurrentFolder(
"HLT/EventInfo");
172 dbe_->book2D(
"reportSummaryMap",
"HLT: ReportSummaryMap", 3, -0.5, 2.5, 1, -0.5, 0.5);
174 dbe_->book2D(
"certificationSummaryMap",
"HLT: CertificationSummaryMap", 3, -0.5, 2.5, 1, -0.5, 0.5);
176 TH2* reportSummaryMapTH2 = reportSummaryMap->getTH2F();
178 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
179 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
180 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
182 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
184 TH2* CertificationSummaryMapTH2 = CertificationSummaryMap->getTH2F();
186 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Muon");
187 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Electron");
188 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"Photon");
189 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"Quality");
193 float photonValue = photonQualityBit->getFloatValue();
195 float electronValue = eleQualityBit->getFloatValue();
197 float muonValue = muonQualityBit->getFloatValue();
199 float hltOverallValue = 1.0;
201 if ((photonValue > 0.99) && (electronValue > 0.99) && (muonValue > 0.99)) {
202 hltOverallValue = 1.0;
205 hltOverallValue = 0.0;
208 hltQualityBit->Fill(hltOverallValue);
210 unsigned int hltSummaryValue = 0x0;
212 unsigned int ELECTRON_MASK = 0x1;
213 unsigned int PHOTON_MASK = 0x2;
214 unsigned int MUON_MASK = 0x4;
216 if (electronValue > 0.99)
217 hltSummaryValue = hltSummaryValue | ELECTRON_MASK;
218 if (photonValue > 0.99)
219 hltSummaryValue = hltSummaryValue | PHOTON_MASK;
220 if (muonValue > 0.99)
221 hltSummaryValue = hltSummaryValue | MUON_MASK;
223 hltQualitySummaryWord->Fill(hltSummaryValue);
225 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1, 1), muonValue);
226 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2, 1), electronValue);
227 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3, 1), photonValue);
229 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1, 1), muonValue);
230 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2, 1), electronValue);
231 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3, 1), photonValue);
const edm::EventSetup & c
void endRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
void beginRun(const edm::Run &, const edm::EventSetup &) override
~HLTOverallSummary() override
Log< level::Info, false > LogInfo
dqm::legacy::DQMStore DQMStore
edm::ParameterSet parameters_
HLTOverallSummary(const edm::ParameterSet &pset)
dqm::legacy::MonitorElement MonitorElement