20 #ifdef WITH_ECAL_COND_DB
70 std::cout <<
" Led wavelengths:" << std::endl;
238 name =
"EELDT led quality L1 PNs G01 " +
Numbers::sEE(ism);
245 name =
"EELDT led quality L2 PNs G01 " +
Numbers::sEE(ism);
253 name =
"EELDT led quality L1 PNs G16 " +
Numbers::sEE(ism);
260 name =
"EELDT led quality L2 PNs G16 " +
Numbers::sEE(ism);
324 name =
"EELDT amplitude over PN L1 " +
Numbers::sEE(ism);
331 name =
"EELDT amplitude over PN L2 " +
Numbers::sEE(ism);
339 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L1";
345 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L2";
352 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L1";
358 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L2";
393 for (
int ix = 1; ix <= 50; ix++ ) {
394 for (
int iy = 1; iy <= 50; iy++ ) {
402 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
412 for (
int i = 1;
i <= 10;
i++ ) {
421 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
422 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
469 if (
h01_[ism-1] )
delete h01_[ism-1];
470 if (
h02_[ism-1] )
delete h02_[ism-1];
471 if (
h03_[ism-1] )
delete h03_[ism-1];
472 if (
h04_[ism-1] )
delete h04_[ism-1];
474 if (
h09_[ism-1] )
delete h09_[ism-1];
475 if (
h10_[ism-1] )
delete h10_[ism-1];
480 if (
i01_[ism-1] )
delete i01_[ism-1];
481 if (
i02_[ism-1] )
delete i02_[ism-1];
483 if (
i05_[ism-1] )
delete i05_[ism-1];
484 if (
i06_[ism-1] )
delete i06_[ism-1];
486 if (
i09_[ism-1] )
delete i09_[ism-1];
487 if (
i10_[ism-1] )
delete i10_[ism-1];
489 if (
i13_[ism-1] )
delete i13_[ism-1];
490 if (
i14_[ism-1] )
delete i14_[ism-1];
583 #ifdef WITH_ECAL_COND_DB
591 std::map<EcalLogicID, MonLed1Dat> dataset1_l1;
593 std::map<EcalLogicID, MonLed2Dat> dataset1_l2;
613 for (
int ix = 1; ix <= 50; ix++ ) {
614 for (
int iy = 1; iy <= 50; iy++ ) {
619 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
628 float num01, num02, num03, num04;
629 float mean01, mean02, mean03, mean04;
630 float rms01, rms02, rms03, rms04;
637 if ( update01 || update02 ) {
665 if ( ic == -1 )
continue;
669 dataset1_l1[ecid] = vpt_l1;
674 if ( update03 || update04 ) {
702 if ( ic == -1 )
continue;
706 dataset1_l2[ecid] = vpt_l2;
722 }
catch (std::runtime_error &
e) {
730 std::map<EcalLogicID, MonPNLed1Dat> dataset2_l1;
732 std::map<EcalLogicID, MonPNLed2Dat> dataset2_l2;
763 for (
int i = 1;
i <= 10;
i++ ) {
777 float num01, num02, num05, num06;
778 float num09, num10, num13, num14;
779 float mean01, mean02, mean05, mean06;
780 float mean09, mean10, mean13, mean14;
781 float rms01, rms02, rms05, rms06;
782 float rms09, rms10, rms13, rms14;
796 if ( update01 || update05 || update09 || update13 ) {
802 std::cout <<
"PNs (" <<
i <<
") L1 G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
803 std::cout <<
"PNs (" <<
i <<
") L1 G16 " << num09 <<
" " << mean09 <<
" " << rms09 << std::endl;
833 dataset2_l1[ecid] = pn_l1;
838 if ( update02 || update06 || update10 || update14 ) {
844 std::cout <<
"PNs (" <<
i <<
") L2 G01 " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
845 std::cout <<
"PNs (" <<
i <<
") L2 G16 " << num10 <<
" " << mean10 <<
" " << rms10 << std::endl;
875 dataset2_l2[ecid] = pn_l2;
890 }
catch (std::runtime_error &e) {
898 std::map<EcalLogicID, MonTimingLed1CrystalDat> dataset3_l1;
900 std::map<EcalLogicID, MonTimingLed2CrystalDat> dataset3_l2;
911 for (
int ix = 1; ix <= 50; ix++ ) {
912 for (
int iy = 1; iy <= 50; iy++ ) {
917 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
925 float mean01, mean02;
956 if ( ic == -1 )
continue;
960 dataset3_l1[ecid] = t_l1;
990 if ( ic == -1 )
continue;
994 dataset3_l2[ecid] = t_l2;
1006 if (
verbose_ )
std::cout <<
"Inserting MonTimingLaserCrystalDat ..." << std::endl;
1010 }
catch (std::runtime_error &e) {
1024 if (
ievt_ % 10 == 0 ) {
1028 uint32_t bits01 = 0;
1032 uint32_t bits02 = 0;
1036 uint32_t bits03 = 0;
1040 uint32_t bits04 = 0;
1184 float meanAmplL1, meanAmplL2;
1188 meanAmplL1 = meanAmplL2 = 0.;
1190 nCryL1 = nCryL2 = 0;
1192 for (
int ix = 1; ix <= 50; ix++ ) {
1193 for (
int iy = 1; iy <= 50; iy++ ) {
1199 float mean01, mean02;
1206 meanAmplL1 += mean01;
1211 meanAmplL2 += mean02;
1218 if ( nCryL1 > 0 ) meanAmplL1 /= float (nCryL1);
1219 if ( nCryL2 > 0 ) meanAmplL2 /= float (nCryL2);
1221 for (
int ix = 1; ix <= 50; ix++ ) {
1222 for (
int iy = 1; iy <= 50; iy++ ) {
1230 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1245 float num01, num02, num03, num04;
1247 float mean01, mean02, mean03, mean04;
1248 float mean09, mean10;
1249 float rms01, rms02, rms03, rms04;
1273 if ( mean01 > 0. ) {
1297 if ( mean03 > 0. ) {
1319 if ( mean02 > 0. ) {
1336 if ( mean04 > 0. ) {
1353 if ( mean09 > 0. ) {
1373 if ( mean10 > 0. ) {
1390 for (
int i = 1;
i <= 10;
i++ ) {
1399 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
1400 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
1420 float num01, num02, num05, num06;
1421 float num09, num10, num13, num14;
1422 float mean01, mean02, mean05, mean06;
1423 float mean09, mean10, mean13, mean14;
1424 float rms01, rms02, rms05, rms06;
1425 float rms09, rms10, rms13, rms14;
1439 if ( update01 && update05 ) {
1457 if ( update02 && update06 ) {
1475 if ( update09 && update13 ) {
1493 if ( update10 && update14 ) {
1524 for (
int i = 1;
i <= 10;
i++ ) {
1526 if (
hs01_[ism-1] ) {
1534 if (
hs02_[ism-1] ) {
void setPedMeanG1(float mean)
Cache logicID vector from database.
static const int LED_MEAN_ERROR
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
MonitorElement * meg09_[18]
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
void setPedRMSG1(float mean)
void setBinContent(int binx, double content)
set content of bin (1-D)
float amplitudeThreshold03_
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
MonitorElement * meg06_[18]
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.
void setPedRMSG1(float mean)
void setADCMeanG1(float mean)
Some "id" conversions.
MonitorElement * met02_[18]
EELedClient(const edm::ParameterSet &ps)
Constructor.
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.
MonitorElement * mepnprms05_[18]
void setVPTOverPNMean(float mean)
float amplitudeThresholdPnG01_
void setPedMeanG1(float mean)
MonitorElement * meg10_[18]
MonitorElement * met01_[18]
static int ix0EE(const unsigned ism)
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
void setTimingMean(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.
float pedPnDiscrepancyMean_[2]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
MonitorElement * meaopn02_[18]
static int iy0EE(const unsigned ism)
float amplitudeThresholdPnG16_
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
float amplitudeThreshold01_
void setVPTMean(float mean)
float pedPnRMSThreshold_[2]
void setTaskStatus(bool status)
MonitorElement * mepnprms06_[18]
void setADCRMSG16(float mean)
std::vector< int > ledWavelengths_
void setADCMeanG16(float mean)
void setVPTOverPNRMS(float rms)
void setPedMeanG16(float mean)
void setVPTOverPNMean(float mean)
MonitorElement * metrms01_[18]
MonitorElement * meg05_[18]
void setTaskStatus(bool status)
void setTaskStatus(bool status)
void setVPTRMS(float rms)
void removeElement(const std::string &name)
void setTaskStatus(bool status)
void cleanup(void)
Cleanup.
MonitorElement * metav02_[18]
MonitorElement * me_hs01_[18]
void setADCMeanG16(float mean)
static const int LED_TIMING_MEAN_ERROR
void setADCRMSG1(float mean)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setPedMeanG16(float mean)
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void analyze(void)
Analyze.
MonitorElement * meaopn01_[18]
void setADCRMSG16(float mean)
void setADCRMSG1(float mean)
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
void setPedRMSG16(float mean)
void setTaskStatus(bool status)
std::vector< int > superModules_
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.
void setVPTRMS(float rms)
MonitorElement * meg01_[18]
static const int LED_TIMING_RMS_ERROR
void beginJob(void)
BeginJob.
void setTimingRMS(float rms)
MonitorElement * mepnprms01_[18]
void setADCMeanG1(float mean)
virtual ~EELedClient()
Destructor.
void beginRun(void)
BeginRun.
MonitorElement * mea02_[18]
MonitorElement * metav01_[18]
float percentVariation01_
MonitorElement * mepnprms02_[18]
static unsigned indexEE(const unsigned ism, const unsigned ix, const unsigned iy)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
void setPedRMSG16(float mean)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
static const int LED_RMS_ERROR
void setVPTMean(float mean)
MonitorElement * metrms02_[18]
void setVPTOverPNRMS(float rms)
float pedPnExpectedMean_[2]
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)
float percentVariation03_
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.
MonitorElement * meg02_[18]
void setCurrentFolder(const std::string &fullpath)
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
MonitorElement * mea01_[18]
MonitorElement * me_hs02_[18]