12 : dr2_(0.15 * 0.15), mindr2_(0), rechittools_(nullptr), debug_(
false), nlayers_(30) {
26 throw cms::Exception(
"HGCalIsoCalculator::produceHGCalIso: rechittools not set");
33 auto makeEtaPhiPair = [
this](
const auto&
hit) {
37 return std::make_pair(
eta,
phi);
50 throw cms::Exception(
"HGCalIsoCalculator::produceHGCalIso: rechittools not set");
57 const float seedEta =
seed->eta();
58 const float seedPhi =
seed->phi();
59 const std::vector<std::pair<DetId, float>>& seedHitsAndFractions =
seed->hitsAndFractions();
61 auto checkAndFill = [
this, &seedEta, &seedPhi, &seedHitsAndFractions](
const HGCRecHit&
hit,
62 std::pair<float, float> etaphiVal) {
63 float deltar2 =
reco::deltaR2(etaphiVal.first, etaphiVal.second, seedEta, seedPhi);
72 if (std::none_of(seedHitsAndFractions.begin(), seedHitsAndFractions.end(), [&
hit](
const auto& seedhit) {
73 return hit.
id() == seedhit.first;
83 checkAndFill(
hit, *itEtaPhiCache);
87 checkAndFill(
hit, *itEtaPhiCache);
91 checkAndFill(
hit, *itEtaPhiCache);
98 throw std::logic_error(
"PhotonHGCalIsoCalculator::setNRings: max number of rings reached");
116 throw cms::Exception(
"HGCalIsoCalculator::getIso: ring index out of range");