22 #ifdef WITH_ECAL_COND_DB
185 name =
"EBTPT test pulse quality G01 " +
Numbers::sEB(ism);
192 name =
"EBTPT test pulse quality G06 " +
Numbers::sEB(ism);
199 name =
"EBTPT test pulse quality G12 " +
Numbers::sEB(ism);
207 name =
"EBTPT test pulse quality PNs G01 " +
Numbers::sEB(ism);
214 name =
"EBTPT test pulse quality PNs G16 " +
Numbers::sEB(ism);
222 name =
"EBTPT test pulse amplitude G01 " +
Numbers::sEB(ism);
229 name =
"EBTPT test pulse amplitude G06 " +
Numbers::sEB(ism);
236 name =
"EBTPT test pulse amplitude G12 " +
Numbers::sEB(ism);
244 name =
"EBTPT PNs pedestal rms " +
Numbers::sEB(ism) +
" G01";
250 name =
"EBTPT PNs pedestal rms " +
Numbers::sEB(ism) +
" G16";
257 name =
"EBTPT test pulse shape G01 " +
Numbers::sEB(ism);
264 name =
"EBTPT test pulse shape G06 " +
Numbers::sEB(ism);
271 name =
"EBTPT test pulse shape G12 " +
Numbers::sEB(ism);
290 for (
int ie = 1; ie <= 85; ie++ ) {
291 for (
int ip = 1; ip <= 20; ip++ ) {
300 for (
int i = 1;
i <= 10;
i++ ) {
339 if (
i01_[ism-1] )
delete i01_[ism-1];
340 if (
i02_[ism-1] )
delete i02_[ism-1];
341 if (
i03_[ism-1] )
delete i03_[ism-1];
342 if (
i04_[ism-1] )
delete i04_[ism-1];
401 #ifdef WITH_ECAL_COND_DB
409 std::map<EcalLogicID, MonTestPulseDat> dataset1;
411 std::map<EcalLogicID, MonPulseShapeDat> dataset2;
431 for (
int ie = 1; ie <= 85; ie++ ) {
432 for (
int ip = 1; ip <= 20; ip++ ) {
438 float num01, num02, num03;
439 float mean01, mean02, mean03;
440 float rms01, rms02, rms03;
446 if ( update01 || update02 || update03 ) {
452 std::cout <<
"G01 (" << ie <<
"," << ip <<
") " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
453 std::cout <<
"G06 (" << ie <<
"," << ip <<
") " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
454 std::cout <<
"G12 (" << ie <<
"," << ip <<
") " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
483 std::vector<float> sample01, sample02, sample03;
490 for (
int i = 1;
i <= 10;
i++ ) {
491 sample01.push_back(
int(
me_hs01_[ism-1]->getBinContent(
i)));
494 for (
int i = 1;
i <= 10;
i++ ) { sample01.push_back(-1.); }
498 for (
int i = 1;
i <= 10;
i++ ) {
499 sample02.push_back(
int(
me_hs02_[ism-1]->getBinContent(
i)));
502 for (
int i = 1;
i <= 10;
i++ ) { sample02.push_back(-1.); }
506 for (
int i = 1;
i <= 10;
i++ ) {
507 sample03.push_back(
int(
me_hs03_[ism-1]->getBinContent(
i)));
510 for (
int i = 1;
i <= 10;
i++ ) { sample03.push_back(-1.); }
514 std::cout <<
"sample01 = " << std::flush;
515 for (
unsigned int i = 0;
i < sample01.size();
i++ ) {
516 std::cout << sample01[
i] <<
" " << std::flush;
520 std::cout <<
"sample02 = " << std::flush;
521 for (
unsigned int i = 0;
i < sample02.size();
i++ ) {
522 std::cout << sample02[
i] <<
" " << std::flush;
526 std::cout <<
"sample03 = " << std::flush;
527 for (
unsigned int i = 0;
i < sample03.size();
i++ ) {
528 std::cout << sample03[
i] <<
" " << std::flush;
545 dataset1[ecid] =
adc;
546 if (
Numbers::icEB(ism, ie, ip) == 1 ) dataset2[ecid] = shape;
560 if ( dataset2.size() != 0 ) econn->
insertDataSet(&dataset2, moniov);
562 }
catch (std::runtime_error &e) {
570 std::map<EcalLogicID, MonPNMGPADat> dataset3;
589 for (
int i = 1;
i <= 10;
i++ ) {
596 float num01, num02, num03, num04;
597 float mean01, mean02, mean03, mean04;
598 float rms01, rms02, rms03, rms04;
605 if ( update01 || update02 || update03 || update04 ) {
611 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 <<
" " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
612 std::cout <<
"PNs (" <<
i <<
") G16 " << num02 <<
" " << mean02 <<
" " << rms02 <<
" " << num04 <<
" " << mean04 <<
" " << rms04 << std::endl;
656 }
catch (std::runtime_error &e) {
670 if (
ievt_ % 10 == 0 ) {
790 float meanAmpl01, meanAmpl02, meanAmpl03;
792 int nCry01, nCry02, nCry03;
794 meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.;
796 nCry01 = nCry02 = nCry03 = 0;
798 for (
int ie = 1; ie <= 85; ie++ ) {
799 for (
int ip = 1; ip <= 20; ip++ ) {
805 float num01, num02, num03;
806 float mean01, mean02, mean03;
807 float rms01, rms02, rms03;
814 meanAmpl01 += mean01;
819 meanAmpl02 += mean02;
824 meanAmpl03 += mean03;
831 if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01);
832 if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02);
833 if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03);
835 for (
int ie = 1; ie <= 85; ie++ ) {
836 for (
int ip = 1; ip <= 20; ip++ ) {
842 float numEventsinCry[3] = {0., 0., 0.};
844 if (
ha01_[ism-1] ) numEventsinCry[0] =
ha01_[ism-1]->GetBinEntries(
ha01_[ism-1]->GetBin(ie, ip));
845 if (
ha02_[ism-1] ) numEventsinCry[1] =
ha02_[ism-1]->GetBinEntries(
ha02_[ism-1]->GetBin(ie, ip));
846 if (
ha03_[ism-1] ) numEventsinCry[2] =
ha03_[ism-1]->GetBinEntries(
ha03_[ism-1]->GetBin(ie, ip));
852 float num01, num02, num03;
853 float mean01, mean02, mean03;
854 float rms01, rms02, rms03;
939 for (
int i = 1;
i <= 10;
i++ ) {
949 float num01, num02, num03, num04;
950 float mean01, mean02, mean03, mean04;
951 float rms01, rms02, rms03, rms04;
961 if ( update01 && update03 ) {
977 if ( update02 && update04 ) {
998 for (
int i = 1;
i <= 10;
i++ ) {
1000 if (
hs01_[ism-1] ) {
1008 if (
hs02_[ism-1] ) {
1016 if (
hs03_[ism-1] ) {
int adc(sample_type sample)
get the ADC sample (12 bits)
float pedPnDiscrepancyMean_[2]
Cache logicID vector from database.
T getUntrackedParameter(std::string const &, T const &) const
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 std::string sEB(const int ism)
static const int TESTPULSE_LOW_GAIN_RMS_ERROR
MonitorElement * meg05_[36]
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.
void beginRun(void)
BeginRun.
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 * meg03_[36]
MonitorElement * mea01_[36]
MonitorElement * me_hs03_[36]
MonitorElement * meg02_[36]
void beginJob(void)
BeginJob.
void setADCMeanG1(float mean)
void setADCMeanG6(float mean)
float pedPnRMSThreshold_[2]
MonitorElement * mer05_[36]
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.
void cleanup(void)
Cleanup.
static int icEB(const int ism, const int ix, const int iy)
MonitorElement * mea03_[36]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
void setSamples(std::vector< float > &samples, int gain)
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
MonitorElement * mea02_[36]
static const int TESTPULSE_MIDDLE_GAIN_RMS_ERROR
static int indexEB(const int ism, const int ie, const int ip)
void setADCMeanG12(float mean)
static int iSM(const int ism, const EcalSubdetector subdet)
void setADCMeanG16(float mean)
EBTestPulseClient(const edm::ParameterSet &ps)
Constructor.
std::vector< int > MGPAGainsPN_
std::vector< int > MGPAGains_
void setTaskStatus(bool status)
void removeElement(const std::string &name)
static const int TESTPULSE_HIGH_GAIN_RMS_ERROR
float pedPnExpectedMean_[2]
void setADCRMSG12(float rms)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * meg04_[36]
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")
float amplitudeThreshold_
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
virtual ~EBTestPulseClient()
Destructor.
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
void setADCRMSG6(float rms)
MonitorElement * me_hs02_[36]
float amplitudeThresholdPnG01_
void setPedMeanG16(float mean)
void setADCRMSG1(float mean)
void setADCMeanG1(float mean)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
std::vector< int > superModules_
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
MonitorElement * mer04_[36]
static const int TESTPULSE_HIGH_GAIN_MEAN_ERROR
void setADCRMSG16(float mean)
MonitorElement * me_hs01_[36]
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)
MonitorElement * meg01_[36]
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)
void setPedMeanG1(float mean)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
void analyze(void)
Analyze.
void setPedRMSG16(float mean)
void setCurrentFolder(const std::string &fullpath)
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
float amplitudeThresholdPnG16_