CMS 3D CMS Logo

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