1 #include "../interface/TestPulseClient.h"
20 minChannelEntries_(0),
21 amplitudeThreshold_(0),
23 PNAmplitudeThreshold_(0),
39 unsigned nG(MGPAGains.size());
40 for(
unsigned iG(0); iG != nG; ++iG){
41 int gain(MGPAGains[iG]);
42 if(gain != 1 && gain != 6 && gain != 12)
throw cms::Exception(
"InvalidConfiguration") <<
"MGPA gain";
49 MESetMulti const& pnAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"PNAmplitude")));
50 unsigned nGPN(MGPAGainsPN.size());
51 for(
unsigned iG(0); iG != nGPN; ++iG){
52 int gain(MGPAGainsPN[iG]);
53 if(gain != 1 && gain != 16)
throw cms::Exception(
"InvalidConfiguration") <<
"PN MGPA gain";
61 std::vector<double> inAmplitudeThreshold(_params.
getUntrackedParameter<std::vector<double> >(
"amplitudeThreshold"));
62 std::vector<double> inToleranceRMS(_params.
getUntrackedParameter<std::vector<double> >(
"toleranceRMS"));
64 for(std::map<int, unsigned>::iterator gainItr(
gainToME_.begin()); gainItr !=
gainToME_.end(); ++gainItr){
65 unsigned iME(gainItr->second);
67 switch(gainItr->first){
83 std::vector<double> inPNAmplitudeThreshold(_params.
getUntrackedParameter<std::vector<double> >(
"PNAmplitudeThreshold"));
84 std::vector<double> inTolerancePNRMS(_params.
getUntrackedParameter<std::vector<double> >(
"tolerancePNRMS"));
86 for(std::map<int, unsigned>::iterator gainItr(
pnGainToME_.begin()); gainItr !=
pnGainToME_.end(); ++gainItr){
87 unsigned iME(gainItr->second);
89 switch(gainItr->first){
110 MESetMulti& meQuality(static_cast<MESetMulti&>(
MEs_.at(
"Quality")));
111 MESetMulti& meAmplitudeRMS(static_cast<MESetMulti&>(
MEs_.at(
"AmplitudeRMS")));
112 MESetMulti& meQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"QualitySummary")));
113 MESetMulti& mePNQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"PNQualitySummary")));
115 MESetMulti const& sAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"Amplitude")));
116 MESetMulti const& sPNAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"PNAmplitude")));
118 for(map<int, unsigned>::iterator gainItr(
gainToME_.begin()); gainItr !=
gainToME_.end(); ++gainItr){
119 meQuality.
use(gainItr->second);
120 meQualitySummary.
use(gainItr->second);
121 meAmplitudeRMS.
use(gainItr->second);
123 sAmplitude.
use(gainItr->second);
126 switch(gainItr->first){
147 DetId id(qItr->getId());
153 float entries(aItr->getBinEntries());
160 float amp(aItr->getBinContent());
166 qItr->setBinContent(doMask ?
kMBad :
kBad);
175 mePNQualitySummary.
use(gainItr->second);
177 sPNAmplitude.
use(gainItr->second);
180 switch(gainItr->first){
193 for(
unsigned iDCC(0); iDCC <
nDCC; ++iDCC){
195 if(
memDCCIndex(iDCC + 1) == unsigned(-1))
continue;
197 for(
unsigned iPN(0); iPN < 10; ++iPN){
unsigned memDCCIndex(unsigned)
T getUntrackedParameter(std::string const &, T const &) const
void towerAverage_(MESet &, MESet const &, float)
static const int TESTPULSE_LOW_GAIN_RMS_ERROR
std::vector< float > PNAmplitudeThreshold_
void setBinContent(DetId const &_id, double _content) override
double getBinError(DetId const &_id, int _bin=0) const override
static const int TESTPULSE_MIDDLE_GAIN_MEAN_ERROR
const_iterator & toNextChannel()
std::vector< float > tolerancePNRMS_
DEFINE_ECALDQM_WORKER(CalibrationSummaryClient)
std::map< int, unsigned > gainToME_
std::string to_string(const T &t)
static const int TESTPULSE_MIDDLE_GAIN_RMS_ERROR
std::set< std::string > qualitySummaries_
bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager) const override
StatusManager const * statusManager_
double getBinEntries(DetId const &_id, int _bin=0) const override
static const int TESTPULSE_HIGH_GAIN_RMS_ERROR
const_iterator beginChannel() const override
void producePlots(ProcessType) override
double getBinContent(DetId const &_id, int _bin=0) const override
std::map< int, unsigned > pnGainToME_
static const int TESTPULSE_LOW_GAIN_MEAN_ERROR
const_iterator end() const override
std::vector< float > toleranceRMS_
std::vector< float > amplitudeThreshold_
static const int TESTPULSE_HIGH_GAIN_MEAN_ERROR
std::map< std::string, std::string > PathReplacements
unsigned getIndex(PathReplacements const &) const
void setParams(edm::ParameterSet const &) override