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
EEBeamCaloClient Class Reference

#include <EEBeamCaloClient.h>

Inheritance diagram for EEBeamCaloClient:
EEClient

Public Member Functions

void analyze (void)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (void)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
 EEBeamCaloClient (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 ~EEBeamCaloClient ()
 Destructor. More...
 
- Public Member Functions inherited from EEClient
virtual ~EEClient (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_
 
MonitorElementmeEEBCaloRedGreen_
 
MonitorElementmeEEBCaloRedGreenReadCry_
 
MonitorElementmeEEBCaloRedGreenSteps_
 
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 33 of file EEBeamCaloClient.h.

Constructor & Destructor Documentation

EEBeamCaloClient::EEBeamCaloClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 33 of file EEBeamCaloClient.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, meEEBCaloRedGreen_, meEEBCaloRedGreenReadCry_, meEEBCaloRedGreenSteps_, 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 18).
51  superModules_.reserve(18);
52  for ( unsigned int i = 1; i <= 18; 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 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
TH1F * hBGains_[cryInArray_]
MonitorElement * meEEBCaloRedGreenSteps_
std::vector< int > superModules_
TProfile * hBpulse_[cryInArray_]
MonitorElement * meEEBCaloRedGreen_
TProfile * pBCriInBeamEvents_
static const int cryInArray_
std::string prefixME_
std::vector< int > checkedSteps_
MonitorElement * meEEBCaloRedGreenReadCry_
TProfile * hBE3x3vsCry_
EEBeamCaloClient::~EEBeamCaloClient ( )
virtual

Destructor.

Definition at line 97 of file EEBeamCaloClient.cc.

97  {
98 
99 }

Member Function Documentation

void EEBeamCaloClient::analyze ( void  )
virtual

Analyze.

Implements EEClient.

Definition at line 333 of file EEBeamCaloClient.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_, meEEBCaloRedGreen_, meEEBCaloRedGreenReadCry_, meEEBCaloRedGreenSteps_, 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 << "EEBeamCaloClient: 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT number of entries").c_str());
399  me = dqmStore_->get(histo);
400  hBEntriesvsCry_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hBEntriesvsCry_);
401 
402  sprintf(histo, (prefixME_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT table is moving").c_str());
407  me = dqmStore_->get(histo);
408  hbTBmoving_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, hbTBmoving_);
409 
410  sprintf(histo, (prefixME_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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_ + "/EEBeamCaloTask/EEBCT 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) {meEEBCaloRedGreen_->setBinContent(ieta,iphi,1.);}
455  else {meEEBCaloRedGreen_->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 ) { meEEBCaloRedGreenSteps_->setBinContent(step,1,1.);}
472  else{ meEEBCaloRedGreenSteps_->setBinContent(step,1,0.);}
473 
474  if (readCryOk && meEEBCaloRedGreenReadCry_->getBinContent(1,1) != 0.) { meEEBCaloRedGreenReadCry_->setBinContent(1,1, 1.);}
475  else if ( !readCryOk ) { meEEBCaloRedGreenReadCry_->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_ && meEEBCaloRedGreen_) {//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) {meEEBCaloRedGreen_->setBinContent(ieta,iphi,1.);}
498  else {meEEBCaloRedGreen_->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_ ) { meEEBCaloRedGreenReadCry_->setBinContent(1,1,0.);}
504  else { meEEBCaloRedGreenReadCry_->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) {meEEBCaloRedGreen_->setBinContent(ieta,iphi,1.);}
526  // else {meEEBCaloRedGreen_->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_ ) { meEEBCaloRedGreenReadCry_->setBinContent(1,1,0.);}
531  // else { meEEBCaloRedGreenReadCry_->setBinContent(1,1,1.);}
532  // }
533 
534 
535 }
TH1F * hBGains_[cryInArray_]
MonitorElement * meEEBCaloRedGreenSteps_
void setBinContent(int binx, double content)
set content of bin (1-D)
DQMStore * dqmStore_
#define abs(x)
Definition: mlp_lapack.h:159
tuple histo
Definition: trackerHits.py:12
TProfile * hBpulse_[cryInArray_]
MonitorElement * meEEBCaloRedGreen_
TProfile * pBCriInBeamEvents_
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
static const int cryInArray_
std::string prefixME_
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:41
MonitorElement * meEEBCaloRedGreenReadCry_
TProfile * hBE3x3vsCry_
void EEBeamCaloClient::beginJob ( void  )
virtual

BeginJob.

Implements EEClient.

Definition at line 101 of file EEBeamCaloClient.cc.

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

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

BeginRun.

Implements EEClient.

Definition at line 112 of file EEBeamCaloClient.cc.

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

112  {
113 
114  if ( debug_ ) std::cout << "EEBeamCaloClient: 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 EEBeamCaloClient::cleanup ( void  )
virtual

Cleanup.

Implements EEClient.

Definition at line 173 of file EEBeamCaloClient.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_, meEEBCaloRedGreen_, meEEBCaloRedGreenReadCry_, meEEBCaloRedGreenSteps_, 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_ + "/EEBeamCaloClient" );
226 
228  meEEBCaloRedGreen_ = 0;
233 }
const std::string & getName(void) const
get name of ME
TH1F * hBGains_[cryInArray_]
MonitorElement * meEEBCaloRedGreenSteps_
DQMStore * dqmStore_
TProfile * hBpulse_[cryInArray_]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
MonitorElement * meEEBCaloRedGreen_
TProfile * pBCriInBeamEvents_
static const int cryInArray_
std::string prefixME_
MonitorElement * meEEBCaloRedGreenReadCry_
TProfile * hBE3x3vsCry_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void EEBeamCaloClient::endJob ( void  )
virtual

EndJob.

Implements EEClient.

Definition at line 122 of file EEBeamCaloClient.cc.

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

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

EndRun.

Implements EEClient.

Definition at line 130 of file EEBeamCaloClient.cc.

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

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

Get Functions.

Implements EEClient.

Definition at line 70 of file EEBeamCaloClient.h.

References ievt_.

70 { return ievt_; }
int EEBeamCaloClient::getEvtPerRun ( void  )
inlinevirtual

Returns the number of processed events in this Run.

Implements EEClient.

Definition at line 71 of file EEBeamCaloClient.h.

References jevt_.

71 { return jevt_; }
void EEBeamCaloClient::setup ( void  )
virtual

Setup.

Implements EEClient.

Definition at line 138 of file EEBeamCaloClient.cc.

References newFWLiteAna::bin, DQMStore::book2D(), dqmStore_, MonitorElement::getName(), trackerHits::histo, meEEBCaloRedGreen_, meEEBCaloRedGreenReadCry_, meEEBCaloRedGreenSteps_, 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_ + "/EEBeamCaloClient" );
143 
145  sprintf(histo, "EEBCT quality");
146  meEEBCaloRedGreen_ = 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  meEEBCaloRedGreen_ ->setBinContent( ie, ip, 2. );
154 
155  }
156  }
157 
159  sprintf(histo, "EEBCT quality read crystal errors");
160  meEEBCaloRedGreenReadCry_ = dqmStore_->book2D(histo, histo, 1, 0., 1., 1, 0., 1.);
163 
165  sprintf(histo, "EEBCT quality entries or read crystals errors");
166  meEEBCaloRedGreenSteps_ = dqmStore_->book2D(histo, histo, 86, 1., 87., 1, 0., 1.);
167  meEEBCaloRedGreenSteps_->setAxisTitle("step in the scan");
169  for( int bin=1; bin <87; bin++) { meEEBCaloRedGreenSteps_->setBinContent( bin, 1, 2. );}
170 
171 }
const std::string & getName(void) const
get name of ME
MonitorElement * meEEBCaloRedGreenSteps_
void setBinContent(int binx, double content)
set content of bin (1-D)
DQMStore * dqmStore_
tuple histo
Definition: trackerHits.py:12
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
MonitorElement * meEEBCaloRedGreen_
std::string prefixME_
MonitorElement * meEEBCaloRedGreenReadCry_
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)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237

Member Data Documentation

float EEBeamCaloClient::aveEne1_
private

Definition at line 146 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

float EEBeamCaloClient::aveEne3x3_
private

Definition at line 148 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

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

Definition at line 94 of file EEBeamCaloClient.h.

Referenced by EEBeamCaloClient().

bool EEBeamCaloClient::cloneME_
private

Definition at line 80 of file EEBeamCaloClient.h.

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

const int EEBeamCaloClient::cryInArray_ = 9
staticprivate

Definition at line 75 of file EEBeamCaloClient.h.

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

bool EEBeamCaloClient::debug_
private

Definition at line 83 of file EEBeamCaloClient.h.

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

DQMStore* EEBeamCaloClient::dqmStore_
private

Definition at line 91 of file EEBeamCaloClient.h.

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

float EEBeamCaloClient::E1Th_
private

Definition at line 147 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

float EEBeamCaloClient::E3x3Th_
private

Definition at line 149 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

bool EEBeamCaloClient::enableCleanup_
private

Definition at line 87 of file EEBeamCaloClient.h.

Referenced by cleanup(), and EEBeamCaloClient().

TH1F* EEBeamCaloClient::hBAllNeededCry_
private

Definition at line 106 of file EEBeamCaloClient.h.

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

TH2F* EEBeamCaloClient::hBBeamCentered_
private

Definition at line 128 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBcryDone_
private

Definition at line 126 of file EEBeamCaloClient.h.

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

TH2F* EEBeamCaloClient::hBCryOnBeam_
private

Definition at line 114 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hbDesync_
private

Definition at line 134 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hbE1MaxCry_
private

Definition at line 132 of file EEBeamCaloClient.h.

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

TProfile* EEBeamCaloClient::hBE1vsCry_
private

Definition at line 120 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBE3x3_
private

Definition at line 110 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBE3x3Moving_
private

Definition at line 112 of file EEBeamCaloClient.h.

Referenced by cleanup(), and EEBeamCaloClient().

TProfile* EEBeamCaloClient::hBE3x3vsCry_
private

Definition at line 122 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBEne1_
private

Definition at line 101 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBEntriesvsCry_
private

Definition at line 124 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBGains_[cryInArray_]
private

Definition at line 98 of file EEBeamCaloClient.h.

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

TH2F* EEBeamCaloClient::hBMaxEneCry_
private

Definition at line 116 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBNumReadCry_
private

Definition at line 108 of file EEBeamCaloClient.h.

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

TProfile* EEBeamCaloClient::hBpulse_[cryInArray_]
private

Definition at line 99 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hBReadCryErrors_
private

Definition at line 118 of file EEBeamCaloClient.h.

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

TH1F* EEBeamCaloClient::hbTBmoving_
private

Definition at line 130 of file EEBeamCaloClient.h.

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

int EEBeamCaloClient::ievt_
private

Definition at line 77 of file EEBeamCaloClient.h.

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

int EEBeamCaloClient::jevt_
private

Definition at line 78 of file EEBeamCaloClient.h.

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

MonitorElement* EEBeamCaloClient::meEEBCaloRedGreen_
private

Definition at line 138 of file EEBeamCaloClient.h.

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

MonitorElement* EEBeamCaloClient::meEEBCaloRedGreenReadCry_
private

Definition at line 139 of file EEBeamCaloClient.h.

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

MonitorElement* EEBeamCaloClient::meEEBCaloRedGreenSteps_
private

Definition at line 140 of file EEBeamCaloClient.h.

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

int EEBeamCaloClient::minEvtNum_
private

Definition at line 144 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

TProfile* EEBeamCaloClient::pBCriInBeamEvents_
private

Definition at line 136 of file EEBeamCaloClient.h.

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

std::string EEBeamCaloClient::prefixME_
private

Definition at line 85 of file EEBeamCaloClient.h.

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

float EEBeamCaloClient::prescaling_
private

Definition at line 95 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

float EEBeamCaloClient::ReadCryErrThr_
private

Definition at line 151 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

float EEBeamCaloClient::RMSEne3x3_
private

Definition at line 150 of file EEBeamCaloClient.h.

Referenced by analyze(), and EEBeamCaloClient().

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

Definition at line 89 of file EEBeamCaloClient.h.

Referenced by EEBeamCaloClient().

bool EEBeamCaloClient::verbose_
private

Definition at line 82 of file EEBeamCaloClient.h.

Referenced by EEBeamCaloClient().