52 LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient") <<
"DTChamberEfficiencyClient: endRun";
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();
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);
116 for (
int wheel = -2; wheel <= 2; wheel++) {
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)
170 else if (eff_result < 0.7 && eff_result > 0.5)
172 else if (eff_result < 0.5 && eff_result > 0.3)
174 else if (eff_result < 0.3 && eff_result > 0.)
virtual TH2F * getTH2F() const
virtual int getNbinsY() const
get # of bins in Y-axis
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
std::map< int, MonitorElement * > EffDistrPerWh
virtual void Reset()
reset ME (ie. contents, errors, etc)
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinContent(int binx) const
get content of bin (1-D)
void bookHistos(DQMStore::IBooker &)
book the report summary
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * summaryHistos[5][2]
MonitorElement * globalEffSummary
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * globalEffDistr
Power< A, B >::type pow(const A &a, const B &b)