CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
EEIntegrityTask Class Reference

#include <EEIntegrityTask.h>

Inheritance diagram for EEIntegrityTask:
edm::EDAnalyzer

Public Member Functions

 EEIntegrityTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EEIntegrityTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 BeginLuminosityBlock. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 EndLuminosityBlock. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

DQMStoredqmStore_
 
edm::InputTag EcalElectronicsIdCollection1_
 
edm::InputTag EcalElectronicsIdCollection2_
 
edm::InputTag EcalElectronicsIdCollection3_
 
edm::InputTag EcalElectronicsIdCollection4_
 
edm::InputTag EcalElectronicsIdCollection5_
 
edm::InputTag EcalElectronicsIdCollection6_
 
edm::InputTag EEDetIdCollection0_
 
edm::InputTag EEDetIdCollection1_
 
edm::InputTag EEDetIdCollection2_
 
edm::InputTag EEDetIdCollection3_
 
edm::InputTag EEDetIdCollection4_
 
bool enableCleanup_
 
int ievt_
 
bool init_
 
MonitorElementmeIntegrityChId [18]
 
MonitorElementmeIntegrityDCCSize
 
MonitorElementmeIntegrityErrorsByLumi
 
MonitorElementmeIntegrityGain [18]
 
MonitorElementmeIntegrityGainSwitch [18]
 
MonitorElementmeIntegrityMemChId [18]
 
MonitorElementmeIntegrityMemGain [18]
 
MonitorElementmeIntegrityMemTTBlockSize [18]
 
MonitorElementmeIntegrityMemTTId [18]
 
MonitorElementmeIntegrityTTBlockSize [18]
 
MonitorElementmeIntegrityTTId [18]
 
bool mergeRuns_
 
std::string prefixME_
 
std::string subfolder_
 

Static Private Attributes

static const int chMemAbscissa [25]
 
static const int chMemOrdinate [25]
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 21 of file EEIntegrityTask.h.

Constructor & Destructor Documentation

EEIntegrityTask::EEIntegrityTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 29 of file EEIntegrityTask.cc.

References dqmStore_, EcalElectronicsIdCollection1_, EcalElectronicsIdCollection2_, EcalElectronicsIdCollection3_, EcalElectronicsIdCollection4_, EcalElectronicsIdCollection5_, EcalElectronicsIdCollection6_, EEDetIdCollection0_, EEDetIdCollection1_, EEDetIdCollection2_, EEDetIdCollection3_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, mergeRuns_, cppFunctionSkipper::operator, prefixME_, and subfolder_.

29  {
30 
31  init_ = false;
32 
34 
35  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
36 
37  subfolder_ = ps.getUntrackedParameter<std::string>("subfolder", "");
38 
39  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
40 
41  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
42 
43  EEDetIdCollection0_ = ps.getParameter<edm::InputTag>("EEDetIdCollection0");
44  EEDetIdCollection1_ = ps.getParameter<edm::InputTag>("EEDetIdCollection1");
45  EEDetIdCollection2_ = ps.getParameter<edm::InputTag>("EEDetIdCollection2");
46  EEDetIdCollection3_ = ps.getParameter<edm::InputTag>("EEDetIdCollection3");
47  EcalElectronicsIdCollection1_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection1");
48  EcalElectronicsIdCollection2_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection2");
49  EcalElectronicsIdCollection3_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection3");
50  EcalElectronicsIdCollection4_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection4");
51  EcalElectronicsIdCollection5_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection5");
52  EcalElectronicsIdCollection6_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection6");
53 
55  for (int i = 0; i < 18; i++) {
56  meIntegrityGain[i] = 0;
57  meIntegrityChId[i] = 0;
59  meIntegrityTTId[i] = 0;
61  meIntegrityMemChId[i] = 0;
62  meIntegrityMemGain[i] = 0;
63  meIntegrityMemTTId[i] = 0;
65  }
67 }
edm::InputTag EEDetIdCollection3_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::InputTag EEDetIdCollection2_
MonitorElement * meIntegrityTTId[18]
edm::InputTag EEDetIdCollection0_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityTTBlockSize[18]
MonitorElement * meIntegrityDCCSize
edm::InputTag EcalElectronicsIdCollection1_
edm::InputTag EcalElectronicsIdCollection3_
edm::InputTag EcalElectronicsIdCollection5_
std::string prefixME_
MonitorElement * meIntegrityGainSwitch[18]
MonitorElement * meIntegrityMemChId[18]
edm::InputTag EEDetIdCollection1_
MonitorElement * meIntegrityGain[18]
edm::InputTag EcalElectronicsIdCollection4_
MonitorElement * meIntegrityMemTTId[18]
DQMStore * dqmStore_
edm::InputTag EcalElectronicsIdCollection6_
std::string subfolder_
MonitorElement * meIntegrityMemGain[18]
MonitorElement * meIntegrityChId[18]
edm::InputTag EcalElectronicsIdCollection2_
MonitorElement * meIntegrityMemTTBlockSize[18]
EEIntegrityTask::~EEIntegrityTask ( )
virtual

Destructor.

Definition at line 70 of file EEIntegrityTask.cc.

70  {
71 
72 }

Member Function Documentation

void EEIntegrityTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 348 of file EEIntegrityTask.cc.

References chMemAbscissa, chMemOrdinate, Numbers::crystals(), EcalElectronicsIdCollection1_, EcalElectronicsIdCollection2_, EcalElectronicsIdCollection3_, EcalElectronicsIdCollection4_, EcalElectronicsIdCollection5_, EcalElectronicsIdCollection6_, EcalEndcap, EEDetIdCollection0_, EEDetIdCollection1_, EEDetIdCollection2_, EEDetIdCollection3_, MonitorElement::Fill(), edm::Event::getByLabel(), i, ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), EEDetId::ix(), meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, setup(), and Numbers::subDet().

348  {
349 
350  if ( ! init_ ) this->setup();
351 
352  ievt_++;
353 
354  // fill bin 0 with number of events in the lumi
356 
358 
359  if ( e.getByLabel(EEDetIdCollection0_, ids0) ) {
360 
361  for ( EEDetIdCollection::const_iterator idItr = ids0->begin(); idItr != ids0->end(); ++idItr ) {
362 
363  int ism = Numbers::iSM( *idItr );
364 
365  float xism = ism + 0.5;
366 
368 
369  }
370 
371  } else {
372 
373 // edm::LogWarning("EEIntegrityTask") << EEDetIdCollection0_ << " not available";
374 
375  }
376 
378 
379  if ( e.getByLabel(EEDetIdCollection1_, ids1) ) {
380 
381  for ( EEDetIdCollection::const_iterator idItr = ids1->begin(); idItr != ids1->end(); ++idItr ) {
382 
383  EEDetId id = (*idItr);
384 
385  int ix = id.ix();
386  int iy = id.iy();
387 
388  int ism = Numbers::iSM( id );
389  float xism = ism + 0.5;
390 
391  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
392 
393  float xix = ix - 0.5;
394  float xiy = iy - 0.5;
395 
396  if ( meIntegrityGain[ism-1] ) meIntegrityGain[ism-1]->Fill(xix, xiy);
398 
399  }
400 
401  } else {
402 
403  edm::LogWarning("EEIntegrityTask") << EEDetIdCollection1_ << " not available";
404 
405  }
406 
408 
409  if ( e.getByLabel(EEDetIdCollection2_, ids2) ) {
410 
411  for ( EEDetIdCollection::const_iterator idItr = ids2->begin(); idItr != ids2->end(); ++idItr ) {
412 
413  EEDetId id = (*idItr);
414 
415  int ix = id.ix();
416  int iy = id.iy();
417 
418  int ism = Numbers::iSM( id );
419  float xism = ism + 0.5;
420 
421  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
422 
423  float xix = ix - 0.5;
424  float xiy = iy - 0.5;
425 
426  if ( meIntegrityChId[ism-1] ) meIntegrityChId[ism-1]->Fill(xix, xiy);
428 
429  }
430 
431  } else {
432 
433  edm::LogWarning("EEIntegrityTask") << EEDetIdCollection2_ << " not available";
434 
435  }
436 
438 
439  if ( e.getByLabel(EEDetIdCollection3_, ids3) ) {
440 
441  for ( EEDetIdCollection::const_iterator idItr = ids3->begin(); idItr != ids3->end(); ++idItr ) {
442 
443  EEDetId id = (*idItr);
444 
445  int ix = id.ix();
446  int iy = id.iy();
447 
448  int ism = Numbers::iSM( id );
449  float xism = ism + 0.5;
450 
451  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
452 
453  float xix = ix - 0.5;
454  float xiy = iy - 0.5;
455 
456  if ( meIntegrityGainSwitch[ism-1] ) meIntegrityGainSwitch[ism-1]->Fill(xix, xiy);
458 
459  }
460 
461  } else {
462 
463  edm::LogWarning("EEIntegrityTask") << EEDetIdCollection3_ << " not available";
464 
465  }
466 
468 
469  if ( e.getByLabel(EcalElectronicsIdCollection1_, ids4) ) {
470 
471  for ( EcalElectronicsIdCollection::const_iterator idItr = ids4->begin(); idItr != ids4->end(); ++idItr ) {
472 
473  if ( Numbers::subDet( *idItr ) != EcalEndcap ) continue;
474 
475  int ism = Numbers::iSM( *idItr );
476  float xism = ism + 0.5;
477 
478  std::vector<DetId>* crystals = Numbers::crystals( *idItr );
479 
480  for ( unsigned int i=0; i<crystals->size(); i++ ) {
481 
482  EEDetId id = (*crystals)[i];
483 
484  int ix = id.ix();
485  int iy = id.iy();
486 
487  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
488 
489  float xix = ix - 0.5;
490  float xiy = iy - 0.5;
491 
492  if ( meIntegrityTTId[ism-1] ) meIntegrityTTId[ism-1]->Fill(xix, xiy);
493  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./34./crystals->size());
494 
495  }
496 
497  }
498 
499  } else {
500 
501  edm::LogWarning("EEIntegrityTask") << EcalElectronicsIdCollection1_ << " not available";
502 
503  }
504 
506 
507  if ( e.getByLabel(EcalElectronicsIdCollection2_, ids5) ) {
508 
509  for ( EcalElectronicsIdCollection::const_iterator idItr = ids5->begin(); idItr != ids5->end(); ++idItr ) {
510 
511  if ( Numbers::subDet( *idItr ) != EcalEndcap ) continue;
512 
513  int ism = Numbers::iSM( *idItr );
514  float xism = ism + 0.5;
515 
516  std::vector<DetId>* crystals = Numbers::crystals( *idItr );
517 
518  for ( unsigned int i=0; i<crystals->size(); i++ ) {
519 
520  EEDetId id = (*crystals)[i];
521 
522  int ix = id.ix();
523  int iy = id.iy();
524 
525  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
526 
527  float xix = ix - 0.5;
528  float xiy = iy - 0.5;
529 
530  if ( meIntegrityTTBlockSize[ism-1] ) meIntegrityTTBlockSize[ism-1]->Fill(xix, xiy);
531  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./34./crystals->size());
532 
533  }
534 
535  }
536 
537  } else {
538 
539  edm::LogWarning("EEIntegrityTask") << EcalElectronicsIdCollection2_ << " not available";
540 
541  }
542 
544 
545  if ( e.getByLabel(EcalElectronicsIdCollection3_, ids6) ) {
546 
547  for ( EcalElectronicsIdCollection::const_iterator idItr = ids6->begin(); idItr != ids6->end(); ++idItr ) {
548 
549  if ( Numbers::subDet( *idItr ) != EcalEndcap ) continue;
550 
551  int ism = Numbers::iSM( *idItr );
552 
553  int itt = idItr->towerId();
554  float iTt = itt + 0.5 - 69;
555 
556  if ( meIntegrityMemTTId[ism-1] ) meIntegrityMemTTId[ism-1]->Fill(iTt,0);
557 
558  }
559 
560  } else {
561 
562  edm::LogWarning("EEIntegrityTask") << EcalElectronicsIdCollection3_ << " not available";
563 
564  }
565 
567 
568  if ( e.getByLabel(EcalElectronicsIdCollection4_, ids7) ) {
569 
570  for ( EcalElectronicsIdCollection::const_iterator idItr = ids7->begin(); idItr != ids7->end(); ++idItr ) {
571 
572  if ( Numbers::subDet( *idItr ) != EcalEndcap ) continue;
573 
574  int ism = Numbers::iSM( *idItr );
575 
576  int itt = idItr->towerId();
577  float iTt = itt + 0.5 - 69;
578 
579  if ( meIntegrityMemTTBlockSize[ism-1] ) meIntegrityMemTTBlockSize[ism-1]->Fill(iTt,0);
580 
581  }
582 
583  } else {
584 
585  edm::LogWarning("EEIntegrityTask") << EcalElectronicsIdCollection4_ << " not available";
586 
587  }
588 
590 
591  if ( e.getByLabel(EcalElectronicsIdCollection5_, ids8) ) {
592 
593  for ( EcalElectronicsIdCollection::const_iterator idItr = ids8->begin(); idItr != ids8->end(); ++idItr ) {
594 
595  if ( Numbers::subDet( *idItr ) != EcalEndcap ) continue;
596 
597  int ism = Numbers::iSM( *idItr );
598 
599  int chid = idItr->channelId();
600  int ie = EEIntegrityTask::chMemAbscissa[chid-1];
601  int ip = EEIntegrityTask::chMemOrdinate[chid-1];
602 
603  int itt = idItr->towerId();
604  ie += (itt-69)*5;
605 
606  float xix = ie - 0.5;
607  float xiy = ip - 0.5;
608 
609  if ( meIntegrityMemChId[ism-1] ) meIntegrityMemChId[ism-1]->Fill(xix,xiy);
610 
611  }
612 
613  } else {
614 
615  edm::LogWarning("EEIntegrityTask") << EcalElectronicsIdCollection5_ << " not available";
616 
617  }
618 
620 
621  if ( e.getByLabel(EcalElectronicsIdCollection6_, ids9) ) {
622 
623  for ( EcalElectronicsIdCollection::const_iterator idItr = ids9->begin(); idItr != ids9->end(); ++idItr ) {
624 
625  if ( Numbers::subDet( *idItr ) != EcalEndcap ) continue;
626 
627  int ism = Numbers::iSM( *idItr );
628 
629  int chid = idItr->channelId();
630  int ie = EEIntegrityTask::chMemAbscissa[chid-1];
631  int ip = EEIntegrityTask::chMemOrdinate[chid-1];
632 
633  int itt = idItr->towerId();
634  ie += (itt-69)*5;
635 
636  float xix = ie - 0.5;
637  float xiy = ip - 0.5;
638 
639  if ( meIntegrityMemGain[ism-1] ) meIntegrityMemGain[ism-1]->Fill(xix,xiy);
640 
641  }
642 
643  } else {
644 
645  edm::LogWarning("EEIntegrityTask") << EcalElectronicsIdCollection6_ << " not available";
646 
647  }
648 
649 }// end analyze
edm::InputTag EEDetIdCollection3_
int i
Definition: DBlmapReader.cc:9
edm::InputTag EEDetIdCollection2_
MonitorElement * meIntegrityTTId[18]
int ix() const
Definition: EEDetId.h:71
edm::InputTag EEDetIdCollection0_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityTTBlockSize[18]
MonitorElement * meIntegrityDCCSize
edm::InputTag EcalElectronicsIdCollection1_
edm::InputTag EcalElectronicsIdCollection3_
void Fill(long long x)
void setup(void)
Setup.
edm::InputTag EcalElectronicsIdCollection5_
static std::vector< DetId > * crystals(const EcalTrigTowerDetId &id)
Definition: Numbers.cc:585
MonitorElement * meIntegrityGainSwitch[18]
MonitorElement * meIntegrityMemChId[18]
edm::InputTag EEDetIdCollection1_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
static const int chMemAbscissa[25]
MonitorElement * meIntegrityGain[18]
edm::InputTag EcalElectronicsIdCollection4_
MonitorElement * meIntegrityMemTTId[18]
static const int chMemOrdinate[25]
edm::InputTag EcalElectronicsIdCollection6_
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
MonitorElement * meIntegrityMemGain[18]
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
MonitorElement * meIntegrityChId[18]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
edm::InputTag EcalElectronicsIdCollection2_
MonitorElement * meIntegrityMemTTBlockSize[18]
std::vector< T >::const_iterator const_iterator
Definition: EDCollection.h:20
void EEIntegrityTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 74 of file EEIntegrityTask.cc.

References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), DQMStore::setCurrentFolder(), and subfolder_.

74  {
75 
76  ievt_ = 0;
77 
78  if ( dqmStore_ ) {
79  dqmStore_->setCurrentFolder(prefixME_ + "/EEIntegrityTask");
80  if(subfolder_.size())
81  dqmStore_->setCurrentFolder(prefixME_ + "/EEIntegrityTask/" + subfolder_);
82  dqmStore_->rmdir(prefixME_ + "/EEIntegrityTask");
83  }
84 
85 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2530
std::string prefixME_
DQMStore * dqmStore_
std::string subfolder_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void EEIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 87 of file EEIntegrityTask.cc.

References meIntegrityErrorsByLumi, and MonitorElement::Reset().

87  {
88 
90 
91 }
MonitorElement * meIntegrityErrorsByLumi
void Reset(void)
reset ME (ie. contents, errors, etc)
void EEIntegrityTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 96 of file EEIntegrityTask.cc.

References Numbers::initGeometry(), mergeRuns_, and reset().

96  {
97 
98  Numbers::initGeometry(c, false);
99 
100  if ( ! mergeRuns_ ) this->reset();
101 
102 }
void reset(void)
Reset.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:50
void EEIntegrityTask::cleanup ( void  )
protected

Cleanup.

Definition at line 260 of file EEIntegrityTask.cc.

References dir, dqmStore_, edm::getName(), MonitorElement::getName(), i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, prefixME_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), and subfolder_.

Referenced by endJob().

260  {
261 
262  if ( ! init_ ) return;
263 
264  if ( dqmStore_ ) {
265 
266  std::string dir;
267 
268  dir = prefixME_ + "/EEIntegrityTask";
269  if(subfolder_.size())
270  dir += "/" + subfolder_;
271 
272  dqmStore_->setCurrentFolder(dir + "");
273 
275  meIntegrityDCCSize = 0;
276 
279 
280  dqmStore_->setCurrentFolder(dir + "/Gain");
281  for (int i = 0; i < 18; i++) {
283  meIntegrityGain[i] = 0;
284  }
285 
286  dqmStore_->setCurrentFolder(dir + "/ChId");
287  for (int i = 0; i < 18; i++) {
289  meIntegrityChId[i] = 0;
290  }
291 
292  dqmStore_->setCurrentFolder(dir + "/GainSwitch");
293  for (int i = 0; i < 18; i++) {
296  }
297 
298  dqmStore_->setCurrentFolder(dir + "/TTId");
299  for (int i = 0; i < 18; i++) {
301  meIntegrityTTId[i] = 0;
302  }
303 
304  dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
305  for (int i = 0; i < 18; i++) {
308  }
309 
310  dqmStore_->setCurrentFolder(dir + "/MemChId");
311  for (int i = 0; i < 18; i++) {
313  meIntegrityMemChId[i] = 0;
314  }
315 
316  dqmStore_->setCurrentFolder(dir + "/MemGain");
317  for (int i = 0; i < 18; i++) {
319  meIntegrityMemGain[i] = 0;
320  }
321 
322  dqmStore_->setCurrentFolder(dir + "/MemTTId");
323  for (int i = 0; i < 18; i++) {
325  meIntegrityMemTTId[i] = 0;
326  }
327 
328  dqmStore_->setCurrentFolder(dir + "/MemSize");
329  for (int i = 0; i < 18; i++) {
332  }
333 
334  }
335 
336  init_ = false;
337 
338 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTId[18]
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityTTBlockSize[18]
MonitorElement * meIntegrityDCCSize
std::string prefixME_
MonitorElement * meIntegrityGainSwitch[18]
MonitorElement * meIntegrityMemChId[18]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2572
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
MonitorElement * meIntegrityGain[18]
MonitorElement * meIntegrityMemTTId[18]
DQMStore * dqmStore_
std::string subfolder_
MonitorElement * meIntegrityMemGain[18]
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * meIntegrityChId[18]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
MonitorElement * meIntegrityMemTTBlockSize[18]
void EEIntegrityTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 340 of file EEIntegrityTask.cc.

References cleanup(), enableCleanup_, and ievt_.

340  {
341 
342  edm::LogInfo("EEIntegrityTask") << "analyzed " << ievt_ << " events";
343 
344  if ( enableCleanup_ ) this->cleanup();
345 
346 }
void cleanup(void)
Cleanup.
void EEIntegrityTask::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

EndLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 93 of file EEIntegrityTask.cc.

93  {
94 }
void EEIntegrityTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 104 of file EEIntegrityTask.cc.

104  {
105 
106 }
void EEIntegrityTask::reset ( void  )
protected

Reset.

Definition at line 108 of file EEIntegrityTask.cc.

References i, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, and MonitorElement::Reset().

Referenced by beginRun().

108  {
109 
111  for (int i = 0; i < 18; i++) {
113  if ( meIntegrityChId[i] ) meIntegrityChId[i]->Reset();
115  if ( meIntegrityTTId[i] ) meIntegrityTTId[i]->Reset();
121  }
123 
124 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTId[18]
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityTTBlockSize[18]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityGainSwitch[18]
MonitorElement * meIntegrityMemChId[18]
MonitorElement * meIntegrityGain[18]
MonitorElement * meIntegrityMemTTId[18]
MonitorElement * meIntegrityMemGain[18]
MonitorElement * meIntegrityChId[18]
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meIntegrityMemTTBlockSize[18]
void EEIntegrityTask::setup ( void  )
protected

Setup.

Definition at line 126 of file EEIntegrityTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), dir, dqmStore_, i, init_, Numbers::ix0EE(), Numbers::iy0EE(), meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), MonitorElement::setLumiFlag(), subfolder_, and DQMStore::tag().

Referenced by analyze().

126  {
127 
128  init_ = true;
129 
130  std::string name;
131  std::string dir;
132 
133  if ( dqmStore_ ) {
134 
135  dir = prefixME_ + "/EEIntegrityTask";
136  if(subfolder_.size())
137  dir += "/" + subfolder_;
138 
140 
141  // checking when number of towers in data different than expected from header
142  name = "EEIT DCC size error";
143  meIntegrityDCCSize = dqmStore_->book1D(name, name, 18, 1., 19.);
144  for (int i = 0; i < 18; i++) {
145  meIntegrityDCCSize->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
146  }
147 
148  // checking the number of integrity errors in each DCC for each lumi
149  // crystal integrity error is weighted by 1/850
150  // tower integrity error is weighted by 1/34
151  // bin 0 contains the number of processed events in the lumi (for normalization)
152  name = "EEIT weighted integrity errors by lumi";
153  meIntegrityErrorsByLumi = dqmStore_->book1D(name, name, 18, 1., 19.);
155  for (int i = 0; i < 18; i++) {
157  }
158 
159  // checking when the gain is 0
160  dqmStore_->setCurrentFolder(dir + "/Gain");
161  for (int i = 0; i < 18; i++) {
162  name = "EEIT gain " + Numbers::sEE(i+1);
163  meIntegrityGain[i] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50.);
164  meIntegrityGain[i]->setAxisTitle("ix", 1);
165  if ( i+1 >= 1 && i+1 <= 9 ) meIntegrityGain[i]->setAxisTitle("101-ix", 1);
166  meIntegrityGain[i]->setAxisTitle("iy", 2);
167  dqmStore_->tag(meIntegrityGain[i], i+1);
168  }
169 
170  // checking when channel has unexpected or invalid ID
171  dqmStore_->setCurrentFolder(dir + "/ChId");
172  for (int i = 0; i < 18; i++) {
173  name = "EEIT ChId " + Numbers::sEE(i+1);
174  meIntegrityChId[i] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50.);
175  meIntegrityChId[i]->setAxisTitle("ix", 1);
176  if ( i+1 >= 1 && i+1 <= 9 ) meIntegrityChId[i]->setAxisTitle("101-ix", 1);
177  meIntegrityChId[i]->setAxisTitle("iy", 2);
178  dqmStore_->tag(meIntegrityChId[i], i+1);
179  }
180 
181  // checking when channel has unexpected or invalid ID
182  dqmStore_->setCurrentFolder(dir + "/GainSwitch");
183  for (int i = 0; i < 18; i++) {
184  name = "EEIT gain switch " + Numbers::sEE(i+1);
185  meIntegrityGainSwitch[i] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50.);
187  if ( i+1 >= 1 && i+1 <= 9 ) meIntegrityGainSwitch[i]->setAxisTitle("101-ix", 1);
190  }
191 
192  // checking when trigger tower has unexpected or invalid ID
193  dqmStore_->setCurrentFolder(dir + "/TTId");
194  for (int i = 0; i < 18; i++) {
195  name = "EEIT TTId " + Numbers::sEE(i+1);
196  meIntegrityTTId[i] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50.);
197  meIntegrityTTId[i]->setAxisTitle("ix", 1);
198  if ( i+1 >= 1 && i+1 <= 9 ) meIntegrityTTId[i]->setAxisTitle("101-ix", 1);
199  meIntegrityTTId[i]->setAxisTitle("iy", 2);
200  dqmStore_->tag(meIntegrityTTId[i], i+1);
201  }
202 
203  // checking when trigger tower has unexpected or invalid size
204  dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
205  for (int i = 0; i < 18; i++) {
206  name = "EEIT TTBlockSize " + Numbers::sEE(i+1);
207  meIntegrityTTBlockSize[i] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50.);
209  if ( i+1 >= 1 && i+1 <= 9 ) meIntegrityTTBlockSize[i]->setAxisTitle("101-ix", 1);
212  }
213 
214  // checking when mem channels have unexpected ID
215  dqmStore_->setCurrentFolder(dir + "/MemChId");
216  for (int i = 0; i < 18; i++) {
217  name = "EEIT MemChId " + Numbers::sEE(i+1);
218  meIntegrityMemChId[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
219  meIntegrityMemChId[i]->setAxisTitle("pseudo-strip", 1);
220  meIntegrityMemChId[i]->setAxisTitle("channel", 2);
222  }
223 
224  // checking when mem samples have second bit encoding the gain different from 0
225  // note: strictly speaking, this does not corrupt the mem sample gain value (since only first bit is considered)
226  // but indicates that data are not completely correct
227  dqmStore_->setCurrentFolder(dir + "/MemGain");
228  for (int i = 0; i < 18; i++) {
229  name = "EEIT MemGain " + Numbers::sEE(i+1);
230  meIntegrityMemGain[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
231  meIntegrityMemGain[i]->setAxisTitle("pseudo-strip", 1);
232  meIntegrityMemGain[i]->setAxisTitle("channel", 2);
234  }
235 
236  // checking when mem tower block has unexpected ID
237  dqmStore_->setCurrentFolder(dir + "/MemTTId");
238  for (int i = 0; i < 18; i++) {
239  name = "EEIT MemTTId " + Numbers::sEE(i+1);
240  meIntegrityMemTTId[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
241  meIntegrityMemTTId[i]->setAxisTitle("pseudo-strip", 1);
242  meIntegrityMemTTId[i]->setAxisTitle("channel", 2);
244  }
245 
246  // checking when mem tower block has invalid size
247  dqmStore_->setCurrentFolder(dir + "/MemSize");
248  for (int i = 0; i < 18; i++) {
249  name = "EEIT MemSize " + Numbers::sEE(i+1);
250  meIntegrityMemTTBlockSize[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
251  meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
252  meIntegrityMemTTBlockSize[i]->setAxisTitle("channel", 2);
254  }
255 
256  }
257 
258 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:226
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTId[18]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
MonitorElement * meIntegrityErrorsByLumi
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)
MonitorElement * meIntegrityTTBlockSize[18]
MonitorElement * meIntegrityDCCSize
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:812
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1354
std::string prefixME_
MonitorElement * meIntegrityGainSwitch[18]
MonitorElement * meIntegrityMemChId[18]
MonitorElement * meIntegrityGain[18]
MonitorElement * meIntegrityMemTTId[18]
DQMStore * dqmStore_
std::string subfolder_
MonitorElement * meIntegrityMemGain[18]
dbl *** dir
Definition: mlp_gen.cc:35
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
MonitorElement * meIntegrityChId[18]
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:845
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
MonitorElement * meIntegrityMemTTBlockSize[18]

Member Data Documentation

const int EEIntegrityTask::chMemAbscissa
staticprivate
Initial value:
= {
1, 1, 1, 1, 1,
2, 2, 2, 2, 2,
3, 3, 3, 3, 3,
4, 4, 4, 4, 4,
5, 5, 5, 5, 5
}

Definition at line 103 of file EEIntegrityTask.h.

Referenced by analyze().

const int EEIntegrityTask::chMemOrdinate
staticprivate
Initial value:
= {
1, 2, 3, 4, 5,
5, 4, 3, 2, 1,
1, 2, 3, 4, 5,
5, 4, 3, 2, 1,
1, 2, 3, 4, 5
}

Definition at line 104 of file EEIntegrityTask.h.

Referenced by analyze().

DQMStore* EEIntegrityTask::dqmStore_
private

Definition at line 67 of file EEIntegrityTask.h.

Referenced by beginJob(), cleanup(), EEIntegrityTask(), and setup().

edm::InputTag EEIntegrityTask::EcalElectronicsIdCollection1_
private

Definition at line 82 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EcalElectronicsIdCollection2_
private

Definition at line 83 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EcalElectronicsIdCollection3_
private

Definition at line 84 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EcalElectronicsIdCollection4_
private

Definition at line 85 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EcalElectronicsIdCollection5_
private

Definition at line 86 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EcalElectronicsIdCollection6_
private

Definition at line 87 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EEDetIdCollection0_
private

Definition at line 77 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EEDetIdCollection1_
private

Definition at line 78 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EEDetIdCollection2_
private

Definition at line 79 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EEDetIdCollection3_
private

Definition at line 80 of file EEIntegrityTask.h.

Referenced by analyze(), and EEIntegrityTask().

edm::InputTag EEIntegrityTask::EEDetIdCollection4_
private

Definition at line 81 of file EEIntegrityTask.h.

bool EEIntegrityTask::enableCleanup_
private

Definition at line 73 of file EEIntegrityTask.h.

Referenced by EEIntegrityTask(), and endJob().

int EEIntegrityTask::ievt_
private

Definition at line 65 of file EEIntegrityTask.h.

Referenced by analyze(), beginJob(), and endJob().

bool EEIntegrityTask::init_
private

Definition at line 101 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityChId[18]
private

Definition at line 89 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityDCCSize
private

Definition at line 98 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityErrorsByLumi
private

Definition at line 99 of file EEIntegrityTask.h.

Referenced by analyze(), beginLuminosityBlock(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityGain[18]
private

Definition at line 90 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityGainSwitch[18]
private

Definition at line 91 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityMemChId[18]
private

Definition at line 94 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityMemGain[18]
private

Definition at line 95 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityMemTTBlockSize[18]
private

Definition at line 97 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityMemTTId[18]
private

Definition at line 96 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityTTBlockSize[18]
private

Definition at line 93 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

MonitorElement* EEIntegrityTask::meIntegrityTTId[18]
private

Definition at line 92 of file EEIntegrityTask.h.

Referenced by analyze(), cleanup(), EEIntegrityTask(), reset(), and setup().

bool EEIntegrityTask::mergeRuns_
private

Definition at line 75 of file EEIntegrityTask.h.

Referenced by beginRun(), and EEIntegrityTask().

std::string EEIntegrityTask::prefixME_
private

Definition at line 69 of file EEIntegrityTask.h.

Referenced by beginJob(), cleanup(), EEIntegrityTask(), and setup().

std::string EEIntegrityTask::subfolder_
private

Definition at line 71 of file EEIntegrityTask.h.

Referenced by beginJob(), cleanup(), EEIntegrityTask(), and setup().