23 template <
typename T1>
46 template <
typename T1>
52 drMax_(
config.getParameter<double>(
"drMax")),
53 drVetoBarrel_(
config.getParameter<double>(
"drVetoBarrel")),
54 drVetoEndcap_(
config.getParameter<double>(
"drVetoEndcap")),
55 etaStripBarrel_(
config.getParameter<double>(
"etaStripBarrel")),
56 etaStripEndcap_(
config.getParameter<double>(
"etaStripEndcap")),
57 energyBarrel_(
config.getParameter<double>(
"energyBarrel")),
58 energyEndcap_(
config.getParameter<double>(
"energyEndcap")) {
59 produces<edm::ValueMap<float>>();
62 template <
typename T1>
67 desc.add<
double>(
"drMax", 0.3);
68 desc.add<
double>(
"drVetoBarrel", 0.0);
69 desc.add<
double>(
"drVetoEndcap", 0.0);
70 desc.add<
double>(
"etaStripBarrel", 0.0);
71 desc.add<
double>(
"etaStripEndcap", 0.0);
72 desc.add<
double>(
"energyBarrel", 0.0);
73 desc.add<
double>(
"energyEndcap", 0.0);
77 template <
typename T1>
81 auto emObjectHandle =
iEvent.getHandle(emObjectProducer_);
83 auto isoMap = std::make_unique<edm::ValueMap<float>>();
85 std::vector<float> retV(emObjectHandle->size(), 0);
87 auto clusterHandle =
iEvent.getHandle(pfClusterProducer_);
90 drMax_, drVetoBarrel_, drVetoEndcap_, etaStripBarrel_, etaStripEndcap_, energyBarrel_, energyEndcap_);
92 for (
unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
93 T1Ref candRef(emObjectHandle, iReco);
94 retV[iReco] = isoAlgo.
getSum(candRef, clusterHandle);
97 filler.insert(emObjectHandle, retV.begin(), retV.end());
double getSum(T1, edm::Handle< std::vector< reco::PFCluster > >)
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
edm::Ref< T1Collection > T1Ref
const double etaStripBarrel_
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string defaultModuleLabel()
EgammaEcalPFClusterIsolationProducer< reco::GsfElectron > ElectronEcalPFClusterIsolationProducer
EgammaEcalPFClusterIsolationProducer(const edm::ParameterSet &)
EgammaEcalPFClusterIsolationProducer< reco::Photon > PhotonEcalPFClusterIsolationProducer
const double energyBarrel_
const double drVetoBarrel_
std::vector< l1t::PFCluster > PFClusterCollection
const edm::EDGetTokenT< T1Collection > emObjectProducer_
const double energyEndcap_
const double drVetoEndcap_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< T1 > T1Collection
const double etaStripEndcap_