22 #ifdef WITH_ECAL_COND_DB
72 std::cout <<
" Led wavelengths:" << std::endl;
240 name =
"EELDT led quality L1 PNs G01 " +
Numbers::sEE(ism);
247 name =
"EELDT led quality L2 PNs G01 " +
Numbers::sEE(ism);
255 name =
"EELDT led quality L1 PNs G16 " +
Numbers::sEE(ism);
262 name =
"EELDT led quality L2 PNs G16 " +
Numbers::sEE(ism);
326 name =
"EELDT amplitude over PN L1 " +
Numbers::sEE(ism);
333 name =
"EELDT amplitude over PN L2 " +
Numbers::sEE(ism);
341 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L1";
347 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L2";
354 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L1";
360 name =
"EELDT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L2";
395 for (
int ix = 1; ix <= 50; ix++ ) {
396 for (
int iy = 1; iy <= 50; iy++ ) {
404 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
414 for (
int i = 1;
i <= 10;
i++ ) {
423 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
424 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
471 if (
h01_[ism-1] )
delete h01_[ism-1];
472 if (
h02_[ism-1] )
delete h02_[ism-1];
473 if (
h03_[ism-1] )
delete h03_[ism-1];
474 if (
h04_[ism-1] )
delete h04_[ism-1];
476 if (
h09_[ism-1] )
delete h09_[ism-1];
477 if (
h10_[ism-1] )
delete h10_[ism-1];
482 if (
i01_[ism-1] )
delete i01_[ism-1];
483 if (
i02_[ism-1] )
delete i02_[ism-1];
485 if (
i05_[ism-1] )
delete i05_[ism-1];
486 if (
i06_[ism-1] )
delete i06_[ism-1];
488 if (
i09_[ism-1] )
delete i09_[ism-1];
489 if (
i10_[ism-1] )
delete i10_[ism-1];
491 if (
i13_[ism-1] )
delete i13_[ism-1];
492 if (
i14_[ism-1] )
delete i14_[ism-1];
585 #ifdef WITH_ECAL_COND_DB
593 std::map<EcalLogicID, MonLed1Dat> dataset1_l1;
595 std::map<EcalLogicID, MonLed2Dat> dataset1_l2;
615 for (
int ix = 1; ix <= 50; ix++ ) {
616 for (
int iy = 1; iy <= 50; iy++ ) {
621 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
630 float num01, num02, num03, num04;
631 float mean01, mean02, mean03, mean04;
632 float rms01, rms02, rms03, rms04;
639 if ( update01 || update02 ) {
667 if ( ic == -1 )
continue;
671 dataset1_l1[ecid] = vpt_l1;
676 if ( update03 || update04 ) {
704 if ( ic == -1 )
continue;
708 dataset1_l2[ecid] = vpt_l2;
724 }
catch (std::runtime_error &
e) {
732 std::map<EcalLogicID, MonPNLed1Dat> dataset2_l1;
734 std::map<EcalLogicID, MonPNLed2Dat> dataset2_l2;
765 for (
int i = 1;
i <= 10;
i++ ) {
779 float num01, num02, num05, num06;
780 float num09, num10, num13, num14;
781 float mean01, mean02, mean05, mean06;
782 float mean09, mean10, mean13, mean14;
783 float rms01, rms02, rms05, rms06;
784 float rms09, rms10, rms13, rms14;
798 if ( update01 || update05 || update09 || update13 ) {
804 std::cout <<
"PNs (" <<
i <<
") L1 G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
805 std::cout <<
"PNs (" <<
i <<
") L1 G16 " << num09 <<
" " << mean09 <<
" " << rms09 << std::endl;
835 dataset2_l1[ecid] = pn_l1;
840 if ( update02 || update06 || update10 || update14 ) {
846 std::cout <<
"PNs (" <<
i <<
") L2 G01 " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
847 std::cout <<
"PNs (" <<
i <<
") L2 G16 " << num10 <<
" " << mean10 <<
" " << rms10 << std::endl;
877 dataset2_l2[ecid] = pn_l2;
892 }
catch (std::runtime_error &e) {
900 std::map<EcalLogicID, MonTimingLed1CrystalDat> dataset3_l1;
902 std::map<EcalLogicID, MonTimingLed2CrystalDat> dataset3_l2;
913 for (
int ix = 1; ix <= 50; ix++ ) {
914 for (
int iy = 1; iy <= 50; iy++ ) {
919 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
927 float mean01, mean02;
958 if ( ic == -1 )
continue;
962 dataset3_l1[ecid] = t_l1;
992 if ( ic == -1 )
continue;
996 dataset3_l2[ecid] = t_l2;
1008 if (
verbose_ )
std::cout <<
"Inserting MonTimingLaserCrystalDat ..." << std::endl;
1012 }
catch (std::runtime_error &e) {
1026 if (
ievt_ % 10 == 0 ) {
1030 uint32_t bits01 = 0;
1034 uint32_t bits02 = 0;
1038 uint32_t bits03 = 0;
1042 uint32_t bits04 = 0;
1186 float meanAmplL1, meanAmplL2;
1190 meanAmplL1 = meanAmplL2 = 0.;
1192 nCryL1 = nCryL2 = 0;
1194 for (
int ix = 1; ix <= 50; ix++ ) {
1195 for (
int iy = 1; iy <= 50; iy++ ) {
1201 float mean01, mean02;
1208 meanAmplL1 += mean01;
1213 meanAmplL2 += mean02;
1220 if ( nCryL1 > 0 ) meanAmplL1 /= float (nCryL1);
1221 if ( nCryL2 > 0 ) meanAmplL2 /= float (nCryL2);
1223 for (
int ix = 1; ix <= 50; ix++ ) {
1224 for (
int iy = 1; iy <= 50; iy++ ) {
1232 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1247 float num01, num02, num03, num04;
1249 float mean01, mean02, mean03, mean04;
1250 float mean09, mean10;
1251 float rms01, rms02, rms03, rms04;
1275 if ( mean01 > 0. ) {
1299 if ( mean03 > 0. ) {
1321 if ( mean02 > 0. ) {
1338 if ( mean04 > 0. ) {
1355 if ( mean09 > 0. ) {
1375 if ( mean10 > 0. ) {
1392 for (
int i = 1;
i <= 10;
i++ ) {
1401 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
1402 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
1422 float num01, num02, num05, num06;
1423 float num09, num10, num13, num14;
1424 float mean01, mean02, mean05, mean06;
1425 float mean09, mean10, mean13, mean14;
1426 float rms01, rms02, rms05, rms06;
1427 float rms09, rms10, rms13, rms14;
1441 if ( update01 && update05 ) {
1459 if ( update02 && update06 ) {
1477 if ( update09 && update13 ) {
1495 if ( update10 && update14 ) {
1526 for (
int i = 1;
i <= 10;
i++ ) {
1528 if (
hs01_[ism-1] ) {
1536 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)
std::string getName(Reflex::Type &cc)
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]