|
|
Go to the documentation of this file.
53 : doEtSum_(
config.getParameter<
bool>(
"doEtSum")),
54 etMin_(
config.getParameter<double>(
"etMin")),
55 innerCone_(
config.getParameter<double>(
"innerCone")),
56 outerCone_(
config.getParameter<double>(
"outerCone")),
57 depth_(
config.getParameter<
int>(
"depth")),
58 useSingleTower_(
config.getParameter<
bool>(
"useSingleTower")),
59 doRhoCorrection_(
config.getParameter<
bool>(
"doRhoCorrection")),
60 rhoScale_(
config.getParameter<double>(
"rhoScale")),
61 rhoMax_(
config.getParameter<double>(
"rhoMax")),
62 effectiveAreas_(
config.getParameter<
std::vector<double> >(
"effectiveAreas")),
63 absEtaLowEdges_(
config.getParameter<
std::vector<double> >(
"absEtaLowEdges")),
64 recoEcalCandidateProducer_(
67 rhoProducer_(doRhoCorrection_ ? consumes<double>(
config.getParameter<
edm::
InputTag>(
"rhoProducer"))
68 :
edm::EDGetTokenT<double>()),
69 putToken_{produces<reco::RecoEcalCandidateIsolationMap>()} {
70 if (doRhoCorrection_) {
71 if (absEtaLowEdges_.size() != effectiveAreas_.size()) {
72 throw cms::Exception(
"IncompatibleVects") <<
"absEtaLowEdges and effectiveAreas should be of the same size. \n";
75 if (absEtaLowEdges_.at(0) != 0.0) {
76 throw cms::Exception(
"IncompleteCoverage") <<
"absEtaLowEdges should start from 0. \n";
79 for (
unsigned int aIt = 0; aIt < absEtaLowEdges_.size() - 1; aIt++) {
80 if (!(absEtaLowEdges_.at(aIt) < absEtaLowEdges_.at(aIt + 1))) {
81 throw cms::Exception(
"ImproperBinning") <<
"absEtaLowEdges entries should be in increasing order. \n";
93 desc.
add<
bool>((
"doRhoCorrection"),
false);
94 desc.
add<
double>((
"rhoMax"), 999999.);
95 desc.
add<
double>((
"rhoScale"), 1.0);
96 desc.
add<
double>((
"etMin"), -1.0);
97 desc.
add<
double>((
"innerCone"), 0);
98 desc.
add<
double>((
"outerCone"), 0.15);
99 desc.
add<
int>((
"depth"), -1);
100 desc.
add<
bool>((
"doEtSum"),
false);
101 desc.
add<
bool>((
"useSingleTower"),
false);
102 desc.
add<std::vector<double> >(
"effectiveAreas", {0.079, 0.25});
103 desc.
add<std::vector<double> >(
"absEtaLowEdges", {0.0, 1.479});
104 descriptions.
add((
"hltEgammaHLTBcHcalIsolationProducersRegional"), desc);
131 for (
unsigned int iRecoEcalCand = 0; iRecoEcalCand < recoEcalCandHandle->size(); iRecoEcalCand++) {
136 auto towersBehindCluster =
153 auto const &sc = recoEcalCandRef->superCluster().
get();
160 auto scEta =
std::abs(recoEcalCandRef->superCluster()->eta());
170 isoMap.
insert(recoEcalCandRef, isol);
const edm::EDGetTokenT< double > rhoProducer_
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
ParameterDescriptionBase * add(U const &iLabel, T const &value)
EgammaHLTBcHcalIsolationProducersRegional(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const final
T const * get() const
Returns C++ pointer to the item.
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
double getTowerESum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=nullptr) const
double getDepth2HcalESum(const std::vector< CaloTowerDetId > &towers, CaloTowerCollection const &) const
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::vector< double > effectiveAreas_
const edm::EDGetTokenT< CaloTowerCollection > caloTowerProducer_
const bool useSingleTower_
const edm::EDPutTokenT< reco::RecoEcalCandidateIsolationMap > putToken_
void insert(const key_type &k, const data_type &v)
insert an association
std::vector< CaloTowerDetId > towersOf(const reco::SuperCluster &sc) const
double getDepth1HcalESum(const std::vector< CaloTowerDetId > &towers, CaloTowerCollection const &) const
double getTowerEtSum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=nullptr) const
Abs< T >::type abs(const T &t)
const bool doRhoCorrection_
const std::vector< double > absEtaLowEdges_