19 minChannelEntries_(0),
20 expectedAmplitude_(0),
21 toleranceAmplitude_(0.),
22 toleranceAmpRMSRatio_(0.),
26 expectedPNAmplitude_(0),
28 tolerancePNRMSRatio_(0.),
54 unsigned nWL(ledWavelengths.size());
55 for(
unsigned iWL(0); iWL != nWL; ++iWL){
56 int wl(ledWavelengths[iWL]);
57 if(wl != 1 && wl != 2)
throw cms::Exception(
"InvalidConfiguration") <<
"Led Wavelength";
58 repl[
"wl"] = std::to_string(wl);
66 std::vector<double> inExpectedAmplitude(_params.
getUntrackedParameter<std::vector<double> >(
"expectedAmplitude"));
67 std::vector<double> inExpectedTiming(_params.
getUntrackedParameter<std::vector<double> >(
"expectedTiming"));
68 std::vector<double> inExpectedPNAmplitude(_params.
getUntrackedParameter<std::vector<double> >(
"expectedPNAmplitude"));
70 for(std::map<int, unsigned>::iterator wlItr(
wlToME_.begin()); wlItr !=
wlToME_.end(); ++wlItr){
71 unsigned iME(wlItr->second);
72 int iWL(wlItr->first - 1);
91 MESetMulti& meQuality(static_cast<MESetMulti&>(
MEs_.at(
"Quality")));
92 MESetMulti& meQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"QualitySummary")));
93 MESetMulti& meAmplitudeMean(static_cast<MESetMulti&>(
MEs_.at(
"AmplitudeMean")));
94 MESetMulti& meAmplitudeRMS(static_cast<MESetMulti&>(
MEs_.at(
"AmplitudeRMS")));
95 MESetMulti& meTimingMean(static_cast<MESetMulti&>(
MEs_.at(
"TimingMean")));
96 MESetMulti& meTimingRMSMap(static_cast<MESetMulti&>(
MEs_.at(
"TimingRMSMap")));
97 MESetMulti& mePNQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"PNQualitySummary")));
99 MESetMulti const& sAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"Amplitude")));
101 MESetMulti const& sPNAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"PNAmplitude")));
102 MESet const& sCalibStatus(static_cast<MESet const&>(
sources_.at(
"CalibStatus")));
104 for(std::map<int, unsigned>::iterator wlItr(
wlToME_.begin()); wlItr !=
wlToME_.end(); ++wlItr){
105 meQuality.
use(wlItr->second);
106 meQualitySummary.
use(wlItr->second);
107 meAmplitudeMean.
use(wlItr->second);
108 meAmplitudeRMS.
use(wlItr->second);
109 meTimingMean.
use(wlItr->second);
110 meTimingRMSMap.
use(wlItr->second);
111 mePNQualitySummary.
use(wlItr->second);
113 sAmplitude.
use(wlItr->second);
114 sTiming.
use(wlItr->second);
115 sPNAmplitude.
use(wlItr->second);
122 int wl(wlItr->first+3);
132 float aEntries(aItr->getBinEntries());
139 float aMean(aItr->getBinContent());
140 float aRms(aItr->getBinError() *
sqrt(aEntries));
142 meAmplitudeMean.
fill(
id, aMean);
147 float tEntries(tItr->getBinEntries());
151 float tMean(tItr->getBinContent());
152 float tRms(tItr->getBinError() *
sqrt(tEntries));
154 meTimingMean.
fill(
id, tMean);
161 if(intensity < toleranceAmplitude_ || aRms > aRmsThr ||
163 qItr->setBinContent(doMask ?
kMBad :
kBad);
170 for(
unsigned iDCC(0); iDCC <
nDCC; ++iDCC){
172 if(
memDCCIndex(iDCC + 1) ==
unsigned(-1))
continue;
175 for(
unsigned iPN(0); iPN < 10; ++iPN){
static const int LED_MEAN_ERROR
unsigned memDCCIndex(unsigned)
T getUntrackedParameter(std::string const &, T const &) const
void setParams(edm::ParameterSet const &) override
void towerAverage_(MESet &, MESet const &, float)
#define DEFINE_ECALDQM_WORKER(TYPE)
double toleranceAmplitude_
double getBinContent(DetId const &_id, int _bin=0) const override
void setBinContent(DetId const &_id, double _content) override
double getBinError(DetId const &_id, int _bin=0) const override
bool isForward(DetId const &)
const_iterator & toNextChannel()
void fill(DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
std::map< int, unsigned > wlToME_
const_iterator beginChannel() const override
std::set< std::string > qualitySummaries_
virtual double getBinContent(DetId const &, int=0) const
std::vector< double > expectedTiming_
StatusManager const * statusManager_
std::vector< double > expectedAmplitude_
Abs< T >::type abs(const T &t)
std::vector< double > expectedPNAmplitude_
bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager) const override
static const int LED_TIMING_MEAN_ERROR
double toleranceAmpRMSRatio_
const_iterator end() const override
static const int LED_TIMING_RMS_ERROR
void producePlots(ProcessType) override
double getBinEntries(DetId const &_id, int _bin=0) const override
static const int LED_RMS_ERROR
std::map< std::string, std::string > PathReplacements
unsigned getIndex(PathReplacements const &) const
Power< A, B >::type pow(const A &a, const B &b)
double tolerancePNRMSRatio_