20 #ifdef WITH_ECAL_COND_DB
112 #ifdef COMMON_NOISE_ANALYSIS
200 name =
"EBPT pedestal quality G01 " +
Numbers::sEB(ism);
207 name =
"EBPT pedestal quality G06 " +
Numbers::sEB(ism);
214 name =
"EBPT pedestal quality G12 " +
Numbers::sEB(ism);
222 name =
"EBPT pedestal quality PNs G01 " +
Numbers::sEB(ism);
229 name =
"EBPT pedestal quality PNs G16 " +
Numbers::sEB(ism);
275 name =
"EBPDT PNs pedestal rms " +
Numbers::sEB(ism) +
" G01";
281 name =
"EBPDT PNs pedestal rms " +
Numbers::sEB(ism) +
" G16";
286 #ifdef COMMON_NOISE_ANALYSIS
345 for (
int ie = 1; ie <= 85; ie++ ) {
346 for (
int ip = 1; ip <= 20; ip++ ) {
355 for (
int i = 1;
i <= 10;
i++ ) {
373 #ifdef COMMON_NOISE_ANALYSIS
382 for (
int ie = 1; ie <= 85; ie++ ) {
383 for (
int ip = 1; ip <= 20; ip++ ) {
410 if (
h01_[ism-1] )
delete h01_[ism-1];
411 if (
h02_[ism-1] )
delete h02_[ism-1];
412 if (
h03_[ism-1] )
delete h03_[ism-1];
414 if (
j01_[ism-1] )
delete j01_[ism-1];
415 if (
j02_[ism-1] )
delete j02_[ism-1];
416 if (
j03_[ism-1] )
delete j03_[ism-1];
418 if (
k01_[ism-1] )
delete k01_[ism-1];
419 if (
k02_[ism-1] )
delete k02_[ism-1];
420 if (
k03_[ism-1] )
delete k03_[ism-1];
422 if (
i01_[ism-1] )
delete i01_[ism-1];
423 if (
i02_[ism-1] )
delete i02_[ism-1];
480 #ifdef COMMON_NOISE_ANALYSIS
500 #ifdef WITH_ECAL_COND_DB
508 std::map<EcalLogicID, MonPedestalsDat> dataset1;
528 for (
int ie = 1; ie <= 85; ie++ ) {
529 for (
int ip = 1; ip <= 20; ip++ ) {
535 float num01, num02, num03;
536 float mean01, mean02, mean03;
537 float rms01, rms02, rms03;
543 if ( update01 || update02 || update03 ) {
549 std::cout <<
"G01 (" << ie <<
"," << ip <<
") " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
550 std::cout <<
"G06 (" << ie <<
"," << ip <<
") " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
551 std::cout <<
"G12 (" << ie <<
"," << ip <<
") " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
597 }
catch (std::runtime_error &
e) {
605 std::map<EcalLogicID, MonPNPedDat> dataset2;
622 for (
int i = 1;
i <= 10;
i++ ) {
628 float mean01, mean02;
634 if ( update01 || update02 ) {
640 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
641 std::cout <<
"PNs (" <<
i <<
") G16 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
679 }
catch (std::runtime_error &e) {
693 if (
ievt_ % 10 == 0 ) {
736 #ifdef COMMON_NOISE_ANALYSIS
812 #ifdef COMMON_NOISE_ANALYSIS
822 for (
int ie = 1; ie <= 85; ie++ ) {
823 for (
int ip = 1; ip <= 20; ip++ ) {
833 float num01, num02, num03;
834 float mean01, mean02, mean03;
835 float rms01, rms02, rms03;
898 for (
int i = 1;
i <= 10;
i++ ) {
907 float mean01, mean02;
951 #ifdef COMMON_NOISE_ANALYSIS
952 for (
int ie = 1; ie <= 85; ie++ ) {
953 for (
int ip = 1; ip <= 20; ip++ ) {
987 if ( ie >= 2 && ie <= 84 && ip >= 2 && ip <= 19 ) {
992 for (
int i = -1;
i <= +1;
i++ ) {
993 for (
int j = -1;
j <= +1;
j++ ) {
995 if (
h01_[ism-1] ) x3val01 = x3val01 +
h01_[ism-1]->GetBinError(ie+
i, ip+
j) *
996 h01_[ism-1]->GetBinError(ie+
i, ip+
j);
998 if (
h02_[ism-1] ) x3val02 = x3val02 +
h02_[ism-1]->GetBinError(ie+
i, ip+
j) *
999 h02_[ism-1]->GetBinError(ie+
i, ip+
j);
1001 if (
h03_[ism-1] ) x3val03 = x3val03 +
h03_[ism-1]->GetBinError(ie+
i, ip+
j) *
1002 h03_[ism-1]->GetBinError(ie+
i, ip+
j);
1006 x3val01 = x3val01 / (9.*9.);
1007 x3val02 = x3val02 / (9.*9.);
1008 x3val03 = x3val03 / (9.*9.);
1011 if (
j01_[ism-1] ) y3val01 =
j01_[ism-1]->GetBinError(ie, ip) *
1012 j01_[ism-1]->GetBinError(ie, ip);
1015 if (
j02_[ism-1] ) y3val02 =
j02_[ism-1]->GetBinError(ie, ip) *
1016 j02_[ism-1]->GetBinError(ie, ip);
1019 if (
j03_[ism-1] ) y3val03 =
j03_[ism-1]->GetBinError(ie, ip) *
1020 j03_[ism-1]->GetBinError(ie, ip);
1023 if ( x3val01 != 0 && y3val01 != 0 ) z3val01 =
sqrt(
std::abs(x3val01 - y3val01));
1024 if ( (x3val01 - y3val01) < 0 ) z3val01 = -z3val01;
1029 if ( x3val02 != 0 && y3val02 != 0 ) z3val02 =
sqrt(
std::abs(x3val02 - y3val02));
1030 if ( (x3val02 - y3val02) < 0 ) z3val02 = -z3val02;
1035 if ( x3val03 != 0 && y3val03 != 0 ) z3val03 =
sqrt(
std::abs(x3val03 - y3val03));
1036 if ( (x3val03 - y3val03) < 0 ) z3val03 = -z3val03;
1042 if ( ie >= 3 && ie <= 83 && ip >= 3 && ip <= 18 ) {
1047 for (
int i = -2;
i <= +2;
i++ ) {
1048 for (
int j = -2;
j <= +2;
j++ ) {
1050 if (
h01_[ism-1] ) x5val01 = x5val01 +
h01_[ism-1]->GetBinError(ie+
i, ip+
j) *
1051 h01_[ism-1]->GetBinError(ie+
i, ip+
j);
1053 if (
h02_[ism-1] ) x5val02 = x5val02 +
h02_[ism-1]->GetBinError(ie+
i, ip+
j) *
1054 h02_[ism-1]->GetBinError(ie+
i, ip+
j);
1056 if (
h03_[ism-1] ) x5val03 = x5val03 +
h03_[ism-1]->GetBinError(ie+
i, ip+
j) *
1057 h03_[ism-1]->GetBinError(ie+
i, ip+
j);
1061 x5val01 = x5val01 / (25.*25.);
1062 x5val02 = x5val02 / (25.*25.);
1063 x5val03 = x5val03 / (25.*25.);
1066 if (
k01_[ism-1] ) y5val01 =
k01_[ism-1]->GetBinError(ie, ip) *
1067 k01_[ism-1]->GetBinError(ie, ip);
1070 if (
k02_[ism-1] ) y5val02 =
k02_[ism-1]->GetBinError(ie, ip) *
1071 k02_[ism-1]->GetBinError(ie, ip);
1074 if (
k03_[ism-1] ) y5val03 =
k03_[ism-1]->GetBinError(ie, ip) *
1075 k03_[ism-1]->GetBinError(ie, ip);
1078 if ( x5val01 != 0 && y5val01 != 0 ) z5val01 =
sqrt(
std::abs(x5val01 - y5val01));
1079 if ( (x5val01 - y5val01) < 0 ) z5val01 = -z5val01;
1084 if ( x5val02 != 0 && y5val02 != 0 ) z5val02 =
sqrt(
std::abs(x5val02 - y5val02));
1085 if ( (x5val02 - y5val02) < 0 ) z5val02 = -z5val02;
1090 if ( x5val03 != 0 && y5val03 != 0 ) z5val03 =
sqrt(
std::abs(x5val03 - y5val03));
1091 if ( (x5val03 - y5val03) < 0 ) z5val03 = -z5val03;
MonitorElement * mer01_[36]
void beginRun(void)
begin of run method
Cache logicID vector from database.
T getUntrackedParameter(std::string const &, T const &) const
void setPedMeanG1(float mean)
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)
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.
MonitorElement * met02_[36]
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Some "id" conversions.
static std::string sEB(const unsigned ism)
void setPedRMSG16(float mean)
static const int PEDESTAL_HIGH_GAIN_MEAN_ERROR
std::vector< int > MGPAGains_
static bool getBinQuality(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin quality is good or masked.
MonitorElement * mes02_[36]
virtual ~EBPedestalClient()
Destructor.
MonitorElement * mep02_[36]
MonitorElement * meg01_[36]
void setPedRMSG1(float mean)
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
void setPedMeanG1(float mean)
static unsigned icEB(const unsigned ism, const unsigned ix, const unsigned iy)
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)
MonitorElement * meg04_[36]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
void setTaskStatus(bool status)
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
void cleanup(void)
clean up method
MonitorElement * mep03_[36]
MonitorElement * mes03_[36]
MonitorElement * mer03_[36]
MonitorElement * mer05_[36]
void setPedMeanG6(float mean)
void removeElement(const std::string &name)
void endJob(void)
end of job method
std::vector< int > superModules_
Abs< T >::type abs(const T &t)
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
MonitorElement * mer04_[36]
EBPedestalClient(const edm::ParameterSet &ps)
Constructor.
void analyze(void)
Analyze.
void setPedMeanG16(float mean)
std::vector< int > MGPAGainsPN_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void endRun(void)
end of run method
void beginJob(void)
begin of job method
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
MonitorElement * mep01_[36]
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.
MonitorElement * met01_[36]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
float discrepancyMean_[3]
float discrepancyMeanPn_[2]
void setPedMeanG12(float mean)
void setTaskStatus(bool status)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
MonitorElement * meg05_[36]
static const int PEDESTAL_MIDDLE_GAIN_MEAN_ERROR
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.
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)