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_));
117 candRef->superCluster()->eta(), candRef->superCluster()->phi(), layerClusters, 0.,
hOverECone_, 0., 0.);
118 hForHoverEMap->insert(candRef, hForHoverE);
119 auto pcaWidths = ssCalc.getPCAWidths(
rCylinder_);
120 for (
auto& pcaMap : pcaAssocMaps_) {
121 pcaMap.insert(candRef, pcaWidths);
126 for (
auto& pcaMap : pcaAssocMaps_) {
127 iEvent.
put(pcaMap.releaseMap(), pcaMap.name());
const edm::EDGetTokenT< reco::CaloClusterCollection > layerClusterToken_
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
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
PCAAssocMap(double HGCalShowerShapeHelper::ShowerWidths::*var, const std::string &name)
std::vector< PFRecHit > PFRecHitCollection
collection of PFRecHit objects
const std::string & name() const
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
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_
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
bool get(ProductID const &oid, Handle< PROD > &result) const
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
tuple config
parse the configuration file
double HGCalShowerShapeHelper::ShowerWidths::* var_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > releaseMap()
void initMap(const edm::Handle< reco::RecoEcalCandidateCollection > &candHandle)
static constexpr float kRCylinder