1 #include "../interface/LedClient.h"
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";
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")));
103 for(std::map<int, unsigned>::iterator wlItr(
wlToME_.begin()); wlItr !=
wlToME_.end(); ++wlItr){
104 meQuality.
use(wlItr->second);
105 meQualitySummary.
use(wlItr->second);
106 meAmplitudeMean.
use(wlItr->second);
107 meAmplitudeRMS.
use(wlItr->second);
108 meTimingMean.
use(wlItr->second);
109 meTimingRMSMap.
use(wlItr->second);
110 mePNQualitySummary.
use(wlItr->second);
112 sAmplitude.
use(wlItr->second);
113 sTiming.
use(wlItr->second);
114 sPNAmplitude.
use(wlItr->second);
122 DetId id(qItr->getId());
128 float aEntries(aItr->getBinEntries());
135 float aMean(aItr->getBinContent());
136 float aRms(aItr->getBinError() *
sqrt(aEntries));
138 meAmplitudeMean.
fill(
id, aMean);
143 float tEntries(tItr->getBinEntries());
147 float tMean(tItr->getBinContent());
148 float tRms(tItr->getBinError() *
sqrt(tEntries));
150 meTimingMean.
fill(
id, tMean);
158 qItr->setBinContent(doMask ?
kMBad :
kBad);
165 for(
unsigned iDCC(0); iDCC <
nDCC; ++iDCC){
167 if(
memDCCIndex(iDCC + 1) ==
unsigned(-1))
continue;
170 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)
double toleranceAmplitude_
void setBinContent(DetId const &_id, double _content) override
bool isForward(DetId const &)
double getBinError(DetId const &_id, int _bin=0) const override
const_iterator & toNextChannel()
void fill(DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
std::map< int, unsigned > wlToME_
DEFINE_ECALDQM_WORKER(CalibrationSummaryClient)
std::string to_string(const T &t)
std::set< std::string > qualitySummaries_
std::vector< double > expectedTiming_
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
std::vector< double > expectedAmplitude_
Abs< T >::type abs(const T &t)
std::vector< double > expectedPNAmplitude_
static const int LED_TIMING_MEAN_ERROR
double toleranceAmpRMSRatio_
const_iterator beginChannel() const override
double getBinContent(DetId const &_id, int _bin=0) const override
static const int LED_TIMING_RMS_ERROR
const_iterator end() const override
void producePlots(ProcessType) override
static const int LED_RMS_ERROR
std::map< std::string, std::string > PathReplacements
unsigned getIndex(PathReplacements const &) const
double tolerancePNRMSRatio_