74 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
77 LogInfo(
"HLTMuonVal") <<
">>> Constructor (HLTMuonCertSummary) <<<" << endl;
93 LogInfo(
"HLTMuonVal") <<
">>> BeginRun (HLTMuonCertSummary) <<<" << std::endl;
95 LogInfo(
"HLTMuonVal") <<
">>> " <<
run.id() << std::endl;
102 LogInfo(
"HLTMuonVal") <<
">>> EndRun (HLTMuonCertSummary) <<<" << std::endl;
104 std::vector<string> histoNameVector;
112 int SummaryBitResult = 100;
118 iBooker.
book2D(
"HLT_MUON_ReportSummaryMap",
"HLT_MUON: ReportSummaryMap", 6, -0.5, 5.5, 1, -0.5, 0.5);
120 "HLT_MUON_CertificationSummaryMap",
"HLT_MUON: CertificationSummaryMap", 6, -0.5, 5.5, 1, -0.5, 0.5);
122 TH2* reportSummaryMapTH2 = reportSummaryMap->
getTH2F();
124 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"PhiEtaOccAll");
125 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"PhiEtaOccMatch");
126 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"PhiEtaEff");
127 reportSummaryMapTH2->GetXaxis()->SetBinLabel(4,
"PhiEff");
128 reportSummaryMapTH2->GetXaxis()->SetBinLabel(5,
"EtaEff");
129 reportSummaryMapTH2->GetXaxis()->SetBinLabel(6,
"PtEff");
131 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"HLT_Mu5_allMuons");
133 TH2* CertificationSummaryMapTH2 = CertificationSummaryMap->
getTH2F();
135 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"PhiEtaOccAll");
136 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"PhiEtaOccMatch");
137 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"PhiEtaEff");
138 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(4,
"PhiEff");
139 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(5,
"EtaEff");
140 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(6,
"PtEff");
142 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"HLT_Mu5_allMuons");
144 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recPhiVsRecEta_All");
145 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recPhiVsRecEta_L3Filtered");
146 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPhiVsEta_L3Filtered");
147 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPt_L3Filtered");
148 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPhi_L3Filtered");
149 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffEta_L3Filtered");
156 LogInfo(
"HLTMuonVal") <<
"\n>>> looping over histograms to be tested <<<\n\n";
158 for (
auto& it : histoNameVector) {
167 bool validMe = TestHist !=
nullptr;
169 LogInfo(
"HLTMuonVal") <<
" is valid? " << validMe <<
"\n";
173 string histNameNoPath = TestHist->
getName();
176 LogInfo(
"HLTMuonVal") <<
">>> TestHist Name: " << histNameNoPath <<
"\n\n";
179 std::vector<QReport*> myQReports = TestHist->
getQReports();
181 LogInfo(
"HLTMuonVal") << TestHist->
getName() <<
": myQReports.size() = " << myQReports.size() <<
"\n\n";
182 for (
uint i = 0;
i != myQReports.size(); ++
i) {
184 float qtresult = myQReports[
i]->getQTresult();
185 int qtstatus = myQReports[
i]->getStatus();
188 LogInfo(
"HLTMuonVal") <<
"\tTest " <<
i <<
": qtname: " << qtname <<
"\n";
190 LogInfo(
"HLTMuonVal") <<
"\tTest " <<
i <<
": qtresult: " << qtresult << std::endl;
192 LogInfo(
"HLTMuonVal") <<
"\tTest " <<
i <<
": qtstatus: " << qtstatus <<
"\n\n";
197 qValueInt->
Fill(qtstatus);
201 if (
HistoName.find(
"recPhiVsRecEta_All") != std::string::npos) {
202 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1, 1), qtstatus);
203 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1, 1), qtstatus);
204 if ((qtstatus == 200) && (SummaryBitResult < 300))
205 SummaryBitResult = 200;
207 SummaryBitResult = 300;
210 if (
HistoName.find(
"recPhiVsRecEta_L3Filtered") != std::string::npos) {
211 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2, 1), qtstatus);
212 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2, 1), qtstatus);
213 if ((qtstatus == 200) && (SummaryBitResult < 300))
214 SummaryBitResult = 200;
216 SummaryBitResult = 300;
219 if (
HistoName.find(
"recEffPhiVsEta_L3Filtered") != std::string::npos) {
220 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3, 1), qtstatus);
221 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3, 1), qtstatus);
222 if ((qtstatus == 200) && (SummaryBitResult < 300))
223 SummaryBitResult = 200;
225 SummaryBitResult = 300;
228 if (
HistoName.find(
"recEffPhi_L3Filtered") != std::string::npos) {
229 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(4, 1), qtstatus);
230 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(4, 1), qtstatus);
233 if (
HistoName.find(
"recEffEta_L3Filtered") != std::string::npos) {
234 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(5, 1), qtstatus);
235 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(5, 1), qtstatus);
238 if (
HistoName.find(
"recEffPt_L3Filtered") != std::string::npos) {
239 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(6, 1), qtstatus);
240 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(6, 1), qtstatus);
245 reportSummary->
Fill(SummaryBitResult);
246 CertificationSummary->
Fill(SummaryBitResult);
253 if (SummaryBitResult == 100) {
254 muonHLTQualityBinaryBit->
Fill(1);
256 muonHLTQualityBinaryBit->
Fill(0);
HLTMuonCertSummary(const edm::ParameterSet &pset)
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< MonitorElementData::QReport * > getQReports() const
get map of QReports
edm::ParameterSet parameters_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual TH2F * getTH2F() const
~HLTMuonCertSummary() override
#define DEFINE_FWK_MODULE(type)
Log< level::Info, false > LogInfo
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual MonitorElement * get(std::string const &fullpath) const
const std::string & getName() const
get name of ME
void beginRun(const edm::Run &, const edm::EventSetup &) override