34 DetId detid(itdg->id());
43 aped = &
peds_->endcap(hashedIndex);
44 aGain = &
gains_->endcap(hashedIndex);
45 gid = &
grps_->endcap(hashedIndex);
48 aped = &
peds_->barrel(hashedIndex);
49 aGain = &
gains_->barrel(hashedIndex);
50 gid = &
grps_->barrel(hashedIndex);
53 pedVec[0] = aped->mean_x12;
65 EcalTBWeights::EcalTBWeightMap::const_iterator wit;
66 wit = wgtsMap.find(std::make_pair(*gid, tdcid));
67 if (wit == wgtsMap.end()) {
69 <<
"No weights found for EcalGroupId: " << gid->
id() <<
" and EcalTDCId: " << tdcid
70 <<
"\n skipping digi with id: " << detid.rawId();
100 result.emplace_back(rhit);
108 result.emplace_back(rhit);
124 "EcalUncalibRecHitWorkerWeights");
edm::ESHandle< EcalWeightXtalGroups > grps_
int hashedIndex() const
get a compact index for arrays
const edm::EventSetup & c
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
edm::ESHandle< EcalTBWeights > wgts_
math::Matrix< 3, 10 >::type EcalWeightMatrix
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > tokenPeds_
Log< level::Error, false > LogError
const EcalWeightSet::EcalWeightMatrix * weights[2]
int hashedIndex(int ieta, int iphi)
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > tokenGains_
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< EcalPedestals > peds_
EcalWeightMatrix & getWeightsBeforeGainSwitch()
EcalUncalibRecHitWorkerWeights()=default
float gain12Over6() const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void setEventSetup(const edm::EventSetup &evtSetup)
edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > tokenWgts_
void setFlagBit(Flags flag)
#define DEFINE_EDM_PLUGIN(factory, type, name)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > tokenGrps_
edm::ESHandle< EcalGainRatios > gains_
edm::ParameterSetDescription getAlgoDescription() override