40 DetId detid(itdg->id());
49 aped = &
peds->endcap(hashedIndex);
50 aGain = &
gains->endcap(hashedIndex);
51 gid = &
grps->endcap(hashedIndex);
54 aped = &
peds->barrel(hashedIndex);
55 aGain = &
gains->barrel(hashedIndex);
56 gid = &
grps->barrel(hashedIndex);
59 pedVec[0] = aped->mean_x12;
71 EcalTBWeights::EcalTBWeightMap::const_iterator wit;
72 wit = wgtsMap.find( std::make_pair(*gid,tdcid) );
73 if( wit == wgtsMap.end() ) {
74 edm::LogError(
"EcalUncalibRecHitError") <<
"No weights found for EcalGroupId: " 75 << gid->
id() <<
" and EcalTDCId: " << tdcid
76 <<
"\n skipping digi with id: " << detid.rawId();
103 result.emplace_back(rhit);
108 result.emplace_back(rhit);
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
edm::ESHandle< EcalPedestals > peds
int hashedIndex() const
get a compact index for arrays
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
edm::ESHandle< EcalGainRatios > gains
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > uncalibMaker_endcap_
void set(const edm::EventSetup &es) override
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
void setEventSetup(const edm::EventSetup &evtSetup)
const EcalTBWeightMap & getMap() const
math::Matrix< 3, 10 >::type EcalWeightMatrix
void setFlagBit(Flags flag)
#define DEFINE_EDM_PLUGIN(factory, type, name)
EcalUncalibRecHitWorkerWeights()
edm::ParameterSetDescription getAlgoDescription() override
edm::ESHandle< EcalTBWeights > wgts