51 produces<edm::ValueMap<float>>(
"miniIsoChg");
52 produces<edm::ValueMap<float>>(
"miniIsoAll");
57 produces<edm::ValueMap<float>>(
"PFIsoChg");
58 produces<edm::ValueMap<float>>(
"PFIsoAll");
59 produces<edm::ValueMap<float>>(
"PFIsoAll04");
63 produces<edm::ValueMap<float>>(
"PFIsoChg");
64 produces<edm::ValueMap<float>>(
"PFIsoAll");
103 template <
typename T>
116 template <
typename T>
130 template <
typename T>
137 unsigned int nInput =
src->size();
143 for (
const auto&
obj : *
src) {
144 auto iso =
obj.miniPFIsolation();
145 auto chg = iso.chargedHadronIso();
146 auto neu = iso.neutralHadronIso();
147 auto pho = iso.photonIso();
148 auto ea = ea_miniiso_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
151 float scale = relative_ ? 1.0 /
obj.pt() : 1;
172 template <
typename T>
182 unsigned int nInput =
src->size();
189 for (
const auto&
obj : *
src) {
190 auto iso =
obj.pfIsolationVariables();
191 auto chg = iso.sumChargedHadronPt;
192 auto neu = iso.sumNeutralHadronEt;
193 auto pho = iso.sumPhotonEt;
194 auto ea = ea_pfiso_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
195 float scale = relative_ ? 1.0 /
obj.pt() : 1;
199 std::max(0.0,
obj.neutralHadronIso() +
obj.photonIso() - (*rho) * ea * 16. / 9.)));
220 template <
typename T>
230 unsigned int nInput =
src->size();
236 for (
const auto&
obj : *
src) {
237 auto chg =
obj.chargedHadronIso();
238 auto neu =
obj.neutralHadronIso();
239 auto pho =
obj.photonIso();
240 auto ea_chg = ea_pfiso_chg_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
241 auto ea_neu = ea_pfiso_neu_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
242 auto ea_pho = ea_pfiso_pho_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
243 float scale = relative_ ? 1.0 /
obj.pt() : 1;
263 template <
typename T>
266 desc.
add<
edm::InputTag>(
"src")->setComment(
"input physics object collection");
267 desc.
add<
bool>(
"relative")->setComment(
"compute relative isolation instead of absolute one");
271 ->setComment(
"txt file containing effective areas to be used for mini-isolation pileup subtraction");
273 ->setComment(
"rho to be used for effective-area based mini-isolation pileup subtraction");
278 "txt file containing effective areas to be used for PF-isolation pileup subtraction for electrons");
280 ->setComment(
"rho to be used for effective-area based PF-isolation pileup subtraction for electrons");
283 desc.
add<
edm::InputTag>(
"mapIsoChg")->setComment(
"input charged PF isolation calculated in VID for photons");
284 desc.
add<
edm::InputTag>(
"mapIsoNeu")->setComment(
"input neutral PF isolation calculated in VID for photons");
285 desc.
add<
edm::InputTag>(
"mapIsoPho")->setComment(
"input photon PF isolation calculated in VID for photons");
288 "txt file containing effective areas to be used for charged PF-isolation pileup subtraction for photons");
291 "txt file containing effective areas to be used for neutral PF-isolation pileup subtraction for photons");
294 "txt file containing effective areas to be used for photon PF-isolation pileup subtraction for photons");
296 ->setComment(
"rho to be used for effective-area based PF-isolation pileup subtraction for photons");
307 modname +=
"IsoValueMapProducer";