90 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
92 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> Constructor (HLTMuonCertSummary) <<<" << endl;
121 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> BeginRun (HLTMuonCertSummary) <<<" << std::endl;
122 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> "<< run.
id() << std::endl;
134 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> EndRun (HLTMuonCertSummary) <<<" << std::endl;
136 std::vector<string> histoNameVector;
147 int SummaryBitResult = 100;
154 MonitorElement* reportSummaryMap = iBooker.
book2D(
"HLT_MUON_ReportSummaryMap",
"HLT_MUON: ReportSummaryMap",6,-0.5,5.5,1,-0.5,0.5);
155 MonitorElement* CertificationSummaryMap = iBooker.
book2D(
"HLT_MUON_CertificationSummaryMap",
"HLT_MUON: CertificationSummaryMap",6,-0.5,5.5,1,-0.5,0.5);
157 TH2 * reportSummaryMapTH2 = reportSummaryMap->
getTH2F();
159 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"PhiEtaOccAll");
160 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"PhiEtaOccMatch");
161 reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"PhiEtaEff");
162 reportSummaryMapTH2->GetXaxis()->SetBinLabel(4,
"PhiEff");
163 reportSummaryMapTH2->GetXaxis()->SetBinLabel(5,
"EtaEff");
164 reportSummaryMapTH2->GetXaxis()->SetBinLabel(6,
"PtEff");
166 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"HLT_Mu5_allMuons");
169 TH2 * CertificationSummaryMapTH2 = CertificationSummaryMap->
getTH2F();
171 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"PhiEtaOccAll");
172 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"PhiEtaOccMatch");
173 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,
"PhiEtaEff");
174 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(4,
"PhiEff");
175 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(5,
"EtaEff");
176 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(6,
"PtEff");
178 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"HLT_Mu5_allMuons");
181 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recPhiVsRecEta_All");
182 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recPhiVsRecEta_L3Filtered");
183 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPhiVsEta_L3Filtered");
184 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPt_L3Filtered");
185 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPhi_L3Filtered");
186 histoNameVector.emplace_back(
"HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffEta_L3Filtered");
193 if(verbose_)
LogInfo (
"HLTMuonVal") <<
"\n>>> looping over histograms to be tested <<<\n\n";
195 for(
auto & it : histoNameVector){
203 TestHist = iGetter.
get(HistoName);
205 bool validMe = TestHist!=
nullptr;
206 if(verbose_)
LogInfo (
"HLTMuonVal") <<
" is valid? " << validMe <<
"\n";
207 if(!validMe)
continue;
209 string histNameNoPath = TestHist->
getName();
211 if(verbose_)
LogInfo (
"HLTMuonVal") <<
">>> TestHist Name: " << histNameNoPath <<
"\n\n";
216 std::vector<QReport *> myQReports = TestHist->
getQReports();
217 if(verbose_)
LogInfo (
"HLTMuonVal") << TestHist->
getName() <<
": myQReports.size() = " << myQReports.size() <<
"\n\n";
218 for(
uint i=0;
i!=myQReports.size();++
i) {
221 float qtresult = myQReports[
i]->getQTresult();
222 int qtstatus = myQReports[
i]->getStatus() ;
224 if(verbose_)
LogInfo (
"HLTMuonVal") <<
"\tTest " <<
i <<
": qtname: " << qtname <<
"\n";
225 if(verbose_)
LogInfo (
"HLTMuonVal") <<
"\tTest " <<
i <<
": qtresult: " << qtresult << std::endl;
226 if(verbose_)
LogInfo (
"HLTMuonVal") <<
"\tTest " <<
i <<
": qtstatus: " << qtstatus <<
"\n\n";
232 qValueInt->
Fill(qtstatus);
237 if (HistoName.find(
"recPhiVsRecEta_All") != std::string::npos) {
238 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1,1), qtstatus);
239 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1,1), qtstatus );
240 if ( (qtstatus == 200) && (SummaryBitResult < 300)) SummaryBitResult = 200;
241 if ( qtstatus == 300 ) SummaryBitResult = 300;
245 if (HistoName.find(
"recPhiVsRecEta_L3Filtered") != std::string::npos) {
246 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2,1), qtstatus);
247 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2,1), qtstatus);
248 if ( (qtstatus == 200) && (SummaryBitResult < 300)) SummaryBitResult = 200;
249 if (qtstatus == 300 ) SummaryBitResult = 300;
253 if (HistoName.find(
"recEffPhiVsEta_L3Filtered") != std::string::npos) {
254 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3,1), qtstatus );
255 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3,1), qtstatus);
256 if ( (qtstatus == 200) && (SummaryBitResult < 300)) SummaryBitResult = 200;
257 if (qtstatus == 300 ) SummaryBitResult = 300;
260 if (HistoName.find(
"recEffPhi_L3Filtered") != std::string::npos) {
261 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(4,1), qtstatus);
262 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(4,1), qtstatus);
265 if (HistoName.find(
"recEffEta_L3Filtered") != std::string::npos) {
266 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(5,1), qtstatus);
267 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(5,1), qtstatus);
270 if (HistoName.find(
"recEffPt_L3Filtered") != std::string::npos) {
271 reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(6,1), qtstatus);
272 CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(6,1), qtstatus);
280 reportSummary->
Fill(SummaryBitResult);
281 CertificationSummary->
Fill(SummaryBitResult);
290 if (SummaryBitResult == 100){
291 muonHLTQualityBinaryBit->
Fill(1);
293 muonHLTQualityBinaryBit->
Fill(0);
HLTMuonCertSummary(const edm::ParameterSet &pset)
const std::string & getName() const
get name of ME
edm::ParameterSet parameters_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
~HLTMuonCertSummary() override
MonitorElement * get(std::string const &path)
MonitorElement * book2D(Args &&...args)
std::vector< QReport * > getQReports() const
get map of QReports
void beginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * bookFloat(Args &&...args)