CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTOccupancyTest.cc
Go to the documentation of this file.
1 
2 
3 /*
4  * See header file for a description of this class.
5  *
6  * $Date: 2011/06/10 13:50:12 $
7  * $Revision: 1.17 $
8  * \author G. Cerminara - University and INFN Torino
9  */
10 
11 
14 
24 
25 #include "TMath.h"
26 
27 using namespace edm;
28 using namespace std;
29 
30 
31 
32 
34  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: Constructor";
35 
36  // Get the DQM service
37  dbe = Service<DQMStore>().operator->();
38 
39  lsCounter = 0;
40 
41  writeRootFile = ps.getUntrackedParameter<bool>("writeRootFile", false);
42  if(writeRootFile) {
43  rootFile = new TFile("DTOccupancyTest.root","RECREATE");
44  ntuple = new TNtuple("OccupancyNtuple", "OccupancyNtuple", "ls:wh:st:se:lay1MeanCell:lay1RMS:lay2MeanCell:lay2RMS:lay3MeanCell:lay3RMS:lay4MeanCell:lay4RMS:lay5MeanCell:lay5RMS:lay6MeanCell:lay6RMS:lay7MeanCell:lay7RMS:lay8MeanCell:lay8RMS:lay9MeanCell:lay9RMS:lay10MeanCell:lay10RMS:lay11MeanCell:lay11RMS:lay12MeanCell:lay12RMS");
45  }
46 
47  // switch on the mode for running on test pulses (different top folder)
48  tpMode = ps.getUntrackedParameter<bool>("testPulseMode", false);
49 
50  runOnAllHitsOccupancies = ps.getUntrackedParameter<bool>("runOnAllHitsOccupancies", true);
51  runOnNoiseOccupancies = ps.getUntrackedParameter<bool>("runOnNoiseOccupancies", false);
52  runOnInTimeOccupancies = ps.getUntrackedParameter<bool>("runOnInTimeOccupancies", false);
53  nMinEvts = ps.getUntrackedParameter<int>("nEventsCert", 5000);
54 
55 }
56 
57 
58 
59 
61  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << " destructor called" << endl;
62 
63 
64 }
65 
66 
67 
68 
70  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: BeginJob";
71 
72  // Event counter
73  nevents = 0;
74 
75  // Book the summary histos
76  // - one summary per wheel
77  for(int wh = -2; wh <= 2; ++wh) { // loop over wheels
78  bookHistos(wh, string("Occupancies"), "OccupancySummary");
79  }
80 
81  dbe->setCurrentFolder(topFolder());
82  string title = "Occupancy Summary";
83  if(tpMode) {
84  title = "Test Pulse Occupancy Summary";
85  }
86  // - global summary with alarms
87  summaryHisto = dbe->book2D("OccupancySummary",title.c_str(),12,1,13,5,-2,3);
88  summaryHisto->setAxisTitle("sector",1);
89  summaryHisto->setAxisTitle("wheel",2);
90 
91  // - global summary with percentages
92  glbSummaryHisto = dbe->book2D("OccupancyGlbSummary",title.c_str(),12,1,13,5,-2,3);
93  glbSummaryHisto->setAxisTitle("sector",1);
94  glbSummaryHisto->setAxisTitle("wheel",2);
95 
96 
97  // assign the name of the input histogram
98  if(runOnAllHitsOccupancies) {
99  nameMonitoredHisto = "OccupancyAllHits_perCh";
100  } else if(runOnNoiseOccupancies) {
101  nameMonitoredHisto = "OccupancyNoise_perCh";
102  } else if(runOnInTimeOccupancies) {
103  nameMonitoredHisto = "OccupancyInTimeHits_perCh";
104  } else { // default is AllHits histo
105  nameMonitoredHisto = "OccupancyAllHits_perCh";
106  }
107 
108 }
109 
110 
111 
112 
113 void DTOccupancyTest::beginRun(const edm::Run& run, const EventSetup& context){
114 
115  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: BeginRun";
116 
117  // Get the geometry
118  context.get<MuonGeometryRecord>().get(muonGeom);
119 
120 }
121 
122 
123 
124 
126  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") <<"[DTOccupancyTest]: Begin of LS transition";
127 }
128 
129 
130 
131 
132 void DTOccupancyTest::analyze(const Event& e, const EventSetup& context) {
133  nevents++;
134 // if(nevents%1000)
135 // LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: "<<nevents<<" events";
136 }
137 
138 
139 
140 
141 void DTOccupancyTest::endLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& context) {
142  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest")
143  <<"[DTOccupancyTest]: End of LS transition, performing the DQM client operation";
144  lsCounter++;
145 
146 
147 
148  // Reset the global summary
149  summaryHisto->Reset();
150  glbSummaryHisto->Reset();
151 
152  // Get all the DT chambers
153  vector<DTChamber*> chambers = muonGeom->chambers();
154 
155  for(vector<DTChamber*>::const_iterator chamber = chambers.begin();
156  chamber != chambers.end(); ++chamber) { // Loop over all chambers
157  DTChamberId chId = (*chamber)->id();
158 
159  MonitorElement * chamberOccupancyHisto = dbe->get(getMEName(nameMonitoredHisto, chId));
160 
161  // Run the tests on the plot for the various granularities
162  if(chamberOccupancyHisto != 0) {
163  // Get the 2D histo
164  TH2F* histo = chamberOccupancyHisto->getTH2F();
165  float chamberPercentage = 1.;
166  int result = runOccupancyTest(histo, chId, chamberPercentage);
167  int sector = chId.sector();
168 
169  if(sector == 13) {
170  sector = 4;
171  float resultSect4 = wheelHistos[chId.wheel()]->getBinContent(sector, chId.station());
172  if(resultSect4 > result) {
173  result = (int)resultSect4;
174  }
175  } else if(sector == 14) {
176  sector = 10;
177  float resultSect10 = wheelHistos[chId.wheel()]->getBinContent(sector, chId.station());
178  if(resultSect10 > result) {
179  result = (int)resultSect10;
180  }
181  }
182 
183  // the 2 MB4 of Sect 4 and 10 count as half a chamber
184  if((sector == 4 || sector == 10) && chId.station() == 4)
185  chamberPercentage = chamberPercentage/2.;
186 
187  wheelHistos[chId.wheel()]->setBinContent(sector, chId.station(),result);
188  if(result > summaryHisto->getBinContent(sector, chId.wheel()+3)) {
189  summaryHisto->setBinContent(sector, chId.wheel()+3, result);
190  }
191  glbSummaryHisto->Fill(sector, chId.wheel(), chamberPercentage*1./4.);
192  } else {
193  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] ME: "
194  << getMEName(nameMonitoredHisto, chId) << " not found!" << endl;
195  }
196 
197  }
198 
199  string nEvtsName = "DT/EventInfo/Counters/nProcessedEventsDigi";
200  MonitorElement * meProcEvts = dbe->get(nEvtsName);
201 
202  if (meProcEvts) {
203  int nProcEvts = meProcEvts->getFloatValue();
204  glbSummaryHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
205  summaryHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
206  } else {
207  glbSummaryHisto->setEntries(nMinEvts +1);
208  summaryHisto->setEntries(nMinEvts + 1);
209  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] ME: "
210  << nEvtsName << " not found!" << endl;
211  }
212 
213  // Fill the global summary
214  // Check for entire sectors off and report them on the global summary
215  //FIXME: TODO
216 
217  if(writeRootFile) ntuple->AutoSave("SaveSelf");
218 
219 }
220 
221 
223 
224  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] endjob called!";
225  if(writeRootFile) {
226  rootFile->cd();
227  ntuple->Write();
228  rootFile->Close();
229  }
230 }
231 
232 
233 
234 // --------------------------------------------------
235 void DTOccupancyTest::bookHistos(const int wheelId, string folder, string histoTag) {
236  // Set the current folder
237  stringstream wheel; wheel << wheelId;
238  dbe->setCurrentFolder(topFolder());
239 
240  // build the histo name
241  string histoName = histoTag + "_W" + wheel.str();
242 
243 
244  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") <<"[DTOccupancyTest]: booking wheel histo:"
245  << histoName
246  << " (tag "
247  << histoTag
248  << ") in: "
249  << topFolder() + "Wheel"+ wheel.str() + "/" + folder << endl;
250 
251  string histoTitle = "Occupancy summary WHEEL: "+wheel.str();
252  if(tpMode) {
253  histoTitle = "TP Occupancy summary WHEEL: "+wheel.str();
254  }
255  wheelHistos[wheelId] = dbe->book2D(histoName,histoTitle,12,1,13,4,1,5);
256  wheelHistos[wheelId]->setBinLabel(1,"MB1",2);
257  wheelHistos[wheelId]->setBinLabel(2,"MB2",2);
258  wheelHistos[wheelId]->setBinLabel(3,"MB3",2);
259  wheelHistos[wheelId]->setBinLabel(4,"MB4",2);
260  wheelHistos[wheelId]->setAxisTitle("sector",1);
261 }
262 
263 
264 
265 string DTOccupancyTest::getMEName(string histoTag, const DTChamberId& chId) {
266 
267  stringstream wheel; wheel << chId.wheel();
268  stringstream station; station << chId.station();
269  stringstream sector; sector << chId.sector();
270 
271 
272  string folderRoot = topFolder() + "Wheel" + wheel.str() +
273  "/Sector" + sector.str() +
274  "/Station" + station.str() + "/";
275 
276  string folder = "Occupancies/";
277 
278  // build the histo name
279  string histoName = histoTag
280  + "_W" + wheel.str()
281  + "_St" + station.str()
282  + "_Sec" + sector.str();
283 
284  string histoname = folderRoot + histoName;
285 
286  return histoname;
287 }
288 
289 
290 
291 
292 // Run a test on the occupancy of the chamber
293 // Return values:
294 // 0 -> all ok
295 // 1 -> # consecutive dead channels > N
296 // 2 -> dead layer
297 // 3 -> dead SL
298 // 4 -> dead chamber
300  float& chamberPercentage) {
301  int nBinsX = histo->GetNbinsX();
302 
303  // Reset the error flags
304  bool failSL = false;
305  bool failLayer = false;
306  bool failCells = false;
307 
308  // Check that the chamber has digis
309  if(histo->Integral() == 0) {
310  chamberPercentage = 0;
311  return 4;
312  }
313 
314  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << "--- Occupancy test for chamber: " << chId << endl;
315  // set the # of SLs
316  int nSL = 3;
317  if(chId.station() == 4) nSL = 2;
318 
319  //
320  float values[28];
321  if(writeRootFile) {
322  values[0] = lsCounter;
323  values[1] = chId.wheel();
324  values[2] = chId.station();
325  values[3] = chId.sector();
326  }
327 
328  // Compute the average occupancy per layer and its RMS
329  // we also look of the layer with the smallest RMS in order to find a reference value
330  // for the cell occupancy
331  double totalChamberOccupp = 0;
332  double squaredLayerOccupSum = 0;
333 
334  map<DTLayerId, pair<double, double> > averageCellOccupAndRMS;
335  map<DTLayerId, double> layerOccupancyMap;
336 
337  int index = 3;
338  for(int slay = 1; slay <= 3; ++slay) { // loop over SLs
339  // Skip layer 2 on MB4
340  if(chId.station() == 4 && slay == 2) {
341  if(writeRootFile) {
342  values[12] = -1;
343  values[13] = -1;
344  values[14] = -1;
345  values[15] = -1;
346  values[16] = -1;
347  values[17] = -1;
348  values[18] = -1;
349  values[19] = -1;
350  }
351  index = 19;
352  continue;
353  }
354  // check the SL occupancy
355  int binYlow = ((slay-1)*4)+1;
356  int binYhigh = binYlow+3;
357  double slInteg = histo->Integral(1,nBinsX,binYlow,binYhigh);
358  if(slInteg == 0) {
359  chamberPercentage = 1.-1./(float)nSL;
360  return 3;
361  }
362 
363  for(int lay = 1; lay <= 4; ++lay) { // loop over layers
364  DTLayerId layID(chId,slay,lay);
365 
366  int binY = binYlow+(lay-1);
367 
368  double layerInteg = histo->Integral(1,nBinsX,binY,binY);
369  squaredLayerOccupSum += layerInteg*layerInteg;
370  totalChamberOccupp+= layerInteg;
371 
372  layerOccupancyMap[layID] = layerInteg;
373 
374  // We look for the distribution of hits within the layer
375  int nWires = muonGeom->layer(layID)->specificTopology().channels();
376  int firstWire = muonGeom->layer(layID)->specificTopology().firstChannel();
377  double layerSquaredSum = 0;
378  // reset the alert bit in the plot (used by render plugins)
379  histo->SetBinContent(nBinsX+1,binY,0.);
380 
381  for(int cell = firstWire; cell != (nWires+firstWire); ++cell) { // loop over cells
382  double cellOccup = histo->GetBinContent(cell,binY);
383  layerSquaredSum+=cellOccup*cellOccup;
384  }
385 
386 
387 
388  // compute the average cell occpuancy and RMS
389  double averageCellOccup = layerInteg/nWires;
390  double averageSquaredCellOccup = layerSquaredSum/nWires;
391  double rmsCellOccup = sqrt(averageSquaredCellOccup - averageCellOccup*averageCellOccup);
392  averageCellOccupAndRMS[layID] = make_pair(averageCellOccup, rmsCellOccup);
393  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " " << layID
394  << " average cell occ.: " << averageCellOccup
395  << " RMS: " << rmsCellOccup << endl;
396  if(writeRootFile) {
397  index++;
398  values[index] = averageCellOccup;
399  index++;
400  values[index] = rmsCellOccup;
401  }
402  }
403  }
404 
405 
406  if(writeRootFile) ntuple->Fill(values);
407 
408 // double averageLayerOcc = totalChamberOccupp/(nSL*4);
409 // double averageSquaredLayeroccup = squaredLayerOccupSum/(nSL*4);
410 // double layerOccupRMS = sqrt(averageSquaredLayeroccup - averageLayerOcc*averageLayerOcc);
411 
412  double minCellRMS = 99999999;
413  double referenceCellOccup = -1;
414 
416 
417  // find the cell reference value
418  for(map<DTLayerId, pair<double, double> >::const_iterator layAndValues = averageCellOccupAndRMS.begin();
419  layAndValues != averageCellOccupAndRMS.end(); layAndValues++) {
420  DTLayerId lid = (*layAndValues).first;
421 
422  double rms = (*layAndValues).second.second;
423  double lOcc = layerOccupancyMap[lid]; // FIXME: useless
424  double avCellOcc = (*layAndValues).second.first;
425  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " " << lid << " tot. occ: " << lOcc
426  << " average cell occ: " << avCellOcc
427  << " RMS: " << rms << endl;
428 
429  if(avCellOcc != 0) {
430  DTOccupancyPoint point(avCellOcc, rms, lid);
431  builder.addPoint(point);
432  } else {
433  if(monitoredLayers.find(lid) == monitoredLayers.end()) monitoredLayers.insert(lid);
434  }
435  }
436 
437  builder.buildClusters();
438  referenceCellOccup = builder.getBestCluster().averageMean();
439  minCellRMS = builder.getBestCluster().averageRMS();
440 
441 // set<DTLayerId> bestLayers getLayerIDs()
442 
443  double safeFactor = 3.;
444 // if(minCellRMS > referenceCellOccup) safeFactor = 5;
445 
446  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " Reference cell occup.: " << referenceCellOccup
447  << " RMS: " << minCellRMS << endl;
448 
449  // Set a warning for particularly high RMS: noise can "mask" dead channels
450 // bool rmsWarning = false;
451 // if(layerOccupRMS > averageLayerOcc) {
452 // cout << " Warning RMS is too big: monitoring all layers" << endl;
453 // rmsWarning = true;
454 // }
455 
456  int nFailingSLs = 0;
457 
458  // Check the layer occupancy
459  for(int slay = 1; slay <= 3; ++slay) { // loop over SLs
460  // Skip layer 2 on MB4
461  if(chId.station() == 4 && slay == 2) continue;
462 
463  int binYlow = ((slay-1)*4)+1;
464 // int binYhigh = binYlow+3;
465 
466 
467  int nFailingLayers = 0;
468 
469  for(int lay = 1; lay <= 4; ++lay) { // loop over layers
470  DTLayerId layID(chId,slay,lay);
471  int nWires = muonGeom->layer(layID)->specificTopology().channels();
472  int firstWire = muonGeom->layer(layID)->specificTopology().firstChannel();
473  int binY = binYlow+(lay-1);
474 
475  // compute the integral of the layer occupancy
476  double layerInteg = histo->Integral(1,nBinsX,binY,binY);
477 
478  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " layer: " << layID << " integral: " << layerInteg << endl;
479 
480  // Check if in the list of layers which are monitored
481  bool alreadyMonitored = false;
482  if(monitoredLayers.find(layID) != monitoredLayers.end()) alreadyMonitored = true;
483 
484 
485  if(layerInteg == 0) { // layer is dead (no need to go further
486  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " fail layer: no entries" << endl;
487  // Add it to the list of of monitored layers
488  if(!alreadyMonitored) monitoredLayers.insert(layID);
489  nFailingLayers++;
490  failLayer = true;
491  histo->SetBinContent(nBinsX+1,binY,-1.);
492  // go to next layer
493  continue;
494  }
495 
496 
497 
498 // double avCellOccInLayer = averageCellOccupAndRMS[layID].first;
499 // double cellOccupRMS = averageCellOccupAndRMS[layID].second;
500 // if(monitoredLayers.find(layID) != monitoredLayers.end() ||
501 // layerInteg == 0 ||
502 // layerInteg < (averageLayerOcc - 3*layerOccupRMS) ||
503 // cellOccupRMS > avCellOccInLayer ||
504 // avCellOccInLayer < referenceCellOccup/3.) { // check the layer
505 
506  if(alreadyMonitored || builder.isProblematic(layID)) { // check the layer
507 
508  // Add it to the list of of monitored layers
509  if(monitoredLayers.find(layID) == monitoredLayers.end()) monitoredLayers.insert(layID);
510 
511 // if(layerInteg != 0) { // check # of dead cells
512  int totalDeadCells = 0;
513  int nDeadCellsInARow = 1;
514  int nDeadCellsInARowMax = 0;
515  int nCellsZeroCount = 0;
516  bool previousIsDead = false;
517 
518  int interDeadCells = 0;
519  for(int cell = firstWire; cell != (nWires+firstWire); ++cell) { // loop over cells
520  double cellOccup = histo->GetBinContent(cell,binY);
521  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " cell occup: " << cellOccup;
522  if(cellOccup == 0 || cellOccup < (referenceCellOccup-safeFactor*sqrt(referenceCellOccup))) {
523  if(cellOccup == 0) nCellsZeroCount++;
524  totalDeadCells++;
525  if(previousIsDead) nDeadCellsInARow++;
526  previousIsDead = true;
527  interDeadCells = 0;
528  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " below reference" << endl;
529  } else {
530  previousIsDead = false;
531  interDeadCells++;
532 
533  // 3 cells not dead between a group of dead cells don't break the count
534  if(interDeadCells > 3) {
535  if(nDeadCellsInARow > nDeadCellsInARowMax) nDeadCellsInARowMax = nDeadCellsInARow;
536  nDeadCellsInARow = 1;
537  }
538  }
539  }
540  if(nDeadCellsInARow > nDeadCellsInARowMax) nDeadCellsInARowMax = nDeadCellsInARow;
541  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " # wires: " << nWires
542  << " # cells 0 count: " << nCellsZeroCount
543  << " # dead cells in a row: " << nDeadCellsInARowMax
544  << " total # of dead cells: " << totalDeadCells;
545 
546 
547  // Count dead cells
548 // if(TMath::Erf(referenceCellOccup/sqrt(referenceCellOccup)) > 2./3. &&
549 // nDeadCellsInARowMax > nWires/3.
550 // && nDeadCellsInARowMax < 2*nWires/3.) {
551 // cout << " -> fail cells!" << endl;
552 
553 // failCells = true;
554 // histo->SetBinContent(nBinsX+1,binY,-1.);
555 // } else
556  if((TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup)) < 10./(double)nWires &&
557  nDeadCellsInARowMax>= 10.) ||
558  (TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup)) < 0.5 &&
559  totalDeadCells > nWires/2.)) {
560  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " -> fail layer!" << endl;
561  nFailingLayers++;
562  failLayer = true;
563  histo->SetBinContent(nBinsX+1,binY,-1.);
564  } else if(referenceCellOccup > 10 &&
565  nCellsZeroCount > nWires/3. &&
566  (double)nCellsZeroCount/(double)nWires >
567  2.*TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup))) {
568  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " -> would fail cells!" << endl;
569  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " # of cells with 0 count: " << nCellsZeroCount
570  << " # wires: " << nWires
571  << " erfc: "
572  << TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup))
573  << endl;
574 // failCells = true;
575 // histo->SetBinContent(nBinsX+1,binY,-1.);
576  }
577 
578 // } else { // all layer is dead
579 // LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " fail layer: no entries" << endl;
580 // nFailingLayers++;
581 // failLayer = true;
582 // histo->SetBinContent(nBinsX+1,binY,-1.);
583 // }
584  }
585  }
586  // Check if the whole layer is off
587  if( nFailingLayers == 4) {
588  nFailingSLs++;
589  failSL = true;
590  }
591  }
592 
593  // All the chamber is off
594  if(nFailingSLs == nSL) {
595  chamberPercentage = 0;
596  return 4;
597  } else {
598  chamberPercentage = 1.-(float)nFailingSLs/(float)nSL;
599  }
600 
601  // FIXME add check on cells
602  if(failSL) return 3;
603  if(failLayer) return 2;
604  if(failCells) return 1;
605 
606  return 0;
607 }
608 
609 
611  if(tpMode) return string("DT/10-TestPulses/");
612  return string("DT/01-Digi/");
613 }
DTOccupancyCluster getBestCluster() const
get the cluster correspondig to &quot;normal&quot; cell occupancy.
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &event, const edm::EventSetup &context)
Analyze.
int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage)
static char chambers[TOTALCHAMBERS][20]
Definition: ReadPGInfo.cc:243
void beginJob()
BeginJob.
virtual ~DTOccupancyTest()
Destructor.
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
dictionary map
Definition: Association.py:205
void bookHistos()
Definition: Histogram.h:33
double averageRMS() const
average RMS of the cell occpuancy distributions of the layers in the cluster
DTOccupancyTest(const edm::ParameterSet &ps)
Constructor.
void endJob()
Endjob.
T sqrt(T t)
Definition: SSEVec.h:46
tuple result
Definition: query.py:137
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
double getFloatValue(void) const
int nevents
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
DQM Client Diagnostic.
#define LogTrace(id)
double averageMean() const
average cell occupancy of the layers in the cluster
void addPoint(const DTOccupancyPoint &point)
Add an occupancy point for a given layer.
void buildClusters()
build the clusters
void bookHistos(const int wheelId, std::string folder, std::string histoTag)
book the summary histograms
const T & get() const
Definition: EventSetup.h:55
int sector() const
Definition: DTChamberId.h:63
bool isProblematic(DTLayerId layerId) const
std::string topFolder() const
int station() const
Return the station number.
Definition: DTChamberId.h:53
TH2F * getTH2F(void) const
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
Definition: Run.h:33