32 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
33 <<
"DTChamberEfficiencyClient: Constructor called";
42 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
43 <<
"DTChamberEfficiencyClient: Destructor called";
48 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
49 <<
"DTChamberEfficiencyClient: BeginJob";
60 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
61 <<
"[DTChamberEfficiencyClient]: Begin of LS transition";
68 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
69 <<
"DTChamberEfficiencyClient: beginRun";
81 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
82 <<
"[DTChamberEfficiencyClient]: " <<
nevents <<
" events";
88 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
89 <<
"DTChamberEfficiencyClient: endluminosityBlock";
95 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
96 <<
"DTChamberEfficiencyClient: endRun";
98 globalEffSummary->Reset();
101 for(
int wheel=-2;wheel<=2;wheel++){
102 stringstream wheel_str; wheel_str << wheel;
106 MonitorElement* MECountAll = dbe->get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_All_W" + wheel_str.str());
107 MonitorElement* MECountQual = dbe->get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_Qual_W" + wheel_str.str());
108 MonitorElement* MEExtrap = dbe->get(
"DT/05-ChamberEff/Task/hExtrapSectVsChamb_W" + wheel_str.str());
111 TH2F* hCountAll = MECountAll->
getTH2F();
112 TH2F* hCountQual = MECountQual->
getTH2F();
113 TH2F* hExtrap = MEExtrap->
getTH2F();
115 const int nBinX = summaryHistos[wheel+2][0]->getNbinsX();
116 const int nBinY = summaryHistos[wheel+2][0]->getNbinsY();
118 for(
int j=1;
j<=nBinX;
j++){
119 for(
int k=1;
k<=nBinY;
k++){
120 summaryHistos[wheel+2][0]->setBinContent(
j,
k,0.);
121 summaryHistos[wheel+2][1]->setBinContent(
j,
k,0.);
123 const float numerAll = hCountAll->GetBinContent(
j,
k);
124 const float numerQual = hCountQual->GetBinContent(
j,
k);
125 const float denom = hExtrap->GetBinContent(
j,
k);
128 const float effAll= numerAll/denom;
129 const float eff_error_All =
sqrt((effAll+effAll*effAll)/denom);
131 const float effQual= numerQual/denom;
132 const float eff_error_Qual =
sqrt((effQual+effQual*effQual)/denom);
136 summaryHistos[wheel+2][0]->setBinContent(
j,
k,effAll);
137 summaryHistos[wheel+2][0]->setBinError(
j,
k,eff_error_All);
139 summaryHistos[wheel+2][1]->setBinContent(
j,
k,effQual);
140 summaryHistos[wheel+2][1]->setBinError(
j,
k,eff_error_Qual);
148 for(
int wheel=-2; wheel<=2; wheel++) {
151 if(segmentWheelSummary != 0) {
153 for(
int sector=1; sector<=12; sector++) {
154 float nFailingChambers = 0.;
157 double errorsum = 0.;
166 if(tmpefficiency < 0.2 || tmpvariance == 0){
171 meaneff += tmpefficiency/tmpvariance;
172 errorsum += 1./tmpvariance;
174 LogTrace(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
175 <<
"Wheel: " << wheel <<
" Stat: " <<
station
176 <<
" Sect: " << sector <<
" status: " << meaneff/errorsum << endl;
179 if(sector == 4 || sector == 10) {
180 int whichSector = (sector == 4) ? 13 : 14;
182 const double tmpefficiency = segmentWheelSummary->
getBinContent(whichSector, 4);
183 const double tmpvariance =
pow(segmentWheelSummary->
getBinError(whichSector, 4),2);
185 if(tmpefficiency > 0.2 && tmpvariance != 0) {
186 meaneff += tmpefficiency/tmpvariance;
187 errorsum += 1./tmpvariance;
189 else nFailingChambers++;
193 double eff_result = 0;
194 if(errorsum != 0) eff_result = meaneff/errorsum;
196 if(nFailingChambers != 0) {
197 if(sector != 4 && sector != 10) eff_result = eff_result*(4.-nFailingChambers)/4.;
198 else eff_result = eff_result*(5.-nFailingChambers)/5.;
201 if(eff_result > 0.7) globalEffSummary->Fill(sector,wheel,1.);
202 else if(eff_result < 0.7 && eff_result > 0.5) globalEffSummary->Fill(sector,wheel,0.6);
203 else if(eff_result < 0.5 && eff_result > 0.3) globalEffSummary->Fill(sector,wheel,0.4);
204 else if(eff_result < 0.3 && eff_result > 0.) globalEffSummary->Fill(sector,wheel,0.15);
217 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
218 <<
"DTChamberEfficiencyClient: endJob";
225 dbe->setCurrentFolder(
"DT/05-ChamberEff");
226 globalEffSummary = dbe->book2D(
"EfficiencyGlbSummary",
"Efficiency Summary",12,1,13,5,-2,3);
227 globalEffSummary->setAxisTitle(
"sector",1);
228 globalEffSummary->setAxisTitle(
"wheel",2);
232 for(
int wh=-2; wh<=2; wh++){
233 stringstream wheel; wheel << wh;
234 string histoNameAll =
"EfficiencyMap_All_W" + wheel.str();
235 string histoTitleAll =
"Efficiency map for all segments for wheel " + wheel.str();
237 string histoNameQual =
"EfficiencyMap_Qual_W" + wheel.str();
238 string histoTitleQual =
"Efficiency map for quality segments for wheel " + wheel.str();
241 dbe->setCurrentFolder(
"DT/05-ChamberEff");
243 summaryHistos[wh+2][0] = dbe->book2D(histoNameAll.c_str(),histoTitleAll.c_str(),14,1.,15.,4,1.,5.);
244 summaryHistos[wh+2][0]->setAxisTitle(
"Sector",1);
245 summaryHistos[wh+2][0]->setBinLabel(1,
"MB1",2);
246 summaryHistos[wh+2][0]->setBinLabel(2,
"MB2",2);
247 summaryHistos[wh+2][0]->setBinLabel(3,
"MB3",2);
248 summaryHistos[wh+2][0]->setBinLabel(4,
"MB4",2);
250 dbe->setCurrentFolder(
"DT/05-ChamberEff/HighQual");
252 summaryHistos[wh+2][1] = dbe->book2D(histoNameQual.c_str(),histoTitleQual.c_str(),14,1.,15.,4,1.,5.);
253 summaryHistos[wh+2][1]->setAxisTitle(
"Sector",1);
254 summaryHistos[wh+2][1]->setBinLabel(1,
"MB1",2);
255 summaryHistos[wh+2][1]->setBinLabel(2,
"MB2",2);
256 summaryHistos[wh+2][1]->setBinLabel(3,
"MB3",2);
257 summaryHistos[wh+2][1]->setBinLabel(4,
"MB4",2);
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
DQM Client Diagnostic.
void beginRun(const edm::Run &run, const edm::EventSetup &setup)
T getUntrackedParameter(std::string const &, T const &) const
virtual ~DTChamberEfficiencyClient()
Destructor.
void endRun(edm::Run const &run, edm::EventSetup const &c)
void analyze(const edm::Event &e, const edm::EventSetup &c)
void bookHistos()
book the report summary
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
double getBinContent(int binx) const
get content of bin (1-D)
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
TH2F * getTH2F(void) const
DTChamberEfficiencyClient(const edm::ParameterSet &ps)
Constructor.
Power< A, B >::type pow(const A &a, const B &b)