80 : doEtSum_(
config.getParameter<
bool>(
"doEtSum")),
85 innerCone_(
config.getParameter<double>(
"innerCone")),
86 outerCone_(
config.getParameter<double>(
"outerCone")),
87 depth_(
config.getParameter<
int>(
"depth")),
88 maxSeverityHB_(
config.getParameter<
int>(
"maxSeverityHB")),
89 maxSeverityHE_(
config.getParameter<
int>(
"maxSeverityHE")),
90 useSingleTower_(
config.getParameter<
bool>(
"useSingleTower")),
91 doRhoCorrection_(
config.getParameter<
bool>(
"doRhoCorrection")),
92 rhoScale_(
config.getParameter<double>(
"rhoScale")),
93 rhoMax_(
config.getParameter<double>(
"rhoMax")),
94 effectiveAreas_(
config.getParameter<
std::
vector<double> >(
"effectiveAreas")),
95 absEtaLowEdges_(
config.getParameter<
std::
vector<double> >(
"absEtaLowEdges")),
96 recoEcalCandidateProducer_(consumes(
config.getParameter<
edm::
InputTag>(
"recoEcalCandidateProducer"))),
98 rhoProducer_(doRhoCorrection_ ? consumes<double>(
config.getParameter<
edm::
InputTag>(
"rhoProducer"))
99 :
edm::EDGetTokenT<double>()),
105 putToken_{produces<reco::RecoEcalCandidateIsolationMap>()},
107 config.getParameter<
bool>(
"usePFThresholdsFromDB")) {
108 if (doRhoCorrection_) {
109 if (absEtaLowEdges_.size() != effectiveAreas_.size()) {
110 throw cms::Exception(
"IncompatibleVects") <<
"absEtaLowEdges and effectiveAreas should be of the same size. \n";
113 if (absEtaLowEdges_.at(0) != 0.0) {
114 throw cms::Exception(
"IncompleteCoverage") <<
"absEtaLowEdges should start from 0. \n";
117 for (
unsigned int aIt = 0; aIt < absEtaLowEdges_.size() - 1; aIt++) {
118 if (!(absEtaLowEdges_.at(aIt) < absEtaLowEdges_.at(aIt + 1))) {
119 throw cms::Exception(
"ImproperBinning") <<
"absEtaLowEdges entries should be in increasing order. \n";
125 hcalCutsToken_ = esConsumes<HcalPFCuts, HcalPFCutsRcd>(
edm::ESInputTag(
"",
"withTopo"));
135 desc.add<
bool>(
"doRhoCorrection",
false);
136 desc.add<
double>(
"rhoMax", 999999.);
137 desc.add<
double>((
"rhoScale"), 1.0);
139 desc.add<std::vector<double> >(
"eThresHB", {0.1, 0.2, 0.3, 0.3});
140 desc.add<std::vector<double> >(
"etThresHB", {0, 0, 0, 0});
141 desc.add<std::vector<double> >(
"eThresHE", {0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2});
142 desc.add<std::vector<double> >(
"etThresHE", {0, 0, 0, 0, 0, 0, 0});
143 desc.add<
bool>(
"usePFThresholdsFromDB",
true);
144 desc.add<
double>(
"innerCone", 0);
145 desc.add<
double>(
"outerCone", 0.14);
146 desc.add<
int>(
"depth", 0);
147 desc.add<
int>(
"maxSeverityHB", 9);
148 desc.add<
int>(
"maxSeverityHE", 9);
149 desc.add<
bool>(
"doEtSum",
false);
150 desc.add<
bool>(
"useSingleTower",
false);
151 desc.add<std::vector<double> >(
"effectiveAreas", {0.079, 0.25});
152 desc.add<std::vector<double> >(
"absEtaLowEdges", {0.0, 1.479});
153 descriptions.
add(
"hltEgammaHLTHcalVarProducerFromRecHit",
desc);
173 for (
unsigned int iRecoEcalCand = 0; iRecoEcalCand < recoEcalCandHandle->size(); iRecoEcalCand++) {
230 auto scEta =
std::abs(recoEcalCandRef->superCluster()->eta());
240 isoMap.
insert(recoEcalCandRef, isol);
const edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > hcalSevLvlComputerToken_
const bool doRhoCorrection_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
double getHcalESumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
const edm::EDGetTokenT< double > rhoProducer_
const bool useSingleTower_
double getHcalEtSumBc(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
EgammaHLTHcalVarProducerFromRecHit(const edm::ParameterSet &)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const final
const edm::ESGetToken< CaloTowerConstituentsMap, CaloGeometryRecord > caloTowerConstituentsMapToken_
const edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
const EgammaHcalIsolation::arrayHB eThresHB_
double getHcalESum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
const EgammaHcalIsolation::arrayHE etThresHE_
const std::vector< double > effectiveAreas_
const EgammaHcalIsolation::arrayHB etThresHB_
const std::vector< double > absEtaLowEdges_
const edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitsTag_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
void insert(const key_type &k, const data_type &v)
insert an association
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
double getHcalEtSum(const reco::Candidate *c, int depth, const HcalPFCuts *hcalCuts) const
T const * get() const
Returns C++ pointer to the item.
const EgammaHcalIsolation::arrayHE eThresHE_
std::array< double, 4 > arrayHB
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > hcalTopologyToken_
const edm::EDPutTokenT< reco::RecoEcalCandidateIsolationMap > putToken_
std::array< double, 7 > arrayHE