37 DetId detid(itdg->id());
46 aped = &
peds->endcap(hashedIndex);
47 aGain = &
gains->endcap(hashedIndex);
48 gid = &
grps->endcap(hashedIndex);
51 aped = &
peds->barrel(hashedIndex);
52 aGain = &
gains->barrel(hashedIndex);
53 gid = &
grps->barrel(hashedIndex);
56 pedVec[0] = aped->mean_x12;
68 EcalTBWeights::EcalTBWeightMap::const_iterator wit;
69 wit = wgtsMap.find( std::make_pair(*gid,tdcid) );
70 if( wit == wgtsMap.end() ) {
71 edm::LogError(
"EcalUncalibRecHitError") <<
"No weights found for EcalGroupId: " 72 << gid->
id() <<
" and EcalTDCId: " << tdcid
73 <<
"\n skipping digi with id: " << detid.rawId();
100 result.emplace_back(rhit);
105 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.
const EBShape testbeamEBShape
const EEShape testbeamEEShape
EcalWeightMatrix & getWeightsAfterGainSwitch()
edm::ESHandle< EcalWeightXtalGroups > grps
EcalWeightMatrix & getWeightsBeforeGainSwitch()
float gain12Over6() const
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