22 #ifdef WITH_ECAL_COND_DB
116 #ifdef COMMON_NOISE_ANALYSIS
208 name =
"EEPT pedestal quality G01 " +
Numbers::sEE(ism);
216 name =
"EEPT pedestal quality G06 " +
Numbers::sEE(ism);
224 name =
"EEPT pedestal quality G12 " +
Numbers::sEE(ism);
233 name =
"EEPT pedestal quality PNs G01 " +
Numbers::sEE(ism);
240 name =
"EEPT pedestal quality PNs G16 " +
Numbers::sEE(ism);
286 name =
"EEPDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01";
292 name =
"EEPDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16";
297 #ifdef COMMON_NOISE_ANALYSIS
362 for (
int ix = 1; ix <= 50; ix++ ) {
363 for (
int iy = 1; iy <= 50; iy++ ) {
372 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
383 for (
int i = 1;
i <= 10;
i++ ) {
389 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
390 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
408 #ifdef COMMON_NOISE_ANALYSIS
417 for (
int ix = 1; ix <= 50; ix++ ) {
418 for (
int iy = 1; iy <= 50; iy++ ) {
445 if (
h01_[ism-1] )
delete h01_[ism-1];
446 if (
h02_[ism-1] )
delete h02_[ism-1];
447 if (
h03_[ism-1] )
delete h03_[ism-1];
449 if (
j01_[ism-1] )
delete j01_[ism-1];
450 if (
j02_[ism-1] )
delete j02_[ism-1];
451 if (
j03_[ism-1] )
delete j03_[ism-1];
453 if (
k01_[ism-1] )
delete k01_[ism-1];
454 if (
k02_[ism-1] )
delete k02_[ism-1];
455 if (
k03_[ism-1] )
delete k03_[ism-1];
457 if (
i01_[ism-1] )
delete i01_[ism-1];
458 if (
i02_[ism-1] )
delete i02_[ism-1];
515 #ifdef COMMON_NOISE_ANALYSIS
535 #ifdef WITH_ECAL_COND_DB
543 std::map<EcalLogicID, MonPedestalsDat> dataset1;
563 for (
int ix = 1; ix <= 50; ix++ ) {
564 for (
int iy = 1; iy <= 50; iy++ ) {
569 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
577 float num01, num02, num03;
578 float mean01, mean02, mean03;
579 float rms01, rms02, rms03;
585 if ( update01 || update02 || update03 ) {
622 if ( ic == -1 )
continue;
641 }
catch (std::runtime_error &
e) {
649 std::map<EcalLogicID, MonPNPedDat> dataset2;
666 for (
int i = 1;
i <= 10;
i++ ) {
672 float mean01, mean02;
678 if ( update01 || update02 ) {
684 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
685 std::cout <<
"PNs (" <<
i <<
") G16 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
723 }
catch (std::runtime_error &e) {
737 if (
ievt_ % 10 == 0 ) {
774 #ifdef COMMON_NOISE_ANALYSIS
834 #ifdef COMMON_NOISE_ANALYSIS
844 for (
int ix = 1; ix <= 50; ix++ ) {
845 for (
int iy = 1; iy <= 50; iy++ ) {
854 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
868 float num01, num02, num03;
869 float mean01, mean02, mean03;
870 float rms01, rms02, rms03;
937 for (
int i = 1;
i <= 10;
i++ ) {
943 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
944 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
953 float mean01, mean02;
997 #ifdef COMMON_NOISE_ANALYSIS
998 for (
int ix = 1; ix <= 50; ix++ ) {
999 for (
int iy = 1; iy <= 50; iy++ ) {
1036 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1040 if ( ix >= 2 && ix <= 49 && iy >= 2 && iy <= 49 ) {
1045 for (
int i = -1;
i <= +1;
i++ ) {
1046 for (
int j = -1;
j <= +1;
j++ ) {
1048 if (
h01_[ism-1] ) x3val01 = x3val01 +
h01_[ism-1]->GetBinError(ix+
i, iy+
j) *
1049 h01_[ism-1]->GetBinError(ix+
i, iy+
j);
1051 if (
h02_[ism-1] ) x3val02 = x3val02 +
h02_[ism-1]->GetBinError(ix+
i, iy+
j) *
1052 h02_[ism-1]->GetBinError(ix+
i, iy+
j);
1054 if (
h03_[ism-1] ) x3val03 = x3val03 +
h03_[ism-1]->GetBinError(ix+
i, iy+
j) *
1055 h03_[ism-1]->GetBinError(ix+
i, iy+
j);
1059 x3val01 = x3val01 / (9.*9.);
1060 x3val02 = x3val02 / (9.*9.);
1061 x3val03 = x3val03 / (9.*9.);
1064 if (
j01_[ism-1] ) y3val01 =
j01_[ism-1]->GetBinError(ix, iy) *
1065 j01_[ism-1]->GetBinError(ix, iy);
1068 if (
j02_[ism-1] ) y3val02 =
j02_[ism-1]->GetBinError(ix, iy) *
1069 j02_[ism-1]->GetBinError(ix, iy);
1072 if (
j03_[ism-1] ) y3val03 =
j03_[ism-1]->GetBinError(ix, iy) *
1073 j03_[ism-1]->GetBinError(ix, iy);
1076 if ( x3val01 != 0 && y3val01 != 0 ) z3val01 =
sqrt(
std::abs(x3val01 - y3val01));
1077 if ( (x3val01 - y3val01) < 0 ) z3val01 = -z3val01;
1082 if ( x3val02 != 0 && y3val02 != 0 ) z3val02 =
sqrt(
std::abs(x3val02 - y3val02));
1083 if ( (x3val02 - y3val02) < 0 ) z3val02 = -z3val02;
1088 if ( x3val03 != 0 && y3val03 != 0 ) z3val03 =
sqrt(
std::abs(x3val03 - y3val03));
1089 if ( (x3val03 - y3val03) < 0 ) z3val03 = -z3val03;
1095 if ( ix >= 3 && ix <= 48 && iy >= 3 && iy <= 48 ) {
1100 for (
int i = -2;
i <= +2;
i++ ) {
1101 for (
int j = -2;
j <= +2;
j++ ) {
1103 if (
h01_[ism-1] ) x5val01 = x5val01 +
h01_[ism-1]->GetBinError(ix+
i, iy+
j) *
1104 h01_[ism-1]->GetBinError(ix+
i, iy+
j);
1106 if (
h02_[ism-1] ) x5val02 = x5val02 +
h02_[ism-1]->GetBinError(ix+
i, iy+
j) *
1107 h02_[ism-1]->GetBinError(ix+
i, iy+
j);
1109 if (
h03_[ism-1] ) x5val03 = x5val03 +
h03_[ism-1]->GetBinError(ix+
i, iy+
j) *
1110 h03_[ism-1]->GetBinError(ix+
i, iy+
j);
1114 x5val01 = x5val01 / (25.*25.);
1115 x5val02 = x5val02 / (25.*25.);
1116 x5val03 = x5val03 / (25.*25.);
1119 if (
k01_[ism-1] ) y5val01 =
k01_[ism-1]->GetBinError(ix, iy) *
1120 k01_[ism-1]->GetBinError(ix, iy);
1123 if (
k02_[ism-1] ) y5val02 =
k02_[ism-1]->GetBinError(ix, iy) *
1124 k02_[ism-1]->GetBinError(ix, iy);
1127 if (
k03_[ism-1] ) y5val03 =
k03_[ism-1]->GetBinError(ix, iy) *
1128 k03_[ism-1]->GetBinError(ix, iy);
1131 if ( x5val01 != 0 && y5val01 != 0 ) z5val01 =
sqrt(
std::abs(x5val01 - y5val01));
1132 if ( (x5val01 - y5val01) < 0 ) z5val01 = -z5val01;
1137 if ( x5val02 != 0 && y5val02 != 0 ) z5val02 =
sqrt(
std::abs(x5val02 - y5val02));
1138 if ( (x5val02 - y5val02) < 0 ) z5val02 = -z5val02;
1143 if ( x5val03 != 0 && y5val03 != 0 ) z5val03 =
sqrt(
std::abs(x5val03 - y5val03));
1144 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]
std::string getName(Reflex::Type &cc)
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)