30 edm::LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest]: Constructor";
43 <<
"DTChamberEfficiencyTest: analyzed " <<
nevents <<
" events";
55 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
56 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
57 for (; ch_it != ch_end; ++ch_it) {
69 <<
"[DTChamberEfficiencyTest]: End of LS transition, performing the DQM client operation";
79 <<
"[DTChamberEfficiencyTest]: " << nLumiSegs <<
" updates";
81 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
82 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
85 <<
"[DTChamberEfficiencyTest]: ChamberEfficiency tests results";
88 for (; ch_it != ch_end; ++ch_it) {
102 MonitorElement* GoodSegDen_histo = igetter.
get(getMEName(
"hEffGoodSegVsPosDen", chID));
103 MonitorElement* GoodCloseSegNum_histo = igetter.
get(getMEName(
"hEffGoodCloseSegVsPosNum", chID));
106 if (GoodSegDen_histo && GoodCloseSegNum_histo) {
107 TH2F* GoodSegDen_histo_root = GoodSegDen_histo->
getTH2F();
108 TH2F* GoodCloseSegNum_histo_root = GoodCloseSegNum_histo->
getTH2F();
110 int lastBinX = (*GoodSegDen_histo_root).GetNbinsX();
111 TH1D* proxN = GoodCloseSegNum_histo_root->ProjectionX();
112 TH1D* proxD = GoodSegDen_histo_root->ProjectionX();
114 int lastBinY = (*GoodSegDen_histo_root).GetNbinsY();
115 TH1D* proyN = GoodCloseSegNum_histo_root->ProjectionY();
116 TH1D* proyD = GoodSegDen_histo_root->ProjectionY();
119 if (proxD->GetBinContent(
xBin) != 0) {
120 float Xefficiency = proxN->GetBinContent(
xBin) / proxD->GetBinContent(
xBin);
121 xEfficiencyHistos.find(
HistoName)->second->setBinContent(
xBin, Xefficiency);
125 if (GoodSegDen_histo_root->GetBinContent(
xBin,
yBin) != 0) {
126 float XvsYefficiency = GoodCloseSegNum_histo_root->GetBinContent(
xBin,
yBin) /
127 GoodSegDen_histo_root->GetBinContent(
xBin,
yBin);
128 xVSyEffHistos.find(
HistoName)->second->setBinContent(
xBin,
yBin, XvsYefficiency);
134 if (proyD->GetBinContent(
yBin) != 0) {
135 float Yefficiency = proyN->GetBinContent(
yBin) / proyD->GetBinContent(
yBin);
136 yEfficiencyHistos.find(
HistoName)->second->setBinContent(
yBin, Yefficiency);
143 string XEfficiencyCriterionName =
144 parameters.getUntrackedParameter<
string>(
"XEfficiencyTestName",
"ChEfficiencyInRangeX");
145 for (map<string, MonitorElement*>::const_iterator hXEff = xEfficiencyHistos.begin(); hXEff != xEfficiencyHistos.end();
147 const QReport* theXEfficiencyQReport = (*hXEff).second->getQReport(XEfficiencyCriterionName);
148 if (theXEfficiencyQReport) {
149 vector<dqm::me_util::Channel> badChannels = theXEfficiencyQReport->
getBadChannels();
150 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
152 edm::LogError(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
153 <<
"Chamber : " << (*hXEff).first <<
" Bad XChamberEfficiency channels: " << (*channel).getBin()
154 <<
" Contents : " << (*channel).getContents();
160 string YEfficiencyCriterionName =
161 parameters.getUntrackedParameter<
string>(
"YEfficiencyTestName",
"ChEfficiencyInRangeY");
162 for (map<string, MonitorElement*>::const_iterator hYEff = yEfficiencyHistos.begin(); hYEff != yEfficiencyHistos.end();
164 const QReport* theYEfficiencyQReport = (*hYEff).second->getQReport(YEfficiencyCriterionName);
165 if (theYEfficiencyQReport) {
166 vector<dqm::me_util::Channel> badChannels = theYEfficiencyQReport->
getBadChannels();
167 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
169 edm::LogError(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
170 <<
"Chamber : " << (*hYEff).first <<
" Bad YChamberEfficiency channels: " << (*channel).getBin()
171 <<
" Contents : " << (*channel).getContents();
177 for (
int wh = -2; wh <= 2; wh++) {
179 for (
int st = 1; st <= 4; st++) {
180 summaryHistos[wh]->Fill(
sec, st, 1);
187 edm::LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest] endjob called!";
200 "/Station" +
station.str() +
"/";
216 string xEfficiencyHistoName =
"xEfficiency_" +
HistoName;
217 string yEfficiencyHistoName =
"yEfficiency_" +
HistoName;
218 string xVSyEffHistoName =
"xVSyEff_" +
HistoName;
220 ibooker.
setCurrentFolder(
"DT/01-DTChamberEfficiency/Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
224 ibooker.
book1D(xEfficiencyHistoName.c_str(), xEfficiencyHistoName.c_str(), 25, -250., 250.);
226 ibooker.
book1D(yEfficiencyHistoName.c_str(), yEfficiencyHistoName.c_str(), 25, -250., 250.);
228 ibooker.
book2D(xVSyEffHistoName.c_str(), xVSyEffHistoName.c_str(), 25, -250., 250., 25, -250., 250.);
232 for (
int wh = -2; wh <= 2; wh++) {
240 summaryHistos[wh]->setBinLabel(1,
"MB1", 2);
241 summaryHistos[wh]->setBinLabel(2,
"MB2", 2);
242 summaryHistos[wh]->setBinLabel(3,
"MB3", 2);
243 summaryHistos[wh]->setBinLabel(4,
"MB4", 2);