34 assocMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
47 std::unique_ptr<reco::RecoEcalCandidateIsolationMap>
assocMap_;
62 : rCylinder_(
config.getParameter<double>(
"rCylinder")),
63 hOverECone_(
config.getParameter<double>(
"hOverECone")),
64 recoEcalCandidateToken_(
68 ssHelper_(consumesCollector()) {
79 produces<reco::RecoEcalCandidateIsolationMap>(
"rVar");
80 produces<reco::RecoEcalCandidateIsolationMap>(
"hForHOverE");
82 produces<reco::RecoEcalCandidateIsolationMap>(
var.name());
94 desc.add<
double>(
"hOverECone", 0.15);
95 descriptions.
add((
"hltEgammaHLTHGCalIDVarProducer"),
desc);
105 auto rVarMap = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
106 auto hForHoverEMap = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
108 pcaMap.initMap(recoEcalCandHandle);
111 for (
size_t candNr = 0; candNr < recoEcalCandHandle->size(); candNr++) {
114 rVarMap->insert(candRef, ssCalc.getRvar(
rCylinder_));
118 hForHoverEMap->insert(candRef, hForHoverE);
119 auto pcaWidths = ssCalc.getPCAWidths(
rCylinder_);
121 pcaMap.insert(candRef, pcaWidths);
127 iEvent.put(pcaMap.releaseMap(), pcaMap.name());
const edm::EDGetTokenT< reco::CaloClusterCollection > layerClusterToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
PCAAssocMap(double HGCalShowerShapeHelper::ShowerWidths::*var, const std::string &name)
const std::string & name() const
std::vector< PFRecHit > PFRecHitCollection
collection of PFRecHit objects
std::vector< PCAAssocMap > pcaAssocMaps_
EgammaHLTHGCalIDVarProducer(const edm::ParameterSet &)
~EgammaHLTHGCalIDVarProducer() override
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > assocMap_
void initPerEvent(const std::vector< reco::PFRecHit > &recHits)
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateToken_
HGCalShowerShapeHelper ssHelper_
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
void insert(reco::RecoEcalCandidateRef &ref, const HGCalShowerShapeHelper::ShowerWidths &showerWidths)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< reco::PFRecHitCollection > hgcalRecHitToken_
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
double HGCalShowerShapeHelper::ShowerWidths::* var_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > releaseMap()
void initMap(const edm::Handle< reco::RecoEcalCandidateCollection > &candHandle)
static constexpr float kRCylinder
HGCalShowerShapeHelper::ShowerShapeCalc createCalc(const std::vector< std::pair< DetId, float > > &hitsAndFracs, double rawEnergy, double minHitE=0, double minHitET=0, int minLayer=1, int maxLayer=-1, DetId::Detector subDet=DetId::HGCalEE) const