85 etMin_(config.getParameter<double>(
"etMin")),
86 innerCone_(config.getParameter<double>(
"innerCone")),
87 outerCone_(config.getParameter<double>(
"outerCone")),
88 depth_(config.getParameter<
int>(
"depth")),
91 rhoScale_(config.getParameter<double>(
"rhoScale")),
92 rhoMax_(config.getParameter<double>(
"rhoMax")),
99 :
edm::EDGetTokenT<double>()) {
102 throw cms::Exception(
"IncompatibleVects") <<
"absEtaLowEdges and effectiveAreas should be of the same size. \n";
105 throw cms::Exception(
"IncompleteCoverage") <<
"absEtaLowEdges should start from 0. \n";
109 throw cms::Exception(
"ImproperBinning") <<
"absEtaLowEdges entries should be in increasing order. \n";
120 produces<reco::RecoEcalCandidateIsolationMap>();
131 desc.
add<
bool>((
"doRhoCorrection"),
false);
132 desc.
add<
double>((
"rhoMax"), 999999.);
133 desc.
add<
double>((
"rhoScale"), 1.0);
134 desc.
add<
double>((
"etMin"), -1.0);
135 desc.
add<
double>((
"innerCone"), 0);
136 desc.
add<
double>((
"outerCone"), 0.15);
137 desc.
add<
int>((
"depth"), -1);
138 desc.
add<
bool>((
"doEtSum"),
false);
139 desc.
add<
bool>((
"useSingleTower"),
false);
140 desc.
add<std::vector<double> >(
"effectiveAreas", {0.079, 0.25});
141 desc.
add<std::vector<double> >(
"absEtaLowEdges", {0.0, 1.479});
142 descriptions.
add((
"hltEgammaHLTBcHcalIsolationProducersRegional"), desc);
171 for (
unsigned int iRecoEcalCand = 0; iRecoEcalCand < recoEcalCandHandle->size(); iRecoEcalCand++) {
176 std::vector<CaloTowerDetId> towersBehindCluster;
185 &(*recoEcalCandRef), &(towersBehindCluster));
187 isol = isolAlgo.getTowerEtSum(&(*recoEcalCandRef));
199 auto scEta =
std::abs(recoEcalCandRef->superCluster()->eta());
209 isoMap.
insert(recoEcalCandRef, isol);
212 iEvent.
put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(isoMap));
const bool doRhoCorrection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void readEvent(const edm::Event &)
const std::vector< double > absEtaLowEdges_
double hcalESum(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0) const
void produce(edm::Event &, const edm::EventSetup &) final
const edm::EDGetTokenT< CaloTowerCollection > caloTowerProducer_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void checkSetup(const edm::EventSetup &)
ElectronHcalHelper * hcalHelper_
EgammaHLTBcHcalIsolationProducersRegional(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
EgammaHLTBcHcalIsolationProducersRegional & operator=(EgammaHLTBcHcalIsolationProducersRegional const &)=delete
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
~EgammaHLTBcHcalIsolationProducersRegional() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const edm::EDGetTokenT< double > rhoProducer_
T const * product() const
void insert(const key_type &k, const data_type &v)
insert an association
const bool useSingleTower_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double hcalESumDepth2BehindClusters(const std::vector< CaloTowerDetId > &towers) const
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
std::vector< CaloTowerDetId > hcalTowersBehindClusters(const reco::SuperCluster &sc) const
double getTowerEtSum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=0) const
edm::EDGetTokenT< CaloTowerCollection > hcalTowers
const std::vector< double > effectiveAreas_
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
double hcalESumDepth1BehindClusters(const std::vector< CaloTowerDetId > &towers) const