#include <DQM/EcalBarrelMonitorClient/interface/EBTestPulseClient.h>
Definition at line 31 of file EBTestPulseClient.h.
EBTestPulseClient::EBTestPulseClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 44 of file EBTestPulseClient.cc.
References amplitudeThreshold_, amplitudeThresholdPnG01_, amplitudeThresholdPnG16_, cloneME_, debug_, enableCleanup_, edm::ParameterSet::getUntrackedParameter(), ha01_, ha02_, ha03_, hs01_, hs02_, hs03_, i, i01_, i02_, i03_, i04_, me_hs01_, me_hs02_, me_hs03_, mea01_, mea02_, mea03_, meg01_, meg02_, meg03_, meg04_, meg05_, mer04_, mer05_, pedPnDiscrepancyMean_, pedPnExpectedMean_, pedPnRMSThreshold_, percentVariation_, prefixME_, RMSThreshold_, superModules_, and verbose_.
00044 { 00045 00046 // cloneME switch 00047 cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true); 00048 00049 // verbose switch 00050 verbose_ = ps.getUntrackedParameter<bool>("verbose", true); 00051 00052 // debug switch 00053 debug_ = ps.getUntrackedParameter<bool>("debug", false); 00054 00055 // prefixME path 00056 prefixME_ = ps.getUntrackedParameter<string>("prefixME", ""); 00057 00058 // enableCleanup_ switch 00059 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); 00060 00061 // vector of selected Super Modules (Defaults to all 36). 00062 superModules_.reserve(36); 00063 for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i); 00064 superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_); 00065 00066 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00067 00068 int ism = superModules_[i]; 00069 00070 ha01_[ism-1] = 0; 00071 ha02_[ism-1] = 0; 00072 ha03_[ism-1] = 0; 00073 00074 hs01_[ism-1] = 0; 00075 hs02_[ism-1] = 0; 00076 hs03_[ism-1] = 0; 00077 00078 i01_[ism-1] = 0; 00079 i02_[ism-1] = 0; 00080 i03_[ism-1] = 0; 00081 i04_[ism-1] = 0; 00082 00083 } 00084 00085 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00086 00087 int ism = superModules_[i]; 00088 00089 meg01_[ism-1] = 0; 00090 meg02_[ism-1] = 0; 00091 meg03_[ism-1] = 0; 00092 00093 meg04_[ism-1] = 0; 00094 meg05_[ism-1] = 0; 00095 00096 mea01_[ism-1] = 0; 00097 mea02_[ism-1] = 0; 00098 mea03_[ism-1] = 0; 00099 00100 mer04_[ism-1] = 0; 00101 mer05_[ism-1] = 0; 00102 00103 me_hs01_[ism-1] = 0; 00104 me_hs02_[ism-1] = 0; 00105 me_hs03_[ism-1] = 0; 00106 00107 } 00108 00109 percentVariation_ = 0.2; 00110 RMSThreshold_ = 300.0; 00111 00112 amplitudeThreshold_ = 100.; 00113 00114 amplitudeThresholdPnG01_ = 200./16.; 00115 amplitudeThresholdPnG16_ = 200.; 00116 00117 pedPnExpectedMean_[0] = 750.0; 00118 pedPnExpectedMean_[1] = 750.0; 00119 00120 pedPnDiscrepancyMean_[0] = 100.0; 00121 pedPnDiscrepancyMean_[1] = 100.0; 00122 00123 pedPnRMSThreshold_[0] = 1.0; 00124 pedPnRMSThreshold_[1] = 3.0; 00125 00126 }
EBTestPulseClient::~EBTestPulseClient | ( | ) | [virtual] |
Analyze.
Implements EBClient.
Definition at line 626 of file EBTestPulseClient.cc.
References amplitudeThreshold_, amplitudeThresholdPnG01_, amplitudeThresholdPnG16_, cloneME_, GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, EcalBarrel, lat::endl(), EcalErrorMask::fetchDataSet(), MonitorElement::Fill(), DQMStore::get(), UtilsClient::getBinStatistics(), LogicID::getEcalLogicID(), UtilsClient::getFirstNonEmptyChannel(), EcalLogicID::getLogicID(), EcalErrorDictionary::getMask(), ha01_, ha02_, ha03_, histo, hs01_, hs02_, hs03_, i, i01_, i02_, i03_, i04_, Numbers::icEB(), ievt_, Numbers::indexEB(), Numbers::iSM(), Numbers::iTT(), jevt_, m, UtilsClient::maskBinContent(), me, me_hs01_, me_hs02_, me_hs03_, mea01_, mea02_, mea03_, meg01_, meg02_, meg03_, meg04_, meg05_, mer04_, mer05_, pedPnDiscrepancyMean_, pedPnExpectedMean_, pedPnRMSThreshold_, percentVariation_, prefixME_, MonitorElement::Reset(), RMSThreshold_, Numbers::sEB(), MonitorElement::setBinContent(), MonitorElement::setBinError(), MonitorElement::setEntries(), and superModules_.
00626 { 00627 00628 ievt_++; 00629 jevt_++; 00630 if ( ievt_ % 10 == 0 ) { 00631 if ( debug_ ) cout << "EBTestPulseClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl; 00632 } 00633 00634 uint64_t bits01 = 0; 00635 bits01 |= EcalErrorDictionary::getMask("TESTPULSE_LOW_GAIN_MEAN_WARNING"); 00636 bits01 |= EcalErrorDictionary::getMask("TESTPULSE_LOW_GAIN_RMS_WARNING"); 00637 00638 uint64_t bits02 = 0; 00639 bits02 |= EcalErrorDictionary::getMask("TESTPULSE_MIDDLE_GAIN_MEAN_WARNING"); 00640 bits02 |= EcalErrorDictionary::getMask("TESTPULSE_MIDDLE_GAIN_RMS_WARNING"); 00641 00642 uint64_t bits03 = 0; 00643 bits03 |= EcalErrorDictionary::getMask("TESTPULSE_HIGH_GAIN_MEAN_WARNING"); 00644 bits03 |= EcalErrorDictionary::getMask("TESTPULSE_HIGH_GAIN_RMS_WARNING"); 00645 00646 uint64_t bits04 = 0; 00647 bits04 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_MEAN_WARNING"); 00648 bits04 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_RMS_WARNING"); 00649 bits04 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_MEAN_ERROR"); 00650 bits04 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_RMS_ERROR"); 00651 00652 uint64_t bits05 = 0; 00653 bits05 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_MEAN_WARNING"); 00654 bits05 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_RMS_WARNING"); 00655 bits05 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_MEAN_ERROR"); 00656 bits05 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_RMS_ERROR"); 00657 00658 uint64_t bits06 = 0; 00659 bits06 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_MEAN_WARNING"); 00660 bits06 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_RMS_WARNING"); 00661 bits06 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_MEAN_ERROR"); 00662 bits06 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_RMS_ERROR"); 00663 00664 map<EcalLogicID, RunCrystalErrorsDat> mask1; 00665 map<EcalLogicID, RunPNErrorsDat> mask2; 00666 map<EcalLogicID, RunTTErrorsDat> mask3; 00667 00668 EcalErrorMask::fetchDataSet(&mask1); 00669 EcalErrorMask::fetchDataSet(&mask2); 00670 EcalErrorMask::fetchDataSet(&mask3); 00671 00672 char histo[200]; 00673 00674 MonitorElement* me; 00675 00676 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00677 00678 int ism = superModules_[i]; 00679 00680 sprintf(histo, (prefixME_ + "/EBTestPulseTask/Gain01/EBTPT amplitude %s G01").c_str(), Numbers::sEB(ism).c_str()); 00681 me = dqmStore_->get(histo); 00682 ha01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, ha01_[ism-1] ); 00683 00684 sprintf(histo, (prefixME_ + "/EBTestPulseTask/Gain06/EBTPT amplitude %s G06").c_str(), Numbers::sEB(ism).c_str()); 00685 me = dqmStore_->get(histo); 00686 ha02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, ha02_[ism-1] ); 00687 00688 sprintf(histo, (prefixME_ + "/EBTestPulseTask/Gain12/EBTPT amplitude %s G12").c_str(), Numbers::sEB(ism).c_str()); 00689 me = dqmStore_->get(histo); 00690 ha03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, ha03_[ism-1] ); 00691 00692 sprintf(histo, (prefixME_ + "/EBTestPulseTask/Gain01/EBTPT shape %s G01").c_str(), Numbers::sEB(ism).c_str()); 00693 me = dqmStore_->get(histo); 00694 hs01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs01_[ism-1] ); 00695 00696 sprintf(histo, (prefixME_ + "/EBTestPulseTask/Gain06/EBTPT shape %s G06").c_str(), Numbers::sEB(ism).c_str()); 00697 me = dqmStore_->get(histo); 00698 hs02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs02_[ism-1] ); 00699 00700 sprintf(histo, (prefixME_ + "/EBTestPulseTask/Gain12/EBTPT shape %s G12").c_str(), Numbers::sEB(ism).c_str()); 00701 me = dqmStore_->get(histo); 00702 hs03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs03_[ism-1] ); 00703 00704 sprintf(histo, (prefixME_ + "/EBTestPulseTask/PN/Gain01/EBPDT PNs amplitude %s G01").c_str(), Numbers::sEB(ism).c_str()); 00705 me = dqmStore_->get(histo); 00706 i01_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i01_[ism-1] ); 00707 00708 sprintf(histo, (prefixME_ + "/EBTestPulseTask/PN/Gain16/EBPDT PNs amplitude %s G16").c_str(), Numbers::sEB(ism).c_str()); 00709 me = dqmStore_->get(histo); 00710 i02_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i02_[ism-1] ); 00711 00712 sprintf(histo, (prefixME_ + "/EBTestPulseTask/PN/Gain01/EBPDT PNs pedestal %s G01").c_str(), Numbers::sEB(ism).c_str()); 00713 me = dqmStore_->get(histo); 00714 i03_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i03_[ism-1] ); 00715 00716 sprintf(histo, (prefixME_ + "/EBTestPulseTask/PN/Gain16/EBPDT PNs pedestal %s G16").c_str(), Numbers::sEB(ism).c_str()); 00717 me = dqmStore_->get(histo); 00718 i04_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i04_[ism-1] ); 00719 00720 if ( meg01_[ism-1] ) meg01_[ism-1]->Reset(); 00721 if ( meg02_[ism-1] ) meg02_[ism-1]->Reset(); 00722 if ( meg03_[ism-1] ) meg03_[ism-1]->Reset(); 00723 00724 if ( meg04_[ism-1] ) meg04_[ism-1]->Reset(); 00725 if ( meg05_[ism-1] ) meg05_[ism-1]->Reset(); 00726 00727 if ( mea01_[ism-1] ) mea01_[ism-1]->Reset(); 00728 if ( mea02_[ism-1] ) mea02_[ism-1]->Reset(); 00729 if ( mea03_[ism-1] ) mea03_[ism-1]->Reset(); 00730 00731 if ( mer04_[ism-1] ) mer04_[ism-1]->Reset(); 00732 if ( mer05_[ism-1] ) mer05_[ism-1]->Reset(); 00733 00734 if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset(); 00735 if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset(); 00736 if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset(); 00737 00738 float meanAmpl01, meanAmpl02, meanAmpl03; 00739 00740 int nCry01, nCry02, nCry03; 00741 00742 meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.; 00743 00744 nCry01 = nCry02 = nCry03 = 0; 00745 00746 for ( int ie = 1; ie <= 85; ie++ ) { 00747 for ( int ip = 1; ip <= 20; ip++ ) { 00748 00749 bool update01; 00750 bool update02; 00751 bool update03; 00752 00753 float num01, num02, num03; 00754 float mean01, mean02, mean03; 00755 float rms01, rms02, rms03; 00756 00757 update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01); 00758 update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02); 00759 update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03); 00760 00761 if ( update01 ) { 00762 meanAmpl01 += mean01; 00763 nCry01++; 00764 } 00765 00766 if ( update02 ) { 00767 meanAmpl02 += mean02; 00768 nCry02++; 00769 } 00770 00771 if ( update03 ) { 00772 meanAmpl03 += mean03; 00773 nCry03++; 00774 } 00775 00776 } 00777 } 00778 00779 if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01); 00780 if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02); 00781 if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03); 00782 00783 for ( int ie = 1; ie <= 85; ie++ ) { 00784 for ( int ip = 1; ip <= 20; ip++ ) { 00785 00786 if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. ); 00787 if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. ); 00788 if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. ); 00789 00790 float numEventsinCry[3] = {0., 0., 0.}; 00791 00792 if ( ha01_[ism-1] ) numEventsinCry[0] = ha01_[ism-1]->GetBinEntries(ha01_[ism-1]->GetBin(ie, ip)); 00793 if ( ha02_[ism-1] ) numEventsinCry[1] = ha02_[ism-1]->GetBinEntries(ha02_[ism-1]->GetBin(ie, ip)); 00794 if ( ha03_[ism-1] ) numEventsinCry[2] = ha03_[ism-1]->GetBinEntries(ha03_[ism-1]->GetBin(ie, ip)); 00795 00796 bool update01; 00797 bool update02; 00798 bool update03; 00799 00800 float num01, num02, num03; 00801 float mean01, mean02, mean03; 00802 float rms01, rms02, rms03; 00803 00804 update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01); 00805 update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02); 00806 update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03); 00807 00808 if ( update01 ) { 00809 00810 float val; 00811 00812 val = 1.; 00813 if ( fabs(mean01 - meanAmpl01) > fabs(percentVariation_ * meanAmpl01) || mean01 < amplitudeThreshold_ ) 00814 val = 0.; 00815 if ( rms01 > RMSThreshold_ ) 00816 val = 0.; 00817 if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, val ); 00818 00819 int ic = Numbers::icEB(ism, ie, ip); 00820 00821 if ( mea01_[ism-1] ) { 00822 if ( mean01 > 0. ) { 00823 mea01_[ism-1]->setBinContent( ic, mean01 ); 00824 mea01_[ism-1]->setBinError( ic, rms01 ); 00825 } else { 00826 mea01_[ism-1]->setEntries( 1.+mea01_[ism-1]->getEntries() ); 00827 } 00828 } 00829 00830 } 00831 00832 if ( update02 ) { 00833 00834 float val; 00835 00836 val = 1.; 00837 if ( fabs(mean02 - meanAmpl02) > fabs(percentVariation_ * meanAmpl02) || mean02 < amplitudeThreshold_ ) 00838 val = 0.; 00839 if ( rms02 > RMSThreshold_ ) 00840 val = 0.; 00841 if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, val ); 00842 00843 int ic = Numbers::icEB(ism, ie, ip); 00844 00845 if ( mea02_[ism-1] ) { 00846 if ( mean02 > 0. ) { 00847 mea02_[ism-1]->setBinContent( ic, mean02 ); 00848 mea02_[ism-1]->setBinError( ic, rms02 ); 00849 } else { 00850 mea02_[ism-1]->setEntries( 1.+mea02_[ism-1]->getEntries() ); 00851 } 00852 } 00853 00854 } 00855 00856 if ( update03 ) { 00857 00858 float val; 00859 00860 val = 1.; 00861 if ( fabs(mean03 - meanAmpl03) > fabs(percentVariation_ * meanAmpl03) || mean03 < amplitudeThreshold_ ) 00862 val = 0.; 00863 if ( rms03 > RMSThreshold_ ) 00864 val = 0.; 00865 if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, val ); 00866 00867 int ic = Numbers::icEB(ism, ie, ip); 00868 00869 if ( mea03_[ism-1] ) { 00870 if ( mean03 > 0. ) { 00871 mea03_[ism-1]->setBinContent( ic, mean03 ); 00872 mea03_[ism-1]->setBinError( ic, rms03 ); 00873 } else { 00874 mea03_[ism-1]->setEntries( 1.+mea03_[ism-1]->getEntries() ); 00875 } 00876 } 00877 00878 } 00879 00880 // masking 00881 00882 if ( mask1.size() != 0 ) { 00883 map<EcalLogicID, RunCrystalErrorsDat>::const_iterator m; 00884 for (m = mask1.begin(); m != mask1.end(); m++) { 00885 00886 EcalLogicID ecid = m->first; 00887 00888 int ic = Numbers::indexEB(ism, ie, ip); 00889 00890 if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic).getLogicID() ) { 00891 if ( (m->second).getErrorBits() & bits01 ) { 00892 UtilsClient::maskBinContent( meg01_[ism-1], ie, ip ); 00893 } 00894 if ( (m->second).getErrorBits() & bits02 ) { 00895 UtilsClient::maskBinContent( meg02_[ism-1], ie, ip ); 00896 } 00897 if ( (m->second).getErrorBits() & bits03 ) { 00898 UtilsClient::maskBinContent( meg03_[ism-1], ie, ip ); 00899 } 00900 } 00901 00902 } 00903 } 00904 00905 // TT masking 00906 00907 if ( mask3.size() != 0 ) { 00908 map<EcalLogicID, RunTTErrorsDat>::const_iterator m; 00909 for (m = mask3.begin(); m != mask3.end(); m++) { 00910 00911 EcalLogicID ecid = m->first; 00912 00913 int itt = Numbers::iTT(ism, EcalBarrel, ie, ip); 00914 00915 if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_trigger_tower", Numbers::iSM(ism, EcalBarrel), itt).getLogicID() ) { 00916 if ( (m->second).getErrorBits() & bits01 ) { 00917 UtilsClient::maskBinContent( meg01_[ism-1], ie, ip ); 00918 } 00919 if ( (m->second).getErrorBits() & bits02 ) { 00920 UtilsClient::maskBinContent( meg02_[ism-1], ie, ip ); 00921 } 00922 if ( (m->second).getErrorBits() & bits03 ) { 00923 UtilsClient::maskBinContent( meg03_[ism-1], ie, ip ); 00924 } 00925 } 00926 00927 } 00928 } 00929 00930 } 00931 } 00932 00933 for ( int i = 1; i <= 10; i++ ) { 00934 00935 if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. ); 00936 if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. ); 00937 00938 bool update01; 00939 bool update02; 00940 bool update03; 00941 bool update04; 00942 00943 float num01, num02, num03, num04; 00944 float mean01, mean02, mean03, mean04; 00945 float rms01, rms02, rms03, rms04; 00946 00947 update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01); 00948 update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02); 00949 update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 0, num03, mean03, rms03); 00950 update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 0, num04, mean04, rms04); 00951 00952 if ( mer04_[ism-1] ) mer04_[ism-1]->Fill(rms03); 00953 if ( mer05_[ism-1] ) mer05_[ism-1]->Fill(rms04); 00954 00955 if ( update01 && update03 ) { 00956 00957 float val; 00958 00959 val = 1.; 00960 if ( mean01 < amplitudeThresholdPnG01_ ) 00961 val = 0.; 00962 if ( mean03 < pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] || 00963 pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean03) 00964 val = 0.; 00965 if ( rms03 > pedPnRMSThreshold_[0] ) 00966 val = 0.; 00967 if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent(i, 1, val); 00968 00969 } 00970 00971 if ( update02 && update04 ) { 00972 00973 float val; 00974 00975 val = 1.; 00976 if ( mean02 < amplitudeThresholdPnG16_ ) 00977 val = 0.; 00978 if ( mean04 < pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] || 00979 pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean04) 00980 val = 0.; 00981 if ( rms04 > pedPnRMSThreshold_[1] ) 00982 val = 0.; 00983 if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent(i, 1, val); 00984 00985 } 00986 00987 // masking 00988 00989 if ( mask2.size() != 0 ) { 00990 map<EcalLogicID, RunPNErrorsDat>::const_iterator m; 00991 for (m = mask2.begin(); m != mask2.end(); m++) { 00992 00993 EcalLogicID ecid = m->first; 00994 00995 if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1).getLogicID() ) { 00996 if ( (m->second).getErrorBits() & (bits01|bits04) ) { 00997 UtilsClient::maskBinContent( meg04_[ism-1], i, 1 ); 00998 } 00999 if ( (m->second).getErrorBits() & (bits03|bits06) ) { 01000 UtilsClient::maskBinContent( meg05_[ism-1], i, 1 ); 01001 } 01002 } 01003 01004 } 01005 } 01006 01007 } 01008 01009 for ( int i = 1; i <= 10; i++ ) { 01010 01011 if ( hs01_[ism-1] ) { 01012 int ic = UtilsClient::getFirstNonEmptyChannel( hs01_[ism-1] ); 01013 if ( me_hs01_[ism-1] ) { 01014 me_hs01_[ism-1]->setBinContent( i, hs01_[ism-1]->GetBinContent(ic, i) ); 01015 me_hs01_[ism-1]->setBinError( i, hs01_[ism-1]->GetBinError(ic, i) ); 01016 } 01017 } 01018 01019 if ( hs02_[ism-1] ) { 01020 int ic = UtilsClient::getFirstNonEmptyChannel( hs02_[ism-1] ); 01021 if ( me_hs02_[ism-1] ) { 01022 me_hs02_[ism-1]->setBinContent( i, hs02_[ism-1]->GetBinContent(ic, i) ); 01023 me_hs02_[ism-1]->setBinError( i, hs02_[ism-1]->GetBinError(ic, i) ); 01024 } 01025 } 01026 01027 if ( hs03_[ism-1] ) { 01028 int ic = UtilsClient::getFirstNonEmptyChannel( hs03_[ism-1] ); 01029 if ( me_hs03_[ism-1] ) { 01030 me_hs03_[ism-1]->setBinContent( i, hs03_[ism-1]->GetBinContent(ic, i) ); 01031 me_hs03_[ism-1]->setBinError( i, hs03_[ism-1]->GetBinError(ic, i) ); 01032 } 01033 } 01034 01035 } 01036 01037 } 01038 01039 01040 }
BeginJob.
Implements EBClient.
Definition at line 132 of file EBTestPulseClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), ievt_, and jevt_.
00132 { 00133 00134 dqmStore_ = dqmStore; 00135 00136 if ( debug_ ) cout << "EBTestPulseClient: beginJob" << endl; 00137 00138 ievt_ = 0; 00139 jevt_ = 0; 00140 00141 }
BeginRun.
Implements EBClient.
Definition at line 143 of file EBTestPulseClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), jevt_, and setup().
00143 { 00144 00145 if ( debug_ ) cout << "EBTestPulseClient: beginRun" << endl; 00146 00147 jevt_ = 0; 00148 00149 this->setup(); 00150 00151 }
Cleanup.
Implements EBClient.
Definition at line 292 of file EBTestPulseClient.cc.
References cloneME_, dqmStore_, enableCleanup_, edm::getName(), ha01_, ha02_, ha03_, hs01_, hs02_, hs03_, i, i01_, i02_, i03_, i04_, me_hs01_, me_hs02_, me_hs03_, mea01_, mea02_, mea03_, meg01_, meg02_, meg03_, meg04_, meg05_, mer04_, mer05_, prefixME_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), and superModules_.
Referenced by endJob(), and endRun().
00292 { 00293 00294 if ( ! enableCleanup_ ) return; 00295 00296 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00297 00298 int ism = superModules_[i]; 00299 00300 if ( cloneME_ ) { 00301 if ( ha01_[ism-1] ) delete ha01_[ism-1]; 00302 if ( ha02_[ism-1] ) delete ha02_[ism-1]; 00303 if ( ha03_[ism-1] ) delete ha03_[ism-1]; 00304 00305 if ( hs01_[ism-1] ) delete hs01_[ism-1]; 00306 if ( hs02_[ism-1] ) delete hs02_[ism-1]; 00307 if ( hs03_[ism-1] ) delete hs03_[ism-1]; 00308 00309 if ( i01_[ism-1] ) delete i01_[ism-1]; 00310 if ( i02_[ism-1] ) delete i02_[ism-1]; 00311 if ( i03_[ism-1] ) delete i03_[ism-1]; 00312 if ( i04_[ism-1] ) delete i04_[ism-1]; 00313 } 00314 00315 ha01_[ism-1] = 0; 00316 ha02_[ism-1] = 0; 00317 ha03_[ism-1] = 0; 00318 00319 hs01_[ism-1] = 0; 00320 hs02_[ism-1] = 0; 00321 hs03_[ism-1] = 0; 00322 00323 i01_[ism-1] = 0; 00324 i02_[ism-1] = 0; 00325 i03_[ism-1] = 0; 00326 i04_[ism-1] = 0; 00327 00328 } 00329 00330 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00331 00332 int ism = superModules_[i]; 00333 00334 dqmStore_->setCurrentFolder( prefixME_ + "/EBTestPulseClient" ); 00335 00336 if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() ); 00337 meg01_[ism-1] = 0; 00338 if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() ); 00339 meg02_[ism-1] = 0; 00340 if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() ); 00341 meg03_[ism-1] = 0; 00342 00343 if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() ); 00344 meg04_[ism-1] = 0; 00345 if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() ); 00346 meg05_[ism-1] = 0; 00347 00348 if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() ); 00349 mea01_[ism-1] = 0; 00350 if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() ); 00351 mea02_[ism-1] = 0; 00352 if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() ); 00353 mea03_[ism-1] = 0; 00354 00355 if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() ); 00356 mer04_[ism-1] = 0; 00357 if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() ); 00358 mer05_[ism-1] = 0; 00359 00360 if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() ); 00361 me_hs01_[ism-1] = 0; 00362 if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() ); 00363 me_hs02_[ism-1] = 0; 00364 if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() ); 00365 me_hs03_[ism-1] = 0; 00366 00367 } 00368 00369 }
EndJob.
Implements EBClient.
Definition at line 153 of file EBTestPulseClient.cc.
References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and ievt_.
00153 { 00154 00155 if ( debug_ ) cout << "EBTestPulseClient: endJob, ievt = " << ievt_ << endl; 00156 00157 this->cleanup(); 00158 00159 }
EndRun.
Implements EBClient.
Definition at line 161 of file EBTestPulseClient.cc.
References cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), and jevt_.
00161 { 00162 00163 if ( debug_ ) cout << "EBTestPulseClient: endRun, jevt = " << jevt_ << endl; 00164 00165 this->cleanup(); 00166 00167 }
Get Functions.
Implements EBClient.
Definition at line 74 of file EBTestPulseClient.h.
References ievt_.
00074 { return ievt_; }
Setup.
Implements EBClient.
Definition at line 169 of file EBTestPulseClient.cc.
References DQMStore::book1D(), DQMStore::book2D(), dqmStore_, edm::getName(), histo, i, me_hs01_, me_hs02_, me_hs03_, mea01_, mea02_, mea03_, meg01_, meg02_, meg03_, meg04_, meg05_, mer04_, mer05_, prefixME_, DQMStore::removeElement(), MonitorElement::Reset(), Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), and superModules_.
Referenced by beginRun().
00169 { 00170 00171 char histo[200]; 00172 00173 dqmStore_->setCurrentFolder( prefixME_ + "/EBTestPulseClient" ); 00174 00175 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00176 00177 int ism = superModules_[i]; 00178 00179 if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() ); 00180 sprintf(histo, "EBTPT test pulse quality G01 %s", Numbers::sEB(ism).c_str()); 00181 meg01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00182 meg01_[ism-1]->setAxisTitle("ieta", 1); 00183 meg01_[ism-1]->setAxisTitle("iphi", 2); 00184 if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() ); 00185 sprintf(histo, "EBTPT test pulse quality G06 %s", Numbers::sEB(ism).c_str()); 00186 meg02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00187 meg02_[ism-1]->setAxisTitle("ieta", 1); 00188 meg02_[ism-1]->setAxisTitle("iphi", 2); 00189 if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() ); 00190 sprintf(histo, "EBTPT test pulse quality G12 %s", Numbers::sEB(ism).c_str()); 00191 meg03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.); 00192 meg03_[ism-1]->setAxisTitle("ieta", 1); 00193 meg03_[ism-1]->setAxisTitle("iphi", 2); 00194 00195 if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() ); 00196 sprintf(histo, "EBTPT test pulse quality PNs G01 %s", Numbers::sEB(ism).c_str()); 00197 meg04_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.); 00198 meg04_[ism-1]->setAxisTitle("pseudo-strip", 1); 00199 meg04_[ism-1]->setAxisTitle("channel", 2); 00200 if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() ); 00201 sprintf(histo, "EBTPT test pulse quality PNs G16 %s", Numbers::sEB(ism).c_str()); 00202 meg05_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.); 00203 meg05_[ism-1]->setAxisTitle("pseudo-strip", 1); 00204 meg05_[ism-1]->setAxisTitle("channel", 2); 00205 00206 if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() ); 00207 sprintf(histo, "EBTPT test pulse amplitude G01 %s", Numbers::sEB(ism).c_str()); 00208 mea01_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.); 00209 mea01_[ism-1]->setAxisTitle("channel", 1); 00210 mea01_[ism-1]->setAxisTitle("amplitude", 2); 00211 if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() ); 00212 sprintf(histo, "EBTPT test pulse amplitude G06 %s", Numbers::sEB(ism).c_str()); 00213 mea02_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.); 00214 mea02_[ism-1]->setAxisTitle("channel", 1); 00215 mea02_[ism-1]->setAxisTitle("amplitude", 2); 00216 if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() ); 00217 sprintf(histo, "EBTPT test pulse amplitude G12 %s", Numbers::sEB(ism).c_str()); 00218 mea03_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.); 00219 mea03_[ism-1]->setAxisTitle("channel", 1); 00220 mea03_[ism-1]->setAxisTitle("amplitude", 2); 00221 00222 if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() ); 00223 sprintf(histo, "EBPDT PNs pedestal rms %s G01", Numbers::sEB(ism).c_str()); 00224 mer04_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00225 mer04_[ism-1]->setAxisTitle("rms", 1); 00226 if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() ); 00227 sprintf(histo, "EBPDT PNs pedestal rms %s G16", Numbers::sEB(ism).c_str()); 00228 mer05_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.); 00229 mer05_[ism-1]->setAxisTitle("rms", 1); 00230 00231 if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() ); 00232 sprintf(histo, "EBTPT test pulse shape G01 %s", Numbers::sEB(ism).c_str()); 00233 me_hs01_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.); 00234 me_hs01_[ism-1]->setAxisTitle("sample", 1); 00235 me_hs01_[ism-1]->setAxisTitle("amplitude", 2); 00236 if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() ); 00237 sprintf(histo, "EBTPT test pulse shape G06 %s", Numbers::sEB(ism).c_str()); 00238 me_hs02_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.); 00239 me_hs02_[ism-1]->setAxisTitle("sample", 1); 00240 me_hs02_[ism-1]->setAxisTitle("amplitude", 2); 00241 if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() ); 00242 sprintf(histo, "EBTPT test pulse shape G12 %s", Numbers::sEB(ism).c_str()); 00243 me_hs03_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.); 00244 me_hs03_[ism-1]->setAxisTitle("sample", 1); 00245 me_hs03_[ism-1]->setAxisTitle("amplitude", 2); 00246 00247 } 00248 00249 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00250 00251 int ism = superModules_[i]; 00252 00253 meg01_[ism-1]->Reset(); 00254 meg02_[ism-1]->Reset(); 00255 meg03_[ism-1]->Reset(); 00256 00257 meg04_[ism-1]->Reset(); 00258 meg05_[ism-1]->Reset(); 00259 00260 for ( int ie = 1; ie <= 85; ie++ ) { 00261 for ( int ip = 1; ip <= 20; ip++ ) { 00262 00263 meg01_[ism-1]->setBinContent( ie, ip, 2. ); 00264 meg02_[ism-1]->setBinContent( ie, ip, 2. ); 00265 meg03_[ism-1]->setBinContent( ie, ip, 2. ); 00266 00267 } 00268 } 00269 00270 for ( int i = 1; i <= 10; i++ ) { 00271 00272 meg04_[ism-1]->setBinContent( i, 1, 2. ); 00273 meg05_[ism-1]->setBinContent( i, 1, 2. ); 00274 00275 } 00276 00277 mea01_[ism-1]->Reset(); 00278 mea02_[ism-1]->Reset(); 00279 mea03_[ism-1]->Reset(); 00280 00281 mer04_[ism-1]->Reset(); 00282 mer05_[ism-1]->Reset(); 00283 00284 me_hs01_[ism-1]->Reset(); 00285 me_hs02_[ism-1]->Reset(); 00286 me_hs03_[ism-1]->Reset(); 00287 00288 } 00289 00290 }
bool EBTestPulseClient::writeDb | ( | EcalCondDBInterface * | econn, | |
RunIOV * | runiov, | |||
MonRunIOV * | moniov, | |||
bool & | status, | |||
bool | flag | |||
) | [virtual] |
WriteDB.
Implements EBClient.
Definition at line 371 of file EBTestPulseClient.cc.
References ecalMGPA::adc(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, e, EcalBarrel, lat::endl(), flush(), UtilsClient::getBinQuality(), UtilsClient::getBinStatistics(), UtilsClient::getBinStatus(), LogicID::getEcalLogicID(), ha01_, ha02_, ha03_, i, i01_, i02_, i03_, i04_, Numbers::icEB(), Numbers::indexEB(), EcalCondDBInterface::insertDataArraySet(), EcalCondDBInterface::insertDataSet(), Numbers::iSM(), me_hs01_, me_hs02_, me_hs03_, meg01_, meg02_, meg03_, meg04_, meg05_, UtilsClient::printBadChannels(), Numbers::sEB(), MonPNMGPADat::setADCMeanG1(), MonTestPulseDat::setADCMeanG1(), MonTestPulseDat::setADCMeanG12(), MonPNMGPADat::setADCMeanG16(), MonTestPulseDat::setADCMeanG6(), MonTestPulseDat::setADCRMSG1(), MonPNMGPADat::setADCRMSG1(), MonTestPulseDat::setADCRMSG12(), MonPNMGPADat::setADCRMSG16(), MonTestPulseDat::setADCRMSG6(), MonPNMGPADat::setPedMeanG1(), MonPNMGPADat::setPedMeanG16(), MonPNMGPADat::setPedRMSG1(), MonPNMGPADat::setPedRMSG16(), MonPulseShapeDat::setSamples(), MonPNMGPADat::setTaskStatus(), MonTestPulseDat::setTaskStatus(), superModules_, and verbose_.
00371 { 00372 00373 status = true; 00374 00375 if ( ! flag ) return false; 00376 00377 EcalLogicID ecid; 00378 00379 MonTestPulseDat adc; 00380 map<EcalLogicID, MonTestPulseDat> dataset1; 00381 MonPulseShapeDat shape; 00382 map<EcalLogicID, MonPulseShapeDat> dataset2; 00383 00384 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00385 00386 int ism = superModules_[i]; 00387 00388 if ( verbose_ ) { 00389 cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00390 cout << endl; 00391 UtilsClient::printBadChannels(meg01_[ism-1], ha01_[ism-1]); 00392 UtilsClient::printBadChannels(meg02_[ism-1], ha02_[ism-1]); 00393 UtilsClient::printBadChannels(meg03_[ism-1], ha03_[ism-1]); 00394 } 00395 00396 for ( int ie = 1; ie <= 85; ie++ ) { 00397 for ( int ip = 1; ip <= 20; ip++ ) { 00398 00399 bool update01; 00400 bool update02; 00401 bool update03; 00402 00403 float num01, num02, num03; 00404 float mean01, mean02, mean03; 00405 float rms01, rms02, rms03; 00406 00407 update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01); 00408 update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02); 00409 update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03); 00410 00411 if ( update01 || update02 || update03 ) { 00412 00413 if ( Numbers::icEB(ism, ie, ip) == 1 ) { 00414 00415 if ( verbose_ ) { 00416 cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00417 cout << "G01 (" << ie << "," << ip << ") " << num01 << " " << mean01 << " " << rms01 << endl; 00418 cout << "G06 (" << ie << "," << ip << ") " << num02 << " " << mean02 << " " << rms02 << endl; 00419 cout << "G12 (" << ie << "," << ip << ") " << num03 << " " << mean03 << " " << rms03 << endl; 00420 cout << endl; 00421 } 00422 00423 } 00424 00425 adc.setADCMeanG1(mean01); 00426 adc.setADCRMSG1(rms01); 00427 00428 adc.setADCMeanG6(mean02); 00429 adc.setADCRMSG6(rms02); 00430 00431 adc.setADCMeanG12(mean03); 00432 adc.setADCRMSG12(rms03); 00433 00434 if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) && 00435 UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) && 00436 UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) { 00437 adc.setTaskStatus(true); 00438 } else { 00439 adc.setTaskStatus(false); 00440 } 00441 00442 status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip) && 00443 UtilsClient::getBinQuality(meg02_[ism-1], ie, ip) && 00444 UtilsClient::getBinQuality(meg03_[ism-1], ie, ip); 00445 00446 if ( Numbers::icEB(ism, ie, ip) == 1 ) { 00447 00448 vector<float> sample01, sample02, sample03; 00449 00450 sample01.clear(); 00451 sample02.clear(); 00452 sample03.clear(); 00453 00454 if ( me_hs01_[ism-1] ) { 00455 for ( int i = 1; i <= 10; i++ ) { 00456 sample01.push_back(int(me_hs01_[ism-1]->getBinContent(i))); 00457 } 00458 } else { 00459 for ( int i = 1; i <= 10; i++ ) { sample01.push_back(-1.); } 00460 } 00461 00462 if ( me_hs02_[ism-1] ) { 00463 for ( int i = 1; i <= 10; i++ ) { 00464 sample02.push_back(int(me_hs02_[ism-1]->getBinContent(i))); 00465 } 00466 } else { 00467 for ( int i = 1; i <= 10; i++ ) { sample02.push_back(-1.); } 00468 } 00469 00470 if ( me_hs03_[ism-1] ) { 00471 for ( int i = 1; i <= 10; i++ ) { 00472 sample03.push_back(int(me_hs03_[ism-1]->getBinContent(i))); 00473 } 00474 } else { 00475 for ( int i = 1; i <= 10; i++ ) { sample03.push_back(-1.); } 00476 } 00477 00478 if ( verbose_ ) { 00479 cout << "sample01 = " << flush; 00480 for ( unsigned int i = 0; i < sample01.size(); i++ ) { 00481 cout << sample01[i] << " " << flush; 00482 } 00483 cout << endl; 00484 00485 cout << "sample02 = " << flush; 00486 for ( unsigned int i = 0; i < sample02.size(); i++ ) { 00487 cout << sample02[i] << " " << flush; 00488 } 00489 cout << endl; 00490 00491 cout << "sample03 = " << flush; 00492 for ( unsigned int i = 0; i < sample03.size(); i++ ) { 00493 cout << sample03[i] << " " << flush; 00494 } 00495 cout << endl; 00496 } 00497 00498 if ( verbose_ ) cout << endl; 00499 00500 shape.setSamples(sample01, 1); 00501 shape.setSamples(sample02, 6); 00502 shape.setSamples(sample03, 12); 00503 00504 } 00505 00506 int ic = Numbers::indexEB(ism, ie, ip); 00507 00508 if ( econn ) { 00509 ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic); 00510 dataset1[ecid] = adc; 00511 if ( Numbers::icEB(ism, ie, ip) == 1 ) dataset2[ecid] = shape; 00512 } 00513 00514 } 00515 00516 } 00517 } 00518 00519 } 00520 00521 if ( econn ) { 00522 try { 00523 if ( verbose_ ) cout << "Inserting MonTestPulseDat ..." << endl; 00524 if ( dataset1.size() != 0 ) econn->insertDataArraySet(&dataset1, moniov); 00525 if ( dataset2.size() != 0 ) econn->insertDataSet(&dataset2, moniov); 00526 if ( verbose_ ) cout << "done." << endl; 00527 } catch (runtime_error &e) { 00528 cerr << e.what() << endl; 00529 } 00530 } 00531 00532 if ( verbose_ ) cout << endl; 00533 00534 MonPNMGPADat pn; 00535 map<EcalLogicID, MonPNMGPADat> dataset3; 00536 00537 for ( unsigned int i=0; i<superModules_.size(); i++ ) { 00538 00539 int ism = superModules_[i]; 00540 00541 if ( verbose_ ) { 00542 cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00543 cout << endl; 00544 UtilsClient::printBadChannels(meg04_[ism-1], i01_[ism-1]); 00545 UtilsClient::printBadChannels(meg04_[ism-1], i03_[ism-1]); 00546 UtilsClient::printBadChannels(meg05_[ism-1], i02_[ism-1]); 00547 UtilsClient::printBadChannels(meg05_[ism-1], i04_[ism-1]); 00548 } 00549 00550 for ( int i = 1; i <= 10; i++ ) { 00551 00552 bool update01; 00553 bool update02; 00554 bool update03; 00555 bool update04; 00556 00557 float num01, num02, num03, num04; 00558 float mean01, mean02, mean03, mean04; 00559 float rms01, rms02, rms03, rms04; 00560 00561 update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01); 00562 update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02); 00563 update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 1, num03, mean03, rms03); 00564 update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 1, num04, mean04, rms04); 00565 00566 if ( update01 || update02 || update03 || update04 ) { 00567 00568 if ( i == 1 ) { 00569 00570 if ( verbose_ ) { 00571 cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl; 00572 cout << "PNs (" << i << ") G01 " << num01 << " " << mean01 << " " << rms01 << " " << num03 << " " << mean03 << " " << rms03 << endl; 00573 cout << "PNs (" << i << ") G16 " << num02 << " " << mean02 << " " << rms02 << " " << num04 << " " << mean04 << " " << rms04 << endl; 00574 cout << endl; 00575 } 00576 00577 } 00578 00579 pn.setADCMeanG1(mean01); 00580 pn.setADCRMSG1(rms01); 00581 00582 pn.setPedMeanG1(mean03); 00583 pn.setPedRMSG1(rms03); 00584 00585 pn.setADCMeanG16(mean02); 00586 pn.setADCRMSG16(rms02); 00587 00588 pn.setPedMeanG16(mean04); 00589 pn.setPedRMSG16(rms04); 00590 00591 if ( UtilsClient::getBinStatus(meg04_[ism-1], i, 1) && 00592 UtilsClient::getBinStatus(meg05_[ism-1], i, 1) ) { 00593 pn.setTaskStatus(true); 00594 } else { 00595 pn.setTaskStatus(false); 00596 } 00597 00598 status = status && UtilsClient::getBinQuality(meg04_[ism-1], i, 1) && 00599 UtilsClient::getBinQuality(meg05_[ism-1], i, 1); 00600 00601 if ( econn ) { 00602 ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1); 00603 dataset3[ecid] = pn; 00604 } 00605 00606 } 00607 00608 } 00609 00610 } 00611 00612 if ( econn ) { 00613 try { 00614 if ( verbose_ ) cout << "Inserting MonPNMGPADat ..." << endl; 00615 if ( dataset3.size() != 0 ) econn->insertDataArraySet(&dataset3, moniov); 00616 if ( verbose_ ) cout << "done." << endl; 00617 } catch (runtime_error &e) { 00618 cerr << e.what() << endl; 00619 } 00620 } 00621 00622 return true; 00623 00624 }
friend class EBSummaryClient [friend] |
Definition at line 33 of file EBTestPulseClient.h.
float EBTestPulseClient::amplitudeThreshold_ [private] |
Definition at line 130 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
float EBTestPulseClient::amplitudeThresholdPnG01_ [private] |
Definition at line 134 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
float EBTestPulseClient::amplitudeThresholdPnG16_ [private] |
Definition at line 135 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
bool EBTestPulseClient::cloneME_ [private] |
Definition at line 82 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), and EBTestPulseClient().
bool EBTestPulseClient::debug_ [private] |
Definition at line 85 of file EBTestPulseClient.h.
Referenced by analyze(), beginJob(), beginRun(), EBTestPulseClient(), endJob(), and endRun().
DQMStore* EBTestPulseClient::dqmStore_ [private] |
Definition at line 93 of file EBTestPulseClient.h.
Referenced by analyze(), beginJob(), cleanup(), and setup().
bool EBTestPulseClient::enableCleanup_ [private] |
Definition at line 89 of file EBTestPulseClient.h.
Referenced by cleanup(), and EBTestPulseClient().
TProfile2D* EBTestPulseClient::ha01_[36] [private] |
Definition at line 95 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
TProfile2D* EBTestPulseClient::ha02_[36] [private] |
Definition at line 96 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
TProfile2D* EBTestPulseClient::ha03_[36] [private] |
Definition at line 97 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
TProfile2D* EBTestPulseClient::hs01_[36] [private] |
Definition at line 99 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), and EBTestPulseClient().
TProfile2D* EBTestPulseClient::hs02_[36] [private] |
Definition at line 100 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), and EBTestPulseClient().
TProfile2D* EBTestPulseClient::hs03_[36] [private] |
Definition at line 101 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), and EBTestPulseClient().
TProfile* EBTestPulseClient::i01_[36] [private] |
Definition at line 121 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
TProfile* EBTestPulseClient::i02_[36] [private] |
Definition at line 122 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
TProfile* EBTestPulseClient::i03_[36] [private] |
Definition at line 123 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
TProfile* EBTestPulseClient::i04_[36] [private] |
Definition at line 124 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and writeDb().
int EBTestPulseClient::ievt_ [private] |
Definition at line 79 of file EBTestPulseClient.h.
Referenced by analyze(), beginJob(), endJob(), and getEvtPerJob().
int EBTestPulseClient::jevt_ [private] |
Definition at line 80 of file EBTestPulseClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), and getEvtPerRun().
MonitorElement* EBTestPulseClient::me_hs01_[36] [private] |
Definition at line 117 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::me_hs02_[36] [private] |
Definition at line 118 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::me_hs03_[36] [private] |
Definition at line 119 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::mea01_[36] [private] |
Definition at line 110 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and setup().
MonitorElement* EBTestPulseClient::mea02_[36] [private] |
Definition at line 111 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and setup().
MonitorElement* EBTestPulseClient::mea03_[36] [private] |
Definition at line 112 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and setup().
MonitorElement* EBTestPulseClient::meg01_[36] [private] |
Definition at line 103 of file EBTestPulseClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::meg02_[36] [private] |
Definition at line 104 of file EBTestPulseClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::meg03_[36] [private] |
Definition at line 105 of file EBTestPulseClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::meg04_[36] [private] |
Definition at line 107 of file EBTestPulseClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::meg05_[36] [private] |
Definition at line 108 of file EBTestPulseClient.h.
Referenced by EBSummaryClient::analyze(), analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
MonitorElement* EBTestPulseClient::mer04_[36] [private] |
Definition at line 114 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and setup().
MonitorElement* EBTestPulseClient::mer05_[36] [private] |
Definition at line 115 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and setup().
float EBTestPulseClient::pedPnDiscrepancyMean_[2] [private] |
Definition at line 137 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
float EBTestPulseClient::pedPnExpectedMean_[2] [private] |
Definition at line 136 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
float EBTestPulseClient::pedPnRMSThreshold_[2] [private] |
Definition at line 138 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
float EBTestPulseClient::percentVariation_ [private] |
Definition at line 128 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
std::string EBTestPulseClient::prefixME_ [private] |
Definition at line 87 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), and setup().
float EBTestPulseClient::RMSThreshold_ [private] |
Definition at line 129 of file EBTestPulseClient.h.
Referenced by analyze(), and EBTestPulseClient().
std::vector<int> EBTestPulseClient::superModules_ [private] |
Definition at line 91 of file EBTestPulseClient.h.
Referenced by analyze(), cleanup(), EBTestPulseClient(), setup(), and writeDb().
bool EBTestPulseClient::verbose_ [private] |
Definition at line 84 of file EBTestPulseClient.h.
Referenced by EBTestPulseClient(), and writeDb().