23 template <
typename T1>
46 template <
typename T1>
50 emObjectProducer_(consumes<
T1Collection>(config.getParameter<edm::
InputTag>(
"candidateProducer"))),
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());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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 &)
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
EgammaEcalPFClusterIsolationProducer< reco::Photon > PhotonEcalPFClusterIsolationProducer
const double energyBarrel_
const double drVetoBarrel_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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)
tuple config
parse the configuration file
std::vector< T1 > T1Collection
const double etaStripEndcap_