1 #include "../interface/LaserClient.h"
19 minChannelEntries_(0),
20 expectedAmplitude_(0),
21 toleranceAmplitude_(0.),
22 toleranceAmpRMSRatio_(0.),
26 expectedPNAmplitude_(0),
28 tolerancePNRMSRatio_(0.),
45 std::vector<int> laserWavelengths(_params.
getUntrackedParameter<std::vector<int> >(
"laserWavelengths"));
54 unsigned nWL(laserWavelengths.size());
55 for(
unsigned iWL(0); iWL != nWL; ++iWL){
56 int wl(laserWavelengths[iWL]);
57 if(wl <= 0 || wl >= 5)
throw cms::Exception(
"InvalidConfiguration") <<
"Laser 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& meTimingRMS(static_cast<MESetMulti&>(
MEs_.at(
"TimingRMS")));
98 MESetMulti& mePNQualitySummary(static_cast<MESetMulti&>(
MEs_.at(
"PNQualitySummary")));
100 MESetMulti const& sAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"Amplitude")));
102 MESetMulti const& sPNAmplitude(static_cast<MESetMulti const&>(
sources_.at(
"PNAmplitude")));
103 MESet const& sCalibStatus(static_cast<MESet const&>(
sources_.at(
"CalibStatus")));
105 for(std::map<int, unsigned>::iterator wlItr(
wlToME_.begin()); wlItr !=
wlToME_.end(); ++wlItr){
106 meQuality.
use(wlItr->second);
107 meQualitySummary.
use(wlItr->second);
108 meAmplitudeMean.
use(wlItr->second);
109 meAmplitudeRMS.
use(wlItr->second);
110 meTimingMean.
use(wlItr->second);
111 meTimingRMSMap.
use(wlItr->second);
112 meTimingRMS.
use(wlItr->second);
113 mePNQualitySummary.
use(wlItr->second);
115 sAmplitude.
use(wlItr->second);
116 sTiming.
use(wlItr->second);
117 sPNAmplitude.
use(wlItr->second);
124 int wl(wlItr->first-1);
125 bool enabled(wl < 0?
false: sCalibStatus.
getBinContent(wl) > 0 ?
true:
false);
128 DetId id(qItr->getId());
134 float aEntries(aItr->getBinEntries());
141 float aMean(aItr->getBinContent());
142 float aRms(aItr->getBinError() *
sqrt(aEntries));
144 meAmplitudeMean.
fill(
id, aMean);
149 float tEntries(tItr->getBinEntries());
153 float tMean(tItr->getBinContent());
154 float tRms(tItr->getBinError() *
sqrt(tEntries));
156 meTimingMean.
fill(
id, tMean);
157 meTimingRMS.
fill(
id, tRms);
165 qItr->setBinContent(doMask ?
kMBad :
kBad);
172 for(
unsigned iDCC(0); iDCC <
nDCC; ++iDCC){
174 if(
memDCCIndex(iDCC + 1) ==
unsigned(-1))
continue;
179 for(
unsigned iPN(0); iPN < 10; ++iPN){
unsigned memDCCIndex(unsigned)
T getUntrackedParameter(std::string const &, T const &) const
static const int LASER_MEAN_ERROR
void towerAverage_(MESet &, MESet const &, float)
#define DEFINE_ECALDQM_WORKER(TYPE)
static const int LASER_TIMING_RMS_ERROR
void setBinContent(DetId const &_id, double _content) override
bool isForward(DetId const &)
double getBinError(DetId const &_id, int _bin=0) const override
std::map< int, unsigned > wlToME_
const_iterator & toNextChannel()
void fill(DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
std::set< std::string > qualitySummaries_
virtual double getBinContent(DetId const &, int=0) const
bool maskMatches(DetId const &_id, uint32_t _mask, StatusManager const *_statusManager) const override
void setParams(edm::ParameterSet const &) override
std::vector< float > expectedPNAmplitude_
StatusManager const * statusManager_
double getBinEntries(DetId const &_id, int _bin=0) const override
float tolerancePNRMSRatio_
Abs< T >::type abs(const T &t)
void producePlots(ProcessType) override
const_iterator beginChannel() const override
std::vector< float > expectedAmplitude_
double getBinContent(DetId const &_id, int _bin=0) const override
float toleranceAmplitude_
const_iterator end() const override
static const int LASER_TIMING_MEAN_ERROR
std::vector< float > expectedTiming_
float toleranceAmpRMSRatio_
static const int LASER_RMS_ERROR
std::map< std::string, std::string > PathReplacements
unsigned getIndex(PathReplacements const &) const