22 #ifdef WITH_ECAL_COND_DB
186 name =
"EETPT test pulse quality G01 " +
Numbers::sEE(ism);
194 name =
"EETPT test pulse quality G06 " +
Numbers::sEE(ism);
202 name =
"EETPT test pulse quality G12 " +
Numbers::sEE(ism);
211 name =
"EETPT test pulse quality PNs G01 " +
Numbers::sEE(ism);
218 name =
"EETPT test pulse quality PNs G16 " +
Numbers::sEE(ism);
226 name =
"EETPT test pulse amplitude G01 " +
Numbers::sEE(ism);
233 name =
"EETPT test pulse amplitude G06 " +
Numbers::sEE(ism);
240 name =
"EETPT test pulse amplitude G12 " +
Numbers::sEE(ism);
248 name =
"EETPT PNs pedestal rms " +
Numbers::sEE(ism) +
" G01";
254 name =
"EETPT PNs pedestal rms " +
Numbers::sEE(ism) +
" G16";
261 name =
"EETPT test pulse shape G01 " +
Numbers::sEE(ism);
268 name =
"EETPT test pulse shape G06 " +
Numbers::sEE(ism);
275 name =
"EETPT test pulse shape G12 " +
Numbers::sEE(ism);
294 for (
int ix = 1; ix <= 50; ix++ ) {
295 for (
int iy = 1; iy <= 50; iy++ ) {
304 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
315 for (
int i = 1;
i <= 10;
i++ ) {
321 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
322 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
361 if (
i01_[ism-1] )
delete i01_[ism-1];
362 if (
i02_[ism-1] )
delete i02_[ism-1];
363 if (
i03_[ism-1] )
delete i03_[ism-1];
364 if (
i04_[ism-1] )
delete i04_[ism-1];
423 #ifdef WITH_ECAL_COND_DB
431 std::map<EcalLogicID, MonTestPulseDat> dataset1;
433 std::map<EcalLogicID, MonPulseShapeDat> dataset2;
453 for (
int ix = 1; ix <= 50; ix++ ) {
454 for (
int iy = 1; iy <= 50; iy++ ) {
459 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
467 float num01, num02, num03;
468 float mean01, mean02, mean03;
469 float rms01, rms02, rms03;
475 if ( update01 || update02 || update03 ) {
512 std::vector<float> sample01, sample02, sample03;
519 for (
int i = 1;
i <= 10;
i++ ) {
520 sample01.push_back(
int(
me_hs01_[ism-1]->getBinContent(
i)));
523 for (
int i = 1;
i <= 10;
i++ ) { sample01.push_back(-1.); }
527 for (
int i = 1;
i <= 10;
i++ ) {
528 sample02.push_back(
int(
me_hs02_[ism-1]->getBinContent(
i)));
531 for (
int i = 1;
i <= 10;
i++ ) { sample02.push_back(-1.); }
535 for (
int i = 1;
i <= 10;
i++ ) {
536 sample03.push_back(
int(
me_hs03_[ism-1]->getBinContent(
i)));
539 for (
int i = 1;
i <= 10;
i++ ) { sample03.push_back(-1.); }
543 std::cout <<
"sample01 = " << std::flush;
544 for (
unsigned int i = 0;
i < sample01.size();
i++ ) {
545 std::cout << sample01[
i] <<
" " << std::flush;
549 std::cout <<
"sample02 = " << std::flush;
550 for (
unsigned int i = 0;
i < sample02.size();
i++ ) {
551 std::cout << sample02[
i] <<
" " << std::flush;
555 std::cout <<
"sample03 = " << std::flush;
556 for (
unsigned int i = 0;
i < sample03.size();
i++ ) {
557 std::cout << sample03[
i] <<
" " << std::flush;
572 if ( ic == -1 )
continue;
576 dataset1[ecid] =
adc;
577 if (
Numbers::icEE(ism, jx, jy) == 1 ) dataset2[ecid] = shape;
591 if ( dataset2.size() != 0 ) econn->
insertDataSet(&dataset2, moniov);
593 }
catch (std::runtime_error &
e) {
601 std::map<EcalLogicID, MonPNMGPADat> dataset3;
620 for (
int i = 1;
i <= 10;
i++ ) {
627 float num01, num02, num03, num04;
628 float mean01, mean02, mean03, mean04;
629 float rms01, rms02, rms03, rms04;
636 if ( update01 || update02 || update03 || update04 ) {
642 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 <<
" " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
643 std::cout <<
"PNs (" <<
i <<
") G16 " << num02 <<
" " << mean02 <<
" " << rms02 <<
" " << num04 <<
" " << mean04 <<
" " << rms04 << std::endl;
687 }
catch (std::runtime_error &e) {
701 if (
ievt_ % 10 == 0 ) {
799 float meanAmpl01, meanAmpl02, meanAmpl03;
801 int nCry01, nCry02, nCry03;
803 meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.;
805 nCry01 = nCry02 = nCry03 = 0;
807 for (
int ix = 1; ix <= 50; ix++ ) {
808 for (
int iy = 1; iy <= 50; iy++ ) {
814 float num01, num02, num03;
815 float mean01, mean02, mean03;
816 float rms01, rms02, rms03;
823 meanAmpl01 += mean01;
828 meanAmpl02 += mean02;
833 meanAmpl03 += mean03;
840 if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01);
841 if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02);
842 if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03);
844 for (
int ix = 1; ix <= 50; ix++ ) {
845 for (
int iy = 1; iy <= 50; iy++ ) {
854 if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
866 float num01, num02, num03;
867 float mean01, mean02, mean03;
868 float rms01, rms02, rms03;
959 for (
int i = 1;
i <= 10;
i++ ) {
965 if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) )
continue;
966 if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) )
continue;
976 float num01, num02, num03, num04;
977 float mean01, mean02, mean03, mean04;
978 float rms01, rms02, rms03, rms04;
988 if ( update01 && update03 ) {
1004 if ( update02 && update04 ) {
1025 for (
int i = 1;
i <= 10;
i++ ) {
1027 if (
hs01_[ism-1] ) {
1035 if (
hs02_[ism-1] ) {
1043 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)
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)
std::string getName(Reflex::Type &cc)
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_