33 DetId detid(itdg->id());
42 aped = &
peds->endcap(hashedIndex);
43 aGain = &
gains->endcap(hashedIndex);
44 gid = &
grps->endcap(hashedIndex);
47 aped = &
peds->barrel(hashedIndex);
48 aGain = &
gains->barrel(hashedIndex);
49 gid = &
grps->barrel(hashedIndex);
52 pedVec[0] = aped->mean_x12;
64 EcalTBWeights::EcalTBWeightMap::const_iterator wit;
65 wit = wgtsMap.find(std::make_pair(*gid, tdcid));
66 if (wit == wgtsMap.end()) {
68 <<
"No weights found for EcalGroupId: " << gid->
id() <<
" and EcalTDCId: " << tdcid
69 <<
"\n skipping digi with id: " << detid.rawId();
99 result.emplace_back(rhit);
107 result.emplace_back(rhit);
123 "EcalUncalibRecHitWorkerWeights");
edm::ESHandle< EcalPedestals > peds
int hashedIndex() const
get a compact index for arrays
edm::ESHandle< EcalGainRatios > gains
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > uncalibMaker_endcap_
void set(const edm::EventSetup &es) override
math::Matrix< 3, 10 >::type EcalWeightMatrix
const EcalWeightSet::EcalWeightMatrix * weights[2]
const unsigned int id() const
int hashedIndex(int ieta, int iphi)
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
EcalWeightMatrix & getWeightsAfterGainSwitch()
edm::ESHandle< EcalWeightXtalGroups > grps
EcalWeightMatrix & getWeightsBeforeGainSwitch()
float gain12Over6() const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void setEventSetup(const edm::EventSetup &evtSetup)
const EcalTBWeightMap & getMap() const
void setFlagBit(Flags flag)
#define DEFINE_EDM_PLUGIN(factory, type, name)
EcalUncalibRecHitWorkerWeights()
edm::ParameterSetDescription getAlgoDescription() override
edm::ESHandle< EcalTBWeights > wgts