22 #ifdef WITH_ECAL_COND_DB
78 std::cout <<
" Laser wavelengths:" << std::endl;
292 name =
"EELT laser quality L1 PNs G01 " +
Numbers::sEE(ism);
299 name =
"EELT laser quality L2 PNs G01 " +
Numbers::sEE(ism);
306 name =
"EELT laser quality L3 PNs G01 " +
Numbers::sEE(ism);
313 name =
"EELT laser quality L4 PNs G01 " +
Numbers::sEE(ism);
320 name =
"EELT laser quality L1 PNs G16 " +
Numbers::sEE(ism);
327 name =
"EELT laser quality L2 PNs G16 " +
Numbers::sEE(ism);
334 name =
"EELT laser quality L3 PNs G16 " +
Numbers::sEE(ism);
341 name =
"EELT laser quality L4 PNs G16 " +
Numbers::sEE(ism);
407 name =
"EELT laser timing mean L1 " +
Numbers::sEE(ism);
413 name =
"EELT laser timing mean L2 " +
Numbers::sEE(ism);
419 name =
"EELT laser timing mean L3 " +
Numbers::sEE(ism);
425 name =
"EELT laser timing mean L4 " +
Numbers::sEE(ism);
457 name =
"EELT amplitude over PN L1 " +
Numbers::sEE(ism);
464 name =
"EELT amplitude over PN L2 " +
Numbers::sEE(ism);
471 name =
"EELT amplitude over PN L3 " +
Numbers::sEE(ism);
478 name =
"EELT amplitude over PN L4 " +
Numbers::sEE(ism);
486 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L1";
492 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L2";
498 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L3";
504 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L4";
510 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L1";
516 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L2";
522 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L3";
528 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L4";
582 for (
int ix = 1; ix <= 50; ix++ ) {
583 for (
int iy = 1; iy <= 50; iy++ ) {
593 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
605 for (
int i = 1;
i <= 10;
i++ ) {
617 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
618 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
683 if (
h01_[ism-1] )
delete h01_[ism-1];
684 if (
h02_[ism-1] )
delete h02_[ism-1];
685 if (
h03_[ism-1] )
delete h03_[ism-1];
686 if (
h04_[ism-1] )
delete h04_[ism-1];
687 if (
h05_[ism-1] )
delete h05_[ism-1];
688 if (
h06_[ism-1] )
delete h06_[ism-1];
689 if (
h07_[ism-1] )
delete h07_[ism-1];
690 if (
h08_[ism-1] )
delete h08_[ism-1];
692 if (
h09_[ism-1] )
delete h09_[ism-1];
693 if (
h10_[ism-1] )
delete h10_[ism-1];
694 if (
h11_[ism-1] )
delete h11_[ism-1];
695 if (
h12_[ism-1] )
delete h12_[ism-1];
702 if (
i01_[ism-1] )
delete i01_[ism-1];
703 if (
i02_[ism-1] )
delete i02_[ism-1];
704 if (
i03_[ism-1] )
delete i03_[ism-1];
705 if (
i04_[ism-1] )
delete i04_[ism-1];
706 if (
i05_[ism-1] )
delete i05_[ism-1];
707 if (
i06_[ism-1] )
delete i06_[ism-1];
708 if (
i07_[ism-1] )
delete i07_[ism-1];
709 if (
i08_[ism-1] )
delete i08_[ism-1];
711 if (
i09_[ism-1] )
delete i09_[ism-1];
712 if (
i10_[ism-1] )
delete i10_[ism-1];
713 if (
i11_[ism-1] )
delete i11_[ism-1];
714 if (
i12_[ism-1] )
delete i12_[ism-1];
715 if (
i13_[ism-1] )
delete i13_[ism-1];
716 if (
i14_[ism-1] )
delete i14_[ism-1];
717 if (
i15_[ism-1] )
delete i15_[ism-1];
718 if (
i16_[ism-1] )
delete i16_[ism-1];
867 #ifdef WITH_ECAL_COND_DB
875 std::map<EcalLogicID, MonLaserBlueDat> dataset1_bl;
877 std::map<EcalLogicID, MonLaserGreenDat> dataset1_gr;
879 std::map<EcalLogicID, MonLaserIRedDat> dataset1_ir;
881 std::map<EcalLogicID, MonLaserRedDat> dataset1_rd;
904 for (
int ix = 1; ix <= 50; ix++ ) {
905 for (
int iy = 1; iy <= 50; iy++ ) {
910 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
923 float num01, num02, num03, num04, num05, num06, num07, num08;
924 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
925 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
936 if ( update01 || update02 ) {
964 if ( ic == -1 )
continue;
968 dataset1_bl[ecid] = apd_bl;
973 if ( update03 || update04 ) {
1001 if ( ic == -1 )
continue;
1005 dataset1_ir[ecid] = apd_ir;
1010 if ( update05 || update06 ) {
1038 if ( ic == -1 )
continue;
1042 dataset1_gr[ecid] = apd_gr;
1047 if ( update07 || update08 ) {
1075 if ( ic == -1 )
continue;
1079 dataset1_rd[ecid] = apd_rd;
1097 }
catch (std::runtime_error &
e) {
1105 std::map<EcalLogicID, MonPNBlueDat> dataset2_bl;
1107 std::map<EcalLogicID, MonPNGreenDat> dataset2_gr;
1109 std::map<EcalLogicID, MonPNIRedDat> dataset2_ir;
1111 std::map<EcalLogicID, MonPNRedDat> dataset2_rd;
1154 for (
int i = 1;
i <= 10;
i++ ) {
1173 float num01, num02, num03, num04, num05, num06, num07, num08;
1174 float num09, num10, num11, num12, num13, num14, num15, num16;
1175 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
1176 float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
1177 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
1178 float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
1197 if ( update01 || update05 || update09 || update13 ) {
1203 std::cout <<
"PNs (" <<
i <<
") L1 G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
1204 std::cout <<
"PNs (" <<
i <<
") L1 G16 " << num09 <<
" " << mean09 <<
" " << rms09 << std::endl;
1234 dataset2_bl[ecid] = pn_bl;
1239 if ( update02 || update06 || update10 || update14 ) {
1245 std::cout <<
"PNs (" <<
i <<
") L2 G01 " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
1246 std::cout <<
"PNs (" <<
i <<
") L2 G16 " << num10 <<
" " << mean10 <<
" " << rms10 << std::endl;
1276 dataset2_ir[ecid] = pn_ir;
1281 if ( update03 || update07 || update11 || update15 ) {
1287 std::cout <<
"PNs (" <<
i <<
") L3 G01 " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
1288 std::cout <<
"PNs (" <<
i <<
") L3 G16 " << num11 <<
" " << mean11 <<
" " << rms11 << std::endl;
1318 dataset2_gr[ecid] = pn_gr;
1323 if ( update04 || update08 || update12 || update16 ) {
1329 std::cout <<
"PNs (" <<
i <<
") L4 G01 " << num04 <<
" " << mean04 <<
" " << rms04 << std::endl;
1330 std::cout <<
"PNs (" <<
i <<
") L4 G16 " << num12 <<
" " << mean12 <<
" " << rms12 << std::endl;
1360 dataset2_rd[ecid] = pn_rd;
1377 }
catch (std::runtime_error &e) {
1385 std::map<EcalLogicID, MonTimingLaserBlueCrystalDat> dataset3_bl;
1387 std::map<EcalLogicID, MonTimingLaserGreenCrystalDat> dataset3_gr;
1389 std::map<EcalLogicID, MonTimingLaserIRedCrystalDat> dataset3_ir;
1391 std::map<EcalLogicID, MonTimingLaserRedCrystalDat> dataset3_rd;
1402 for (
int ix = 1; ix <= 50; ix++ ) {
1403 for (
int iy = 1; iy <= 50; iy++ ) {
1408 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1417 float num01, num02, num03, num04;
1418 float mean01, mean02, mean03, mean04;
1419 float rms01, rms02, rms03, rms04;
1451 if ( ic == -1 )
continue;
1455 dataset3_bl[ecid] = t_bl;
1485 if ( ic == -1 )
continue;
1489 dataset3_gr[ecid] = t_gr;
1519 if ( ic == -1 )
continue;
1523 dataset3_ir[ecid] = t_ir;
1553 if ( ic == -1 )
continue;
1557 dataset3_rd[ecid] = t_rd;
1569 if (
verbose_ )
std::cout <<
"Inserting MonTimingLaserCrystalDat ..." << std::endl;
1575 }
catch (std::runtime_error &e) {
1589 if (
ievt_ % 10 == 0 ) {
1593 uint32_t bits01 = 0;
1597 uint32_t bits02 = 0;
1601 uint32_t bits03 = 0;
1605 uint32_t bits04 = 0;
1876 float meanAmplL1, meanAmplL2, meanAmplL3, meanAmplL4;
1878 int nCryL1, nCryL2, nCryL3, nCryL4;
1880 meanAmplL1 = meanAmplL2 = meanAmplL3 = meanAmplL4 = 0.;
1882 nCryL1 = nCryL2 = nCryL3 = nCryL4 = 0;
1884 bool l1Data(
false), l2Data(
false), l3Data(
false), l4Data(
false);
1886 for (
int ix = 1; ix <= 50; ix++ ) {
1887 for (
int iy = 1; iy <= 50; iy++ ) {
1894 float num01, num02, num03, num04;
1895 float mean01, mean02, mean03, mean04;
1896 float rms01, rms02, rms03, rms04;
1903 if(update01) l1Data =
true;
1904 if(update02) l2Data =
true;
1905 if(update03) l3Data =
true;
1906 if(update04) l4Data =
true;
1909 meanAmplL1 += mean01;
1914 meanAmplL2 += mean02;
1919 meanAmplL3 += mean03;
1924 meanAmplL4 += mean04;
1931 if ( nCryL1 > 0 ) meanAmplL1 /= float (nCryL1);
1932 if ( nCryL2 > 0 ) meanAmplL2 /= float (nCryL2);
1933 if ( nCryL3 > 0 ) meanAmplL3 /= float (nCryL3);
1934 if ( nCryL4 > 0 ) meanAmplL4 /= float (nCryL4);
1936 for (
int ix = 1; ix <= 50; ix++ ) {
1937 for (
int iy = 1; iy <= 50; iy++ ) {
1947 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1969 float num01, num02, num03, num04, num05, num06, num07, num08;
1970 float num09, num10, num11, num12;
1971 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
1972 float mean09, mean10, mean11, mean12;
1973 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
1974 float rms09, rms10, rms11, rms12;
2002 if ( mean01 > 0. ) {
2026 if ( mean03 > 0. ) {
2050 if ( mean05 > 0. ) {
2074 if ( mean07 > 0. ) {
2098 if ( mean02 > 0. ) {
2115 if ( mean04 > 0. ) {
2132 if ( mean06 > 0. ) {
2149 if ( mean08 > 0. ) {
2166 if ( mean09 > 0. ) {
2186 if ( mean10 > 0. ) {
2207 if ( mean11 > 0. ) {
2227 if ( mean12 > 0. ) {
2244 for (
int i = 1;
i <= 10;
i++ ) {
2256 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
2257 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
2285 float num01, num02, num03, num04, num05, num06, num07, num08;
2286 float num09, num10, num11, num12, num13, num14, num15, num16;
2287 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
2288 float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
2289 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
2290 float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
2309 if ( update01 && update05 ) {
2327 if ( update02 && update06 ) {
2345 if ( update03 && update07 ) {
2363 if ( update04 && update08 ) {
2381 if ( update09 && update13 ) {
2402 if ( update10 && update14 ) {
2424 if ( update11 && update15 ) {
2446 if ( update12 && update16 ) {
2484 for (
int i = 1;
i <= 10;
i++ ) {
2486 if (
hs01_[ism-1] ) {
2494 if (
hs02_[ism-1] ) {
2502 if (
hs03_[ism-1] ) {
2510 if (
hs04_[ism-1] ) {
std::vector< int > laserWavelengths_
MonitorElement * metrms03_[18]
Cache logicID vector from database.
float rmsThresholdRelative_
void setADCMeanG1(float mean)
std::vector< int > superModules_
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
void setADCRMSG16(float mean)
void setPedRMSG16(float mean)
MonitorElement * met01_[18]
void setBinContent(int binx, double content)
set content of bin (1-D)
static const int LASER_MEAN_ERROR
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
MonitorElement * me_hs01_[18]
void beginJob(void)
BeginJob.
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
void setADCRMSG16(float mean)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
EELaserClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * metav04_[18]
void setADCMeanG16(float mean)
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
void setAPDOverPNRMS(float rms)
Some "id" conversions.
void setAPDOverPNMean(float mean)
virtual ~EELaserClient()
Destructor.
MonitorElement * mepnprms03_[18]
void setAPDMean(float mean)
static const int LASER_TIMING_RMS_ERROR
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 setADCMeanG16(float mean)
void setADCMeanG1(float mean)
MonitorElement * meg04_[18]
void setADCRMSG1(float mean)
void setTaskStatus(bool status)
MonitorElement * met02_[18]
void analyze(void)
Analyze.
MonitorElement * meg11_[18]
MonitorElement * mepnprms02_[18]
void setADCRMSG1(float mean)
static int ix0EE(const unsigned ism)
MonitorElement * metav02_[18]
MonitorElement * met04_[18]
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
void setPedRMSG16(float mean)
MonitorElement * mepnprms05_[18]
void setTimingMean(float mean)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * meg12_[18]
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
MonitorElement * meg09_[18]
void setTaskStatus(bool status)
MonitorElement * metav03_[18]
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)
MonitorElement * me_hs02_[18]
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
MonitorElement * mea04_[18]
MonitorElement * me_hs04_[18]
MonitorElement * meaopn01_[18]
void setADCMeanG1(float mean)
MonitorElement * meaopn03_[18]
void setTaskStatus(bool status)
void setAPDMean(float mean)
float pedPnDiscrepancyMean_[2]
void removeElement(const std::string &name)
MonitorElement * metrms02_[18]
void setPedMeanG1(float mean)
void setAPDMean(float mean)
void setTaskStatus(bool status)
MonitorElement * meaopn04_[18]
MonitorElement * mepnprms08_[18]
void setPedRMSG1(float mean)
void setPedRMSG1(float mean)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setPedRMSG1(float mean)
float pedPnRMSThreshold_[2]
float amplitudeThresholdPnG16_
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")
MonitorElement * mea03_[18]
void setADCMeanG1(float mean)
MonitorElement * meg03_[18]
void setADCRMSG1(float mean)
void setPedRMSG1(float mean)
void setADCRMSG1(float mean)
void setTaskStatus(bool status)
MonitorElement * mepnprms06_[18]
void setAPDRMS(float rms)
MonitorElement * mea01_[18]
void setPedRMSG16(float mean)
float pedPnExpectedMean_[2]
float amplitudeThreshold_
MonitorElement * meg08_[18]
MonitorElement * mepnprms04_[18]
void setADCRMSG16(float mean)
void setAPDOverPNRMS(float rms)
void setAPDRMS(float rms)
Ecal Monitor Utils for Client.
MonitorElement * me_hs03_[18]
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
void setTaskStatus(bool status)
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 setAPDOverPNRMS(float rms)
MonitorElement * meg07_[18]
MonitorElement * mea02_[18]
void cleanup(void)
Cleanup.
void setAPDOverPNMean(float mean)
MonitorElement * meg02_[18]
void setTimingRMS(float rms)
void setADCMeanG16(float mean)
void setADCMeanG16(float mean)
void setTaskStatus(bool status)
void setPedMeanG16(float mean)
void setAPDOverPNRMS(float rms)
void setTaskStatus(bool status)
static const int LASER_TIMING_MEAN_ERROR
void setPedMeanG1(float mean)
void beginRun(void)
BeginRun.
MonitorElement * meg10_[18]
void setAPDOverPNMean(float mean)
void setAPDRMS(float rms)
MonitorElement * metrms04_[18]
void setPedMeanG16(float mean)
MonitorElement * metav01_[18]
static unsigned indexEE(const unsigned ism, const unsigned ix, const unsigned iy)
MonitorElement * meg06_[18]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
void setPedMeanG1(float mean)
MonitorElement * metrms01_[18]
MonitorElement * mepnprms01_[18]
void setPedRMSG16(float mean)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void setPedMeanG16(float mean)
void setTaskStatus(bool status)
MonitorElement * met03_[18]
void setAPDMean(float mean)
void setADCRMSG16(float mean)
static const int LASER_RMS_ERROR
MonitorElement * meaopn02_[18]
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)
void setAPDOverPNMean(float mean)
float amplitudeThresholdPnG01_
int ism(int ieta, int iphi)
MonitorElement * meg05_[18]
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)
void setPedMeanG1(float mean)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
void setAPDRMS(float rms)
MonitorElement * mepnprms07_[18]
void setCurrentFolder(const std::string &fullpath)
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
void setPedMeanG16(float mean)
MonitorElement * meg01_[18]