20 #ifdef WITH_ECAL_COND_DB
114 #ifdef COMMON_NOISE_ANALYSIS
206 name =
"EEPT pedestal quality G01 " +
Numbers::sEE(ism);
214 name =
"EEPT pedestal quality G06 " +
Numbers::sEE(ism);
222 name =
"EEPT pedestal quality G12 " +
Numbers::sEE(ism);
231 name =
"EEPT pedestal quality PNs G01 " +
Numbers::sEE(ism);
238 name =
"EEPT pedestal quality PNs G16 " +
Numbers::sEE(ism);
284 name =
"EEPDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01";
290 name =
"EEPDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16";
295 #ifdef COMMON_NOISE_ANALYSIS
360 for (
int ix = 1; ix <= 50; ix++ ) {
361 for (
int iy = 1; iy <= 50; iy++ ) {
370 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
381 for (
int i = 1;
i <= 10;
i++ ) {
387 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
388 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
406 #ifdef COMMON_NOISE_ANALYSIS
415 for (
int ix = 1; ix <= 50; ix++ ) {
416 for (
int iy = 1; iy <= 50; iy++ ) {
443 if (
h01_[ism-1] )
delete h01_[ism-1];
444 if (
h02_[ism-1] )
delete h02_[ism-1];
445 if (
h03_[ism-1] )
delete h03_[ism-1];
447 if (
j01_[ism-1] )
delete j01_[ism-1];
448 if (
j02_[ism-1] )
delete j02_[ism-1];
449 if (
j03_[ism-1] )
delete j03_[ism-1];
451 if (
k01_[ism-1] )
delete k01_[ism-1];
452 if (
k02_[ism-1] )
delete k02_[ism-1];
453 if (
k03_[ism-1] )
delete k03_[ism-1];
455 if (
i01_[ism-1] )
delete i01_[ism-1];
456 if (
i02_[ism-1] )
delete i02_[ism-1];
513 #ifdef COMMON_NOISE_ANALYSIS
533 #ifdef WITH_ECAL_COND_DB
541 std::map<EcalLogicID, MonPedestalsDat> dataset1;
561 for (
int ix = 1; ix <= 50; ix++ ) {
562 for (
int iy = 1; iy <= 50; iy++ ) {
567 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
575 float num01, num02, num03;
576 float mean01, mean02, mean03;
577 float rms01, rms02, rms03;
583 if ( update01 || update02 || update03 ) {
620 if ( ic == -1 )
continue;
639 }
catch (std::runtime_error &
e) {
647 std::map<EcalLogicID, MonPNPedDat> dataset2;
664 for (
int i = 1;
i <= 10;
i++ ) {
670 float mean01, mean02;
676 if ( update01 || update02 ) {
682 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
683 std::cout <<
"PNs (" <<
i <<
") G16 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
721 }
catch (std::runtime_error &e) {
735 if (
ievt_ % 10 == 0 ) {
772 #ifdef COMMON_NOISE_ANALYSIS
832 #ifdef COMMON_NOISE_ANALYSIS
842 for (
int ix = 1; ix <= 50; ix++ ) {
843 for (
int iy = 1; iy <= 50; iy++ ) {
852 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
866 float num01, num02, num03;
867 float mean01, mean02, mean03;
868 float rms01, rms02, rms03;
935 for (
int i = 1;
i <= 10;
i++ ) {
941 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
942 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
951 float mean01, mean02;
995 #ifdef COMMON_NOISE_ANALYSIS
996 for (
int ix = 1; ix <= 50; ix++ ) {
997 for (
int iy = 1; iy <= 50; iy++ ) {
1034 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1038 if ( ix >= 2 && ix <= 49 && iy >= 2 && iy <= 49 ) {
1043 for (
int i = -1;
i <= +1;
i++ ) {
1044 for (
int j = -1;
j <= +1;
j++ ) {
1046 if (
h01_[ism-1] ) x3val01 = x3val01 +
h01_[ism-1]->GetBinError(ix+
i, iy+
j) *
1047 h01_[ism-1]->GetBinError(ix+
i, iy+
j);
1049 if (
h02_[ism-1] ) x3val02 = x3val02 +
h02_[ism-1]->GetBinError(ix+
i, iy+
j) *
1050 h02_[ism-1]->GetBinError(ix+
i, iy+
j);
1052 if (
h03_[ism-1] ) x3val03 = x3val03 +
h03_[ism-1]->GetBinError(ix+
i, iy+
j) *
1053 h03_[ism-1]->GetBinError(ix+
i, iy+
j);
1057 x3val01 = x3val01 / (9.*9.);
1058 x3val02 = x3val02 / (9.*9.);
1059 x3val03 = x3val03 / (9.*9.);
1062 if (
j01_[ism-1] ) y3val01 =
j01_[ism-1]->GetBinError(ix, iy) *
1063 j01_[ism-1]->GetBinError(ix, iy);
1066 if (
j02_[ism-1] ) y3val02 =
j02_[ism-1]->GetBinError(ix, iy) *
1067 j02_[ism-1]->GetBinError(ix, iy);
1070 if (
j03_[ism-1] ) y3val03 =
j03_[ism-1]->GetBinError(ix, iy) *
1071 j03_[ism-1]->GetBinError(ix, iy);
1074 if ( x3val01 != 0 && y3val01 != 0 ) z3val01 =
sqrt(
std::abs(x3val01 - y3val01));
1075 if ( (x3val01 - y3val01) < 0 ) z3val01 = -z3val01;
1080 if ( x3val02 != 0 && y3val02 != 0 ) z3val02 =
sqrt(
std::abs(x3val02 - y3val02));
1081 if ( (x3val02 - y3val02) < 0 ) z3val02 = -z3val02;
1086 if ( x3val03 != 0 && y3val03 != 0 ) z3val03 =
sqrt(
std::abs(x3val03 - y3val03));
1087 if ( (x3val03 - y3val03) < 0 ) z3val03 = -z3val03;
1093 if ( ix >= 3 && ix <= 48 && iy >= 3 && iy <= 48 ) {
1098 for (
int i = -2;
i <= +2;
i++ ) {
1099 for (
int j = -2;
j <= +2;
j++ ) {
1101 if (
h01_[ism-1] ) x5val01 = x5val01 +
h01_[ism-1]->GetBinError(ix+
i, iy+
j) *
1102 h01_[ism-1]->GetBinError(ix+
i, iy+
j);
1104 if (
h02_[ism-1] ) x5val02 = x5val02 +
h02_[ism-1]->GetBinError(ix+
i, iy+
j) *
1105 h02_[ism-1]->GetBinError(ix+
i, iy+
j);
1107 if (
h03_[ism-1] ) x5val03 = x5val03 +
h03_[ism-1]->GetBinError(ix+
i, iy+
j) *
1108 h03_[ism-1]->GetBinError(ix+
i, iy+
j);
1112 x5val01 = x5val01 / (25.*25.);
1113 x5val02 = x5val02 / (25.*25.);
1114 x5val03 = x5val03 / (25.*25.);
1117 if (
k01_[ism-1] ) y5val01 =
k01_[ism-1]->GetBinError(ix, iy) *
1118 k01_[ism-1]->GetBinError(ix, iy);
1121 if (
k02_[ism-1] ) y5val02 =
k02_[ism-1]->GetBinError(ix, iy) *
1122 k02_[ism-1]->GetBinError(ix, iy);
1125 if (
k03_[ism-1] ) y5val03 =
k03_[ism-1]->GetBinError(ix, iy) *
1126 k03_[ism-1]->GetBinError(ix, iy);
1129 if ( x5val01 != 0 && y5val01 != 0 ) z5val01 =
sqrt(
std::abs(x5val01 - y5val01));
1130 if ( (x5val01 - y5val01) < 0 ) z5val01 = -z5val01;
1135 if ( x5val02 != 0 && y5val02 != 0 ) z5val02 =
sqrt(
std::abs(x5val02 - y5val02));
1136 if ( (x5val02 - y5val02) < 0 ) z5val02 = -z5val02;
1141 if ( x5val03 != 0 && y5val03 != 0 ) z5val03 =
sqrt(
std::abs(x5val03 - y5val03));
1142 if ( (x5val03 - y5val03) < 0 ) z5val03 = -z5val03;
virtual ~EEPedestalClient()
Destructor.
Cache logicID vector from database.
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
void setPedMeanG1(float mean)
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
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)
std::vector< int > MGPAGainsPN_
MonitorElement * mep03_[18]
MonitorElement * meg04_[18]
void beginJob(void)
begin of job method
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Some "id" conversions.
MonitorElement * meg05_[18]
void setPedRMSG16(float mean)
static const int PEDESTAL_HIGH_GAIN_MEAN_ERROR
static bool getBinQuality(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin quality is good or masked.
void endJob(void)
end of job method
MonitorElement * met01_[18]
MonitorElement * meg01_[18]
std::vector< int > superModules_
static int ix0EE(const unsigned ism)
MonitorElement * mer01_[18]
void setPedRMSG1(float mean)
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
void setPedMeanG1(float mean)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
void setPedRMSG6(float rms)
float discrepancyMean_[3]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
static int iy0EE(const unsigned ism)
void setTaskStatus(bool status)
void beginRun(void)
begin of run method
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
MonitorElement * mer05_[18]
MonitorElement * meg03_[18]
MonitorElement * mer03_[18]
MonitorElement * mep02_[18]
void setPedMeanG6(float mean)
void removeElement(const std::string &name)
MonitorElement * mer04_[18]
MonitorElement * mer02_[18]
Abs< T >::type abs(const T &t)
void setPedMeanG16(float mean)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
MonitorElement * meg02_[18]
MonitorElement * mes03_[18]
MonitorElement * mes01_[18]
void cleanup(void)
clean up method
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
void setPedRMSG1(float rms)
static bool getBinStatistics(TH1 *histo, const int ix, const int iy, float &num, float &mean, float &rms, float minEntries=1.)
Returns true if the bin contains good statistical data.
float RMSThresholdInner_[3]
std::vector< int > MGPAGains_
MonitorElement * met02_[18]
EEPedestalClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * mep01_[18]
MonitorElement * mes02_[18]
float discrepancyMeanPn_[2]
static unsigned indexEE(const unsigned ism, const unsigned ix, const unsigned iy)
void endRun(void)
end of run method
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
void setPedMeanG12(float mean)
MonitorElement * met03_[18]
void setTaskStatus(bool status)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void analyze(void)
Analyze.
static const int PEDESTAL_MIDDLE_GAIN_MEAN_ERROR
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
int ism(int ieta, int iphi)
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)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
void setCurrentFolder(const std::string &fullpath)
void setPedRMSG12(float rms)