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 | Friends
EBPedestalClient Class Reference

#include <EBPedestalClient.h>

Inheritance diagram for EBPedestalClient:
EBClient

Public Member Functions

void analyze (void)
 Analyze. More...
 
void beginJob (void)
 begin of job method More...
 
void beginRun (void)
 begin of run method More...
 
void cleanup (void)
 clean up method More...
 
 EBPedestalClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void endJob (void)
 end of job method More...
 
void endRun (void)
 end of run method More...
 
int getEvtPerJob ()
 Get Functions. More...
 
int getEvtPerRun ()
 Returns the number of processed events in this Run. More...
 
void setup (void)
 Setup. More...
 
virtual ~EBPedestalClient ()
 Destructor. More...
 
- Public Member Functions inherited from EBClient
virtual ~EBClient (void)
 

Private Attributes

bool cloneME_
 
bool debug_
 
float discrepancyMean_ [3]
 
float discrepancyMeanPn_ [2]
 
DQMStoredqmStore_
 
bool enableCleanup_
 
float expectedMean_ [3]
 
float expectedMeanPn_ [2]
 
TProfile2D * h01_ [36]
 
TProfile2D * h02_ [36]
 
TProfile2D * h03_ [36]
 
TProfile * i01_ [36]
 
TProfile * i02_ [36]
 
int ievt_
 
TProfile2D * j01_ [36]
 
TProfile2D * j02_ [36]
 
TProfile2D * j03_ [36]
 
int jevt_
 
TProfile2D * k01_ [36]
 
TProfile2D * k02_ [36]
 
TProfile2D * k03_ [36]
 
MonitorElementmeg01_ [36]
 
MonitorElementmeg02_ [36]
 
MonitorElementmeg03_ [36]
 
MonitorElementmeg04_ [36]
 
MonitorElementmeg05_ [36]
 
MonitorElementmep01_ [36]
 
MonitorElementmep02_ [36]
 
MonitorElementmep03_ [36]
 
MonitorElementmer01_ [36]
 
MonitorElementmer02_ [36]
 
MonitorElementmer03_ [36]
 
MonitorElementmer04_ [36]
 
MonitorElementmer05_ [36]
 
MonitorElementmes01_ [36]
 
MonitorElementmes02_ [36]
 
MonitorElementmes03_ [36]
 
MonitorElementmet01_ [36]
 
MonitorElementmet02_ [36]
 
MonitorElementmet03_ [36]
 
std::vector< int > MGPAGains_
 
std::vector< int > MGPAGainsPN_
 
std::string prefixME_
 
float RMSThreshold_ [3]
 
float RMSThresholdPn_ [2]
 
std::vector< int > superModules_
 
bool verbose_
 

Friends

class EBSummaryClient
 

Detailed Description

Definition at line 33 of file EBPedestalClient.h.

Constructor & Destructor Documentation

EBPedestalClient::EBPedestalClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 40 of file EBPedestalClient.cc.

References cloneME_, debug_, discrepancyMean_, discrepancyMeanPn_, enableCleanup_, expectedMean_, expectedMeanPn_, edm::ParameterSet::getUntrackedParameter(), h01_, h02_, h03_, i, i01_, i02_, ecalpyutils::ism(), j01_, j02_, j03_, k01_, k02_, k03_, meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, MGPAGains_, MGPAGainsPN_, prefixME_, RMSThreshold_, RMSThresholdPn_, superModules_, and verbose_.

40  {
41 
42  // cloneME switch
43  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
44 
45  // verbose switch
46  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
47 
48  // debug switch
49  debug_ = ps.getUntrackedParameter<bool>("debug", false);
50 
51  // prefixME path
52  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
53 
54  // enableCleanup_ switch
55  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
56 
57  // vector of selected Super Modules (Defaults to all 36).
58  superModules_.reserve(36);
59  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
60  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
61 
62  MGPAGains_.reserve(3);
63  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
64  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
65 
66  MGPAGainsPN_.reserve(2);
67  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
68  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
69 
70  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
71 
72  int ism = superModules_[i];
73 
74  h01_[ism-1] = 0;
75  h02_[ism-1] = 0;
76  h03_[ism-1] = 0;
77 
78  j01_[ism-1] = 0;
79  j02_[ism-1] = 0;
80  j03_[ism-1] = 0;
81 
82  k01_[ism-1] = 0;
83  k02_[ism-1] = 0;
84  k03_[ism-1] = 0;
85 
86  i01_[ism-1] = 0;
87  i02_[ism-1] = 0;
88 
89  }
90 
91  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
92 
93  int ism = superModules_[i];
94 
95  meg01_[ism-1] = 0;
96  meg02_[ism-1] = 0;
97  meg03_[ism-1] = 0;
98 
99  meg04_[ism-1] = 0;
100  meg05_[ism-1] = 0;
101 
102  mep01_[ism-1] = 0;
103  mep02_[ism-1] = 0;
104  mep03_[ism-1] = 0;
105 
106  mer01_[ism-1] = 0;
107  mer02_[ism-1] = 0;
108  mer03_[ism-1] = 0;
109 
110  mer04_[ism-1] = 0;
111  mer05_[ism-1] = 0;
112 
113 #ifdef COMMON_NOISE_ANALYSIS
114  mes01_[ism-1] = 0;
115  mes02_[ism-1] = 0;
116  mes03_[ism-1] = 0;
117 
118  met01_[ism-1] = 0;
119  met02_[ism-1] = 0;
120  met03_[ism-1] = 0;
121 #endif
122 
123  }
124 
125  expectedMean_[0] = 200.0;
126  expectedMean_[1] = 200.0;
127  expectedMean_[2] = 200.0;
128 
129  discrepancyMean_[0] = 25.0;
130  discrepancyMean_[1] = 25.0;
131  discrepancyMean_[2] = 25.0;
132 
133  RMSThreshold_[0] = 1.0;
134  RMSThreshold_[1] = 1.2;
135  RMSThreshold_[2] = 2.0;
136 
137  expectedMeanPn_[0] = 750.0;
138  expectedMeanPn_[1] = 750.0;
139 
140  discrepancyMeanPn_[0] = 100.0;
141  discrepancyMeanPn_[1] = 100.0;
142 
143  RMSThresholdPn_[0] = 999.;
144  RMSThresholdPn_[1] = 999.;
145 
146 }
MonitorElement * mer01_[36]
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * mer02_[36]
MonitorElement * meg03_[36]
MonitorElement * meg02_[36]
MonitorElement * met03_[36]
std::string prefixME_
MonitorElement * met02_[36]
TProfile2D * k03_[36]
std::vector< int > MGPAGains_
MonitorElement * mes02_[36]
TProfile * i01_[36]
MonitorElement * mep02_[36]
MonitorElement * meg01_[36]
MonitorElement * meg04_[36]
MonitorElement * mep03_[36]
MonitorElement * mes03_[36]
TProfile2D * h02_[36]
MonitorElement * mer03_[36]
MonitorElement * mer05_[36]
TProfile2D * j01_[36]
std::vector< int > superModules_
MonitorElement * mer04_[36]
std::vector< int > MGPAGainsPN_
TProfile * i02_[36]
MonitorElement * mep01_[36]
MonitorElement * met01_[36]
TProfile2D * k01_[36]
TProfile2D * j03_[36]
TProfile2D * j02_[36]
float discrepancyMeanPn_[2]
TProfile2D * k02_[36]
MonitorElement * meg05_[36]
MonitorElement * mes01_[36]
TProfile2D * h03_[36]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
TProfile2D * h01_[36]
EBPedestalClient::~EBPedestalClient ( )
virtual

Destructor.

Definition at line 148 of file EBPedestalClient.cc.

148  {
149 
150 }

Member Function Documentation

void EBPedestalClient::analyze ( void  )
virtual

Analyze.

Implements EBClient.

Definition at line 690 of file EBPedestalClient.cc.

References abs, cloneME_, gather_cfg::cout, debug_, discrepancyMean_, discrepancyMeanPn_, dqmStore_, EcalBarrel, expectedMean_, expectedMeanPn_, MonitorElement::Fill(), spr::find(), DQMStore::get(), UtilsClient::getBinStatistics(), h01_, h02_, h03_, trackerHits::histo, i, i01_, i02_, ievt_, j, j01_, j02_, j03_, jevt_, k01_, k02_, k03_, UtilsClient::maskBinContent(), Masks::maskChannel(), Masks::maskPn(), meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, MGPAGains_, MGPAGainsPN_, EcalDQMStatusHelper::PEDESTAL_HIGH_GAIN_MEAN_ERROR, EcalDQMStatusHelper::PEDESTAL_HIGH_GAIN_RMS_ERROR, EcalDQMStatusHelper::PEDESTAL_LOW_GAIN_MEAN_ERROR, EcalDQMStatusHelper::PEDESTAL_LOW_GAIN_RMS_ERROR, EcalDQMStatusHelper::PEDESTAL_MIDDLE_GAIN_MEAN_ERROR, EcalDQMStatusHelper::PEDESTAL_MIDDLE_GAIN_RMS_ERROR, prefixME_, MonitorElement::Reset(), RMSThreshold_, RMSThresholdPn_, Numbers::sEB(), MonitorElement::setBinContent(), mathSSE::sqrt(), and superModules_.

690  {
691 
692  ievt_++;
693  jevt_++;
694  if ( ievt_ % 10 == 0 ) {
695  if ( debug_ ) std::cout << "EBPedestalClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
696  }
697 
698  uint32_t bits01 = 0;
701 
702  uint32_t bits02 = 0;
705 
706  uint32_t bits03 = 0;
709 
710  char histo[200];
711 
712  MonitorElement* me;
713 
714  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
715 
716  int ism = superModules_[i];
717 
718  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
719 
720  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain01/EBPT pedestal %s G01").c_str(), Numbers::sEB(ism).c_str());
721  me = dqmStore_->get(histo);
722  h01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h01_[ism-1] );
723 
724  }
725 
726  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
727 
728  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain06/EBPT pedestal %s G06").c_str(), Numbers::sEB(ism).c_str());
729  me = dqmStore_->get(histo);
730  h02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h02_[ism-1] );
731 
732  }
733 
734  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
735 
736  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain12/EBPT pedestal %s G12").c_str(), Numbers::sEB(ism).c_str());
737  me = dqmStore_->get(histo);
738  h03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h03_[ism-1] );
739 
740  }
741 
742 #ifdef COMMON_NOISE_ANALYSIS
743  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
744 
745  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain01/EBPT pedestal 3sum %s G01").c_str(), Numbers::sEB(ism).c_str());
746  me = dqmStore_->get(histo);
747  j01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, j01_[ism-1] );
748 
749  }
750 
751  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
752 
753  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain06/EBPT pedestal 3sum %s G06").c_str(), Numbers::sEB(ism).c_str());
754  me = dqmStore_->get(histo);
755  j02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, j02_[ism-1] );
756 
757  }
758 
759  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
760 
761  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain12/EBPT pedestal 3sum %s G12").c_str(), Numbers::sEB(ism).c_str());
762  me = dqmStore_->get(histo);
763  j03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, j03_[ism-1] );
764 
765  }
766 
767  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
768 
769  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain01/EBPT pedestal 5sum %s G01").c_str(), Numbers::sEB(ism).c_str());
770  me = dqmStore_->get(histo);
771  k01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, k01_[ism-1] );
772 
773  }
774 
775  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
776 
777  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain06/EBPT pedestal 5sum %s G06").c_str(), Numbers::sEB(ism).c_str());
778  me = dqmStore_->get(histo);
779  k02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, k02_[ism-1] );
780 
781  }
782 
783  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
784 
785  sprintf(histo, (prefixME_ + "/EBPedestalTask/Gain12/EBPT pedestal 5sum %s G12").c_str(), Numbers::sEB(ism).c_str());
786  me = dqmStore_->get(histo);
787  k03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, k03_[ism-1] );
788 
789  }
790 #endif
791 
792  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
793 
794  sprintf(histo, (prefixME_ + "/EBPedestalTask/PN/Gain01/EBPDT PNs pedestal %s G01").c_str(), Numbers::sEB(ism).c_str());
795  me = dqmStore_->get(histo);
796  i01_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i01_[ism-1] );
797 
798  }
799 
800  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 6) != MGPAGainsPN_.end() ) {
801 
802  sprintf(histo, (prefixME_ + "/EBPedestalTask/PN/Gain16/EBPDT PNs pedestal %s G16").c_str(), Numbers::sEB(ism).c_str());
803  me = dqmStore_->get(histo);
804  i02_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i02_[ism-1] );
805 
806  }
807 
808  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
809  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
810  if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
811 
812  if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
813  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
814 
815  if ( mep01_[ism-1] ) mep01_[ism-1]->Reset();
816  if ( mep02_[ism-1] ) mep02_[ism-1]->Reset();
817  if ( mep03_[ism-1] ) mep03_[ism-1]->Reset();
818 
819  if ( mer01_[ism-1] ) mer01_[ism-1]->Reset();
820  if ( mer02_[ism-1] ) mer02_[ism-1]->Reset();
821  if ( mer03_[ism-1] ) mer03_[ism-1]->Reset();
822 
823  if ( mer04_[ism-1] ) mer04_[ism-1]->Reset();
824  if ( mer05_[ism-1] ) mer05_[ism-1]->Reset();
825 
826 #ifdef COMMON_NOISE_ANALYSIS
827  if ( mes01_[ism-1] ) mes01_[ism-1]->Reset();
828  if ( mes02_[ism-1] ) mes02_[ism-1]->Reset();
829  if ( mes03_[ism-1] ) mes03_[ism-1]->Reset();
830 
831  if ( met01_[ism-1] ) met01_[ism-1]->Reset();
832  if ( met02_[ism-1] ) met02_[ism-1]->Reset();
833  if ( met03_[ism-1] ) met03_[ism-1]->Reset();
834 #endif
835 
836  for ( int ie = 1; ie <= 85; ie++ ) {
837  for ( int ip = 1; ip <= 20; ip++ ) {
838 
839  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent(ie, ip, 2.);
840  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent(ie, ip, 2.);
841  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent(ie, ip, 2.);
842 
843  bool update01;
844  bool update02;
845  bool update03;
846 
847  float num01, num02, num03;
848  float mean01, mean02, mean03;
849  float rms01, rms02, rms03;
850 
851  update01 = UtilsClient::getBinStatistics(h01_[ism-1], ie, ip, num01, mean01, rms01);
852  update02 = UtilsClient::getBinStatistics(h02_[ism-1], ie, ip, num02, mean02, rms02);
853  update03 = UtilsClient::getBinStatistics(h03_[ism-1], ie, ip, num03, mean03, rms03);
854 
855  if ( update01 ) {
856 
857  float val;
858 
859  val = 1.;
860  if ( std::abs(mean01 - expectedMean_[0]) > discrepancyMean_[0] )
861  val = 0.;
862  if ( rms01 > RMSThreshold_[0] )
863  val = 0.;
864  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent(ie, ip, val);
865 
866  if ( mep01_[ism-1] ) mep01_[ism-1]->Fill(mean01);
867  if ( mer01_[ism-1] ) mer01_[ism-1]->Fill(rms01);
868 
869  }
870 
871  if ( update02 ) {
872 
873  float val;
874 
875  val = 1.;
876  if ( std::abs(mean02 - expectedMean_[1]) > discrepancyMean_[1] )
877  val = 0.;
878  if ( rms02 > RMSThreshold_[1] )
879  val = 0.;
880  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent(ie, ip, val);
881 
882  if ( mep02_[ism-1] ) mep02_[ism-1]->Fill(mean02);
883  if ( mer02_[ism-1] ) mer02_[ism-1]->Fill(rms02);
884 
885  }
886 
887  if ( update03 ) {
888 
889  float val;
890 
891  val = 1.;
892  if ( std::abs(mean03 - expectedMean_[2]) > discrepancyMean_[2] )
893  val = 0.;
894  if ( rms03 > RMSThreshold_[2] )
895  val = 0.;
896  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent(ie, ip, val);
897 
898  if ( mep03_[ism-1] ) mep03_[ism-1]->Fill(mean03);
899  if ( mer03_[ism-1] ) mer03_[ism-1]->Fill(rms03);
900 
901  }
902 
903  if ( Masks::maskChannel(ism, ie, ip, bits01, EcalBarrel) ) UtilsClient::maskBinContent( meg01_[ism-1], ie, ip );
904  if ( Masks::maskChannel(ism, ie, ip, bits02, EcalBarrel) ) UtilsClient::maskBinContent( meg02_[ism-1], ie, ip );
905  if ( Masks::maskChannel(ism, ie, ip, bits03, EcalBarrel) ) UtilsClient::maskBinContent( meg03_[ism-1], ie, ip );
906 
907  }
908  }
909 
910  // PN diodes
911 
912  for ( int i = 1; i <= 10; i++ ) {
913 
914  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. );
915  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
916 
917  bool update01;
918  bool update02;
919 
920  float num01, num02;
921  float mean01, mean02;
922  float rms01, rms02;
923 
924  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
925  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
926 
927  // filling projections
928  if ( mer04_[ism-1] ) mer04_[ism-1]->Fill(rms01);
929  if ( mer05_[ism-1] ) mer05_[ism-1]->Fill(rms02);
930 
931  if ( update01 ) {
932 
933  float val;
934 
935  val = 1.;
936  if ( mean01 < (expectedMeanPn_[0] - discrepancyMeanPn_[0])
937  || (expectedMeanPn_[0] + discrepancyMeanPn_[0]) < mean01)
938  val = 0.;
939  if ( rms01 > RMSThresholdPn_[0])
940  val = 0.;
941 
942  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent(i, 1, val);
943 
944  }
945 
946  if ( update02 ) {
947 
948  float val;
949 
950  val = 1.;
951  if ( mean02 < (expectedMeanPn_[1] - discrepancyMeanPn_[1])
952  || (expectedMeanPn_[1] + discrepancyMeanPn_[1]) < mean02)
953  val = 0.;
954  if ( rms02 > RMSThresholdPn_[1])
955  val = 0.;
956 
957  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent(i, 1, val);
958  }
959 
960  if ( Masks::maskPn(ism, i, bits01, EcalBarrel) ) UtilsClient::maskBinContent( meg04_[ism-1], i, 1 );
961  if ( Masks::maskPn(ism, i, bits03, EcalBarrel) ) UtilsClient::maskBinContent( meg05_[ism-1], i, 1 );
962 
963  }
964 
965 #ifdef COMMON_NOISE_ANALYSIS
966  for ( int ie = 1; ie <= 85; ie++ ) {
967  for ( int ip = 1; ip <= 20; ip++ ) {
968 
969  float x3val01;
970  float x3val02;
971  float x3val03;
972 
973  float y3val01;
974  float y3val02;
975  float y3val03;
976 
977  float z3val01;
978  float z3val02;
979  float z3val03;
980 
981  float x5val01;
982  float x5val02;
983  float x5val03;
984 
985  float y5val01;
986  float y5val02;
987  float y5val03;
988 
989  float z5val01;
990  float z5val02;
991  float z5val03;
992 
993  if ( mes01_[ism-1] ) mes01_[ism-1]->setBinContent(ie, ip, -999.);
994  if ( mes02_[ism-1] ) mes02_[ism-1]->setBinContent(ie, ip, -999.);
995  if ( mes03_[ism-1] ) mes03_[ism-1]->setBinContent(ie, ip, -999.);
996 
997  if ( met01_[ism-1] ) met01_[ism-1]->setBinContent(ie, ip, -999.);
998  if ( met02_[ism-1] ) met02_[ism-1]->setBinContent(ie, ip, -999.);
999  if ( met03_[ism-1] ) met03_[ism-1]->setBinContent(ie, ip, -999.);
1000 
1001  if ( ie >= 2 && ie <= 84 && ip >= 2 && ip <= 19 ) {
1002 
1003  x3val01 = 0.;
1004  x3val02 = 0.;
1005  x3val03 = 0.;
1006  for ( int i = -1; i <= +1; i++ ) {
1007  for ( int j = -1; j <= +1; j++ ) {
1008 
1009  if ( h01_[ism-1] ) x3val01 = x3val01 + h01_[ism-1]->GetBinError(ie+i, ip+j) *
1010  h01_[ism-1]->GetBinError(ie+i, ip+j);
1011 
1012  if ( h02_[ism-1] ) x3val02 = x3val02 + h02_[ism-1]->GetBinError(ie+i, ip+j) *
1013  h02_[ism-1]->GetBinError(ie+i, ip+j);
1014 
1015  if ( h03_[ism-1] ) x3val03 = x3val03 + h03_[ism-1]->GetBinError(ie+i, ip+j) *
1016  h03_[ism-1]->GetBinError(ie+i, ip+j);
1017 
1018  }
1019  }
1020  x3val01 = x3val01 / (9.*9.);
1021  x3val02 = x3val02 / (9.*9.);
1022  x3val03 = x3val03 / (9.*9.);
1023 
1024  y3val01 = 0.;
1025  if ( j01_[ism-1] ) y3val01 = j01_[ism-1]->GetBinError(ie, ip) *
1026  j01_[ism-1]->GetBinError(ie, ip);
1027 
1028  y3val02 = 0.;
1029  if ( j02_[ism-1] ) y3val02 = j02_[ism-1]->GetBinError(ie, ip) *
1030  j02_[ism-1]->GetBinError(ie, ip);
1031 
1032  y3val03 = 0.;
1033  if ( j03_[ism-1] ) y3val03 = j03_[ism-1]->GetBinError(ie, ip) *
1034  j03_[ism-1]->GetBinError(ie, ip);
1035 
1036  z3val01 = -999.;
1037  if ( x3val01 != 0 && y3val01 != 0 ) z3val01 = sqrt(std::abs(x3val01 - y3val01));
1038  if ( (x3val01 - y3val01) < 0 ) z3val01 = -z3val01;
1039 
1040  if ( mes01_[ism-1] ) mes01_[ism-1]->setBinContent(ie, ip, z3val01);
1041 
1042  z3val02 = -999.;
1043  if ( x3val02 != 0 && y3val02 != 0 ) z3val02 = sqrt(std::abs(x3val02 - y3val02));
1044  if ( (x3val02 - y3val02) < 0 ) z3val02 = -z3val02;
1045 
1046  if ( mes02_[ism-1] ) mes02_[ism-1]->setBinContent(ie, ip, z3val02);
1047 
1048  z3val03 = -999.;
1049  if ( x3val03 != 0 && y3val03 != 0 ) z3val03 = sqrt(std::abs(x3val03 - y3val03));
1050  if ( (x3val03 - y3val03) < 0 ) z3val03 = -z3val03;
1051 
1052  if ( mes03_[ism-1] ) mes03_[ism-1]->setBinContent(ie, ip, z3val03);
1053 
1054  }
1055 
1056  if ( ie >= 3 && ie <= 83 && ip >= 3 && ip <= 18 ) {
1057 
1058  x5val01 = 0.;
1059  x5val02 = 0.;
1060  x5val03 = 0.;
1061  for ( int i = -2; i <= +2; i++ ) {
1062  for ( int j = -2; j <= +2; j++ ) {
1063 
1064  if ( h01_[ism-1] ) x5val01 = x5val01 + h01_[ism-1]->GetBinError(ie+i, ip+j) *
1065  h01_[ism-1]->GetBinError(ie+i, ip+j);
1066 
1067  if ( h02_[ism-1] ) x5val02 = x5val02 + h02_[ism-1]->GetBinError(ie+i, ip+j) *
1068  h02_[ism-1]->GetBinError(ie+i, ip+j);
1069 
1070  if ( h03_[ism-1] ) x5val03 = x5val03 + h03_[ism-1]->GetBinError(ie+i, ip+j) *
1071  h03_[ism-1]->GetBinError(ie+i, ip+j);
1072 
1073  }
1074  }
1075  x5val01 = x5val01 / (25.*25.);
1076  x5val02 = x5val02 / (25.*25.);
1077  x5val03 = x5val03 / (25.*25.);
1078 
1079  y5val01 = 0.;
1080  if ( k01_[ism-1] ) y5val01 = k01_[ism-1]->GetBinError(ie, ip) *
1081  k01_[ism-1]->GetBinError(ie, ip);
1082 
1083  y5val02 = 0.;
1084  if ( k02_[ism-1] ) y5val02 = k02_[ism-1]->GetBinError(ie, ip) *
1085  k02_[ism-1]->GetBinError(ie, ip);
1086 
1087  y5val03 = 0.;
1088  if ( k03_[ism-1] ) y5val03 = k03_[ism-1]->GetBinError(ie, ip) *
1089  k03_[ism-1]->GetBinError(ie, ip);
1090 
1091  z5val01 = -999.;
1092  if ( x5val01 != 0 && y5val01 != 0 ) z5val01 = sqrt(std::abs(x5val01 - y5val01));
1093  if ( (x5val01 - y5val01) < 0 ) z5val01 = -z5val01;
1094 
1095  if ( met01_[ism-1] ) met01_[ism-1]->setBinContent(ie, ip, z5val01);
1096 
1097  z5val02 = -999.;
1098  if ( x5val02 != 0 && y5val02 != 0 ) z5val02 = sqrt(std::abs(x5val02 - y5val02));
1099  if ( (x5val02 - y5val02) < 0 ) z5val02 = -z5val02;
1100 
1101  if ( met02_[ism-1] ) met02_[ism-1]->setBinContent(ie, ip, z5val02);
1102 
1103  z5val03 = -999.;
1104  if ( x5val03 != 0 && y5val03 != 0 ) z5val03 = sqrt(std::abs(x5val03 - y5val03));
1105  if ( (x5val03 - y5val03) < 0 ) z5val03 = -z5val03;
1106 
1107  if ( met03_[ism-1] ) met03_[ism-1]->setBinContent(ie, ip, z5val03);
1108 
1109  }
1110 
1111  }
1112  }
1113 #endif
1114 
1115  }
1116 
1117 }
MonitorElement * mer01_[36]
int i
Definition: DBlmapReader.cc:9
static const int PEDESTAL_MIDDLE_GAIN_RMS_ERROR
void setBinContent(int binx, double content)
set content of bin (1-D)
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:60
static std::string sEB(const int ism)
Definition: Numbers.cc:81
MonitorElement * mer02_[36]
MonitorElement * meg03_[36]
MonitorElement * meg02_[36]
MonitorElement * met03_[36]
std::string prefixME_
MonitorElement * met02_[36]
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.h:189
TProfile2D * k03_[36]
static const int PEDESTAL_HIGH_GAIN_MEAN_ERROR
std::vector< int > MGPAGains_
MonitorElement * mes02_[36]
TProfile * i01_[36]
MonitorElement * mep02_[36]
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * meg01_[36]
tuple histo
Definition: trackerHits.py:12
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * meg04_[36]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:112
void Fill(long long x)
MonitorElement * mep03_[36]
MonitorElement * mes03_[36]
TProfile2D * h02_[36]
MonitorElement * mer03_[36]
T sqrt(T t)
Definition: SSEVec.h:28
MonitorElement * mer05_[36]
TProfile2D * j01_[36]
std::vector< int > superModules_
int j
Definition: DBlmapReader.cc:9
MonitorElement * mer04_[36]
DQMStore * dqmStore_
std::vector< int > MGPAGainsPN_
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 PEDESTAL_LOW_GAIN_MEAN_ERROR
TProfile * i02_[36]
MonitorElement * mep01_[36]
MonitorElement * met01_[36]
TProfile2D * k01_[36]
TProfile2D * j03_[36]
TProfile2D * j02_[36]
float discrepancyMeanPn_[2]
tuple cout
Definition: gather_cfg.py:41
TProfile2D * k02_[36]
MonitorElement * meg05_[36]
static const int PEDESTAL_MIDDLE_GAIN_MEAN_ERROR
MonitorElement * mes01_[36]
TProfile2D * h03_[36]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
TProfile2D * h01_[36]
void Reset(void)
reset ME (ie. contents, errors, etc)
static bool getBinStatistics(const T *histo, const int ix, const int iy, float &num, float &mean, float &rms)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.h:133
void EBPedestalClient::beginJob ( void  )
virtual

begin of job method

Implements EBClient.

Definition at line 152 of file EBPedestalClient.cc.

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

152  {
153 
155 
156  if ( debug_ ) std::cout << "EBPedestalClient: beginJob" << std::endl;
157 
158  ievt_ = 0;
159  jevt_ = 0;
160 
161 }
DQMStore * dqmStore_
tuple cout
Definition: gather_cfg.py:41
void EBPedestalClient::beginRun ( void  )
virtual

begin of run method

Implements EBClient.

Definition at line 163 of file EBPedestalClient.cc.

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

163  {
164 
165  if ( debug_ ) std::cout << "EBPedestalClient: beginRun" << std::endl;
166 
167  jevt_ = 0;
168 
169  this->setup();
170 
171 }
void setup(void)
Setup.
tuple cout
Definition: gather_cfg.py:41
void EBPedestalClient::cleanup ( void  )
virtual

clean up method

Implements EBClient.

Definition at line 402 of file EBPedestalClient.cc.

References cloneME_, dqmStore_, enableCleanup_, edm::getName(), h01_, h02_, h03_, i, i01_, i02_, ecalpyutils::ism(), j01_, j02_, j03_, k01_, k02_, k03_, meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, prefixME_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), and superModules_.

Referenced by endJob(), and endRun().

402  {
403 
404  if ( ! enableCleanup_ ) return;
405 
406  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
407 
408  int ism = superModules_[i];
409 
410  if ( cloneME_ ) {
411  if ( h01_[ism-1] ) delete h01_[ism-1];
412  if ( h02_[ism-1] ) delete h02_[ism-1];
413  if ( h03_[ism-1] ) delete h03_[ism-1];
414 
415  if ( j01_[ism-1] ) delete j01_[ism-1];
416  if ( j02_[ism-1] ) delete j02_[ism-1];
417  if ( j03_[ism-1] ) delete j03_[ism-1];
418 
419  if ( k01_[ism-1] ) delete k01_[ism-1];
420  if ( k02_[ism-1] ) delete k02_[ism-1];
421  if ( k03_[ism-1] ) delete k03_[ism-1];
422 
423  if ( i01_[ism-1] ) delete i01_[ism-1];
424  if ( i02_[ism-1] ) delete i02_[ism-1];
425  }
426 
427  h01_[ism-1] = 0;
428  h02_[ism-1] = 0;
429  h03_[ism-1] = 0;
430 
431  j01_[ism-1] = 0;
432  j02_[ism-1] = 0;
433  j03_[ism-1] = 0;
434 
435  k01_[ism-1] = 0;
436  k02_[ism-1] = 0;
437  k03_[ism-1] = 0;
438 
439  i01_[ism-1] = 0;
440  i02_[ism-1] = 0;
441 
442  }
443 
444  dqmStore_->setCurrentFolder( prefixME_ + "/EBPedestalClient" );
445 
446  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
447 
448  int ism = superModules_[i];
449 
450  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
451  meg01_[ism-1] = 0;
452  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
453  meg02_[ism-1] = 0;
454  if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
455  meg03_[ism-1] = 0;
456 
457  if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
458  meg04_[ism-1] = 0;
459  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
460  meg05_[ism-1] = 0;
461 
462  if ( mep01_[ism-1] ) dqmStore_->removeElement( mep01_[ism-1]->getName() );
463  mep01_[ism-1] = 0;
464  if ( mep02_[ism-1] ) dqmStore_->removeElement( mep02_[ism-1]->getName() );
465  mep02_[ism-1] = 0;
466  if ( mep03_[ism-1] ) dqmStore_->removeElement( mep03_[ism-1]->getName() );
467  mep03_[ism-1] = 0;
468 
469  if ( mer01_[ism-1] ) dqmStore_->removeElement( mer01_[ism-1]->getName() );
470  mer01_[ism-1] = 0;
471  if ( mer02_[ism-1] ) dqmStore_->removeElement( mer02_[ism-1]->getName() );
472  mer02_[ism-1] = 0;
473  if ( mer03_[ism-1] ) dqmStore_->removeElement( mer03_[ism-1]->getName() );
474  mer03_[ism-1] = 0;
475 
476  if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() );
477  mer04_[ism-1] = 0;
478  if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() );
479  mer05_[ism-1] = 0;
480 
481 #ifdef COMMON_NOISE_ANALYSIS
482  if ( mes01_[ism-1] ) dqmStore_->removeElement( mes01_[ism-1]->getName() );
483  mes01_[ism-1] = 0;
484  if ( mes02_[ism-1] ) dqmStore_->removeElement( mes02_[ism-1]->getName() );
485  mes02_[ism-1] = 0;
486  if ( mes03_[ism-1] ) dqmStore_->removeElement( mes03_[ism-1]->getName() );
487  mes03_[ism-1] = 0;
488 
489  if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() );
490  met01_[ism-1] = 0;
491  if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() );
492  met02_[ism-1] = 0;
493  if ( met03_[ism-1] ) dqmStore_->removeElement( met03_[ism-1]->getName() );
494  met03_[ism-1] = 0;
495 #endif
496 
497  }
498 
499 }
MonitorElement * mer01_[36]
int i
Definition: DBlmapReader.cc:9
MonitorElement * mer02_[36]
MonitorElement * meg03_[36]
MonitorElement * meg02_[36]
MonitorElement * met03_[36]
std::string prefixME_
MonitorElement * met02_[36]
TProfile2D * k03_[36]
MonitorElement * mes02_[36]
TProfile * i01_[36]
MonitorElement * mep02_[36]
MonitorElement * meg01_[36]
MonitorElement * meg04_[36]
MonitorElement * mep03_[36]
MonitorElement * mes03_[36]
TProfile2D * h02_[36]
MonitorElement * mer03_[36]
MonitorElement * mer05_[36]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
TProfile2D * j01_[36]
std::vector< int > superModules_
MonitorElement * mer04_[36]
DQMStore * dqmStore_
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
TProfile * i02_[36]
MonitorElement * mep01_[36]
MonitorElement * met01_[36]
TProfile2D * k01_[36]
TProfile2D * j03_[36]
TProfile2D * j02_[36]
TProfile2D * k02_[36]
MonitorElement * meg05_[36]
MonitorElement * mes01_[36]
TProfile2D * h03_[36]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
TProfile2D * h01_[36]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void EBPedestalClient::endJob ( void  )
virtual

end of job method

Implements EBClient.

Definition at line 173 of file EBPedestalClient.cc.

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

173  {
174 
175  if ( debug_ ) std::cout << "EBPedestalClient: endJob, ievt = " << ievt_ << std::endl;
176 
177  this->cleanup();
178 
179 }
void cleanup(void)
clean up method
tuple cout
Definition: gather_cfg.py:41
void EBPedestalClient::endRun ( void  )
virtual

end of run method

Implements EBClient.

Definition at line 181 of file EBPedestalClient.cc.

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

181  {
182 
183  if ( debug_ ) std::cout << "EBPedestalClient: endRun, jevt = " << jevt_ << std::endl;
184 
185  this->cleanup();
186 
187 }
void cleanup(void)
clean up method
tuple cout
Definition: gather_cfg.py:41
int EBPedestalClient::getEvtPerJob ( void  )
inlinevirtual

Get Functions.

Implements EBClient.

Definition at line 72 of file EBPedestalClient.h.

References ievt_.

72 { return ievt_; }
int EBPedestalClient::getEvtPerRun ( void  )
inlinevirtual

Returns the number of processed events in this Run.

Implements EBClient.

Definition at line 73 of file EBPedestalClient.h.

References jevt_.

73 { return jevt_; }
void EBPedestalClient::setup ( void  )
virtual

Setup.

Implements EBClient.

Definition at line 189 of file EBPedestalClient.cc.

References DQMStore::book1D(), DQMStore::book2D(), dqmStore_, spr::find(), edm::getName(), trackerHits::histo, i, ecalpyutils::ism(), meg01_, meg02_, meg03_, meg04_, meg05_, mep01_, mep02_, mep03_, mer01_, mer02_, mer03_, mer04_, mer05_, mes01_, mes02_, mes03_, met01_, met02_, met03_, MGPAGains_, MGPAGainsPN_, prefixME_, DQMStore::removeElement(), MonitorElement::Reset(), Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), and superModules_.

Referenced by beginRun().

189  {
190 
191  char histo[200];
192 
193  dqmStore_->setCurrentFolder( prefixME_ + "/EBPedestalClient" );
194 
195  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
196 
197  int ism = superModules_[i];
198 
199  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
200  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
201  sprintf(histo, "EBPT pedestal quality G01 %s", Numbers::sEB(ism).c_str());
202  meg01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
203  meg01_[ism-1]->setAxisTitle("ieta", 1);
204  meg01_[ism-1]->setAxisTitle("iphi", 2);
205  }
206  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
207  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
208  sprintf(histo, "EBPT pedestal quality G06 %s", Numbers::sEB(ism).c_str());
209  meg02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
210  meg02_[ism-1]->setAxisTitle("ieta", 1);
211  meg02_[ism-1]->setAxisTitle("iphi", 2);
212  }
213  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
214  if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
215  sprintf(histo, "EBPT pedestal quality G12 %s", Numbers::sEB(ism).c_str());
216  meg03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
217  meg03_[ism-1]->setAxisTitle("ieta", 1);
218  meg03_[ism-1]->setAxisTitle("iphi", 2);
219  }
220 
221  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
222  if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
223  sprintf(histo, "EBPT pedestal quality PNs G01 %s", Numbers::sEB(ism).c_str());
224  meg04_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
225  meg04_[ism-1]->setAxisTitle("pseudo-strip", 1);
226  meg04_[ism-1]->setAxisTitle("channel", 2);
227  }
228  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
229  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
230  sprintf(histo, "EBPT pedestal quality PNs G16 %s", Numbers::sEB(ism).c_str());
231  meg05_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
232  meg05_[ism-1]->setAxisTitle("pseudo-strip", 1);
233  meg05_[ism-1]->setAxisTitle("channel", 2);
234  }
235 
236  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
237  if ( mep01_[ism-1] ) dqmStore_->removeElement( mep01_[ism-1]->getName() );
238  sprintf(histo, "EBPT pedestal mean G01 %s", Numbers::sEB(ism).c_str());
239  mep01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 150., 250.);
240  mep01_[ism-1]->setAxisTitle("mean", 1);
241  }
242  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
243  if ( mep02_[ism-1] ) dqmStore_->removeElement( mep02_[ism-1]->getName() );
244  sprintf(histo, "EBPT pedestal mean G06 %s", Numbers::sEB(ism).c_str());
245  mep02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 150., 250.);
246  mep02_[ism-1]->setAxisTitle("mean", 1);
247  }
248  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
249  if ( mep03_[ism-1] ) dqmStore_->removeElement( mep03_[ism-1]->getName() );
250  sprintf(histo, "EBPT pedestal mean G12 %s", Numbers::sEB(ism).c_str());
251  mep03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 150., 250.);
252  mep03_[ism-1]->setAxisTitle("mean", 1);
253  }
254 
255  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
256  if ( mer01_[ism-1] ) dqmStore_->removeElement( mer01_[ism-1]->getName() );
257  sprintf(histo, "EBPT pedestal rms G01 %s", Numbers::sEB(ism).c_str());
258  mer01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
259  mer01_[ism-1]->setAxisTitle("rms", 1);
260  }
261  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
262  if ( mer02_[ism-1] ) dqmStore_->removeElement( mer02_[ism-1]->getName() );
263  sprintf(histo, "EBPT pedestal rms G06 %s", Numbers::sEB(ism).c_str());
264  mer02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
265  mer02_[ism-1]->setAxisTitle("rms", 1);
266  }
267  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
268  if ( mer03_[ism-1] ) dqmStore_->removeElement( mer03_[ism-1]->getName() );
269  sprintf(histo, "EBPT pedestal rms G12 %s", Numbers::sEB(ism).c_str());
270  mer03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
271  mer03_[ism-1]->setAxisTitle("rms", 1);
272  }
273 
274  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
275  if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() );
276  sprintf(histo, "EBPDT PNs pedestal rms %s G01", Numbers::sEB(ism).c_str());
277  mer04_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
278  mer04_[ism-1]->setAxisTitle("rms", 1);
279  }
280  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
281  if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() );
282  sprintf(histo, "EBPDT PNs pedestal rms %s G16", Numbers::sEB(ism).c_str());
283  mer05_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
284  mer05_[ism-1]->setAxisTitle("rms", 1);
285  }
286 
287 #ifdef COMMON_NOISE_ANALYSIS
288  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
289  if ( mes01_[ism-1] ) dqmStore_->removeElement( mes01_[ism-1]->getName() );
290  sprintf(histo, "EBPT pedestal 3sum G01 %s", Numbers::sEB(ism).c_str());
291  mes01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
292  mes01_[ism-1]->setAxisTitle("ieta", 1);
293  mes01_[ism-1]->setAxisTitle("iphi", 2);
294  }
295  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
296  if ( mes02_[ism-1] ) dqmStore_->removeElement( mes02_[ism-1]->getName() );
297  sprintf(histo, "EBPT pedestal 3sum G06 %s", Numbers::sEB(ism).c_str());
298  mes02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
299  mes02_[ism-1]->setAxisTitle("ieta", 1);
300  mes02_[ism-1]->setAxisTitle("iphi", 2);
301  }
302  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
303  if ( mes03_[ism-1] ) dqmStore_->removeElement( mes03_[ism-1]->getName() );
304  sprintf(histo, "EBPT pedestal 3sum G12 %s", Numbers::sEB(ism).c_str());
305  mes03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
306  mes03_[ism-1]->setAxisTitle("ieta", 1);
307  mes03_[ism-1]->setAxisTitle("iphi", 2);
308  }
309 
310  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
311  if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() );
312  sprintf(histo, "EBPT pedestal 5sum G01 %s", Numbers::sEB(ism).c_str());
313  met01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
314  met01_[ism-1]->setAxisTitle("ieta", 1);
315  met01_[ism-1]->setAxisTitle("iphi", 2);
316  }
317  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
318  if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() );
319  sprintf(histo, "EBPT pedestal 5sum G06 %s", Numbers::sEB(ism).c_str());
320  met02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
321  met02_[ism-1]->setAxisTitle("ieta", 1);
322  met02_[ism-1]->setAxisTitle("iphi", 2);
323  }
324  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
325  if ( met03_[ism-1] ) dqmStore_->removeElement( met03_[ism-1]->getName() );
326  sprintf(histo, "EBPT pedestal 5sum G12 %s", Numbers::sEB(ism).c_str());
327  met03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
328  met03_[ism-1]->setAxisTitle("ieta", 1);
329  met03_[ism-1]->setAxisTitle("iphi", 2);
330  }
331 #endif
332 
333  }
334 
335  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
336 
337  int ism = superModules_[i];
338 
339  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
340  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
341  if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
342 
343  if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
344  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
345 
346  for ( int ie = 1; ie <= 85; ie++ ) {
347  for ( int ip = 1; ip <= 20; ip++ ) {
348 
349  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. );
350  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. );
351  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. );
352 
353  }
354  }
355 
356  for ( int i = 1; i <= 10; i++ ) {
357 
358  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. );
359  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
360 
361  }
362 
363  if ( mep01_[ism-1] ) mep01_[ism-1]->Reset();
364  if ( mep02_[ism-1] ) mep02_[ism-1]->Reset();
365  if ( mep03_[ism-1] ) mep03_[ism-1]->Reset();
366 
367  if ( mer01_[ism-1] ) mer01_[ism-1]->Reset();
368  if ( mer02_[ism-1] ) mer02_[ism-1]->Reset();
369  if ( mer03_[ism-1] ) mer03_[ism-1]->Reset();
370 
371  if ( mer04_[ism-1] ) mer04_[ism-1]->Reset();
372  if ( mer05_[ism-1] ) mer05_[ism-1]->Reset();
373 
374 #ifdef COMMON_NOISE_ANALYSIS
375  if ( mes01_[ism-1] ) mes01_[ism-1]->Reset();
376  if ( mes02_[ism-1] ) mes02_[ism-1]->Reset();
377  if ( mes03_[ism-1] ) mes03_[ism-1]->Reset();
378 
379  if ( met01_[ism-1] ) met01_[ism-1]->Reset();
380  if ( met02_[ism-1] ) met02_[ism-1]->Reset();
381  if ( met03_[ism-1] ) met03_[ism-1]->Reset();
382 
383  for ( int ie = 1; ie <= 85; ie++ ) {
384  for ( int ip = 1; ip <= 20; ip++ ) {
385 
386  if ( mes01_[ism-1] ) mes01_[ism-1]->setBinContent( ie, ip, -999. );
387  if ( mes02_[ism-1] ) mes02_[ism-1]->setBinContent( ie, ip, -999. );
388  if ( mes03_[ism-1] ) mes03_[ism-1]->setBinContent( ie, ip, -999. );
389 
390  if ( met01_[ism-1] ) met01_[ism-1]->setBinContent( ie, ip, -999. );
391  if ( met02_[ism-1] ) met02_[ism-1]->setBinContent( ie, ip, -999. );
392  if ( met03_[ism-1] ) met03_[ism-1]->setBinContent( ie, ip, -999. );
393 
394  }
395  }
396 #endif
397 
398  }
399 
400 }
MonitorElement * mer01_[36]
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
static std::string sEB(const int ism)
Definition: Numbers.cc:81
MonitorElement * mer02_[36]
MonitorElement * meg03_[36]
MonitorElement * meg02_[36]
MonitorElement * met03_[36]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
std::string prefixME_
MonitorElement * met02_[36]
std::vector< int > MGPAGains_
MonitorElement * mes02_[36]
MonitorElement * mep02_[36]
MonitorElement * meg01_[36]
tuple histo
Definition: trackerHits.py:12
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * meg04_[36]
MonitorElement * mep03_[36]
MonitorElement * mes03_[36]
MonitorElement * mer03_[36]
MonitorElement * mer05_[36]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
std::vector< int > superModules_
MonitorElement * mer04_[36]
DQMStore * dqmStore_
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
std::vector< int > MGPAGainsPN_
MonitorElement * mep01_[36]
MonitorElement * met01_[36]
MonitorElement * meg05_[36]
MonitorElement * mes01_[36]
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
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

Friends And Related Function Documentation

friend class EBSummaryClient
friend

Definition at line 35 of file EBPedestalClient.h.

Member Data Documentation

bool EBPedestalClient::cloneME_
private

Definition at line 80 of file EBPedestalClient.h.

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

bool EBPedestalClient::debug_
private

Definition at line 83 of file EBPedestalClient.h.

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

float EBPedestalClient::discrepancyMean_[3]
private

Definition at line 139 of file EBPedestalClient.h.

Referenced by analyze(), and EBPedestalClient().

float EBPedestalClient::discrepancyMeanPn_[2]
private

Definition at line 145 of file EBPedestalClient.h.

Referenced by analyze(), and EBPedestalClient().

DQMStore* EBPedestalClient::dqmStore_
private

Definition at line 93 of file EBPedestalClient.h.

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

bool EBPedestalClient::enableCleanup_
private

Definition at line 87 of file EBPedestalClient.h.

Referenced by cleanup(), and EBPedestalClient().

float EBPedestalClient::expectedMean_[3]
private

Definition at line 138 of file EBPedestalClient.h.

Referenced by analyze(), and EBPedestalClient().

float EBPedestalClient::expectedMeanPn_[2]
private

Definition at line 144 of file EBPedestalClient.h.

Referenced by analyze(), and EBPedestalClient().

TProfile2D* EBPedestalClient::h01_[36]
private

Definition at line 95 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::h02_[36]
private

Definition at line 96 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::h03_[36]
private

Definition at line 97 of file EBPedestalClient.h.

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

TProfile* EBPedestalClient::i01_[36]
private

Definition at line 133 of file EBPedestalClient.h.

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

TProfile* EBPedestalClient::i02_[36]
private

Definition at line 134 of file EBPedestalClient.h.

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

int EBPedestalClient::ievt_
private

Definition at line 77 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::j01_[36]
private

Definition at line 99 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::j02_[36]
private

Definition at line 100 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::j03_[36]
private

Definition at line 101 of file EBPedestalClient.h.

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

int EBPedestalClient::jevt_
private

Definition at line 78 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::k01_[36]
private

Definition at line 103 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::k02_[36]
private

Definition at line 104 of file EBPedestalClient.h.

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

TProfile2D* EBPedestalClient::k03_[36]
private

Definition at line 105 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::meg01_[36]
private
MonitorElement* EBPedestalClient::meg02_[36]
private
MonitorElement* EBPedestalClient::meg03_[36]
private
MonitorElement* EBPedestalClient::meg04_[36]
private
MonitorElement* EBPedestalClient::meg05_[36]
private
MonitorElement* EBPedestalClient::mep01_[36]
private

Definition at line 114 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mep02_[36]
private

Definition at line 115 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mep03_[36]
private

Definition at line 116 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mer01_[36]
private

Definition at line 118 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mer02_[36]
private

Definition at line 119 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mer03_[36]
private

Definition at line 120 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mer04_[36]
private

Definition at line 122 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mer05_[36]
private

Definition at line 123 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mes01_[36]
private

Definition at line 125 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mes02_[36]
private

Definition at line 126 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::mes03_[36]
private

Definition at line 127 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::met01_[36]
private

Definition at line 129 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::met02_[36]
private

Definition at line 130 of file EBPedestalClient.h.

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

MonitorElement* EBPedestalClient::met03_[36]
private

Definition at line 131 of file EBPedestalClient.h.

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

std::vector<int> EBPedestalClient::MGPAGains_
private

Definition at line 90 of file EBPedestalClient.h.

Referenced by analyze(), EBPedestalClient(), and setup().

std::vector<int> EBPedestalClient::MGPAGainsPN_
private

Definition at line 91 of file EBPedestalClient.h.

Referenced by analyze(), EBPedestalClient(), and setup().

std::string EBPedestalClient::prefixME_
private

Definition at line 85 of file EBPedestalClient.h.

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

float EBPedestalClient::RMSThreshold_[3]
private

Definition at line 140 of file EBPedestalClient.h.

Referenced by analyze(), and EBPedestalClient().

float EBPedestalClient::RMSThresholdPn_[2]
private

Definition at line 146 of file EBPedestalClient.h.

Referenced by analyze(), and EBPedestalClient().

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

Definition at line 89 of file EBPedestalClient.h.

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

bool EBPedestalClient::verbose_
private

Definition at line 82 of file EBPedestalClient.h.

Referenced by EBPedestalClient().