CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTEfficiencyTest.cc
Go to the documentation of this file.
1 
2 
3 /*
4  * See header file for a description of this class.
5  *
6  * \author G. Mila - INFN Torino
7  */
8 
9 
11 
12 // Framework
14 
15 
16 // Geometry
21 
25 
26 #include <stdio.h>
27 #include <sstream>
28 #include <math.h>
29 
30 
31 using namespace edm;
32 using namespace std;
33 
35 
36  edm::LogVerbatim ("efficiency") << "[DTEfficiencyTest]: Constructor";
37 
38  parameters = ps;
39 
40  dbe = edm::Service<DQMStore>().operator->();
41 
42  prescaleFactor = parameters.getUntrackedParameter<int>("diagnosticPrescale", 1);
43 
44  percentual = parameters.getUntrackedParameter<int>("BadSLpercentual", 10);
45 
46 }
47 
49 
50  edm::LogVerbatim ("efficiency") << "DTEfficiencyTest: analyzed " << nevents << " events";
51 
52 }
53 
54 
56 
57  edm::LogVerbatim ("efficiency") << "[DTEfficiencyTest]: BeginJob";
58 
59  nevents = 0;
60 
61 }
62 
63 void DTEfficiencyTest::beginRun(Run const& run, EventSetup const& context) {
64 
65  // Get the geometry
66  context.get<MuonGeometryRecord>().get(muonGeom);
67 
68 }
69 
71 
72  edm::LogVerbatim ("efficiency") <<"[DTEfficiencyTest]: Begin of LS transition";
73 
74  // Get the run number
75  run = lumiSeg.run();
76 
77 }
78 
79 
81 
82  nevents++;
83  edm::LogVerbatim ("efficiency") << "[DTEfficiencyTest]: "<<nevents<<" events";
84 }
85 
86 
87 void DTEfficiencyTest::endLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& context) {
88 
89  // counts number of updats (online mode) or number of events (standalone mode)
90  //nevents++;
91  // if running in standalone perform diagnostic only after a reasonalbe amount of events
92  //if ( parameters.getUntrackedParameter<bool>("runningStandalone", false) &&
93  // nevents%parameters.getUntrackedParameter<int>("diagnosticPrescale", 1000) != 0 ) return;
94 
95 
96  for(map<int, MonitorElement*> ::const_iterator histo = wheelHistos.begin();
97  histo != wheelHistos.end();
98  histo++) {
99  (*histo).second->Reset();
100  }
101 
102  for(map<int, MonitorElement*> ::const_iterator histo = wheelUnassHistos.begin();
103  histo != wheelUnassHistos.end();
104  histo++) {
105  (*histo).second->Reset();
106  }
107 
108  edm::LogVerbatim ("efficiency") <<"[DTEfficiencyTest]: End of LS transition, performing the DQM client operation";
109 
110  // counts number of lumiSegs
111  nLumiSegs = lumiSeg.id().luminosityBlock();
112 
113  // prescale factor
114  if ( nLumiSegs%prescaleFactor != 0 ) return;
115 
116  edm::LogVerbatim ("efficiency") <<"[DTEfficiencyTest]: "<<nLumiSegs<<" updates";
117 
118  vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
119  vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
120 
121  edm::LogVerbatim ("efficiency") << "[DTEfficiencyTest]: Efficiency tests results";
122 
123 
124  map <DTLayerId, vector<double> > LayerBadCells;
125  LayerBadCells.clear();
126  map <DTLayerId, vector<double> > LayerUnassBadCells;
127  LayerUnassBadCells.clear();
128  map <DTSuperLayerId, vector<double> > SuperLayerBadCells;
129  SuperLayerBadCells.clear();
130  map <DTSuperLayerId,vector<double> > SuperLayerUnassBadCells;
131  SuperLayerUnassBadCells.clear();
132  map <pair<int,int>, int> cmsHistos;
133  cmsHistos.clear();
134  map <pair<int,int>, bool> filled;
135  for(int i=-2; i<3; i++){
136  for(int j=1; j<15; j++){
137  filled[make_pair(i,j)]=false;
138  }
139  }
140  map <pair<int,int>, int> cmsUnassHistos;
141  cmsUnassHistos.clear();
142  map <pair<int,int>, bool> UnassFilled;
143  for(int i=-2; i<3; i++){
144  for(int j=1; j<15; j++){
145  UnassFilled[make_pair(i,j)]=false;
146  }
147  }
148 
149 
150 
151  // Loop over the chambers
152  for (; ch_it != ch_end; ++ch_it) {
153  DTChamberId chID = (*ch_it)->id();
154  vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
155  vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
156 
157  // Loop over the SuperLayers
158  for(; sl_it != sl_end; ++sl_it) {
159  DTSuperLayerId slID = (*sl_it)->id();
160  vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
161  vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
162 
163  // Loop over the layers
164  for(; l_it != l_end; ++l_it) {
165  DTLayerId lID = (*l_it)->id();
166 
167  stringstream wheel; wheel << chID.wheel();
168  stringstream station; station << chID.station();
169  stringstream sector; sector << chID.sector();
170  stringstream superLayer; superLayer << slID.superlayer();
171  stringstream layer; layer << lID.layer();
172 
173  string HistoName = "W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str() + "_L" + layer.str();
174 
175  // Get the ME produced by EfficiencyTask Source
176  MonitorElement * occupancy_histo = dbe->get(getMEName("hEffOccupancy", lID));
177  MonitorElement * unassOccupancy_histo = dbe->get(getMEName("hEffUnassOccupancy", lID));
178  MonitorElement * recSegmOccupancy_histo = dbe->get(getMEName("hRecSegmOccupancy", lID));
179 
180  // ME -> TH1F
181  if(occupancy_histo && unassOccupancy_histo && recSegmOccupancy_histo) {
182  TH1F * occupancy_histo_root = occupancy_histo->getTH1F();
183  TH1F * unassOccupancy_histo_root = unassOccupancy_histo->getTH1F();
184  TH1F * recSegmOccupancy_histo_root = recSegmOccupancy_histo->getTH1F();
185 
186  const int firstWire = muonGeom->layer(lID)->specificTopology().firstChannel();
187  const int lastWire = muonGeom->layer(lID)->specificTopology().lastChannel();
188 
189  // Loop over the TH1F bin and fill the ME to be used for the Quality Test
190  for(int bin=firstWire; bin <= lastWire; bin++) {
191  if((recSegmOccupancy_histo_root->GetBinContent(bin))!=0) {
192  //cout<<"book histos"<<endl;
193  if (EfficiencyHistos.find(lID) == EfficiencyHistos.end()) bookHistos(lID, firstWire, lastWire);
194  float efficiency = occupancy_histo_root->GetBinContent(bin) / recSegmOccupancy_histo_root->GetBinContent(bin);
195  float errorEff = sqrt(efficiency*(1-efficiency) / recSegmOccupancy_histo_root->GetBinContent(bin));
196  EfficiencyHistos.find(lID)->second->setBinContent(bin, efficiency);
197  EfficiencyHistos.find(lID)->second->setBinError(bin, errorEff);
198 
199  if (UnassEfficiencyHistos.find(lID) == EfficiencyHistos.end()) bookHistos(lID, firstWire, lastWire);
200  float unassEfficiency = unassOccupancy_histo_root->GetBinContent(bin) / recSegmOccupancy_histo_root->GetBinContent(bin);
201  float errorUnassEff = sqrt(unassEfficiency*(1-unassEfficiency) / recSegmOccupancy_histo_root->GetBinContent(bin));
202  UnassEfficiencyHistos.find(lID)->second->setBinContent(bin, unassEfficiency);
203  UnassEfficiencyHistos.find(lID)->second->setBinError(bin, errorUnassEff);
204  }
205  }
206  }
207  } // loop on layers
208  } // loop on superlayers
209  } //loop on chambers
210 
211 
212 
213  // Efficiency test
214  //cout<<"[DTEfficiencyTest]: Efficiency Tests results"<<endl;
215  string EfficiencyCriterionName = parameters.getUntrackedParameter<string>("EfficiencyTestName","EfficiencyInRange");
216  for(map<DTLayerId, MonitorElement*>::const_iterator hEff = EfficiencyHistos.begin();
217  hEff != EfficiencyHistos.end();
218  hEff++) {
219  const QReport * theEfficiencyQReport = (*hEff).second->getQReport(EfficiencyCriterionName);
220  double counter=0;
221  if(theEfficiencyQReport) {
222  vector<dqm::me_util::Channel> badChannels = theEfficiencyQReport->getBadChannels();
223  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
224  channel != badChannels.end(); channel++) {
225  edm::LogError ("efficiency") <<"LayerID : "<<getMEName("hEffOccupancy",(*hEff).first)<< " Bad efficiency channels: "<<(*channel).getBin()<<" Contents : "<<(*channel).getContents();
226  counter++;
227  }
228  LayerBadCells[(*hEff).first].push_back(counter);
229  LayerBadCells[(*hEff).first].push_back(muonGeom->layer((*hEff).first)->specificTopology().channels());
230  // FIXME: getMessage() sometimes returns and invalid string (null pointer inside QReport data member)
231  // edm::LogWarning ("efficiency") << "-------- "<<theEfficiencyQReport->getMessage()<<" ------- "<<theEfficiencyQReport->getStatus();
232  }
233  }
234 
235 
236 
237  // UnassEfficiency test
238  //cout<<"[DTEfficiencyTest]: UnassEfficiency Tests results"<<endl;
239  string UnassEfficiencyCriterionName = parameters.getUntrackedParameter<string>("UnassEfficiencyTestName","UnassEfficiencyInRange");
240  for(map<DTLayerId, MonitorElement*>::const_iterator hUnassEff = UnassEfficiencyHistos.begin();
241  hUnassEff != UnassEfficiencyHistos.end();
242  hUnassEff++) {
243  const QReport * theUnassEfficiencyQReport = (*hUnassEff).second->getQReport(UnassEfficiencyCriterionName);
244  double counter=0;
245  if(theUnassEfficiencyQReport) {
246  vector<dqm::me_util::Channel> badChannels = theUnassEfficiencyQReport->getBadChannels();
247  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
248  channel != badChannels.end(); channel++) {
249  edm::LogError ("efficiency") << "Bad unassEfficiency channels: "<<(*channel).getBin()<<" "<<(*channel).getContents();
250  counter++;
251  }
252  LayerUnassBadCells[(*hUnassEff).first].push_back(counter);
253  LayerUnassBadCells[(*hUnassEff).first].push_back(double(muonGeom->layer((*hUnassEff).first)->specificTopology().channels()));
254  // FIXME: getMessage() sometimes returns and invalid string (null pointer inside QReport data member)
255  // edm::LogWarning ("efficiency") << theUnassEfficiencyQReport->getMessage()<<" ------- "<<theUnassEfficiencyQReport->getStatus();
256  }
257  }
258 
259 
260  vector<const DTChamber*>::const_iterator ch2_it = muonGeom->chambers().begin();
261  vector<const DTChamber*>::const_iterator ch2_end = muonGeom->chambers().end();
262  for (; ch2_it != ch2_end; ++ch2_it) {
263  vector<const DTSuperLayer*>::const_iterator sl2_it = (*ch2_it)->superLayers().begin();
264  vector<const DTSuperLayer*>::const_iterator sl2_end = (*ch2_it)->superLayers().end();
265  // Loop over the SLs
266  for(; sl2_it != sl2_end; ++sl2_it) {
267  DTSuperLayerId sl = (*sl2_it)->id();
268  double superLayerBadC=0;
269  double superLayerTotC=0;
270  double superLayerUnassBadC=0;
271  double superLayerUnassTotC=0;
272  bool fill=false;
273  vector<const DTLayer*>::const_iterator l2_it = (*sl2_it)->layers().begin();
274  vector<const DTLayer*>::const_iterator l2_end = (*sl2_it)->layers().end();
275  // Loop over the Ls
276  for(; l2_it != l2_end; ++l2_it) {
277  DTLayerId layerId = (*l2_it)->id();
278  if(LayerBadCells.find(layerId) != LayerBadCells.end() &&
279  LayerUnassBadCells.find(layerId) != LayerUnassBadCells.end()){
280  fill=true;
281  superLayerBadC+=LayerBadCells[layerId][0];
282  superLayerTotC+=LayerBadCells[layerId][1];
283  superLayerUnassBadC+=LayerUnassBadCells[layerId][0];
284  superLayerUnassTotC+=LayerUnassBadCells[layerId][1];
285  }
286  }
287  if(fill){
288  SuperLayerBadCells[sl].push_back(superLayerBadC);
289  SuperLayerBadCells[sl].push_back(superLayerTotC);
290  SuperLayerUnassBadCells[sl].push_back(superLayerUnassBadC);
291  SuperLayerUnassBadCells[sl].push_back(superLayerUnassTotC);
292  }
293  }
294  }
295 
296 
297  for(map<DTSuperLayerId, vector<double> >::const_iterator SLBCells = SuperLayerBadCells.begin();
298  SLBCells != SuperLayerBadCells.end();
299  SLBCells++) {
300  if((*SLBCells).second[0]/(*SLBCells).second[1] > double(percentual/100)){
301  if(wheelHistos.find((*SLBCells).first.wheel()) == wheelHistos.end()) bookHistos((*SLBCells).first.wheel());
302  if(!((*SLBCells).first.station() == 4 && (*SLBCells).first.superlayer() == 3))
303  wheelHistos[(*SLBCells).first.wheel()]->Fill((*SLBCells).first.sector()-1,((*SLBCells).first.superlayer()-1)+3*((*SLBCells).first.station()-1));
304  else
305  wheelHistos[(*SLBCells).first.wheel()]->Fill((*SLBCells).first.sector()-1,10);
306  // fill the cms summary histo if the percentual of SL which have not passed the test
307  // is more than a predefined treshold
308  cmsHistos[make_pair((*SLBCells).first.wheel(),(*SLBCells).first.sector())]++;
309  if(((*SLBCells).first.sector()<13 &&
310  double(cmsHistos[make_pair((*SLBCells).first.wheel(),(*SLBCells).first.sector())])/11>double(percentual)/100 &&
311  filled[make_pair((*SLBCells).first.wheel(),(*SLBCells).first.sector())]==false) ||
312  ((*SLBCells).first.sector()>=13 &&
313  double(cmsHistos[make_pair((*SLBCells).first.wheel(),(*SLBCells).first.sector())])/2>double(percentual)/100 &&
314  filled[make_pair((*SLBCells).first.wheel(),(*SLBCells).first.sector())]==false)){
315  filled[make_pair((*SLBCells).first.wheel(),(*SLBCells).first.sector())]=true;
316  wheelHistos[3]->Fill((*SLBCells).first.sector()-1,(*SLBCells).first.wheel());
317  }
318  }
319  }
320 
321 
322  for(map<DTSuperLayerId, vector<double> >::const_iterator SLUBCells = SuperLayerUnassBadCells.begin();
323  SLUBCells != SuperLayerUnassBadCells.end();
324  SLUBCells++) {
325  if((*SLUBCells).second[0]/(*SLUBCells).second[1] > double(percentual/100)){
326  if(wheelUnassHistos.find((*SLUBCells).first.wheel()) == wheelUnassHistos.end()) bookHistos((*SLUBCells).first.wheel());
327  if(!((*SLUBCells).first.station() == 4 && (*SLUBCells).first.superlayer() == 3))
328  wheelUnassHistos[(*SLUBCells).first.wheel()]->Fill((*SLUBCells).first.sector()-1,((*SLUBCells).first.superlayer()-1)+3*((*SLUBCells).first.station()-1));
329  else
330  wheelUnassHistos[(*SLUBCells).first.wheel()]->Fill((*SLUBCells).first.sector()-1,10);
331  // fill the cms summary histo if the percentual of SL which have not passed the test
332  // is more than a predefined treshold
333  cmsUnassHistos[make_pair((*SLUBCells).first.wheel(),(*SLUBCells).first.sector())]++;
334  if(((*SLUBCells).first.sector()<13 &&
335  double(cmsUnassHistos[make_pair((*SLUBCells).first.wheel(),(*SLUBCells).first.sector())])/11>double(percentual)/100 &&
336  UnassFilled[make_pair((*SLUBCells).first.wheel(),(*SLUBCells).first.sector())]==false) ||
337  ((*SLUBCells).first.sector()>=13 &&
338  double(cmsUnassHistos[make_pair((*SLUBCells).first.wheel(),(*SLUBCells).first.sector())])/2>double(percentual)/100 &&
339  UnassFilled[make_pair((*SLUBCells).first.wheel(),(*SLUBCells).first.sector())]==false)){
340  UnassFilled[make_pair((*SLUBCells).first.wheel(),(*SLUBCells).first.sector())]=true;
341  wheelUnassHistos[3]->Fill((*SLUBCells).first.sector()-1,(*SLUBCells).first.wheel());
342  }
343  }
344  }
345 
346 
347 
348 }
349 
350 
352 
353  edm::LogVerbatim ("efficiency") << "[DTEfficiencyTest] endjob called!";
354 
355  dbe->rmdir("DT/Tests/DTEfficiency");
356 
357 }
358 
359 
360 string DTEfficiencyTest::getMEName(string histoTag, const DTLayerId & lID) {
361 
362  stringstream wheel; wheel << lID.superlayerId().wheel();
363  stringstream station; station << lID.superlayerId().station();
364  stringstream sector; sector << lID.superlayerId().sector();
365  stringstream superLayer; superLayer << lID.superlayerId().superlayer();
366  stringstream layer; layer << lID.layer();
367 
368  string folderRoot = parameters.getUntrackedParameter<string>("folderRoot", "Collector/FU0/");
369  string folderName =
370  folderRoot + "DT/DTEfficiencyTask/Wheel" + wheel.str() +
371  "/Station" + station.str() +
372  "/Sector" + sector.str() +
373  "/SuperLayer" + superLayer.str() + "/";
374 
375  string histoname = folderName + histoTag
376  + "_W" + wheel.str()
377  + "_St" + station.str()
378  + "_Sec" + sector.str()
379  + "_SL" + superLayer.str()
380  + "_L" + layer.str();
381 
382  return histoname;
383 
384 }
385 
386 
387 void DTEfficiencyTest::bookHistos(const DTLayerId & lId, int firstWire, int lastWire) {
388 
389  stringstream wheel; wheel << lId.superlayerId().wheel();
390  stringstream station; station << lId.superlayerId().station();
391  stringstream sector; sector << lId.superlayerId().sector();
392  stringstream superLayer; superLayer << lId.superlayerId().superlayer();
393  stringstream layer; layer << lId.layer();
394 
395  string HistoName = "W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str() + "_SL" + superLayer.str() + "_L" + layer.str();
396  string EfficiencyHistoName = "Efficiency_" + HistoName;
397  string UnassEfficiencyHistoName = "UnassEfficiency_" + HistoName;
398 
399  dbe->setCurrentFolder("DT/Tests/DTEfficiency/Wheel" + wheel.str() +
400  "/Station" + station.str() +
401  "/Sector" + sector.str());
402 
403  EfficiencyHistos[lId] = dbe->book1D(EfficiencyHistoName.c_str(),EfficiencyHistoName.c_str(),lastWire-firstWire+1, firstWire-0.5, lastWire+0.5);
404  UnassEfficiencyHistos[lId] = dbe->book1D(UnassEfficiencyHistoName.c_str(),UnassEfficiencyHistoName.c_str(),lastWire-firstWire+1, firstWire-0.5, lastWire+0.5);
405 
406 }
407 
408 
410 
411  dbe->setCurrentFolder("DT/Tests/DTEfficiency/SummaryPlot");
412 
413  if(wheelHistos.find(3) == wheelHistos.end()){
414  string histoName = "ESummary_testFailedByAtLeastBadSL";
415  wheelHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,2);
416  wheelHistos[3]->setBinLabel(1,"Sector1",1);
417  wheelHistos[3]->setBinLabel(1,"Sector1",1);
418  wheelHistos[3]->setBinLabel(2,"Sector2",1);
419  wheelHistos[3]->setBinLabel(3,"Sector3",1);
420  wheelHistos[3]->setBinLabel(4,"Sector4",1);
421  wheelHistos[3]->setBinLabel(5,"Sector5",1);
422  wheelHistos[3]->setBinLabel(6,"Sector6",1);
423  wheelHistos[3]->setBinLabel(7,"Sector7",1);
424  wheelHistos[3]->setBinLabel(8,"Sector8",1);
425  wheelHistos[3]->setBinLabel(9,"Sector9",1);
426  wheelHistos[3]->setBinLabel(10,"Sector10",1);
427  wheelHistos[3]->setBinLabel(11,"Sector11",1);
428  wheelHistos[3]->setBinLabel(12,"Sector12",1);
429  wheelHistos[3]->setBinLabel(13,"Sector13",1);
430  wheelHistos[3]->setBinLabel(14,"Sector14",1);
431  wheelHistos[3]->setBinLabel(1,"Wheel-2",2);
432  wheelHistos[3]->setBinLabel(2,"Wheel-1",2);
433  wheelHistos[3]->setBinLabel(3,"Wheel0",2);
434  wheelHistos[3]->setBinLabel(4,"Wheel+1",2);
435  wheelHistos[3]->setBinLabel(5,"Wheel+2",2);
436  }
437  if(wheelUnassHistos.find(3) == wheelUnassHistos.end()){
438  string histoName = "UESummary_testFailedByAtLeastBadSL";
439  wheelUnassHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,2);
440  wheelUnassHistos[3]->setBinLabel(1,"Sector1",1);
441  wheelUnassHistos[3]->setBinLabel(1,"Sector1",1);
442  wheelUnassHistos[3]->setBinLabel(2,"Sector2",1);
443  wheelUnassHistos[3]->setBinLabel(3,"Sector3",1);
444  wheelUnassHistos[3]->setBinLabel(4,"Sector4",1);
445  wheelUnassHistos[3]->setBinLabel(5,"Sector5",1);
446  wheelUnassHistos[3]->setBinLabel(6,"Sector6",1);
447  wheelUnassHistos[3]->setBinLabel(7,"Sector7",1);
448  wheelUnassHistos[3]->setBinLabel(8,"Sector8",1);
449  wheelUnassHistos[3]->setBinLabel(9,"Sector9",1);
450  wheelUnassHistos[3]->setBinLabel(10,"Sector10",1);
451  wheelUnassHistos[3]->setBinLabel(11,"Sector11",1);
452  wheelUnassHistos[3]->setBinLabel(12,"Sector12",1);
453  wheelUnassHistos[3]->setBinLabel(13,"Sector13",1);
454  wheelUnassHistos[3]->setBinLabel(14,"Sector14",1);
455  wheelUnassHistos[3]->setBinLabel(1,"Wheel-2",2);
456  wheelUnassHistos[3]->setBinLabel(2,"Wheel-1",2);
457  wheelUnassHistos[3]->setBinLabel(3,"Wheel0",2);
458  wheelUnassHistos[3]->setBinLabel(4,"Wheel+1",2);
459  wheelUnassHistos[3]->setBinLabel(5,"Wheel+2",2);
460  }
461 
462 
463  stringstream wheel; wheel <<wh;
464 
465  if(wheelHistos.find(wh) == wheelHistos.end()){
466  string histoName = "ESummary_testFailed_W" + wheel.str();
467  wheelHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
468  wheelHistos[wh]->setBinLabel(1,"Sector1",1);
469  wheelHistos[wh]->setBinLabel(2,"Sector2",1);
470  wheelHistos[wh]->setBinLabel(3,"Sector3",1);
471  wheelHistos[wh]->setBinLabel(4,"Sector4",1);
472  wheelHistos[wh]->setBinLabel(5,"Sector5",1);
473  wheelHistos[wh]->setBinLabel(6,"Sector6",1);
474  wheelHistos[wh]->setBinLabel(7,"Sector7",1);
475  wheelHistos[wh]->setBinLabel(8,"Sector8",1);
476  wheelHistos[wh]->setBinLabel(9,"Sector9",1);
477  wheelHistos[wh]->setBinLabel(10,"Sector10",1);
478  wheelHistos[wh]->setBinLabel(11,"Sector11",1);
479  wheelHistos[wh]->setBinLabel(12,"Sector12",1);
480  wheelHistos[wh]->setBinLabel(13,"Sector13",1);
481  wheelHistos[wh]->setBinLabel(14,"Sector14",1);
482  wheelHistos[wh]->setBinLabel(1,"MB1_SL1",2);
483  wheelHistos[wh]->setBinLabel(2,"MB1_SL2",2);
484  wheelHistos[wh]->setBinLabel(3,"MB1_SL3",2);
485  wheelHistos[wh]->setBinLabel(4,"MB2_SL1",2);
486  wheelHistos[wh]->setBinLabel(5,"MB2_SL2",2);
487  wheelHistos[wh]->setBinLabel(6,"MB2_SL3",2);
488  wheelHistos[wh]->setBinLabel(7,"MB3_SL1",2);
489  wheelHistos[wh]->setBinLabel(8,"MB3_SL2",2);
490  wheelHistos[wh]->setBinLabel(9,"MB3_SL3",2);
491  wheelHistos[wh]->setBinLabel(10,"MB4_SL1",2);
492  wheelHistos[wh]->setBinLabel(11,"MB4_SL3",2);
493  }
494  if(wheelUnassHistos.find(wh) == wheelUnassHistos.end()){
495  string histoName = "UESummary_testFailed_W" + wheel.str();
496  wheelUnassHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
497  wheelUnassHistos[wh]->setBinLabel(1,"Sector1",1);
498  wheelUnassHistos[wh]->setBinLabel(2,"Sector2",1);
499  wheelUnassHistos[wh]->setBinLabel(3,"Sector3",1);
500  wheelUnassHistos[wh]->setBinLabel(4,"Sector4",1);
501  wheelUnassHistos[wh]->setBinLabel(5,"Sector5",1);
502  wheelUnassHistos[wh]->setBinLabel(6,"Sector6",1);
503  wheelUnassHistos[wh]->setBinLabel(7,"Sector7",1);
504  wheelUnassHistos[wh]->setBinLabel(8,"Sector8",1);
505  wheelUnassHistos[wh]->setBinLabel(9,"Sector9",1);
506  wheelUnassHistos[wh]->setBinLabel(10,"Sector10",1);
507  wheelUnassHistos[wh]->setBinLabel(11,"Sector11",1);
508  wheelUnassHistos[wh]->setBinLabel(12,"Sector12",1);
509  wheelUnassHistos[wh]->setBinLabel(13,"Sector13",1);
510  wheelUnassHistos[wh]->setBinLabel(14,"Sector14",1);
511  wheelUnassHistos[wh]->setBinLabel(1,"MB1_SL1",2);
512  wheelUnassHistos[wh]->setBinLabel(2,"MB1_SL2",2);
513  wheelUnassHistos[wh]->setBinLabel(3,"MB1_SL3",2);
514  wheelUnassHistos[wh]->setBinLabel(4,"MB2_SL1",2);
515  wheelUnassHistos[wh]->setBinLabel(5,"MB2_SL2",2);
516  wheelUnassHistos[wh]->setBinLabel(6,"MB2_SL3",2);
517  wheelUnassHistos[wh]->setBinLabel(7,"MB3_SL1",2);
518  wheelUnassHistos[wh]->setBinLabel(8,"MB3_SL2",2);
519  wheelUnassHistos[wh]->setBinLabel(9,"MB3_SL3",2);
520  wheelUnassHistos[wh]->setBinLabel(10,"MB4_SL1",2);
521  wheelUnassHistos[wh]->setBinLabel(11,"MB4_SL3",2);
522  }
523 
524 }
525 
LuminosityBlockID id() const
int i
Definition: DBlmapReader.cc:9
virtual ~DTEfficiencyTest()
Destructor.
dictionary parameters
Definition: Parameters.py:2
string fill
Definition: lumiContext.py:319
void beginRun(const edm::Run &r, const edm::EventSetup &c)
Analyze.
void endJob()
Endjob.
int layer() const
Return the layer number.
Definition: DTLayerId.h:53
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:59
void bookHistos(const DTLayerId &ch, int firstWire, int lastWire)
book the new ME
DTEfficiencyTest(const edm::ParameterSet &ps)
Constructor.
void bookHistos()
Definition: Histogram.h:33
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
void beginJob()
BeginJob.
T sqrt(T t)
Definition: SSEVec.h:48
int j
Definition: DBlmapReader.cc:9
RunNumber_t run() const
int nevents
const std::vector< DQMChannel > & getBadChannels(void) const
Definition: QReport.h:33
int superlayer() const
Return the superlayer number (deprecated method name)
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
DQM Client Diagnostic.
const T & get() const
Definition: EventSetup.h:55
TH1F * getTH1F(void) const
LuminosityBlockNumber_t luminosityBlock() const
std::string HistoName
int sector() const
Definition: DTChamberId.h:61
static std::atomic< unsigned int > counter
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
Definition: Run.h:41
std::string getMEName(std::string histoTag, const DTLayerId &lID)
Get the ME name.