20 #ifdef WITH_ECAL_COND_DB
184 name =
"EETPT test pulse quality G01 " +
Numbers::sEE(ism);
192 name =
"EETPT test pulse quality G06 " +
Numbers::sEE(ism);
200 name =
"EETPT test pulse quality G12 " +
Numbers::sEE(ism);
209 name =
"EETPT test pulse quality PNs G01 " +
Numbers::sEE(ism);
216 name =
"EETPT test pulse quality PNs G16 " +
Numbers::sEE(ism);
224 name =
"EETPT test pulse amplitude G01 " +
Numbers::sEE(ism);
231 name =
"EETPT test pulse amplitude G06 " +
Numbers::sEE(ism);
238 name =
"EETPT test pulse amplitude G12 " +
Numbers::sEE(ism);
246 name =
"EETPT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01";
252 name =
"EETPT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16";
259 name =
"EETPT test pulse shape G01 " +
Numbers::sEE(ism);
266 name =
"EETPT test pulse shape G06 " +
Numbers::sEE(ism);
273 name =
"EETPT test pulse shape G12 " +
Numbers::sEE(ism);
292 for (
int ix = 1; ix <= 50; ix++ ) {
293 for (
int iy = 1; iy <= 50; iy++ ) {
302 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
313 for (
int i = 1;
i <= 10;
i++ ) {
319 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
320 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
359 if (
i01_[ism-1] )
delete i01_[ism-1];
360 if (
i02_[ism-1] )
delete i02_[ism-1];
361 if (
i03_[ism-1] )
delete i03_[ism-1];
362 if (
i04_[ism-1] )
delete i04_[ism-1];
421 #ifdef WITH_ECAL_COND_DB
429 std::map<EcalLogicID, MonTestPulseDat> dataset1;
431 std::map<EcalLogicID, MonPulseShapeDat> dataset2;
451 for (
int ix = 1; ix <= 50; ix++ ) {
452 for (
int iy = 1; iy <= 50; iy++ ) {
457 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
465 float num01, num02, num03;
466 float mean01, mean02, mean03;
467 float rms01, rms02, rms03;
473 if ( update01 || update02 || update03 ) {
510 std::vector<float> sample01, sample02, sample03;
517 for (
int i = 1;
i <= 10;
i++ ) {
518 sample01.push_back(
int(
me_hs01_[ism-1]->getBinContent(
i)));
521 for (
int i = 1;
i <= 10;
i++ ) { sample01.push_back(-1.); }
525 for (
int i = 1;
i <= 10;
i++ ) {
526 sample02.push_back(
int(
me_hs02_[ism-1]->getBinContent(
i)));
529 for (
int i = 1;
i <= 10;
i++ ) { sample02.push_back(-1.); }
533 for (
int i = 1;
i <= 10;
i++ ) {
534 sample03.push_back(
int(
me_hs03_[ism-1]->getBinContent(
i)));
537 for (
int i = 1;
i <= 10;
i++ ) { sample03.push_back(-1.); }
541 std::cout <<
"sample01 = " << std::flush;
542 for (
unsigned int i = 0;
i < sample01.size();
i++ ) {
543 std::cout << sample01[
i] <<
" " << std::flush;
547 std::cout <<
"sample02 = " << std::flush;
548 for (
unsigned int i = 0;
i < sample02.size();
i++ ) {
549 std::cout << sample02[
i] <<
" " << std::flush;
553 std::cout <<
"sample03 = " << std::flush;
554 for (
unsigned int i = 0;
i < sample03.size();
i++ ) {
555 std::cout << sample03[
i] <<
" " << std::flush;
570 if ( ic == -1 )
continue;
574 dataset1[ecid] =
adc;
575 if (
Numbers::icEE(ism, jx, jy) == 1 ) dataset2[ecid] = shape;
589 if ( dataset2.size() != 0 ) econn->
insertDataSet(&dataset2, moniov);
591 }
catch (std::runtime_error &
e) {
599 std::map<EcalLogicID, MonPNMGPADat> dataset3;
618 for (
int i = 1;
i <= 10;
i++ ) {
625 float num01, num02, num03, num04;
626 float mean01, mean02, mean03, mean04;
627 float rms01, rms02, rms03, rms04;
634 if ( update01 || update02 || update03 || update04 ) {
640 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 <<
" " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
641 std::cout <<
"PNs (" <<
i <<
") G16 " << num02 <<
" " << mean02 <<
" " << rms02 <<
" " << num04 <<
" " << mean04 <<
" " << rms04 << std::endl;
685 }
catch (std::runtime_error &e) {
699 if (
ievt_ % 10 == 0 ) {
797 float meanAmpl01, meanAmpl02, meanAmpl03;
799 int nCry01, nCry02, nCry03;
801 meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.;
803 nCry01 = nCry02 = nCry03 = 0;
805 for (
int ix = 1; ix <= 50; ix++ ) {
806 for (
int iy = 1; iy <= 50; iy++ ) {
812 float num01, num02, num03;
813 float mean01, mean02, mean03;
814 float rms01, rms02, rms03;
821 meanAmpl01 += mean01;
826 meanAmpl02 += mean02;
831 meanAmpl03 += mean03;
838 if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01);
839 if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02);
840 if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03);
842 for (
int ix = 1; ix <= 50; ix++ ) {
843 for (
int iy = 1; iy <= 50; iy++ ) {
852 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
864 float num01, num02, num03;
865 float mean01, mean02, mean03;
866 float rms01, rms02, rms03;
957 for (
int i = 1;
i <= 10;
i++ ) {
963 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
964 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
974 float num01, num02, num03, num04;
975 float mean01, mean02, mean03, mean04;
976 float rms01, rms02, rms03, rms04;
986 if ( update01 && update03 ) {
1002 if ( update02 && update04 ) {
1023 for (
int i = 1;
i <= 10;
i++ ) {
1025 if (
hs01_[ism-1] ) {
1033 if (
hs02_[ism-1] ) {
1041 if (
hs03_[ism-1] ) {
int adc(sample_type sample)
get the ADC sample (12 bits)
float pedPnRMSThreshold_[2]
Cache logicID vector from database.
MonitorElement * me_hs03_[18]
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
MonitorElement * mea03_[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)
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
static const int TESTPULSE_LOW_GAIN_RMS_ERROR
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.
void setADCRMSG1(float rms)
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Some "id" conversions.
MonitorElement * me_hs02_[18]
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 beginJob(void)
BeginJob.
float amplitudeThreshold_
void setADCMeanG1(float mean)
float pedPnExpectedMean_[2]
static int ix0EE(const unsigned ism)
MonitorElement * mea01_[18]
void setADCMeanG6(float mean)
static const int TESTPULSE_MIDDLE_GAIN_MEAN_ERROR
void setTaskStatus(bool status)
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
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.
std::vector< int > MGPAGainsPN_
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 * meg01_[18]
MonitorElement * meg05_[18]
void setSamples(std::vector< float > &samples, int gain)
void beginRun(void)
BeginRun.
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
static const int TESTPULSE_MIDDLE_GAIN_RMS_ERROR
void setADCMeanG12(float mean)
void setADCMeanG16(float mean)
MonitorElement * meg04_[18]
void setTaskStatus(bool status)
void removeElement(const std::string &name)
Abs< T >::type abs(const T &t)
float amplitudeThresholdPnG16_
static const int TESTPULSE_HIGH_GAIN_RMS_ERROR
MonitorElement * meg03_[18]
MonitorElement * mea02_[18]
void setADCRMSG12(float rms)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * mer04_[18]
void setEntries(double nentries)
set # of entries
MonitorElement * mer05_[18]
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
float amplitudeThresholdPnG01_
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
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.
static const int TESTPULSE_LOW_GAIN_MEAN_ERROR
MonitorElement * me_hs01_[18]
MonitorElement * meg02_[18]
void setADCRMSG6(float rms)
void setPedMeanG16(float mean)
void setADCRMSG1(float mean)
static unsigned indexEE(const unsigned ism, const unsigned ix, const unsigned iy)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
void setADCMeanG1(float mean)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void analyze(void)
Analyze.
void cleanup(void)
Cleanup.
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
EETestPulseClient(const edm::ParameterSet &ps)
Constructor.
static const int TESTPULSE_HIGH_GAIN_MEAN_ERROR
void setADCRMSG16(float mean)
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)
std::vector< int > MGPAGains_
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)
virtual ~EETestPulseClient()
Destructor.
void setPedMeanG1(float mean)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
float pedPnDiscrepancyMean_[2]
void setPedRMSG16(float mean)
void setCurrentFolder(const std::string &fullpath)
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
std::vector< int > superModules_