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";
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")));
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 meTimingRMS.
use(wlItr->second);
112 mePNQualitySummary.
use(wlItr->second);
114 sAmplitude.
use(wlItr->second);
115 sTiming.
use(wlItr->second);
116 sPNAmplitude.
use(wlItr->second);
124 DetId id(qItr->getId());
130 float aEntries(aItr->getBinEntries());
137 float aMean(aItr->getBinContent());
138 float aRms(aItr->getBinError() *
sqrt(aEntries));
140 meAmplitudeMean.
fill(
id, aMean);
145 float tEntries(tItr->getBinEntries());
149 float tMean(tItr->getBinContent());
150 float tRms(tItr->getBinError() *
sqrt(tEntries));
152 meTimingMean.
fill(
id, tMean);
153 meTimingRMS.
fill(
id, tRms);
161 qItr->setBinContent(doMask ?
kMBad :
kBad);
168 for(
unsigned iDCC(0); iDCC <
nDCC; ++iDCC){
170 if(
memDCCIndex(iDCC + 1) ==
unsigned(-1))
continue;
175 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)
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
DEFINE_ECALDQM_WORKER(CalibrationSummaryClient)
std::string to_string(const T &t)
std::set< std::string > qualitySummaries_
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