56 : doEtSum_(
config.getParameter<
bool>(
"doEtSum")),
57 etMin_(
config.getParameter<double>(
"etMin")),
58 innerCone_(
config.getParameter<double>(
"innerCone")),
59 outerCone_(
config.getParameter<double>(
"outerCone")),
60 depth_(
config.getParameter<
int>(
"depth")),
61 useSingleTower_(
config.getParameter<
bool>(
"useSingleTower")),
62 doRhoCorrection_(
config.getParameter<
bool>(
"doRhoCorrection")),
63 rhoScale_(
config.getParameter<double>(
"rhoScale")),
64 rhoMax_(
config.getParameter<double>(
"rhoMax")),
65 effectiveAreas_(
config.getParameter<
std::
vector<double> >(
"effectiveAreas")),
66 absEtaLowEdges_(
config.getParameter<
std::
vector<double> >(
"absEtaLowEdges")),
67 recoEcalCandidateProducer_(consumes(
config.getParameter<
edm::
InputTag>(
"recoEcalCandidateProducer"))),
68 caloTowerProducer_(consumes(
config.getParameter<
edm::
InputTag>(
"caloTowerProducer"))),
69 rhoProducer_(doRhoCorrection_ ? consumes<double>(
config.getParameter<
edm::
InputTag>(
"rhoProducer"))
70 :
edm::EDGetTokenT<double>()),
72 putToken_{produces<reco::RecoEcalCandidateIsolationMap>()} {
73 if (doRhoCorrection_) {
74 if (absEtaLowEdges_.size() != effectiveAreas_.size()) {
75 throw cms::Exception(
"IncompatibleVects") <<
"absEtaLowEdges and effectiveAreas should be of the same size. \n";
78 if (absEtaLowEdges_.at(0) != 0.0) {
79 throw cms::Exception(
"IncompleteCoverage") <<
"absEtaLowEdges should start from 0. \n";
82 for (
unsigned int aIt = 0; aIt < absEtaLowEdges_.size() - 1; aIt++) {
83 if (!(absEtaLowEdges_.at(aIt) < absEtaLowEdges_.at(aIt + 1))) {
84 throw cms::Exception(
"ImproperBinning") <<
"absEtaLowEdges entries should be in increasing order. \n";
96 desc.add<
bool>((
"doRhoCorrection"),
false);
97 desc.add<
double>((
"rhoMax"), 999999.);
98 desc.add<
double>((
"rhoScale"), 1.0);
99 desc.add<
double>((
"etMin"), -1.0);
100 desc.add<
double>((
"innerCone"), 0);
101 desc.add<
double>((
"outerCone"), 0.15);
102 desc.add<
int>((
"depth"), -1);
103 desc.add<
bool>((
"doEtSum"),
false);
104 desc.add<
bool>((
"useSingleTower"),
false);
105 desc.add<std::vector<double> >(
"effectiveAreas", {0.079, 0.25});
106 desc.add<std::vector<double> >(
"absEtaLowEdges", {0.0, 1.479});
107 descriptions.
add((
"hltEgammaHLTBcHcalIsolationProducersRegional"),
desc);
134 for (
unsigned int iRecoEcalCand = 0; iRecoEcalCand < recoEcalCandHandle->size(); iRecoEcalCand++) {
139 auto towersBehindCluster =
156 auto const &sc = recoEcalCandRef->superCluster().
get();
163 auto scEta =
std::abs(recoEcalCandRef->superCluster()->eta());
173 isoMap.
insert(recoEcalCandRef, isol);