23 unsigned nWL(ledWavelengths.size());
24 for (
unsigned iWL(0); iWL != nWL; ++iWL) {
25 int wl(ledWavelengths[iWL]);
26 if (wl != 1 && wl != 2)
42 for (
unsigned iDCC(0); iDCC !=
nDCC; iDCC++) {
69 unsigned iDCC(rItr->id() - 1);
79 if (rItr->getEventSettings().wavelength == 0)
81 else if (rItr->getEventSettings().wavelength == 2)
92 for (
unsigned iW(0); iW < 2; iW++) {
93 LedStatus[iW] =
false;
107 for (
unsigned iWL(0); iWL < 2; iWL++) {
120 nReadouts[
index] = 0;
121 for (
int i(0);
i < 10;
i++)
126 const DetId&
id(digiItr->id());
147 for (
int i(0);
i < 10;
i++) {
156 if (iMax >= 0 && max - min > 3)
157 maxpos[
index][iMax] += 1;
167 if (nReadouts[
index] == 0) {
176 for (
int i(0);
i < 10;
i++) {
177 if (maxpos[
index][
i] > threshold) {
186 static_cast<MESetMulti&
>(meSignalRate).use(iME);
200 else if (ledOnExpected)
206 const DetId&
id(digiItr->id());
226 for (
int iSample(0); iSample < 10; iSample++)
244 if (digiItr->sample(0).gainId() != 0 && digiItr->sample(0).gainId() != 1)
249 std::map<uint32_t, float>::iterator ampItr(
pnAmp_.find(
id.rawId()));
250 if (ampItr ==
pnAmp_.end())
259 for (
int iSample(0); iSample < 4; iSample++)
260 pedestal += digiItr->sample(iSample).adc();
264 for (
int iSample(0); iSample < 50; iSample++) {
265 float amp(digiItr->sample(iSample).adc() -
pedestal);
272 static_cast<MESetMulti&
>(mePNAmplitude).use(iME);
277 ampItr->second =
max;
285 MESet& meAmplitudeSummary(
MEs_.
at(
"AmplitudeSummary"));
306 static_cast<MESetMulti&
>(meAmplitude).use(iME);
307 static_cast<MESetMulti&
>(meAmplitudeSummary).use(iME);
312 float amp(
max((
double)uhitItr->amplitude(), 0.));
313 float jitter(
max((
double)uhitItr->jitter() + 5.0, 0.));
325 else if (ampItrB ==
pnAmp_.end())
326 aop = amp / ampItrA->second;
328 aop = amp / ampItrB->second;
330 aop = amp / (ampItrA->second + ampItrB->second) * 2.;
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_ECALDQM_WORKER(TYPE)
uint16_t *__restrict__ id
MESet & at(const std::string &key)
constexpr bool null() const
is this a null id ?
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
std::string to_string(const V &value)
const_iterator begin() const
The iterator returned can not safely be used across threads.
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void fill(EcalDQMSetupObjects const edso, DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
void addDependencies(DependencySet &) override
void runOnDigis(EEDigiCollection const &)
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
if(conf_.getParameter< bool >("UseStripCablingDB"))
void beginRun(edm::Run const &, edm::EventSetup const &) override
void runOnRawData(EcalRawDataCollection const &)
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
EcalPnDiodeDetId pnForCrystal(DetId const &, char, EcalElectronicsMapping const *)
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
unsigned wavelength_[nEEDCC]
const_iterator end() const
EcalDQMSetupObjects const getEcalDQMSetupObjects()
std::map< unsigned, float > pnAmp_
std::map< int, unsigned > wlToME_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator end() const
bool filterRunType(short const *) override
unsigned rtHalf(DetId const &, EcalElectronicsMapping const *)
void setParams(edm::ParameterSet const &) override
EcalElectronicsMapping const * GetElectronicsMap()
std::map< std::string, std::string > PathReplacements
void push_back(Dependency const &_d)
unsigned getIndex(PathReplacements const &) const
const_iterator begin() const
uint16_t *__restrict__ uint16_t const *__restrict__ adc
int adc() const
get the ADC sample (12 bits)
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override