22 #ifdef WITH_ECAL_COND_DB
114 #ifdef COMMON_NOISE_ANALYSIS
202 name =
"EBPT pedestal quality G01 " +
Numbers::sEB(ism);
209 name =
"EBPT pedestal quality G06 " +
Numbers::sEB(ism);
216 name =
"EBPT pedestal quality G12 " +
Numbers::sEB(ism);
224 name =
"EBPT pedestal quality PNs G01 " +
Numbers::sEB(ism);
231 name =
"EBPT pedestal quality PNs G16 " +
Numbers::sEB(ism);
277 name =
"EBPDT PNs pedestal rms " +
Numbers::sEB(ism) +
" G01";
283 name =
"EBPDT PNs pedestal rms " +
Numbers::sEB(ism) +
" G16";
288 #ifdef COMMON_NOISE_ANALYSIS
347 for (
int ie = 1; ie <= 85; ie++ ) {
348 for (
int ip = 1; ip <= 20; ip++ ) {
357 for (
int i = 1;
i <= 10;
i++ ) {
375 #ifdef COMMON_NOISE_ANALYSIS
384 for (
int ie = 1; ie <= 85; ie++ ) {
385 for (
int ip = 1; ip <= 20; ip++ ) {
412 if (
h01_[ism-1] )
delete h01_[ism-1];
413 if (
h02_[ism-1] )
delete h02_[ism-1];
414 if (
h03_[ism-1] )
delete h03_[ism-1];
416 if (
j01_[ism-1] )
delete j01_[ism-1];
417 if (
j02_[ism-1] )
delete j02_[ism-1];
418 if (
j03_[ism-1] )
delete j03_[ism-1];
420 if (
k01_[ism-1] )
delete k01_[ism-1];
421 if (
k02_[ism-1] )
delete k02_[ism-1];
422 if (
k03_[ism-1] )
delete k03_[ism-1];
424 if (
i01_[ism-1] )
delete i01_[ism-1];
425 if (
i02_[ism-1] )
delete i02_[ism-1];
482 #ifdef COMMON_NOISE_ANALYSIS
502 #ifdef WITH_ECAL_COND_DB
510 std::map<EcalLogicID, MonPedestalsDat> dataset1;
530 for (
int ie = 1; ie <= 85; ie++ ) {
531 for (
int ip = 1; ip <= 20; ip++ ) {
537 float num01, num02, num03;
538 float mean01, mean02, mean03;
539 float rms01, rms02, rms03;
545 if ( update01 || update02 || update03 ) {
551 std::cout <<
"G01 (" << ie <<
"," << ip <<
") " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
552 std::cout <<
"G06 (" << ie <<
"," << ip <<
") " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
553 std::cout <<
"G12 (" << ie <<
"," << ip <<
") " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
599 }
catch (std::runtime_error &
e) {
607 std::map<EcalLogicID, MonPNPedDat> dataset2;
624 for (
int i = 1;
i <= 10;
i++ ) {
630 float mean01, mean02;
636 if ( update01 || update02 ) {
642 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
643 std::cout <<
"PNs (" <<
i <<
") G16 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
681 }
catch (std::runtime_error &e) {
695 if (
ievt_ % 10 == 0 ) {
738 #ifdef COMMON_NOISE_ANALYSIS
814 #ifdef COMMON_NOISE_ANALYSIS
824 for (
int ie = 1; ie <= 85; ie++ ) {
825 for (
int ip = 1; ip <= 20; ip++ ) {
835 float num01, num02, num03;
836 float mean01, mean02, mean03;
837 float rms01, rms02, rms03;
900 for (
int i = 1;
i <= 10;
i++ ) {
909 float mean01, mean02;
953 #ifdef COMMON_NOISE_ANALYSIS
954 for (
int ie = 1; ie <= 85; ie++ ) {
955 for (
int ip = 1; ip <= 20; ip++ ) {
989 if ( ie >= 2 && ie <= 84 && ip >= 2 && ip <= 19 ) {
994 for (
int i = -1;
i <= +1;
i++ ) {
995 for (
int j = -1;
j <= +1;
j++ ) {
997 if (
h01_[ism-1] ) x3val01 = x3val01 +
h01_[ism-1]->GetBinError(ie+
i, ip+
j) *
998 h01_[ism-1]->GetBinError(ie+
i, ip+
j);
1000 if (
h02_[ism-1] ) x3val02 = x3val02 +
h02_[ism-1]->GetBinError(ie+
i, ip+
j) *
1001 h02_[ism-1]->GetBinError(ie+
i, ip+
j);
1003 if (
h03_[ism-1] ) x3val03 = x3val03 +
h03_[ism-1]->GetBinError(ie+
i, ip+
j) *
1004 h03_[ism-1]->GetBinError(ie+
i, ip+
j);
1008 x3val01 = x3val01 / (9.*9.);
1009 x3val02 = x3val02 / (9.*9.);
1010 x3val03 = x3val03 / (9.*9.);
1013 if (
j01_[ism-1] ) y3val01 =
j01_[ism-1]->GetBinError(ie, ip) *
1014 j01_[ism-1]->GetBinError(ie, ip);
1017 if (
j02_[ism-1] ) y3val02 =
j02_[ism-1]->GetBinError(ie, ip) *
1018 j02_[ism-1]->GetBinError(ie, ip);
1021 if (
j03_[ism-1] ) y3val03 =
j03_[ism-1]->GetBinError(ie, ip) *
1022 j03_[ism-1]->GetBinError(ie, ip);
1025 if ( x3val01 != 0 && y3val01 != 0 ) z3val01 =
sqrt(
std::abs(x3val01 - y3val01));
1026 if ( (x3val01 - y3val01) < 0 ) z3val01 = -z3val01;
1031 if ( x3val02 != 0 && y3val02 != 0 ) z3val02 =
sqrt(
std::abs(x3val02 - y3val02));
1032 if ( (x3val02 - y3val02) < 0 ) z3val02 = -z3val02;
1037 if ( x3val03 != 0 && y3val03 != 0 ) z3val03 =
sqrt(
std::abs(x3val03 - y3val03));
1038 if ( (x3val03 - y3val03) < 0 ) z3val03 = -z3val03;
1044 if ( ie >= 3 && ie <= 83 && ip >= 3 && ip <= 18 ) {
1049 for (
int i = -2;
i <= +2;
i++ ) {
1050 for (
int j = -2;
j <= +2;
j++ ) {
1052 if (
h01_[ism-1] ) x5val01 = x5val01 +
h01_[ism-1]->GetBinError(ie+
i, ip+
j) *
1053 h01_[ism-1]->GetBinError(ie+
i, ip+
j);
1055 if (
h02_[ism-1] ) x5val02 = x5val02 +
h02_[ism-1]->GetBinError(ie+
i, ip+
j) *
1056 h02_[ism-1]->GetBinError(ie+
i, ip+
j);
1058 if (
h03_[ism-1] ) x5val03 = x5val03 +
h03_[ism-1]->GetBinError(ie+
i, ip+
j) *
1059 h03_[ism-1]->GetBinError(ie+
i, ip+
j);
1063 x5val01 = x5val01 / (25.*25.);
1064 x5val02 = x5val02 / (25.*25.);
1065 x5val03 = x5val03 / (25.*25.);
1068 if (
k01_[ism-1] ) y5val01 =
k01_[ism-1]->GetBinError(ie, ip) *
1069 k01_[ism-1]->GetBinError(ie, ip);
1072 if (
k02_[ism-1] ) y5val02 =
k02_[ism-1]->GetBinError(ie, ip) *
1073 k02_[ism-1]->GetBinError(ie, ip);
1076 if (
k03_[ism-1] ) y5val03 =
k03_[ism-1]->GetBinError(ie, ip) *
1077 k03_[ism-1]->GetBinError(ie, ip);
1080 if ( x5val01 != 0 && y5val01 != 0 ) z5val01 =
sqrt(
std::abs(x5val01 - y5val01));
1081 if ( (x5val01 - y5val01) < 0 ) z5val01 = -z5val01;
1086 if ( x5val02 != 0 && y5val02 != 0 ) z5val02 =
sqrt(
std::abs(x5val02 - y5val02));
1087 if ( (x5val02 - y5val02) < 0 ) z5val02 = -z5val02;
1092 if ( x5val03 != 0 && y5val03 != 0 ) z5val03 =
sqrt(
std::abs(x5val03 - y5val03));
1093 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_
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.
std::string getName(Reflex::Type &cc)
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)