CMS 3D CMS Logo

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

#include <EBBeamCaloClient.h>

Inheritance diagram for EBBeamCaloClient:
EBClient

Public Member Functions

void analyze (void)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (void)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
 EBBeamCaloClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void endJob (void)
 EndJob. More...
 
void endRun (void)
 EndRun. More...
 
int getEvtPerJob ()
 Get Functions. More...
 
int getEvtPerRun ()
 Returns the number of processed events in this Run. More...
 
void setup (void)
 Setup. More...
 
virtual ~EBBeamCaloClient ()
 Destructor. More...
 
- Public Member Functions inherited from EBClient
virtual ~EBClient (void)
 

Private Attributes

float aveEne1_
 
float aveEne3x3_
 
std::vector< int > checkedSteps_
 
bool cloneME_
 
bool debug_
 
DQMStoredqmStore_
 
float E1Th_
 
float E3x3Th_
 
bool enableCleanup_
 
TH1F * hBAllNeededCry_
 
TH2F * hBBeamCentered_
 
TH1F * hBcryDone_
 
TH2F * hBCryOnBeam_
 
TH1F * hbDesync_
 
TH1F * hbE1MaxCry_
 
TProfile * hBE1vsCry_
 
TH1F * hBE3x3_
 
TH1F * hBE3x3Moving_
 
TProfile * hBE3x3vsCry_
 
TH1F * hBEne1_
 
TH1F * hBEntriesvsCry_
 
TH1F * hBGains_ [cryInArray_]
 
TH2F * hBMaxEneCry_
 
TH1F * hBNumReadCry_
 
TProfile * hBpulse_ [cryInArray_]
 
TH1F * hBReadCryErrors_
 
TH1F * hbTBmoving_
 
int ievt_
 
int jevt_
 
MonitorElementmeEBBCaloRedGreen_
 
MonitorElementmeEBBCaloRedGreenReadCry_
 
MonitorElementmeEBBCaloRedGreenSteps_
 
int minEvtNum_
 
TProfile * pBCriInBeamEvents_
 
std::string prefixME_
 
float prescaling_
 
float ReadCryErrThr_
 
float RMSEne3x3_
 
std::vector< int > superModules_
 
bool verbose_
 

Static Private Attributes

static const int cryInArray_ = 9
 

Detailed Description

Definition at line 34 of file EBBeamCaloClient.h.

Constructor & Destructor Documentation

EBBeamCaloClient::EBBeamCaloClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 33 of file EBBeamCaloClient.cc.

References aveEne1_, aveEne3x3_, checkedSteps_, cloneME_, cryInArray_, debug_, E1Th_, E3x3Th_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), hBAllNeededCry_, hBBeamCentered_, hBcryDone_, hBCryOnBeam_, hbDesync_, hbE1MaxCry_, hBE1vsCry_, hBE3x3_, hBE3x3Moving_, hBE3x3vsCry_, hBEne1_, hBEntriesvsCry_, hBGains_, hBMaxEneCry_, hBNumReadCry_, hBpulse_, hBReadCryErrors_, hbTBmoving_, i, meEBBCaloRedGreen_, meEBBCaloRedGreenReadCry_, meEBBCaloRedGreenSteps_, minEvtNum_, pBCriInBeamEvents_, prefixME_, prescaling_, ReadCryErrThr_, RMSEne3x3_, superModules_, and verbose_.

33  {
34 
35  // cloneME switch
36  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
37 
38  // verbose switch
39  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
40 
41  // debug switch
42  debug_ = ps.getUntrackedParameter<bool>("debug", false);
43 
44  // prefixME path
45  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
46 
47  // enableCleanup_ switch
48  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
49 
50  // vector of selected Super Modules (Defaults to all 36).
51  superModules_.reserve(36);
52  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
53  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
54 
55  checkedSteps_.reserve(86);
56  // there should be not more than a eta row in an autoscan
57  minEvtNum_ = 1800;//
58  //FIX ME, this should be configurable and change with the beam energy
59  aveEne1_ = 1850; E1Th_ = 900;
60  aveEne3x3_ = 2600; E3x3Th_ = 2600;
61  RMSEne3x3_ = 800;
62 
63  ReadCryErrThr_ = 0.01;// 1%
64  //FIX ME, this should follow the prescaling in the monitoring
65  prescaling_ = 20;
66 
68  for(int u=0;u<cryInArray_;u++) {
69  hBGains_[u] = 0;
70  hBpulse_[u] = 0;
71  //hBGainsMoving_[u] = 0;
72  }
73  hBEne1_ = 0;
74  //hBEne1Moving_ = 0;
75  hBAllNeededCry_ = 0;
76  hBNumReadCry_ = 0;
77  hBE3x3_ = 0;
78  hBE3x3Moving_ = 0;
79  hBCryOnBeam_ = 0;
80  hBMaxEneCry_ = 0;
81  hBReadCryErrors_ = 0;
82  hBE1vsCry_ = 0;
83  hBE3x3vsCry_ = 0;
84  hBEntriesvsCry_ = 0;
85  hBcryDone_ = 0;
86  hBBeamCentered_ = 0;
87  hbTBmoving_ = 0;
88  hbE1MaxCry_ = 0;
89  hbDesync_ = 0;
91 
95 }
std::string prefixME_
MonitorElement * meEBBCaloRedGreenReadCry_
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< int > superModules_
MonitorElement * meEBBCaloRedGreen_
TProfile * hBpulse_[cryInArray_]
std::vector< int > checkedSteps_
TProfile * pBCriInBeamEvents_
static const int cryInArray_
TH1F * hBGains_[cryInArray_]
MonitorElement * meEBBCaloRedGreenSteps_
TProfile * hBE3x3vsCry_
EBBeamCaloClient::~EBBeamCaloClient ( )
virtual

Destructor.

Definition at line 97 of file EBBeamCaloClient.cc.

97  {
98 
99 }

Member Function Documentation

void EBBeamCaloClient::analyze ( void  )
virtual

Analyze.

Implements EBClient.

Definition at line 333 of file EBBeamCaloClient.cc.

References abs, aveEne1_, aveEne3x3_, cloneME_, gather_cfg::cout, cryInArray_, debug_, dqmStore_, E1Th_, E3x3Th_, Entries, newFWLiteAna::found, DQMStore::get(), MonitorElement::getBinContent(), hBAllNeededCry_, hBBeamCentered_, hBcryDone_, hBCryOnBeam_, hbDesync_, hbE1MaxCry_, hBE1vsCry_, hBE3x3_, hBE3x3vsCry_, hBEne1_, hBEntriesvsCry_, hBGains_, hBMaxEneCry_, hBNumReadCry_, hBpulse_, hBReadCryErrors_, hbTBmoving_, trackerHits::histo, ievt_, jevt_, meEBBCaloRedGreen_, meEBBCaloRedGreenReadCry_, meEBBCaloRedGreenSteps_, minEvtNum_, pBCriInBeamEvents_, prefixME_, prescaling_, ReadCryErrThr_, RMSEne3x3_, and MonitorElement::setBinContent().

333  {
334 
335  ievt_++;
336  jevt_++;
337  if ( ievt_ % 10 == 0 ) {
338  if ( debug_ ) std::cout << "EBBeamCaloClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
339  }
340 
341  char histo[200];
342 
343  MonitorElement* me = 0;
344 
345  // MonitorElement* meCD;
346  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT crystals done").c_str());
347  //meCD = dqmStore_->get(histo);
348  me = dqmStore_->get(histo);
349  hBcryDone_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBcryDone_ );
350 
351  //MonitorElement* meCryInBeam;
352  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT crystal on beam").c_str());
353  //meCryInBeam = dqmStore_->get(histo);
354  me = dqmStore_->get(histo);
355  hBCryOnBeam_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hBCryOnBeam_);
356 
357  //MonitorElement* allNeededCry;
358  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT all needed crystals readout").c_str());
359  //allNeededCry= dqmStore_->get(histo);
360  me = dqmStore_->get(histo);
361  hBAllNeededCry_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBAllNeededCry_);
362 
363  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT readout crystals number").c_str());
364  //allNeededCry= dqmStore_->get(histo);
365  me = dqmStore_->get(histo);
366  hBNumReadCry_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBNumReadCry_);
367 
368  //MonitorElement* RecEne3x3;
369  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT rec Ene sum 3x3").c_str());
370  //RecEne3x3= dqmStore_->get(histo);
371  me = dqmStore_->get(histo);
372  hBE3x3_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBE3x3_);
373 
374  //MonitorElement* ErrRedCry;
375  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT readout crystals errors").c_str());
376  //ErrRedCry = dqmStore_->get(histo);
377  me = dqmStore_->get(histo);
378  hBReadCryErrors_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBReadCryErrors_);
379 
380  // MonitorElement* RecEne1;
381  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT rec energy cry 5").c_str());
382  //RecEne1= dqmStore_->get(histo);
383  me = dqmStore_->get(histo);
384  hBEne1_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBEne1_);
385 
386  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT crystal with maximum rec energy").c_str());
387  me = dqmStore_->get(histo);
388  hBMaxEneCry_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hBMaxEneCry_);
389 
390  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT average rec energy in the 3x3 array").c_str());
391  me = dqmStore_->get(histo);
392  hBE3x3vsCry_ = UtilsClient::getHisto<TProfile*>( me, cloneME_, hBE3x3vsCry_);
393 
394  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT average rec energy in the single crystal").c_str());
395  me = dqmStore_->get(histo);
396  hBE1vsCry_ = UtilsClient::getHisto<TProfile*>( me, cloneME_, hBE1vsCry_);
397 
398  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT number of entries").c_str());
399  me = dqmStore_->get(histo);
400  hBEntriesvsCry_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBEntriesvsCry_);
401 
402  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT energy deposition in the 3x3").c_str());
403  me = dqmStore_->get(histo);
404  hBBeamCentered_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, hBBeamCentered_);
405 
406  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT table is moving").c_str());
407  me = dqmStore_->get(histo);
408  hbTBmoving_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hbTBmoving_);
409 
410  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT crystal in beam vs event").c_str());
411  me = dqmStore_->get(histo);
412  pBCriInBeamEvents_ = UtilsClient::getHisto<TProfile*>( me, cloneME_, pBCriInBeamEvents_);
413 
414  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT E1 in the max cry").c_str());
415  me = dqmStore_->get(histo);
416  hbE1MaxCry_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hbE1MaxCry_);
417 
418  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT Desynchronization vs step").c_str());
419  me = dqmStore_->get(histo);
420  hbDesync_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hbDesync_);
421 
422  for(int ind = 0; ind < cryInArray_; ind ++) {
423  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT pulse profile in G12 cry %01d").c_str(), ind+1);
424  me = dqmStore_->get(histo);
425  hBpulse_[ind] = UtilsClient::getHisto<TProfile*>( me, cloneME_, hBpulse_[ind]);
426 
427  sprintf(histo, (prefixME_ + "/EBBeamCaloTask/EBBCT found gains cry %01d").c_str(), ind+1);
428  me = dqmStore_->get(histo);
429  hBGains_[ind] = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBGains_[ind]);
430  }
431 
432  int DoneCry = 0;//if it stays 1 the run is not an autoscan
433  if (hBcryDone_) {
434  for(int cry=1 ; cry<1701 ; cry ++) {
435  int step = (int) hBcryDone_->GetBinContent(cry);
436  if( step>0 ) {//this crystal has been scanned or is being scanned
437  DoneCry++;
438  float E3x3RMS = -1, E3x3 =-1, E1=-1;
439  if(hBE3x3vsCry_) {
440  //E3x3RMS = hBE3x3vsCry_->GetBinError(step);
441  //E3x3 = hBE3x3vsCry_->GetBinContent(step);
442  E3x3RMS = hBE3x3vsCry_->GetBinError(cry);
443  E3x3 = hBE3x3vsCry_->GetBinContent(cry);
444  }
445  //if( hBE1vsCry_) {E1=hBE1vsCry_->GetBinContent(step);}
446  if( hBE1vsCry_) {E1=hBE1vsCry_->GetBinContent(cry);}
447  bool RMS3x3 = ( E3x3RMS < RMSEne3x3_ && E3x3RMS >= 0 );
448  bool Mean3x3 = ( std::abs( E3x3 - aveEne3x3_ ) < E3x3Th_);
449  bool Mean1 = ( std::abs( E1 - aveEne1_ ) < E1Th_ );
450  int ieta = ( cry - 1)/20 + 1 ;//+1 for the bin
451  int iphi = ( cry - 1)%20 + 1 ;//+1 for the bin
452  //fill the RedGreen histo
453  if(ieta >0 && iphi >0 ) {
454  if(RMS3x3 && Mean3x3 && Mean1) {meEBBCaloRedGreen_->setBinContent(ieta,iphi,1.);}
455  else {meEBBCaloRedGreen_->setBinContent(ieta,iphi,0.);}
456  }
457 
458  float Entries = -1;
459  //if ( hBEntriesvsCry_ ) {Entries = hBEntriesvsCry_->GetBinContent(step);}
460  if ( hBEntriesvsCry_ ) {Entries = hBEntriesvsCry_->GetBinContent(cry);}
461  bool Nent = ( Entries * prescaling_ > minEvtNum_ );
462  bool readCryOk = true;
463  if( hBReadCryErrors_ ) {
464  int step_bin = hBReadCryErrors_->GetXaxis()->FindFixBin(step);
465  if ( step_bin > 0 && step_bin < hBReadCryErrors_->GetNbinsX() ) {
466  if ( hBReadCryErrors_->GetBinContent(step_bin) <= Entries*ReadCryErrThr_ ) {readCryOk = true;}
467  else {readCryOk = false;}
468  }
469  }
470 
471  if(Nent && readCryOk ) { meEBBCaloRedGreenSteps_->setBinContent(step,1,1.);}
472  else{ meEBBCaloRedGreenSteps_->setBinContent(step,1,0.);}
473 
474  if (readCryOk && meEBBCaloRedGreenReadCry_->getBinContent(1,1) != 0.) { meEBBCaloRedGreenReadCry_->setBinContent(1,1, 1.);}
475  else if ( !readCryOk ) { meEBBCaloRedGreenReadCry_->setBinContent(1,1, 0.);}
476  }// end of if (step>0)
477  }//end of loop over cry
478  }//end of if(hBcryDone_)
479 
480  if(DoneCry == 1) {//this is probably not an auotscan or it is the first crystal
481  float nEvt = 0;
482  if(hBE3x3_) {nEvt = hBE3x3_->GetEntries();}
483  if(nEvt > 1*prescaling_ && hBE3x3_ && hBEne1_ && hBCryOnBeam_ && meEBBCaloRedGreen_) {//check for mean and RMS
484  bool RMS3x3 = ( hBE3x3_->GetRMS() < RMSEne3x3_ );
485  bool Mean3x3 = ( std::abs( hBE3x3_->GetMean() - aveEne3x3_ ) < E3x3Th_ );
486  bool Mean1 = ( std::abs( hBEne1_->GetMean() - aveEne1_ ) < E1Th_ );
487  //fill the RedGreen histo
488  int ieta=0,iphi=0;
489  float found =0; //there should be just one bin filled but...
490  for (int b_eta =1; b_eta<86; b_eta++) {
491  for (int b_phi =1; b_phi<21; b_phi++) {
492  float bc = hBCryOnBeam_->GetBinContent(b_eta,b_phi);//FIX ME check if this is the correct binning
493  if(bc > found) { found =bc; ieta = b_eta; iphi= b_phi;}
494  }
495  }
496  if(ieta >0 && iphi >0 ) {
497  if(RMS3x3 && Mean3x3 && Mean1) {meEBBCaloRedGreen_->setBinContent(ieta,iphi,1.);}
498  else {meEBBCaloRedGreen_->setBinContent(ieta,iphi,0.);}
499  }
500  }
501  if(hBReadCryErrors_) {
502  float nErr = hBReadCryErrors_->GetBinContent(1);// for a non autoscan just the first bin should be filled
503  if( nErr > nEvt*ReadCryErrThr_ ) { meEBBCaloRedGreenReadCry_->setBinContent(1,1,0.);}
504  else { meEBBCaloRedGreenReadCry_->setBinContent(1,1,1.);}
505  }
506  }
507 
508  // // was done using me instead of histos
509  // if(DoneCry == 0) {//this is probably not an auotscan
510  // float nEvt = RecEne3x3->getEntries();
511  // if(nEvt > 1000*prescaling_) {//check for mean and RMS
512  // bool RMS3x3 = ( RecEne3x3->getRMS() < RMSEne3x3_ );
513  // bool Mean3x3 = ( (RecEne3x3->getMean() - aveEne3x3_) < E3x3Th_);
514  // bool Mean1 = ( (RecEne1->getMean() < aveEne1_) < E1Th_ );
515  // //fill the RedGreen histo
516  // int ieta=0,iphi=0;
517  // float found =0; //there should be just one bin filled but...
518  // for (int b_eta =1; b_eta<86; b_eta++) {
519  // for (int b_phi =1; b_phi<21; b_phi++) {
520  // float bc = meCryInBeam->getBinContent(b_eta,b_phi);//FIX ME check if this is the correct binning
521  // if(bc > found) { found =bc; ieta = b_eta; iphi= b_phi;}
522  // }
523  // }
524  // if(ieta >0 && iphi >0 ) {
525  // if(RMS3x3 && Mean3x3 && Mean1) {meEBBCaloRedGreen_->setBinContent(ieta,iphi,1.);}
526  // else {meEBBCaloRedGreen_->setBinContent(ieta,iphi,0.);}
527  // }
528  // }
529  // float nErr = ErrRedCry->getBinContent(1);// for a non autoscan just the first bin should be filled
530  // if( nErr > nEvt*ReadCryErrThr_ ) { meEBBCaloRedGreenReadCry_->setBinContent(1,1,0.);}
531  // else { meEBBCaloRedGreenReadCry_->setBinContent(1,1,1.);}
532  // }
533 
534 
535 }
std::string prefixME_
MonitorElement * meEBBCaloRedGreenReadCry_
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meEBBCaloRedGreen_
#define abs(x)
Definition: mlp_lapack.h:159
tuple histo
Definition: trackerHits.py:12
TProfile * hBpulse_[cryInArray_]
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
TProfile * pBCriInBeamEvents_
DQMStore * dqmStore_
double getBinContent(int binx) const
get content of bin (1-D)
static const int cryInArray_
tuple cout
Definition: gather_cfg.py:41
TH1F * hBGains_[cryInArray_]
MonitorElement * meEBBCaloRedGreenSteps_
TProfile * hBE3x3vsCry_
void EBBeamCaloClient::beginJob ( void  )
virtual

BeginJob.

Implements EBClient.

Definition at line 101 of file EBBeamCaloClient.cc.

References gather_cfg::cout, debug_, dqmStore_, ievt_, jevt_, and cmsCodeRules.cppFunctionSkipper::operator.

101  {
102 
104 
105  if ( debug_ ) std::cout << "EBBeamCaloClient: beginJob" << std::endl;
106 
107  ievt_ = 0;
108  jevt_ = 0;
109 
110 }
DQMStore * dqmStore_
tuple cout
Definition: gather_cfg.py:41
void EBBeamCaloClient::beginRun ( void  )
virtual

BeginRun.

Implements EBClient.

Definition at line 112 of file EBBeamCaloClient.cc.

References gather_cfg::cout, debug_, jevt_, and setup().

112  {
113 
114  if ( debug_ ) std::cout << "EBBeamCaloClient: beginRun" << std::endl;
115 
116  jevt_ = 0;
117 
118  this->setup();
119 
120 }
void setup(void)
Setup.
tuple cout
Definition: gather_cfg.py:41
void EBBeamCaloClient::cleanup ( void  )
virtual

Cleanup.

Implements EBClient.

Definition at line 173 of file EBBeamCaloClient.cc.

References cloneME_, cryInArray_, dqmStore_, enableCleanup_, MonitorElement::getName(), hBAllNeededCry_, hBBeamCentered_, hBcryDone_, hBCryOnBeam_, hbDesync_, hbE1MaxCry_, hBE1vsCry_, hBE3x3_, hBE3x3Moving_, hBE3x3vsCry_, hBEne1_, hBEntriesvsCry_, hBGains_, hBMaxEneCry_, hBNumReadCry_, hBpulse_, hBReadCryErrors_, hbTBmoving_, meEBBCaloRedGreen_, meEBBCaloRedGreenReadCry_, meEBBCaloRedGreenSteps_, pBCriInBeamEvents_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob(), and endRun().

173  {
174  if ( ! enableCleanup_ ) return;
175  if ( cloneME_ ) {
176  for(int u=0;u<cryInArray_;u++) {
177  if(hBGains_[u]) delete hBGains_[u];
178  if(hBpulse_[u]) delete hBpulse_[u];
179  //if(hBGainsMoving_[u])delete hBGainsMoving_[u];
180  }
181  if(hBEne1_) delete hBEne1_;
182  // if(hBEne1Moving_) delete hBEne1Moving_;
183  if(hBAllNeededCry_) delete hBAllNeededCry_;
184  if(hBNumReadCry_) delete hBNumReadCry_;
185  if(hBE3x3_) delete hBE3x3_;
186  if(hBE3x3Moving_) delete hBE3x3Moving_;
187  if(hBCryOnBeam_) delete hBCryOnBeam_;
188  if(hBMaxEneCry_) delete hBMaxEneCry_;
190  if(hBE1vsCry_) delete hBE1vsCry_;
191  if(hBE3x3vsCry_) delete hBE3x3vsCry_;
192  if(hBEntriesvsCry_) delete hBEntriesvsCry_;
193  if(hBcryDone_) delete hBcryDone_;
194  if(hBBeamCentered_) delete hBBeamCentered_;
195  if(hbTBmoving_) delete hbTBmoving_;
196  if(hbE1MaxCry_) delete hbE1MaxCry_;
197  if(hbDesync_) delete hbDesync_;
199  }
200 
201  for(int u=0;u<cryInArray_;u++) {
202  hBGains_[u] = 0;
203  hBpulse_[u] = 0;
204  //hBGainsMoving_[u] = 0;
205  }
206  hBEne1_ = 0;
207  //hBEne1Moving_ = 0;
208  hBAllNeededCry_ = 0;
209  hBNumReadCry_ = 0;
210  hBE3x3_ = 0;
211  hBE3x3Moving_ = 0;
212  hBCryOnBeam_ = 0;
213  hBMaxEneCry_ = 0;
214  hBReadCryErrors_ = 0;
215  hBE1vsCry_ = 0;
216  hBE3x3vsCry_ = 0;
217  hBEntriesvsCry_ = 0;
218  hBcryDone_ = 0;
219  hBBeamCentered_ = 0;
220  hbTBmoving_ = 0;
221  hbE1MaxCry_ = 0;
222  hbDesync_ = 0;
224 
225  dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamCaloClient" );
226 
228  meEBBCaloRedGreen_ = 0;
233 }
std::string prefixME_
MonitorElement * meEBBCaloRedGreenReadCry_
const std::string & getName(void) const
get name of ME
MonitorElement * meEBBCaloRedGreen_
TProfile * hBpulse_[cryInArray_]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
TProfile * pBCriInBeamEvents_
DQMStore * dqmStore_
static const int cryInArray_
TH1F * hBGains_[cryInArray_]
MonitorElement * meEBBCaloRedGreenSteps_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
TProfile * hBE3x3vsCry_
void EBBeamCaloClient::endJob ( void  )
virtual

EndJob.

Implements EBClient.

Definition at line 122 of file EBBeamCaloClient.cc.

References cleanup(), gather_cfg::cout, debug_, and ievt_.

122  {
123 
124  if ( debug_ ) std::cout << "EBBeamCaloClient: endJob, ievt = " << ievt_ << std::endl;
125 
126  this->cleanup();
127 
128 }
void cleanup(void)
Cleanup.
tuple cout
Definition: gather_cfg.py:41
void EBBeamCaloClient::endRun ( void  )
virtual

EndRun.

Implements EBClient.

Definition at line 130 of file EBBeamCaloClient.cc.

References cleanup(), gather_cfg::cout, debug_, and jevt_.

130  {
131 
132  if ( debug_ ) std::cout << "EBBeamCaloClient: endRun, jevt = " << jevt_ << std::endl;
133 
134  this->cleanup();
135 
136 }
void cleanup(void)
Cleanup.
tuple cout
Definition: gather_cfg.py:41
int EBBeamCaloClient::getEvtPerJob ( void  )
inlinevirtual

Get Functions.

Implements EBClient.

Definition at line 71 of file EBBeamCaloClient.h.

References ievt_.

71 { return ievt_; }
int EBBeamCaloClient::getEvtPerRun ( void  )
inlinevirtual

Returns the number of processed events in this Run.

Implements EBClient.

Definition at line 72 of file EBBeamCaloClient.h.

References jevt_.

72 { return jevt_; }
void EBBeamCaloClient::setup ( void  )
virtual

Setup.

Implements EBClient.

Definition at line 138 of file EBBeamCaloClient.cc.

References newFWLiteAna::bin, DQMStore::book2D(), dqmStore_, MonitorElement::getName(), trackerHits::histo, meEBBCaloRedGreen_, meEBBCaloRedGreenReadCry_, meEBBCaloRedGreenSteps_, prefixME_, DQMStore::removeElement(), MonitorElement::Reset(), MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), and DQMStore::setCurrentFolder().

Referenced by beginRun().

138  {
139 
140  char histo[200];
141 
142  dqmStore_->setCurrentFolder( prefixME_ + "/EBBeamCaloClient" );
143 
145  sprintf(histo, "EBBCT quality");
146  meEBBCaloRedGreen_ = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
147 
149 
150  for ( int ie = 1; ie <= 85; ie++ ) {
151  for ( int ip = 1; ip <= 20; ip++ ) {
152 
153  meEBBCaloRedGreen_ ->setBinContent( ie, ip, 2. );
154 
155  }
156  }
157 
159  sprintf(histo, "EBBCT quality read crystal errors");
160  meEBBCaloRedGreenReadCry_ = dqmStore_->book2D(histo, histo, 1, 0., 1., 1, 0., 1.);
163 
165  sprintf(histo, "EBBCT quality entries or read crystals errors");
166  meEBBCaloRedGreenSteps_ = dqmStore_->book2D(histo, histo, 86, 1., 87., 1, 0., 1.);
167  meEBBCaloRedGreenSteps_->setAxisTitle("step in the scan");
169  for( int bin=1; bin <87; bin++) { meEBBCaloRedGreenSteps_->setBinContent( bin, 1, 2. );}
170 
171 }
std::string prefixME_
MonitorElement * meEBBCaloRedGreenReadCry_
const std::string & getName(void) const
get name of ME
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meEBBCaloRedGreen_
tuple histo
Definition: trackerHits.py:12
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
DQMStore * dqmStore_
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:647
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)
MonitorElement * meEBBCaloRedGreenSteps_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237

Member Data Documentation

float EBBeamCaloClient::aveEne1_
private

Definition at line 147 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

float EBBeamCaloClient::aveEne3x3_
private

Definition at line 149 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

std::vector<int> EBBeamCaloClient::checkedSteps_
private

Definition at line 95 of file EBBeamCaloClient.h.

Referenced by EBBeamCaloClient().

bool EBBeamCaloClient::cloneME_
private

Definition at line 81 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

const int EBBeamCaloClient::cryInArray_ = 9
staticprivate

Definition at line 76 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

bool EBBeamCaloClient::debug_
private

Definition at line 84 of file EBBeamCaloClient.h.

Referenced by analyze(), beginJob(), beginRun(), EBBeamCaloClient(), endJob(), and endRun().

DQMStore* EBBeamCaloClient::dqmStore_
private

Definition at line 92 of file EBBeamCaloClient.h.

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

float EBBeamCaloClient::E1Th_
private

Definition at line 148 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

float EBBeamCaloClient::E3x3Th_
private

Definition at line 150 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

bool EBBeamCaloClient::enableCleanup_
private

Definition at line 88 of file EBBeamCaloClient.h.

Referenced by cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBAllNeededCry_
private

Definition at line 107 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH2F* EBBeamCaloClient::hBBeamCentered_
private

Definition at line 129 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBcryDone_
private

Definition at line 127 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH2F* EBBeamCaloClient::hBCryOnBeam_
private

Definition at line 115 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hbDesync_
private

Definition at line 135 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hbE1MaxCry_
private

Definition at line 133 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TProfile* EBBeamCaloClient::hBE1vsCry_
private

Definition at line 121 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBE3x3_
private

Definition at line 111 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBE3x3Moving_
private

Definition at line 113 of file EBBeamCaloClient.h.

Referenced by cleanup(), and EBBeamCaloClient().

TProfile* EBBeamCaloClient::hBE3x3vsCry_
private

Definition at line 123 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBEne1_
private

Definition at line 102 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBEntriesvsCry_
private

Definition at line 125 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBGains_[cryInArray_]
private

Definition at line 99 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH2F* EBBeamCaloClient::hBMaxEneCry_
private

Definition at line 117 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBNumReadCry_
private

Definition at line 109 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TProfile* EBBeamCaloClient::hBpulse_[cryInArray_]
private

Definition at line 100 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hBReadCryErrors_
private

Definition at line 119 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

TH1F* EBBeamCaloClient::hbTBmoving_
private

Definition at line 131 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

int EBBeamCaloClient::ievt_
private

Definition at line 78 of file EBBeamCaloClient.h.

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

int EBBeamCaloClient::jevt_
private

Definition at line 79 of file EBBeamCaloClient.h.

Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().

MonitorElement* EBBeamCaloClient::meEBBCaloRedGreen_
private

Definition at line 139 of file EBBeamCaloClient.h.

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

MonitorElement* EBBeamCaloClient::meEBBCaloRedGreenReadCry_
private

Definition at line 140 of file EBBeamCaloClient.h.

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

MonitorElement* EBBeamCaloClient::meEBBCaloRedGreenSteps_
private

Definition at line 141 of file EBBeamCaloClient.h.

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

int EBBeamCaloClient::minEvtNum_
private

Definition at line 145 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

TProfile* EBBeamCaloClient::pBCriInBeamEvents_
private

Definition at line 137 of file EBBeamCaloClient.h.

Referenced by analyze(), cleanup(), and EBBeamCaloClient().

std::string EBBeamCaloClient::prefixME_
private

Definition at line 86 of file EBBeamCaloClient.h.

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

float EBBeamCaloClient::prescaling_
private

Definition at line 96 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

float EBBeamCaloClient::ReadCryErrThr_
private

Definition at line 152 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

float EBBeamCaloClient::RMSEne3x3_
private

Definition at line 151 of file EBBeamCaloClient.h.

Referenced by analyze(), and EBBeamCaloClient().

std::vector<int> EBBeamCaloClient::superModules_
private

Definition at line 90 of file EBBeamCaloClient.h.

Referenced by EBBeamCaloClient().

bool EBBeamCaloClient::verbose_
private

Definition at line 83 of file EBBeamCaloClient.h.

Referenced by EBBeamCaloClient().