20 #ifdef WITH_ECAL_COND_DB
183 name =
"EBTPT test pulse quality G01 " +
Numbers::sEB(ism);
190 name =
"EBTPT test pulse quality G06 " +
Numbers::sEB(ism);
197 name =
"EBTPT test pulse quality G12 " +
Numbers::sEB(ism);
205 name =
"EBTPT test pulse quality PNs G01 " +
Numbers::sEB(ism);
212 name =
"EBTPT test pulse quality PNs G16 " +
Numbers::sEB(ism);
220 name =
"EBTPT test pulse amplitude G01 " +
Numbers::sEB(ism);
227 name =
"EBTPT test pulse amplitude G06 " +
Numbers::sEB(ism);
234 name =
"EBTPT test pulse amplitude G12 " +
Numbers::sEB(ism);
242 name =
"EBTPT PNs pedestal rms " +
Numbers::sEB(ism) +
" G01";
248 name =
"EBTPT PNs pedestal rms " +
Numbers::sEB(ism) +
" G16";
255 name =
"EBTPT test pulse shape G01 " +
Numbers::sEB(ism);
262 name =
"EBTPT test pulse shape G06 " +
Numbers::sEB(ism);
269 name =
"EBTPT test pulse shape G12 " +
Numbers::sEB(ism);
288 for (
int ie = 1; ie <= 85; ie++ ) {
289 for (
int ip = 1; ip <= 20; ip++ ) {
298 for (
int i = 1;
i <= 10;
i++ ) {
337 if (
i01_[ism-1] )
delete i01_[ism-1];
338 if (
i02_[ism-1] )
delete i02_[ism-1];
339 if (
i03_[ism-1] )
delete i03_[ism-1];
340 if (
i04_[ism-1] )
delete i04_[ism-1];
399 #ifdef WITH_ECAL_COND_DB
407 std::map<EcalLogicID, MonTestPulseDat> dataset1;
409 std::map<EcalLogicID, MonPulseShapeDat> dataset2;
429 for (
int ie = 1; ie <= 85; ie++ ) {
430 for (
int ip = 1; ip <= 20; ip++ ) {
436 float num01, num02, num03;
437 float mean01, mean02, mean03;
438 float rms01, rms02, rms03;
444 if ( update01 || update02 || update03 ) {
450 std::cout <<
"G01 (" << ie <<
"," << ip <<
") " << num01 <<
" " << mean01 <<
" " << rms01 << std::endl;
451 std::cout <<
"G06 (" << ie <<
"," << ip <<
") " << num02 <<
" " << mean02 <<
" " << rms02 << std::endl;
452 std::cout <<
"G12 (" << ie <<
"," << ip <<
") " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
481 std::vector<float> sample01, sample02, sample03;
488 for (
int i = 1;
i <= 10;
i++ ) {
489 sample01.push_back(
int(
me_hs01_[ism-1]->getBinContent(
i)));
492 for (
int i = 1;
i <= 10;
i++ ) { sample01.push_back(-1.); }
496 for (
int i = 1;
i <= 10;
i++ ) {
497 sample02.push_back(
int(
me_hs02_[ism-1]->getBinContent(
i)));
500 for (
int i = 1;
i <= 10;
i++ ) { sample02.push_back(-1.); }
504 for (
int i = 1;
i <= 10;
i++ ) {
505 sample03.push_back(
int(
me_hs03_[ism-1]->getBinContent(
i)));
508 for (
int i = 1;
i <= 10;
i++ ) { sample03.push_back(-1.); }
512 std::cout <<
"sample01 = " << std::flush;
513 for (
unsigned int i = 0;
i < sample01.size();
i++ ) {
514 std::cout << sample01[
i] <<
" " << std::flush;
518 std::cout <<
"sample02 = " << std::flush;
519 for (
unsigned int i = 0;
i < sample02.size();
i++ ) {
520 std::cout << sample02[
i] <<
" " << std::flush;
524 std::cout <<
"sample03 = " << std::flush;
525 for (
unsigned int i = 0;
i < sample03.size();
i++ ) {
526 std::cout << sample03[
i] <<
" " << std::flush;
543 dataset1[ecid] =
adc;
544 if (
Numbers::icEB(ism, ie, ip) == 1 ) dataset2[ecid] = shape;
558 if ( dataset2.size() != 0 ) econn->
insertDataSet(&dataset2, moniov);
560 }
catch (std::runtime_error &
e) {
568 std::map<EcalLogicID, MonPNMGPADat> dataset3;
587 for (
int i = 1;
i <= 10;
i++ ) {
594 float num01, num02, num03, num04;
595 float mean01, mean02, mean03, mean04;
596 float rms01, rms02, rms03, rms04;
603 if ( update01 || update02 || update03 || update04 ) {
609 std::cout <<
"PNs (" <<
i <<
") G01 " << num01 <<
" " << mean01 <<
" " << rms01 <<
" " << num03 <<
" " << mean03 <<
" " << rms03 << std::endl;
610 std::cout <<
"PNs (" <<
i <<
") G16 " << num02 <<
" " << mean02 <<
" " << rms02 <<
" " << num04 <<
" " << mean04 <<
" " << rms04 << std::endl;
654 }
catch (std::runtime_error &e) {
668 if (
ievt_ % 10 == 0 ) {
788 float meanAmpl01, meanAmpl02, meanAmpl03;
790 int nCry01, nCry02, nCry03;
792 meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.;
794 nCry01 = nCry02 = nCry03 = 0;
796 for (
int ie = 1; ie <= 85; ie++ ) {
797 for (
int ip = 1; ip <= 20; ip++ ) {
803 float num01, num02, num03;
804 float mean01, mean02, mean03;
805 float rms01, rms02, rms03;
812 meanAmpl01 += mean01;
817 meanAmpl02 += mean02;
822 meanAmpl03 += mean03;
829 if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01);
830 if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02);
831 if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03);
833 for (
int ie = 1; ie <= 85; ie++ ) {
834 for (
int ip = 1; ip <= 20; ip++ ) {
844 float num01, num02, num03;
845 float mean01, mean02, mean03;
846 float rms01, rms02, rms03;
931 for (
int i = 1;
i <= 10;
i++ ) {
941 float num01, num02, num03, num04;
942 float mean01, mean02, mean03, mean04;
943 float rms01, rms02, rms03, rms04;
953 if ( update01 && update03 ) {
969 if ( update02 && update04 ) {
990 for (
int i = 1;
i <= 10;
i++ ) {
992 if (
hs01_[ism-1] ) {
1000 if (
hs02_[ism-1] ) {
1008 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 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.
static std::string sEB(const unsigned ism)
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
static unsigned icEB(const unsigned ism, const unsigned ix, const unsigned iy)
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.
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
void setADCMeanG12(float mean)
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)
Abs< T >::type abs(const T &t)
static const int TESTPULSE_HIGH_GAIN_RMS_ERROR
float pedPnExpectedMean_[2]
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
void setADCRMSG12(float rms)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * meg04_[36]
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)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
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_