CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EBTestPulseClient.cc
Go to the documentation of this file.
1 /*
2  * \file EBTestPulseClient.cc
3  *
4  * \author G. Della Ricca
5  * \author F. Cossutti
6  *
7 */
8 
9 #include <memory>
10 #include <iostream>
11 #include <fstream>
12 #include <iomanip>
13 #include <math.h>
14 
16 
19 
20 #ifdef WITH_ECAL_COND_DB
29 #endif
30 
32 
35 
37 
39 
40  // cloneME switch
41  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
42 
43  // verbose switch
44  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
45 
46  // debug switch
47  debug_ = ps.getUntrackedParameter<bool>("debug", false);
48 
49  // prefixME path
50  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
51 
52  // enableCleanup_ switch
53  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
54 
55  // vector of selected Super Modules (Defaults to all 36).
56  superModules_.reserve(36);
57  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
58  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
59 
60  MGPAGains_.reserve(3);
61  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
62  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
63 
64  MGPAGainsPN_.reserve(2);
65  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
66  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
67 
68  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
69 
70  int ism = superModules_[i];
71 
72  ha01_[ism-1] = 0;
73  ha02_[ism-1] = 0;
74  ha03_[ism-1] = 0;
75 
76  hs01_[ism-1] = 0;
77  hs02_[ism-1] = 0;
78  hs03_[ism-1] = 0;
79 
80  i01_[ism-1] = 0;
81  i02_[ism-1] = 0;
82  i03_[ism-1] = 0;
83  i04_[ism-1] = 0;
84 
85  }
86 
87  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
88 
89  int ism = superModules_[i];
90 
91  meg01_[ism-1] = 0;
92  meg02_[ism-1] = 0;
93  meg03_[ism-1] = 0;
94 
95  meg04_[ism-1] = 0;
96  meg05_[ism-1] = 0;
97 
98  mea01_[ism-1] = 0;
99  mea02_[ism-1] = 0;
100  mea03_[ism-1] = 0;
101 
102  mer04_[ism-1] = 0;
103  mer05_[ism-1] = 0;
104 
105  me_hs01_[ism-1] = 0;
106  me_hs02_[ism-1] = 0;
107  me_hs03_[ism-1] = 0;
108 
109  }
110 
111  percentVariation_ = 0.2;
112  RMSThreshold_ = 300.0;
113 
114  amplitudeThreshold_ = 100.;
115 
116  amplitudeThresholdPnG01_ = 200./16.;
118 
119  pedPnExpectedMean_[0] = 750.0;
120  pedPnExpectedMean_[1] = 750.0;
121 
122  pedPnDiscrepancyMean_[0] = 100.0;
123  pedPnDiscrepancyMean_[1] = 100.0;
124 
125  pedPnRMSThreshold_[0] = 999.;
126  pedPnRMSThreshold_[1] = 999.;
127 
128 }
129 
131 
132 }
133 
135 
137 
138  if ( debug_ ) std::cout << "EBTestPulseClient: beginJob" << std::endl;
139 
140  ievt_ = 0;
141  jevt_ = 0;
142 
143 }
144 
146 
147  if ( debug_ ) std::cout << "EBTestPulseClient: beginRun" << std::endl;
148 
149  jevt_ = 0;
150 
151  this->setup();
152 
153 }
154 
156 
157  if ( debug_ ) std::cout << "EBTestPulseClient: std::endlJob, ievt = " << ievt_ << std::endl;
158 
159  this->cleanup();
160 
161 }
162 
164 
165  if ( debug_ ) std::cout << "EBTestPulseClient: std::endlRun, jevt = " << jevt_ << std::endl;
166 
167  this->cleanup();
168 
169 }
170 
172 
174 
175  dqmStore_->setCurrentFolder( prefixME_ + "/EBTestPulseClient" );
176 
177  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
178 
179  int ism = superModules_[i];
180 
181  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
182  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
183  name = "EBTPT test pulse quality G01 " + Numbers::sEB(ism);
184  meg01_[ism-1] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
185  meg01_[ism-1]->setAxisTitle("ieta", 1);
186  meg01_[ism-1]->setAxisTitle("iphi", 2);
187  }
188  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
189  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
190  name = "EBTPT test pulse quality G06 " + Numbers::sEB(ism);
191  meg02_[ism-1] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
192  meg02_[ism-1]->setAxisTitle("ieta", 1);
193  meg02_[ism-1]->setAxisTitle("iphi", 2);
194  }
195  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
196  if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
197  name = "EBTPT test pulse quality G12 " + Numbers::sEB(ism);
198  meg03_[ism-1] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
199  meg03_[ism-1]->setAxisTitle("ieta", 1);
200  meg03_[ism-1]->setAxisTitle("iphi", 2);
201  }
202 
203  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
204  if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
205  name = "EBTPT test pulse quality PNs G01 " + Numbers::sEB(ism);
206  meg04_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
207  meg04_[ism-1]->setAxisTitle("pseudo-strip", 1);
208  meg04_[ism-1]->setAxisTitle("channel", 2);
209  }
210  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
211  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
212  name = "EBTPT test pulse quality PNs G16 " + Numbers::sEB(ism);
213  meg05_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
214  meg05_[ism-1]->setAxisTitle("pseudo-strip", 1);
215  meg05_[ism-1]->setAxisTitle("channel", 2);
216  }
217 
218  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
219  if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );
220  name = "EBTPT test pulse amplitude G01 " + Numbers::sEB(ism);
221  mea01_[ism-1] = dqmStore_->book1D(name, name, 1700, 0., 1700.);
222  mea01_[ism-1]->setAxisTitle("channel", 1);
223  mea01_[ism-1]->setAxisTitle("amplitude", 2);
224  }
225  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
226  if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
227  name = "EBTPT test pulse amplitude G06 " + Numbers::sEB(ism);
228  mea02_[ism-1] = dqmStore_->book1D(name, name, 1700, 0., 1700.);
229  mea02_[ism-1]->setAxisTitle("channel", 1);
230  mea02_[ism-1]->setAxisTitle("amplitude", 2);
231  }
232  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
233  if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() );
234  name = "EBTPT test pulse amplitude G12 " + Numbers::sEB(ism);
235  mea03_[ism-1] = dqmStore_->book1D(name, name, 1700, 0., 1700.);
236  mea03_[ism-1]->setAxisTitle("channel", 1);
237  mea03_[ism-1]->setAxisTitle("amplitude", 2);
238  }
239 
240  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
241  if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() );
242  name = "EBTPT PNs pedestal rms " + Numbers::sEB(ism) + " G01";
243  mer04_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
244  mer04_[ism-1]->setAxisTitle("rms", 1);
245  }
246  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
247  if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() );
248  name = "EBTPT PNs pedestal rms " + Numbers::sEB(ism) + " G16";
249  mer05_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
250  mer05_[ism-1]->setAxisTitle("rms", 1);
251  }
252 
253  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
254  if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
255  name = "EBTPT test pulse shape G01 " + Numbers::sEB(ism);
256  me_hs01_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
257  me_hs01_[ism-1]->setAxisTitle("sample", 1);
258  me_hs01_[ism-1]->setAxisTitle("amplitude", 2);
259  }
260  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
261  if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
262  name = "EBTPT test pulse shape G06 " + Numbers::sEB(ism);
263  me_hs02_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
264  me_hs02_[ism-1]->setAxisTitle("sample", 1);
265  me_hs02_[ism-1]->setAxisTitle("amplitude", 2);
266  }
267  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
268  if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() );
269  name = "EBTPT test pulse shape G12 " + Numbers::sEB(ism);
270  me_hs03_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
271  me_hs03_[ism-1]->setAxisTitle("sample", 1);
272  me_hs03_[ism-1]->setAxisTitle("amplitude", 2);
273  }
274 
275  }
276 
277  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
278 
279  int ism = superModules_[i];
280 
281  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
282  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
283  if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
284 
285  if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
286  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
287 
288  for ( int ie = 1; ie <= 85; ie++ ) {
289  for ( int ip = 1; ip <= 20; ip++ ) {
290 
291  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. );
292  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. );
293  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. );
294 
295  }
296  }
297 
298  for ( int i = 1; i <= 10; i++ ) {
299 
300  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. );
301  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
302 
303  }
304 
305  if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
306  if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
307  if ( mea03_[ism-1] ) mea03_[ism-1]->Reset();
308 
309  if ( mer04_[ism-1] ) mer04_[ism-1]->Reset();
310  if ( mer05_[ism-1] ) mer05_[ism-1]->Reset();
311 
312  if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
313  if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
314  if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset();
315 
316  }
317 
318 }
319 
321 
322  if ( ! enableCleanup_ ) return;
323 
324  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
325 
326  int ism = superModules_[i];
327 
328  if ( cloneME_ ) {
329  if ( ha01_[ism-1] ) delete ha01_[ism-1];
330  if ( ha02_[ism-1] ) delete ha02_[ism-1];
331  if ( ha03_[ism-1] ) delete ha03_[ism-1];
332 
333  if ( hs01_[ism-1] ) delete hs01_[ism-1];
334  if ( hs02_[ism-1] ) delete hs02_[ism-1];
335  if ( hs03_[ism-1] ) delete hs03_[ism-1];
336 
337  if ( i01_[ism-1] ) delete i01_[ism-1];
338  if ( i02_[ism-1] ) delete i02_[ism-1];
339  if ( i03_[ism-1] ) delete i03_[ism-1];
340  if ( i04_[ism-1] ) delete i04_[ism-1];
341  }
342 
343  ha01_[ism-1] = 0;
344  ha02_[ism-1] = 0;
345  ha03_[ism-1] = 0;
346 
347  hs01_[ism-1] = 0;
348  hs02_[ism-1] = 0;
349  hs03_[ism-1] = 0;
350 
351  i01_[ism-1] = 0;
352  i02_[ism-1] = 0;
353  i03_[ism-1] = 0;
354  i04_[ism-1] = 0;
355 
356  }
357 
358  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
359 
360  int ism = superModules_[i];
361 
362  dqmStore_->setCurrentFolder( prefixME_ + "/EBTestPulseClient" );
363 
364  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
365  meg01_[ism-1] = 0;
366  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
367  meg02_[ism-1] = 0;
368  if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
369  meg03_[ism-1] = 0;
370 
371  if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
372  meg04_[ism-1] = 0;
373  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
374  meg05_[ism-1] = 0;
375 
376  if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );
377  mea01_[ism-1] = 0;
378  if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
379  mea02_[ism-1] = 0;
380  if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() );
381  mea03_[ism-1] = 0;
382 
383  if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() );
384  mer04_[ism-1] = 0;
385  if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() );
386  mer05_[ism-1] = 0;
387 
388  if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
389  me_hs01_[ism-1] = 0;
390  if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
391  me_hs02_[ism-1] = 0;
392  if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() );
393  me_hs03_[ism-1] = 0;
394 
395  }
396 
397 }
398 
399 #ifdef WITH_ECAL_COND_DB
400 bool EBTestPulseClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
401 
402  status = true;
403 
404  EcalLogicID ecid;
405 
407  std::map<EcalLogicID, MonTestPulseDat> dataset1;
408  MonPulseShapeDat shape;
409  std::map<EcalLogicID, MonPulseShapeDat> dataset2;
410 
411  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
412 
413  int ism = superModules_[i];
414 
415  if ( verbose_ ) {
416  std::cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
417  std::cout << std::endl;
418  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
420  }
421  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
423  }
424  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
426  }
427  }
428 
429  for ( int ie = 1; ie <= 85; ie++ ) {
430  for ( int ip = 1; ip <= 20; ip++ ) {
431 
432  bool update01;
433  bool update02;
434  bool update03;
435 
436  float num01, num02, num03;
437  float mean01, mean02, mean03;
438  float rms01, rms02, rms03;
439 
440  update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01);
441  update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02);
442  update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03);
443 
444  if ( update01 || update02 || update03 ) {
445 
446  if ( Numbers::icEB(ism, ie, ip) == 1 ) {
447 
448  if ( verbose_ ) {
449  std::cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
450  std::cout << "G01 (" << ie << "," << ip << ") " << num01 << " " << mean01 << " " << rms01 << std::endl;
451  std::cout << "G06 (" << ie << "," << ip << ") " << num02 << " " << mean02 << " " << rms02 << std::endl;
452  std::cout << "G12 (" << ie << "," << ip << ") " << num03 << " " << mean03 << " " << rms03 << std::endl;
453  std::cout << std::endl;
454  }
455 
456  }
457 
458  adc.setADCMeanG1(mean01);
459  adc.setADCRMSG1(rms01);
460 
461  adc.setADCMeanG6(mean02);
462  adc.setADCRMSG6(rms02);
463 
464  adc.setADCMeanG12(mean03);
465  adc.setADCRMSG12(rms03);
466 
467  if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) &&
468  UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) &&
469  UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) {
470  adc.setTaskStatus(true);
471  } else {
472  adc.setTaskStatus(false);
473  }
474 
475  status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip) &&
476  UtilsClient::getBinQuality(meg02_[ism-1], ie, ip) &&
477  UtilsClient::getBinQuality(meg03_[ism-1], ie, ip);
478 
479  if ( Numbers::icEB(ism, ie, ip) == 1 ) {
480 
481  std::vector<float> sample01, sample02, sample03;
482 
483  sample01.clear();
484  sample02.clear();
485  sample03.clear();
486 
487  if ( me_hs01_[ism-1] ) {
488  for ( int i = 1; i <= 10; i++ ) {
489  sample01.push_back(int(me_hs01_[ism-1]->getBinContent(i)));
490  }
491  } else {
492  for ( int i = 1; i <= 10; i++ ) { sample01.push_back(-1.); }
493  }
494 
495  if ( me_hs02_[ism-1] ) {
496  for ( int i = 1; i <= 10; i++ ) {
497  sample02.push_back(int(me_hs02_[ism-1]->getBinContent(i)));
498  }
499  } else {
500  for ( int i = 1; i <= 10; i++ ) { sample02.push_back(-1.); }
501  }
502 
503  if ( me_hs03_[ism-1] ) {
504  for ( int i = 1; i <= 10; i++ ) {
505  sample03.push_back(int(me_hs03_[ism-1]->getBinContent(i)));
506  }
507  } else {
508  for ( int i = 1; i <= 10; i++ ) { sample03.push_back(-1.); }
509  }
510 
511  if ( verbose_ ) {
512  std::cout << "sample01 = " << std::flush;
513  for ( unsigned int i = 0; i < sample01.size(); i++ ) {
514  std::cout << sample01[i] << " " << std::flush;
515  }
516  std::cout << std::endl;
517 
518  std::cout << "sample02 = " << std::flush;
519  for ( unsigned int i = 0; i < sample02.size(); i++ ) {
520  std::cout << sample02[i] << " " << std::flush;
521  }
522  std::cout << std::endl;
523 
524  std::cout << "sample03 = " << std::flush;
525  for ( unsigned int i = 0; i < sample03.size(); i++ ) {
526  std::cout << sample03[i] << " " << std::flush;
527  }
528  std::cout << std::endl;
529  }
530 
531  if ( verbose_ ) std::cout << std::endl;
532 
533  shape.setSamples(sample01, 1);
534  shape.setSamples(sample02, 6);
535  shape.setSamples(sample03, 12);
536 
537  }
538 
539  int ic = Numbers::indexEB(ism, ie, ip);
540 
541  if ( econn ) {
542  ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
543  dataset1[ecid] = adc;
544  if ( Numbers::icEB(ism, ie, ip) == 1 ) dataset2[ecid] = shape;
545  }
546 
547  }
548 
549  }
550  }
551 
552  }
553 
554  if ( econn ) {
555  try {
556  if ( verbose_ ) std::cout << "Inserting MonTestPulseDat ..." << std::endl;
557  if ( dataset1.size() != 0 ) econn->insertDataArraySet(&dataset1, moniov);
558  if ( dataset2.size() != 0 ) econn->insertDataSet(&dataset2, moniov);
559  if ( verbose_ ) std::cout << "done." << std::endl;
560  } catch (std::runtime_error &e) {
561  std::cerr << e.what() << std::endl;
562  }
563  }
564 
565  if ( verbose_ ) std::cout << std::endl;
566 
567  MonPNMGPADat pn;
568  std::map<EcalLogicID, MonPNMGPADat> dataset3;
569 
570  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
571 
572  int ism = superModules_[i];
573 
574  if ( verbose_ ) {
575  std::cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
576  std::cout << std::endl;
577  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
578  UtilsClient::printBadChannels(meg04_[ism-1], i01_[ism-1]);
579  UtilsClient::printBadChannels(meg04_[ism-1], i03_[ism-1]);
580  }
581  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
582  UtilsClient::printBadChannels(meg05_[ism-1], i02_[ism-1]);
583  UtilsClient::printBadChannels(meg05_[ism-1], i04_[ism-1]);
584  }
585  }
586 
587  for ( int i = 1; i <= 10; i++ ) {
588 
589  bool update01;
590  bool update02;
591  bool update03;
592  bool update04;
593 
594  float num01, num02, num03, num04;
595  float mean01, mean02, mean03, mean04;
596  float rms01, rms02, rms03, rms04;
597 
598  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
599  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
600  update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 1, num03, mean03, rms03);
601  update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 1, num04, mean04, rms04);
602 
603  if ( update01 || update02 || update03 || update04 ) {
604 
605  if ( i == 1 ) {
606 
607  if ( verbose_ ) {
608  std::cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
609  std::cout << "PNs (" << i << ") G01 " << num01 << " " << mean01 << " " << rms01 << " " << num03 << " " << mean03 << " " << rms03 << std::endl;
610  std::cout << "PNs (" << i << ") G16 " << num02 << " " << mean02 << " " << rms02 << " " << num04 << " " << mean04 << " " << rms04 << std::endl;
611  std::cout << std::endl;
612  }
613 
614  }
615 
616  pn.setADCMeanG1(mean01);
617  pn.setADCRMSG1(rms01);
618 
619  pn.setPedMeanG1(mean03);
620  pn.setPedRMSG1(rms03);
621 
622  pn.setADCMeanG16(mean02);
623  pn.setADCRMSG16(rms02);
624 
625  pn.setPedMeanG16(mean04);
626  pn.setPedRMSG16(rms04);
627 
628  if ( UtilsClient::getBinStatus(meg04_[ism-1], i, 1) &&
629  UtilsClient::getBinStatus(meg05_[ism-1], i, 1) ) {
630  pn.setTaskStatus(true);
631  } else {
632  pn.setTaskStatus(false);
633  }
634 
635  status = status && UtilsClient::getBinQuality(meg04_[ism-1], i, 1) &&
636  UtilsClient::getBinQuality(meg05_[ism-1], i, 1);
637 
638  if ( econn ) {
639  ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1);
640  dataset3[ecid] = pn;
641  }
642 
643  }
644 
645  }
646 
647  }
648 
649  if ( econn ) {
650  try {
651  if ( verbose_ ) std::cout << "Inserting MonPNMGPADat ..." << std::endl;
652  if ( dataset3.size() != 0 ) econn->insertDataArraySet(&dataset3, moniov);
653  if ( verbose_ ) std::cout << "done." << std::endl;
654  } catch (std::runtime_error &e) {
655  std::cerr << e.what() << std::endl;
656  }
657  }
658 
659  return true;
660 
661 }
662 #endif
663 
665 
666  ievt_++;
667  jevt_++;
668  if ( ievt_ % 10 == 0 ) {
669  if ( debug_ ) std::cout << "EBTestPulseClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
670  }
671 
672  uint32_t bits01 = 0;
675 
676  uint32_t bits02 = 0;
679 
680  uint32_t bits03 = 0;
683 
684  uint32_t bits04 = 0;
687 
688  uint32_t bits05 = 0;
691 
692 
693  MonitorElement* me;
694 
695  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
696 
697  int ism = superModules_[i];
698 
699  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
700 
701  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain01/EBTPT amplitude " + Numbers::sEB(ism) + " G01" );
702  ha01_[ism-1] = UtilsClient::getHisto( me, cloneME_, ha01_[ism-1] );
703 
704  }
705 
706  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
707 
708  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain06/EBTPT amplitude " + Numbers::sEB(ism) + " G06" );
709  ha02_[ism-1] = UtilsClient::getHisto( me, cloneME_, ha02_[ism-1] );
710 
711  }
712 
713  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
714 
715  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain12/EBTPT amplitude " + Numbers::sEB(ism) + " G12" );
716  ha03_[ism-1] = UtilsClient::getHisto( me, cloneME_, ha03_[ism-1] );
717 
718  }
719 
720  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
721 
722  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain01/EBTPT shape " + Numbers::sEB(ism) + " G01" );
723  hs01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs01_[ism-1] );
724 
725  }
726 
727  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
728 
729  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain06/EBTPT shape " + Numbers::sEB(ism) + " G06" );
730  hs02_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs02_[ism-1] );
731 
732  }
733 
734  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
735 
736  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain12/EBTPT shape " + Numbers::sEB(ism) + " G12" );
737  hs03_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs03_[ism-1] );
738 
739  }
740 
741  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
742 
743  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain01/EBTPT PNs amplitude " + Numbers::sEB(ism) + " G01" );
744  i01_[ism-1] = UtilsClient::getHisto( me, cloneME_, i01_[ism-1] );
745 
746  }
747 
748 
749  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
750 
751  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain16/EBTPT PNs amplitude " + Numbers::sEB(ism) + " G16" );
752  i02_[ism-1] = UtilsClient::getHisto( me, cloneME_, i02_[ism-1] );
753 
754  }
755 
756  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
757 
758  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain01/EBTPT PNs pedestal " + Numbers::sEB(ism) + " G01" );
759  i03_[ism-1] = UtilsClient::getHisto( me, cloneME_, i03_[ism-1] );
760 
761  }
762 
763  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
764 
765  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain16/EBTPT PNs pedestal " + Numbers::sEB(ism) + " G16" );
766  i04_[ism-1] = UtilsClient::getHisto( me, cloneME_, i04_[ism-1] );
767 
768  }
769 
770  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
771  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
772  if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
773 
774  if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
775  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
776 
777  if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
778  if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
779  if ( mea03_[ism-1] ) mea03_[ism-1]->Reset();
780 
781  if ( mer04_[ism-1] ) mer04_[ism-1]->Reset();
782  if ( mer05_[ism-1] ) mer05_[ism-1]->Reset();
783 
784  if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
785  if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
786  if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset();
787 
788  float meanAmpl01, meanAmpl02, meanAmpl03;
789 
790  int nCry01, nCry02, nCry03;
791 
792  meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.;
793 
794  nCry01 = nCry02 = nCry03 = 0;
795 
796  for ( int ie = 1; ie <= 85; ie++ ) {
797  for ( int ip = 1; ip <= 20; ip++ ) {
798 
799  bool update01;
800  bool update02;
801  bool update03;
802 
803  float num01, num02, num03;
804  float mean01, mean02, mean03;
805  float rms01, rms02, rms03;
806 
807  update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01);
808  update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02);
809  update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03);
810 
811  if ( update01 ) {
812  meanAmpl01 += mean01;
813  nCry01++;
814  }
815 
816  if ( update02 ) {
817  meanAmpl02 += mean02;
818  nCry02++;
819  }
820 
821  if ( update03 ) {
822  meanAmpl03 += mean03;
823  nCry03++;
824  }
825 
826  }
827  }
828 
829  if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01);
830  if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02);
831  if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03);
832 
833  for ( int ie = 1; ie <= 85; ie++ ) {
834  for ( int ip = 1; ip <= 20; ip++ ) {
835 
836  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. );
837  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. );
838  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. );
839 
840  bool update01;
841  bool update02;
842  bool update03;
843 
844  float num01, num02, num03;
845  float mean01, mean02, mean03;
846  float rms01, rms02, rms03;
847 
848  update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01);
849  update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02);
850  update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03);
851 
852  if ( update01 ) {
853 
854  float val;
855 
856  val = 1.;
857  if ( std::abs(mean01 - meanAmpl01) > std::abs(percentVariation_ * meanAmpl01) || mean01 < amplitudeThreshold_ )
858  val = 0.;
859  if ( rms01 > RMSThreshold_ )
860  val = 0.;
861  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, val );
862 
863  int ic = Numbers::icEB(ism, ie, ip);
864 
865  if ( mea01_[ism-1] ) {
866  if ( mean01 > 0. ) {
867  mea01_[ism-1]->setBinContent( ic, mean01 );
868  mea01_[ism-1]->setBinError( ic, rms01 );
869  } else {
870  mea01_[ism-1]->setEntries( 1.+mea01_[ism-1]->getEntries() );
871  }
872  }
873 
874  }
875 
876  if ( update02 ) {
877 
878  float val;
879 
880  val = 1.;
881  if ( std::abs(mean02 - meanAmpl02) > std::abs(percentVariation_ * meanAmpl02) || mean02 < amplitudeThreshold_ )
882  val = 0.;
883  if ( rms02 > RMSThreshold_ )
884  val = 0.;
885  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, val );
886 
887  int ic = Numbers::icEB(ism, ie, ip);
888 
889  if ( mea02_[ism-1] ) {
890  if ( mean02 > 0. ) {
891  mea02_[ism-1]->setBinContent( ic, mean02 );
892  mea02_[ism-1]->setBinError( ic, rms02 );
893  } else {
894  mea02_[ism-1]->setEntries( 1.+mea02_[ism-1]->getEntries() );
895  }
896  }
897 
898  }
899 
900  if ( update03 ) {
901 
902  float val;
903 
904  val = 1.;
905  if ( std::abs(mean03 - meanAmpl03) > std::abs(percentVariation_ * meanAmpl03) || mean03 < amplitudeThreshold_ )
906  val = 0.;
907  if ( rms03 > RMSThreshold_ )
908  val = 0.;
909  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, val );
910 
911  int ic = Numbers::icEB(ism, ie, ip);
912 
913  if ( mea03_[ism-1] ) {
914  if ( mean03 > 0. ) {
915  mea03_[ism-1]->setBinContent( ic, mean03 );
916  mea03_[ism-1]->setBinError( ic, rms03 );
917  } else {
918  mea03_[ism-1]->setEntries( 1.+mea03_[ism-1]->getEntries() );
919  }
920  }
921 
922  }
923 
924  if ( Masks::maskChannel(ism, ie, ip, bits01, EcalBarrel) ) UtilsClient::maskBinContent( meg01_[ism-1], ie, ip );
925  if ( Masks::maskChannel(ism, ie, ip, bits02, EcalBarrel) ) UtilsClient::maskBinContent( meg02_[ism-1], ie, ip );
926  if ( Masks::maskChannel(ism, ie, ip, bits03, EcalBarrel) ) UtilsClient::maskBinContent( meg03_[ism-1], ie, ip );
927 
928  }
929  }
930 
931  for ( int i = 1; i <= 10; i++ ) {
932 
933  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. );
934  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
935 
936  bool update01;
937  bool update02;
938  bool update03;
939  bool update04;
940 
941  float num01, num02, num03, num04;
942  float mean01, mean02, mean03, mean04;
943  float rms01, rms02, rms03, rms04;
944 
945  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
946  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
947  update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 0, num03, mean03, rms03);
948  update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 0, num04, mean04, rms04);
949 
950  if ( mer04_[ism-1] ) mer04_[ism-1]->Fill(rms03);
951  if ( mer05_[ism-1] ) mer05_[ism-1]->Fill(rms04);
952 
953  if ( update01 && update03 ) {
954 
955  float val;
956 
957  val = 1.;
958  if ( mean01 < amplitudeThresholdPnG01_ )
959  val = 0.;
960  if ( mean03 < pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
961  pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean03)
962  val = 0.;
963  if ( rms03 > pedPnRMSThreshold_[0] )
964  val = 0.;
965  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent(i, 1, val);
966 
967  }
968 
969  if ( update02 && update04 ) {
970 
971  float val;
972 
973  val = 1.;
974  if ( mean02 < amplitudeThresholdPnG16_ )
975  val = 0.;
976  if ( mean04 < pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
977  pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean04)
978  val = 0.;
979  if ( rms04 > pedPnRMSThreshold_[1] )
980  val = 0.;
981  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent(i, 1, val);
982 
983  }
984 
985  if ( Masks::maskPn(ism, i, bits01|bits04, EcalBarrel) ) UtilsClient::maskBinContent( meg04_[ism-1], i, 1 );
986  if ( Masks::maskPn(ism, i, bits03|bits05, EcalBarrel) ) UtilsClient::maskBinContent( meg05_[ism-1], i, 1 );
987 
988  }
989 
990  for ( int i = 1; i <= 10; i++ ) {
991 
992  if ( hs01_[ism-1] ) {
993  int ic = UtilsClient::getFirstNonEmptyChannel( hs01_[ism-1] );
994  if ( me_hs01_[ism-1] ) {
995  me_hs01_[ism-1]->setBinContent( i, hs01_[ism-1]->GetBinContent(ic, i) );
996  me_hs01_[ism-1]->setBinError( i, hs01_[ism-1]->GetBinError(ic, i) );
997  }
998  }
999 
1000  if ( hs02_[ism-1] ) {
1001  int ic = UtilsClient::getFirstNonEmptyChannel( hs02_[ism-1] );
1002  if ( me_hs02_[ism-1] ) {
1003  me_hs02_[ism-1]->setBinContent( i, hs02_[ism-1]->GetBinContent(ic, i) );
1004  me_hs02_[ism-1]->setBinError( i, hs02_[ism-1]->GetBinError(ic, i) );
1005  }
1006  }
1007 
1008  if ( hs03_[ism-1] ) {
1009  int ic = UtilsClient::getFirstNonEmptyChannel( hs03_[ism-1] );
1010  if ( me_hs03_[ism-1] ) {
1011  me_hs03_[ism-1]->setBinContent( i, hs03_[ism-1]->GetBinContent(ic, i) );
1012  me_hs03_[ism-1]->setBinError( i, hs03_[ism-1]->GetBinError(ic, i) );
1013  }
1014  }
1015 
1016  }
1017 
1018  }
1019 
1020 }
1021 
int adc(sample_type sample)
get the ADC sample (12 bits)
float pedPnDiscrepancyMean_[2]
TProfile * i02_[36]
Cache logicID vector from database.
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
void setPedRMSG1(float mean)
Definition: MonPNMGPADat.h:36
void setBinContent(int binx, double content)
set content of bin (1-D)
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:57
static const int TESTPULSE_LOW_GAIN_RMS_ERROR
MonitorElement * meg05_[36]
TProfile2D * ha02_[36]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:873
void setADCRMSG1(float rms)
void endJob(void)
EndJob.
void setup(void)
Setup.
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:89
Some &quot;id&quot; conversions.
static std::string sEB(const unsigned ism)
Definition: Numbers.cc:91
void beginRun(void)
BeginRun.
static const int PEDESTAL_HIGH_GAIN_MEAN_ERROR
static bool getBinQuality(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin quality is good or masked.
Definition: UtilsClient.cc:201
TProfile2D * ha03_[36]
MonitorElement * meg03_[36]
MonitorElement * mea01_[36]
MonitorElement * me_hs03_[36]
MonitorElement * meg02_[36]
void beginJob(void)
BeginJob.
void setADCMeanG1(float mean)
void setADCMeanG6(float mean)
MonitorElement * mer05_[36]
static const int TESTPULSE_MIDDLE_GAIN_MEAN_ERROR
void setTaskStatus(bool status)
Definition: MonPNMGPADat.h:45
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
static unsigned icEB(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:726
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.cc:231
void cleanup(void)
Cleanup.
MonitorElement * mea03_[36]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:109
void setSamples(std::vector< float > &samples, int gain)
void Fill(long long x)
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
Definition: UtilsClient.cc:216
MonitorElement * mea02_[36]
static const int TESTPULSE_MIDDLE_GAIN_RMS_ERROR
void setADCMeanG12(float mean)
void setADCMeanG16(float mean)
Definition: MonPNMGPADat.h:27
EBTestPulseClient(const edm::ParameterSet &ps)
Constructor.
std::vector< int > MGPAGainsPN_
std::vector< int > MGPAGains_
void setTaskStatus(bool status)
void removeElement(const std::string &name)
Definition: DQMStore.cc:2773
channel masking
TProfile2D * hs03_[36]
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int TESTPULSE_HIGH_GAIN_RMS_ERROR
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
Definition: Numbers.cc:695
void setADCRMSG12(float rms)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * meg04_[36]
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1624
TProfile * i01_[36]
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
virtual ~EBTestPulseClient()
Destructor.
static bool getBinStatistics(TH1 *histo, const int ix, const int iy, float &num, float &mean, float &rms, float minEntries=1.)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.cc:74
TProfile2D * ha01_[36]
static const int TESTPULSE_LOW_GAIN_MEAN_ERROR
void setADCRMSG6(float rms)
void endRun(void)
EndRun.
MonitorElement * me_hs02_[36]
void setPedMeanG16(float mean)
Definition: MonPNMGPADat.h:39
void setADCRMSG1(float mean)
Definition: MonPNMGPADat.h:24
TProfile2D * hs01_[36]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
TProfile * i03_[36]
void setADCMeanG1(float mean)
Definition: MonPNMGPADat.h:21
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
std::vector< int > superModules_
tuple cout
Definition: gather_cfg.py:121
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
MonitorElement * mer04_[36]
static const int TESTPULSE_HIGH_GAIN_MEAN_ERROR
tuple status
Definition: ntuplemaker.py:245
void setADCRMSG16(float mean)
Definition: MonPNMGPADat.h:30
MonitorElement * me_hs01_[36]
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1001
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
Definition: LogicID.h:29
MonitorElement * meg01_[36]
Definition: RunIOV.h:13
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
TProfile2D * hs02_[36]
void setPedMeanG1(float mean)
Definition: MonPNMGPADat.h:33
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
Definition: UtilsClient.cc:14
void analyze(void)
Analyze.
void setPedRMSG16(float mean)
Definition: MonPNMGPADat.h:42
TProfile * i04_[36]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
Definition: UtilsClient.cc:246