27 template <
typename T1>
54 template <
typename T1>
58 emObjectProducer_(consumes(
config.getParameter<
edm::
InputTag>(
"candidateProducer"))),
59 pfClusterProducerHCAL_(consumes(
config.getParameter<
edm::
InputTag>(
"pfClusterProducerHCAL"))),
60 pfClusterProducerHFEM_(consumes(
config.getParameter<
edm::
InputTag>(
"pfClusterProducerHFEM"))),
61 pfClusterProducerHFHAD_(consumes(
config.getParameter<
edm::
InputTag>(
"pfClusterProducerHFHAD"))),
63 drMax_(
config.getParameter<double>(
"drMax")),
64 drVetoBarrel_(
config.getParameter<double>(
"drVetoBarrel")),
65 drVetoEndcap_(
config.getParameter<double>(
"drVetoEndcap")),
66 etaStripBarrel_(
config.getParameter<double>(
"etaStripBarrel")),
67 etaStripEndcap_(
config.getParameter<double>(
"etaStripEndcap")),
68 energyBarrel_(
config.getParameter<double>(
"energyBarrel")),
69 energyEndcap_(
config.getParameter<double>(
"energyEndcap")),
71 produces<edm::ValueMap<float>>();
74 template <
typename T1>
81 "pfClusterProducerHFEM", {
"hltParticleFlowClusterHFEM"},
true) and
83 "pfClusterProducerHFHAD", {
"hltParticleFlowClusterHFHAD"},
true))
or
86 desc.add<
double>(
"drMax", 0.3);
87 desc.add<
double>(
"drVetoBarrel", 0.0);
88 desc.add<
double>(
"drVetoEndcap", 0.0);
89 desc.add<
double>(
"etaStripBarrel", 0.0);
90 desc.add<
double>(
"etaStripEndcap", 0.0);
91 desc.add<
double>(
"energyBarrel", 0.0);
92 desc.add<
double>(
"energyEndcap", 0.0);
93 desc.add<
bool>(
"useEt",
true);
97 template <
typename T1>
101 auto emObjectHandle =
iEvent.getHandle(emObjectProducer_);
103 auto isoMap = std::make_unique<edm::ValueMap<float>>();
105 std::vector<float> retV(emObjectHandle->size(), 0);
107 std::vector<edm::Handle<reco::PFClusterCollection>> clusterHandles{
iEvent.getHandle(pfClusterProducerHCAL_)};
110 clusterHandles.push_back(
iEvent.getHandle(pfClusterProducerHFEM_));
111 clusterHandles.push_back(
iEvent.getHandle(pfClusterProducerHFHAD_));
115 drMax_, drVetoBarrel_, drVetoEndcap_, etaStripBarrel_, etaStripEndcap_, energyBarrel_, energyEndcap_, useEt_);
117 for (
unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
118 T1Ref candRef(emObjectHandle, iReco);
119 retV[iReco] = isoAlgo.
getSum(candRef, clusterHandles);
122 filler.insert(emObjectHandle, retV.begin(), retV.end());