20 #ifdef WITH_ECAL_COND_DB
76 std::cout <<
" Laser wavelengths:" << std::endl;
290 name =
"EELT laser quality L1 PNs G01 " +
Numbers::sEE(ism);
297 name =
"EELT laser quality L2 PNs G01 " +
Numbers::sEE(ism);
304 name =
"EELT laser quality L3 PNs G01 " +
Numbers::sEE(ism);
311 name =
"EELT laser quality L4 PNs G01 " +
Numbers::sEE(ism);
318 name =
"EELT laser quality L1 PNs G16 " +
Numbers::sEE(ism);
325 name =
"EELT laser quality L2 PNs G16 " +
Numbers::sEE(ism);
332 name =
"EELT laser quality L3 PNs G16 " +
Numbers::sEE(ism);
339 name =
"EELT laser quality L4 PNs G16 " +
Numbers::sEE(ism);
405 name =
"EELT laser timing mean L1 " +
Numbers::sEE(ism);
411 name =
"EELT laser timing mean L2 " +
Numbers::sEE(ism);
417 name =
"EELT laser timing mean L3 " +
Numbers::sEE(ism);
423 name =
"EELT laser timing mean L4 " +
Numbers::sEE(ism);
455 name =
"EELT amplitude over PN L1 " +
Numbers::sEE(ism);
462 name =
"EELT amplitude over PN L2 " +
Numbers::sEE(ism);
469 name =
"EELT amplitude over PN L3 " +
Numbers::sEE(ism);
476 name =
"EELT amplitude over PN L4 " +
Numbers::sEE(ism);
484 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L1";
490 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L2";
496 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L3";
502 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01 L4";
508 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L1";
514 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L2";
520 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L3";
526 name =
"EELT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16 L4";
580 for (
int ix = 1; ix <= 50; ix++ ) {
581 for (
int iy = 1; iy <= 50; iy++ ) {
591 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
603 for (
int i = 1;
i <= 10;
i++ ) {
615 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
616 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
681 if (
h01_[ism-1] )
delete h01_[ism-1];
682 if (
h02_[ism-1] )
delete h02_[ism-1];
683 if (
h03_[ism-1] )
delete h03_[ism-1];
684 if (
h04_[ism-1] )
delete h04_[ism-1];
685 if (
h05_[ism-1] )
delete h05_[ism-1];
686 if (
h06_[ism-1] )
delete h06_[ism-1];
687 if (
h07_[ism-1] )
delete h07_[ism-1];
688 if (
h08_[ism-1] )
delete h08_[ism-1];
690 if (
h09_[ism-1] )
delete h09_[ism-1];
691 if (
h10_[ism-1] )
delete h10_[ism-1];
692 if (
h11_[ism-1] )
delete h11_[ism-1];
693 if (
h12_[ism-1] )
delete h12_[ism-1];
700 if (
i01_[ism-1] )
delete i01_[ism-1];
701 if (
i02_[ism-1] )
delete i02_[ism-1];
702 if (
i03_[ism-1] )
delete i03_[ism-1];
703 if (
i04_[ism-1] )
delete i04_[ism-1];
704 if (
i05_[ism-1] )
delete i05_[ism-1];
705 if (
i06_[ism-1] )
delete i06_[ism-1];
706 if (
i07_[ism-1] )
delete i07_[ism-1];
707 if (
i08_[ism-1] )
delete i08_[ism-1];
709 if (
i09_[ism-1] )
delete i09_[ism-1];
710 if (
i10_[ism-1] )
delete i10_[ism-1];
711 if (
i11_[ism-1] )
delete i11_[ism-1];
712 if (
i12_[ism-1] )
delete i12_[ism-1];
713 if (
i13_[ism-1] )
delete i13_[ism-1];
714 if (
i14_[ism-1] )
delete i14_[ism-1];
715 if (
i15_[ism-1] )
delete i15_[ism-1];
716 if (
i16_[ism-1] )
delete i16_[ism-1];
865 #ifdef WITH_ECAL_COND_DB
873 std::map<EcalLogicID, MonLaserBlueDat> dataset1_bl;
875 std::map<EcalLogicID, MonLaserGreenDat> dataset1_gr;
877 std::map<EcalLogicID, MonLaserIRedDat> dataset1_ir;
879 std::map<EcalLogicID, MonLaserRedDat> dataset1_rd;
902 for (
int ix = 1; ix <= 50; ix++ ) {
903 for (
int iy = 1; iy <= 50; iy++ ) {
908 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
921 float num01, num02, num03, num04, num05, num06, num07, num08;
922 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
923 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
934 if ( update01 || update02 ) {
962 if ( ic == -1 )
continue;
966 dataset1_bl[ecid] = apd_bl;
971 if ( update03 || update04 ) {
999 if ( ic == -1 )
continue;
1003 dataset1_ir[ecid] = apd_ir;
1008 if ( update05 || update06 ) {
1036 if ( ic == -1 )
continue;
1040 dataset1_gr[ecid] = apd_gr;
1045 if ( update07 || update08 ) {
1073 if ( ic == -1 )
continue;
1077 dataset1_rd[ecid] = apd_rd;
1095 }
catch (std::runtime_error &
e) {
1103 std::map<EcalLogicID, MonPNBlueDat> dataset2_bl;
1105 std::map<EcalLogicID, MonPNGreenDat> dataset2_gr;
1107 std::map<EcalLogicID, MonPNIRedDat> dataset2_ir;
1109 std::map<EcalLogicID, MonPNRedDat> dataset2_rd;
1152 for (
int i = 1;
i <= 10;
i++ ) {
1171 float num01, num02, num03, num04, num05, num06, num07, num08;
1172 float num09, num10, num11, num12, num13, num14, num15, num16;
1173 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
1174 float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
1175 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
1176 float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
1195 if ( update01 || update05 || update09 || update13 ) {
1201 std::cout <<
"PNs (" <<
i <<
") L1 G01 " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
1202 std::cout <<
"PNs (" <<
i <<
") L1 G16 " << num09 <<
" " << mean09 <<
" " << rms09 << std::endl;
1232 dataset2_bl[ecid] = pn_bl;
1237 if ( update02 || update06 || update10 || update14 ) {
1243 std::cout <<
"PNs (" <<
i <<
") L2 G01 " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
1244 std::cout <<
"PNs (" <<
i <<
") L2 G16 " << num10 <<
" " << mean10 <<
" " << rms10 << std::endl;
1274 dataset2_ir[ecid] = pn_ir;
1279 if ( update03 || update07 || update11 || update15 ) {
1285 std::cout <<
"PNs (" <<
i <<
") L3 G01 " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
1286 std::cout <<
"PNs (" <<
i <<
") L3 G16 " << num11 <<
" " << mean11 <<
" " << rms11 << std::endl;
1316 dataset2_gr[ecid] = pn_gr;
1321 if ( update04 || update08 || update12 || update16 ) {
1327 std::cout <<
"PNs (" <<
i <<
") L4 G01 " << num04 <<
" " << mean04 <<
" " << rms04 << std::endl;
1328 std::cout <<
"PNs (" <<
i <<
") L4 G16 " << num12 <<
" " << mean12 <<
" " << rms12 << std::endl;
1358 dataset2_rd[ecid] = pn_rd;
1375 }
catch (std::runtime_error &e) {
1383 std::map<EcalLogicID, MonTimingLaserBlueCrystalDat> dataset3_bl;
1385 std::map<EcalLogicID, MonTimingLaserGreenCrystalDat> dataset3_gr;
1387 std::map<EcalLogicID, MonTimingLaserIRedCrystalDat> dataset3_ir;
1389 std::map<EcalLogicID, MonTimingLaserRedCrystalDat> dataset3_rd;
1400 for (
int ix = 1; ix <= 50; ix++ ) {
1401 for (
int iy = 1; iy <= 50; iy++ ) {
1406 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1415 float num01, num02, num03, num04;
1416 float mean01, mean02, mean03, mean04;
1417 float rms01, rms02, rms03, rms04;
1449 if ( ic == -1 )
continue;
1453 dataset3_bl[ecid] = t_bl;
1483 if ( ic == -1 )
continue;
1487 dataset3_gr[ecid] = t_gr;
1517 if ( ic == -1 )
continue;
1521 dataset3_ir[ecid] = t_ir;
1551 if ( ic == -1 )
continue;
1555 dataset3_rd[ecid] = t_rd;
1567 if (
verbose_ )
std::cout <<
"Inserting MonTimingLaserCrystalDat ..." << std::endl;
1573 }
catch (std::runtime_error &e) {
1587 if (
ievt_ % 10 == 0 ) {
1591 uint32_t bits01 = 0;
1595 uint32_t bits02 = 0;
1599 uint32_t bits03 = 0;
1603 uint32_t bits04 = 0;
1874 float meanAmplL1, meanAmplL2, meanAmplL3, meanAmplL4;
1876 int nCryL1, nCryL2, nCryL3, nCryL4;
1878 meanAmplL1 = meanAmplL2 = meanAmplL3 = meanAmplL4 = 0.;
1880 nCryL1 = nCryL2 = nCryL3 = nCryL4 = 0;
1882 bool l1Data(
false), l2Data(
false), l3Data(
false), l4Data(
false);
1884 for (
int ix = 1; ix <= 50; ix++ ) {
1885 for (
int iy = 1; iy <= 50; iy++ ) {
1892 float num01, num02, num03, num04;
1893 float mean01, mean02, mean03, mean04;
1894 float rms01, rms02, rms03, rms04;
1901 if(update01) l1Data =
true;
1902 if(update02) l2Data =
true;
1903 if(update03) l3Data =
true;
1904 if(update04) l4Data =
true;
1907 meanAmplL1 += mean01;
1912 meanAmplL2 += mean02;
1917 meanAmplL3 += mean03;
1922 meanAmplL4 += mean04;
1929 if ( nCryL1 > 0 ) meanAmplL1 /= float (nCryL1);
1930 if ( nCryL2 > 0 ) meanAmplL2 /= float (nCryL2);
1931 if ( nCryL3 > 0 ) meanAmplL3 /= float (nCryL3);
1932 if ( nCryL4 > 0 ) meanAmplL4 /= float (nCryL4);
1934 for (
int ix = 1; ix <= 50; ix++ ) {
1935 for (
int iy = 1; iy <= 50; iy++ ) {
1945 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1967 float num01, num02, num03, num04, num05, num06, num07, num08;
1968 float num09, num10, num11, num12;
1969 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
1970 float mean09, mean10, mean11, mean12;
1971 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
1972 float rms09, rms10, rms11, rms12;
2000 if ( mean01 > 0. ) {
2024 if ( mean03 > 0. ) {
2048 if ( mean05 > 0. ) {
2072 if ( mean07 > 0. ) {
2096 if ( mean02 > 0. ) {
2113 if ( mean04 > 0. ) {
2130 if ( mean06 > 0. ) {
2147 if ( mean08 > 0. ) {
2164 if ( mean09 > 0. ) {
2184 if ( mean10 > 0. ) {
2205 if ( mean11 > 0. ) {
2225 if ( mean12 > 0. ) {
2242 for (
int i = 1;
i <= 10;
i++ ) {
2254 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
2255 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
2283 float num01, num02, num03, num04, num05, num06, num07, num08;
2284 float num09, num10, num11, num12, num13, num14, num15, num16;
2285 float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
2286 float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
2287 float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
2288 float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
2307 if ( update01 && update05 ) {
2325 if ( update02 && update06 ) {
2343 if ( update03 && update07 ) {
2361 if ( update04 && update08 ) {
2379 if ( update09 && update13 ) {
2400 if ( update10 && update14 ) {
2422 if ( update11 && update15 ) {
2444 if ( update12 && update16 ) {
2482 for (
int i = 1;
i <= 10;
i++ ) {
2484 if (
hs01_[ism-1] ) {
2492 if (
hs02_[ism-1] ) {
2500 if (
hs03_[ism-1] ) {
2508 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)
Abs< T >::type abs(const T &t)
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]