30 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
31 <<
"DTChamberEfficiencyClient: Constructor called";
40 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
41 <<
"DTChamberEfficiencyClient: Destructor called";
46 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
47 <<
"DTChamberEfficiencyClient: BeginJob";
58 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
59 <<
"[DTChamberEfficiencyClient]: Begin of LS transition";
66 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
67 <<
"DTChamberEfficiencyClient: beginRun";
79 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
80 <<
"[DTChamberEfficiencyClient]: " <<
nevents <<
" events";
86 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
87 <<
"DTChamberEfficiencyClient: endluminosityBlock";
93 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
94 <<
"DTChamberEfficiencyClient: endRun";
96 globalEffSummary->Reset();
99 for(
int wheel=-2;wheel<=2;wheel++){
100 stringstream wheel_str; wheel_str << wheel;
104 MonitorElement* MECountAll = dbe->get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_All_W" + wheel_str.str());
105 MonitorElement* MECountQual = dbe->get(
"DT/05-ChamberEff/Task/hCountSectVsChamb_Qual_W" + wheel_str.str());
106 MonitorElement* MEExtrap = dbe->get(
"DT/05-ChamberEff/Task/hExtrapSectVsChamb_W" + wheel_str.str());
109 if(!MECountAll || !(MECountAll->
getTH2F())) {
110 edm::LogWarning(
"DTChamberEfficiencyClient") <<
"ME not available" << std::endl;
114 TH2F* hCountAll = MECountAll->
getTH2F();
115 TH2F* hCountQual = MECountQual->
getTH2F();
116 TH2F* hExtrap = MEExtrap->
getTH2F();
120 const int nBinX = summaryHistos[wheel+2][0]->getNbinsX();
121 const int nBinY = summaryHistos[wheel+2][0]->getNbinsY();
123 for(
int j=1;
j<=nBinX;
j++){
124 for(
int k=1;
k<=nBinY;
k++){
125 summaryHistos[wheel+2][0]->setBinContent(
j,
k,0.);
126 summaryHistos[wheel+2][1]->setBinContent(
j,
k,0.);
128 const float numerAll = hCountAll->GetBinContent(
j,
k);
129 const float numerQual = hCountQual->GetBinContent(
j,
k);
130 const float denom = hExtrap->GetBinContent(
j,
k);
133 const float effAll= numerAll/denom;
134 const float eff_error_All =
sqrt((effAll+effAll*effAll)/denom);
136 const float effQual= numerQual/denom;
137 const float eff_error_Qual =
sqrt((effQual+effQual*effQual)/denom);
141 summaryHistos[wheel+2][0]->setBinContent(
j,
k,effAll);
142 summaryHistos[wheel+2][0]->setBinError(
j,
k,eff_error_All);
144 summaryHistos[wheel+2][1]->setBinContent(
j,
k,effQual);
145 summaryHistos[wheel+2][1]->setBinError(
j,
k,eff_error_Qual);
148 globalEffDistr ->
Fill(effAll);
149 EffDistrPerWh[wheel+2] ->
Fill(effAll);
158 for(
int wheel=-2; wheel<=2; wheel++) {
161 if(segmentWheelSummary != 0) {
163 for(
int sector=1; sector<=12; sector++) {
164 float nFailingChambers = 0.;
167 double errorsum = 0.;
176 if(tmpefficiency < 0.2 || tmpvariance == 0){
181 meaneff += tmpefficiency/tmpvariance;
182 errorsum += 1./tmpvariance;
184 LogTrace(
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
185 <<
"Wheel: " << wheel <<
" Stat: " <<
station
186 <<
" Sect: " << sector <<
" status: " << meaneff/errorsum << endl;
189 if(sector == 4 || sector == 10) {
190 int whichSector = (sector == 4) ? 13 : 14;
192 const double tmpefficiency = segmentWheelSummary->
getBinContent(whichSector, 4);
193 const double tmpvariance =
pow(segmentWheelSummary->
getBinError(whichSector, 4),2);
195 if(tmpefficiency > 0.2 && tmpvariance != 0) {
196 meaneff += tmpefficiency/tmpvariance;
197 errorsum += 1./tmpvariance;
199 else nFailingChambers++;
203 double eff_result = 0;
204 if(errorsum != 0) eff_result = meaneff/errorsum;
206 if(nFailingChambers != 0) {
207 if(sector != 4 && sector != 10) eff_result = eff_result*(4.-nFailingChambers)/4.;
208 else eff_result = eff_result*(5.-nFailingChambers)/5.;
211 if(eff_result > 0.7) globalEffSummary->Fill(sector,wheel,1.);
212 else if(eff_result < 0.7 && eff_result > 0.5) globalEffSummary->Fill(sector,wheel,0.6);
213 else if(eff_result < 0.5 && eff_result > 0.3) globalEffSummary->Fill(sector,wheel,0.4);
214 else if(eff_result < 0.3 && eff_result > 0.) globalEffSummary->Fill(sector,wheel,0.15);
227 LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyClient")
228 <<
"DTChamberEfficiencyClient: endJob";
235 dbe->setCurrentFolder(
"DT/05-ChamberEff");
236 globalEffSummary = dbe->book2D(
"EfficiencyGlbSummary",
"Efficiency Summary",12,1,13,5,-2,3);
237 globalEffSummary->setAxisTitle(
"sector",1);
238 globalEffSummary->setAxisTitle(
"wheel",2);
240 globalEffDistr = dbe->book1D(
"TotalEfficiency",
"Total efficiency",51,0.,1.02);
241 globalEffDistr -> setAxisTitle(
"Eff",1);
243 for(
int wh=-2; wh<=2; wh++){
244 stringstream wheel; wheel << wh;
245 string histoNameAll =
"EfficiencyMap_All_W" + wheel.str();
246 string histoTitleAll =
"Efficiency map for all segments for wheel " + wheel.str();
248 string histoNameQual =
"EfficiencyMap_Qual_W" + wheel.str();
249 string histoTitleQual =
"Efficiency map for quality segments for wheel " + wheel.str();
251 string histoNameEff =
"Efficiency_W" + wheel.str();
252 string histoTitleEff =
"Segment efficiency, wheel " + wheel.str();
254 dbe->setCurrentFolder(
"DT/05-ChamberEff");
256 summaryHistos[wh+2][0] = dbe->book2D(histoNameAll.c_str(),histoTitleAll.c_str(),14,1.,15.,4,1.,5.);
257 summaryHistos[wh+2][0]->setAxisTitle(
"Sector",1);
258 summaryHistos[wh+2][0]->setBinLabel(1,
"MB1",2);
259 summaryHistos[wh+2][0]->setBinLabel(2,
"MB2",2);
260 summaryHistos[wh+2][0]->setBinLabel(3,
"MB3",2);
261 summaryHistos[wh+2][0]->setBinLabel(4,
"MB4",2);
263 EffDistrPerWh[wh+2] = dbe -> book1D(histoNameEff.c_str(),histoTitleEff.c_str(),51,0.,1.02);
264 EffDistrPerWh[wh+2] -> setAxisTitle(
"Eff",1);
266 dbe->setCurrentFolder(
"DT/05-ChamberEff/HighQual");
268 summaryHistos[wh+2][1] = dbe->book2D(histoNameQual.c_str(),histoTitleQual.c_str(),14,1.,15.,4,1.,5.);
269 summaryHistos[wh+2][1]->setAxisTitle(
"Sector",1);
270 summaryHistos[wh+2][1]->setBinLabel(1,
"MB1",2);
271 summaryHistos[wh+2][1]->setBinLabel(2,
"MB2",2);
272 summaryHistos[wh+2][1]->setBinLabel(3,
"MB3",2);
273 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
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
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.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Power< A, B >::type pow(const A &a, const B &b)