40 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<
"[DTSegmentAnalysisTest]: Constructor";
58 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<
"DTSegmentAnalysisTest: analyzed " << nLSs <<
" LS";
62 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<
"[DTSegmentAnalysisTest]: BeginRun";
69 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
70 <<
"DTSegmentAnalysisTest: analyzing LS" << lumiSeg.
id().
luminosityBlock() <<
" of " << nLSs << endl;
87 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
88 <<
"[DTSegmentAnalysisTest]: End of LS " << nLumiSegs
89 <<
". Client called in online mode , perform DQM client operation";
91 performClientDiagnostic(igetter);
97 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
98 <<
"[DTSegmentAnalysisTest]: endJob. Client called in offline mode , perform DQM client operation";
100 performClientDiagnostic(igetter);
105 summaryHistos[3]->Reset();
106 summaryHistos[4]->Reset();
107 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
108 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
110 for (; ch_it != ch_end; ++ch_it) {
116 if (hNHits && hSegmOcc) {
117 TH1F* hNHits_root = hNHits->
getTH1F();
118 TH2F* hSegmOcc_root = hSegmOcc->
getTH2F();
119 TH2F* summary_histo_root = summaryHistos[3]->getTH2F();
121 int sector = chID.
sector();
129 summaryHistos[chID.
wheel()]->setBinContent(sector, chID.
station(), 1);
130 if (summary_histo_root->GetBinContent(sector, chID.
wheel() + 3) < 1)
131 summaryHistos[3]->setBinContent(sector, chID.
wheel() + 3, 1);
133 summaryHistos[chID.
wheel()]->setBinContent(sector, chID.
station(), 0);
138 abs(12 - hNHits_root->GetMaximumBin()));
141 abs(8 - hNHits_root->GetMaximumBin()));
144 TH2F* summary2_histo_root = summaryHistos[3]->getTH2F();
146 if (hSegmOcc_root->GetBinContent(sector, chID.
station()) == 0) {
147 summaryHistos[chID.
wheel()]->setBinContent(sector, chID.
station(), 2);
148 if (summary2_histo_root->GetBinContent(sector, chID.
wheel() + 3) < 2)
149 summaryHistos[3]->setBinContent(sector, chID.
wheel() + 3, 2);
153 if ((sector == 4 || sector == 10) && chID.
station() == 4)
156 summaryHistos[4]->Fill(sector, chID.
wheel(),
weight);
158 LogVerbatim(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
159 <<
"[DTSegmentAnalysisTest]: histos not found!!";
168 TH1F* chi2_histo_root = chi2_histo->
getTH1F();
170 double maximum = chi2_histo_root->GetXaxis()->GetXmax();
171 double minimum = chi2_histo_root->GetXaxis()->GetXmin();
172 int nbins = chi2_histo_root->GetXaxis()->GetNbins();
175 double badSegments = 0;
177 badSegments += chi2_histo_root->GetBinContent(
bin);
180 if (chi2_histo_root->GetEntries() != 0) {
181 double badSegmentsPercentual = badSegments / double(chi2_histo_root->GetEntries());
185 LogVerbatim(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
186 <<
"[DTSegmentAnalysisTest]: Histo: " << getMEName(chID,
"h4DChi2") <<
" not found!" << endl;
192 string nEvtsName =
"DT/EventInfo/Counters/nProcessedEventsSegment";
198 summaryHistos[4]->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
200 summaryHistos[4]->setEntries(nMinEvts + 1);
201 LogVerbatim(
"DTDQM|DTMonitorClient|DTOccupancyTest")
202 <<
"[DTOccupancyTest] ME: " << nEvtsName <<
" not found!" << endl;
206 string chi2CriterionName =
parameters.getUntrackedParameter<
string>(
"chi2TestName",
"chi2InRange");
209 const QReport* theChi2QReport = (*histo).second->getQReport(chi2CriterionName);
210 if (theChi2QReport) {
211 vector<dqm::me_util::Channel> badChannels = theChi2QReport->
getBadChannels();
212 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
214 LogError(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
215 <<
"Wheel: " << (*histo).first.first <<
" Sector: " << (*histo).first.second
216 <<
" Bad stations: " << (*channel).getBin() <<
" Contents : " << (*channel).getContents();
221 string segmRecHitCriterionName =
222 parameters.getUntrackedParameter<
string>(
"segmRecHitTestName",
"segmRecHitInRange");
224 histo != segmRecHitHistos.end();
226 const QReport* theSegmRecHitQReport = (*histo).second->getQReport(segmRecHitCriterionName);
227 if (theSegmRecHitQReport) {
228 vector<dqm::me_util::Channel> badChannels = theSegmRecHitQReport->
getBadChannels();
229 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
231 LogError(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
232 <<
"Wheel: " << (*histo).first.first <<
" Sector: " << (*histo).first.second
233 <<
" Bad stations on recHit number: " << (*channel).getBin()
234 <<
" Contents : " << (*channel).getContents();
262 for (
int wh = -2; wh <= 2; wh++) {
271 summaryHistos[wh]->setBinLabel(1,
"MB1", 2);
272 summaryHistos[wh]->setBinLabel(2,
"MB2", 2);
273 summaryHistos[wh]->setBinLabel(3,
"MB3", 2);
274 summaryHistos[wh]->setBinLabel(4,
"MB4", 2);
277 for (
int sect = 1; sect <= 14; sect++) {
280 string chi2HistoName =
"chi2BadSegmPercentual_W" +
wheel.str() +
"_Sec" + sector.str();
282 chi2Histos[make_pair(wh, sect)] = ibooker.
book1D(chi2HistoName.c_str(), chi2HistoName.c_str(), 4, 1, 5);
283 chi2Histos[make_pair(wh, sect)]->
setBinLabel(1,
"MB1");
284 chi2Histos[make_pair(wh, sect)]->setBinLabel(2,
"MB2");
285 chi2Histos[make_pair(wh, sect)]->setBinLabel(3,
"MB3");
286 chi2Histos[make_pair(wh, sect)]->setBinLabel(4,
"MB4");
288 string segmHistoName =
"residualsOnSegmRecHitNumber_W" +
wheel.str() +
"_Sec" + sector.str();
289 segmRecHitHistos[make_pair(wh, sect)] = ibooker.
book1D(segmHistoName.c_str(), segmHistoName.c_str(), 4, 1, 5);
290 segmRecHitHistos[make_pair(wh, sect)]->
setBinLabel(1,
"MB1");
291 segmRecHitHistos[make_pair(wh, sect)]->setBinLabel(2,
"MB2");
292 segmRecHitHistos[make_pair(wh, sect)]->setBinLabel(3,
"MB3");
293 segmRecHitHistos[make_pair(wh, sect)]->setBinLabel(4,
"MB4");
304 summaryHistos[3]->setAxisTitle(
"Wheel", 2);
306 summaryHistos[4] = ibooker.
book2D(
"SegmentGlbSummary",
histoName.c_str(), 12, 1, 13, 5, -2, 3);
308 summaryHistos[4]->setAxisTitle(
"Wheel", 2);