32 doEtSum_( config.getParameter<bool>(
"doEtSum") ),
33 etMin_( config.getParameter<double>(
"etMin") ),
34 innerCone_( config.getParameter<double>(
"innerCone") ),
35 outerCone_( config.getParameter<double>(
"outerCone") ),
36 depth_( config.getParameter<int>(
"depth") ),
37 useSingleTower_( config.getParameter<bool>(
"useSingleTower") ),
38 doRhoCorrection_( config.getParameter<bool>(
"doRhoCorrection") ),
39 rhoScale_( config.getParameter<double>(
"rhoScale") ),
40 rhoMax_( config.getParameter<double>(
"rhoMax") ),
41 effectiveAreas_( config.getParameter<std::vector<double> >(
"effectiveAreas") ),
42 absEtaLowEdges_( config.getParameter<std::vector<double> >(
"absEtaLowEdges") ),
45 rhoProducer_( doRhoCorrection_ ? consumes<double>(config.getParameter<edm::
InputTag>(
"rhoProducer")) : edm::EDGetTokenT<double>() )
50 throw cms::Exception(
"IncompatibleVects") <<
"absEtaLowEdges and effectiveAreas should be of the same size. \n";
53 throw cms::Exception(
"IncompleteCoverage") <<
"absEtaLowEdges should start from 0. \n";
57 throw cms::Exception(
"ImproperBinning") <<
"absEtaLowEdges entries should be in increasing order. \n";
68 produces<reco::RecoEcalCandidateIsolationMap>();
82 desc.
add<
bool>((
"doRhoCorrection"),
false);
83 desc.
add<
double>((
"rhoMax"), 999999.);
84 desc.
add<
double>((
"rhoScale"), 1.0);
85 desc.
add<
double>((
"etMin"), -1.0);
86 desc.
add<
double>((
"innerCone"), 0);
87 desc.
add<
double>((
"outerCone"), 0.15);
88 desc.
add<
int>((
"depth"), -1);
89 desc.
add<
bool>((
"doEtSum"),
false);
90 desc.
add<
bool>((
"useSingleTower"),
false);
91 desc.
add<std::vector<double> >(
"effectiveAreas", {0.079, 0.25});
92 desc.
add<std::vector<double> >(
"absEtaLowEdges", {0.0, 1.479});
93 descriptions.
add((
"hltEgammaHLTBcHcalIsolationProducersRegional"), desc);
123 for(
unsigned int iRecoEcalCand=0; iRecoEcalCand <recoEcalCandHandle->size(); iRecoEcalCand++) {
129 std::vector<CaloTowerDetId> towersBehindCluster;
137 isol = isolAlgo.
getTowerEtSum(&(*recoEcalCandRef), &(towersBehindCluster));
139 isol = isolAlgo.getTowerEtSum(&(*recoEcalCandRef));
151 auto scEta =
std::abs(recoEcalCandRef->superCluster()->eta());
161 isoMap.
insert(recoEcalCandRef, isol);
164 iEvent.
put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(isoMap));
const bool doRhoCorrection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double hcalESum(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0)
void readEvent(const edm::Event &)
const std::vector< double > absEtaLowEdges_
const edm::EDGetTokenT< CaloTowerCollection > caloTowerProducer_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double hcalESumDepth2BehindClusters(const std::vector< CaloTowerDetId > &towers)
virtual void produce(edm::Event &, const edm::EventSetup &) overridefinal
std::vector< CaloTowerDetId > hcalTowersBehindClusters(const reco::SuperCluster &sc)
void checkSetup(const edm::EventSetup &)
double hcalESumDepth1BehindClusters(const std::vector< CaloTowerDetId > &towers)
~EgammaHLTBcHcalIsolationProducersRegional()
ElectronHcalHelper * hcalHelper_
EgammaHLTBcHcalIsolationProducersRegional(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
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)
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
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_