30 LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient") <<
"DTChamberEfficiencyClient: Constructor called";
36 LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient") <<
"DTChamberEfficiencyClient: Destructor called";
48 LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient") <<
"DTChamberEfficiencyClient: endluminosityBlock";
52 LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient") <<
"DTChamberEfficiencyClient: endRun";
57 globalEffSummary->Reset();
61 stringstream wheel_str;
67 MonitorElement* MECountAll = igetter.
get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_All_W" + wheel_str.str());
68 MonitorElement* MECountQual = igetter.
get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_Qual_W" + wheel_str.str());
69 MonitorElement* MEExtrap = igetter.
get(
"DT/05-ChamberEff/Task/hExtrapSectVsChamb_W" + wheel_str.str());
72 if (!MECountAll || !(MECountAll->
getTH2F())) {
73 edm::LogWarning(
"DTChamberEfficiencyClient") <<
"ME not available" << std::endl;
77 TH2F* hCountAll = MECountAll->
getTH2F();
78 TH2F* hCountQual = MECountQual->
getTH2F();
79 TH2F* hExtrap = MEExtrap->
getTH2F();
81 const int nBinX = summaryHistos[
wheel + 2][0]->getNbinsX();
82 const int nBinY = summaryHistos[
wheel + 2][0]->getNbinsY();
86 summaryHistos[
wheel + 2][0]->setBinContent(
j,
k, 0.);
87 summaryHistos[
wheel + 2][1]->setBinContent(
j,
k, 0.);
89 const float numerAll = hCountAll->GetBinContent(
j,
k);
90 const float numerQual = hCountQual->GetBinContent(
j,
k);
91 const float denom = hExtrap->GetBinContent(
j,
k);
94 const float effAll = numerAll /
denom;
95 const float eff_error_All =
sqrt((effAll + effAll * effAll) /
denom);
97 const float effQual = numerQual /
denom;
98 const float eff_error_Qual =
sqrt((effQual + effQual * effQual) /
denom);
100 summaryHistos[
wheel + 2][0]->setBinContent(
j,
k, effAll);
101 summaryHistos[
wheel + 2][0]->setBinError(
j,
k, eff_error_All);
103 summaryHistos[
wheel + 2][1]->setBinContent(
j,
k, effQual);
104 summaryHistos[
wheel + 2][1]->setBinError(
j,
k, eff_error_Qual);
107 globalEffDistr->Fill(effAll);
108 EffDistrPerWh[
wheel + 2]->Fill(effAll);
119 if (segmentWheelSummary !=
nullptr) {
120 for (
int sector = 1; sector <= 12; sector++) {
121 float nFailingChambers = 0.;
124 double errorsum = 0.;
131 if (tmpefficiency < 0.2 || tmpvariance == 0) {
136 meaneff += tmpefficiency / tmpvariance;
137 errorsum += 1. / tmpvariance;
139 LogTrace(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
140 <<
"Wheel: " <<
wheel <<
" Stat: " <<
station <<
" Sect: " << sector <<
" status: " << meaneff / errorsum
144 if (sector == 4 || sector == 10) {
145 int whichSector = (sector == 4) ? 13 : 14;
147 const double tmpefficiency = segmentWheelSummary->
getBinContent(whichSector, 4);
148 const double tmpvariance =
pow(segmentWheelSummary->
getBinError(whichSector, 4), 2);
150 if (tmpefficiency > 0.2 && tmpvariance != 0) {
151 meaneff += tmpefficiency / tmpvariance;
152 errorsum += 1. / tmpvariance;
157 double eff_result = 0;
159 eff_result = meaneff / errorsum;
161 if (nFailingChambers != 0) {
162 if (sector != 4 && sector != 10)
163 eff_result = eff_result * (4. - nFailingChambers) / 4.;
165 eff_result = eff_result * (5. - nFailingChambers) / 5.;
168 if (eff_result > 0.7)
169 globalEffSummary->Fill(sector,
wheel, 1.);
170 else if (eff_result < 0.7 && eff_result > 0.5)
171 globalEffSummary->Fill(sector,
wheel, 0.6);
172 else if (eff_result < 0.5 && eff_result > 0.3)
173 globalEffSummary->Fill(sector,
wheel, 0.4);
174 else if (eff_result < 0.3 && eff_result > 0.)
175 globalEffSummary->Fill(sector,
wheel, 0.15);
177 globalEffSummary->Fill(sector,
wheel, 0.01);
187 globalEffSummary = ibooker.
book2D(
"EfficiencyGlbSummary",
"Efficiency Summary", 12, 1, 13, 5, -2, 3);
189 globalEffSummary->setAxisTitle(
"wheel", 2);
191 globalEffDistr = ibooker.
book1D(
"TotalEfficiency",
"Total efficiency", 51, 0., 1.02);
194 for (
int wh = -2; wh <= 2; wh++) {
197 string histoNameAll =
"EfficiencyMap_All_W" +
wheel.str();
198 string histoTitleAll =
"Efficiency map for all segments for wheel " +
wheel.str();
200 string histoNameQual =
"EfficiencyMap_Qual_W" +
wheel.str();
201 string histoTitleQual =
"Efficiency map for quality segments for wheel " +
wheel.str();
203 string histoNameEff =
"Efficiency_W" +
wheel.str();
204 string histoTitleEff =
"Segment efficiency, wheel " +
wheel.str();
208 summaryHistos[wh + 2][0] = ibooker.
book2D(histoNameAll.c_str(), histoTitleAll.c_str(), 14, 1., 15., 4, 1., 5.);
210 summaryHistos[wh + 2][0]->setBinLabel(1,
"MB1", 2);
211 summaryHistos[wh + 2][0]->setBinLabel(2,
"MB2", 2);
212 summaryHistos[wh + 2][0]->setBinLabel(3,
"MB3", 2);
213 summaryHistos[wh + 2][0]->setBinLabel(4,
"MB4", 2);
215 EffDistrPerWh[wh + 2] = ibooker.
book1D(histoNameEff.c_str(), histoTitleEff.c_str(), 51, 0., 1.02);
220 summaryHistos[wh + 2][1] = ibooker.
book2D(histoNameQual.c_str(), histoTitleQual.c_str(), 14, 1., 15., 4, 1., 5.);
222 summaryHistos[wh + 2][1]->setBinLabel(1,
"MB1", 2);
223 summaryHistos[wh + 2][1]->setBinLabel(2,
"MB2", 2);
224 summaryHistos[wh + 2][1]->setBinLabel(3,
"MB3", 2);
225 summaryHistos[wh + 2][1]->setBinLabel(4,
"MB4", 2);