51 produces<edm::ValueMap<float>>(
"miniIsoChg");
52 produces<edm::ValueMap<float>>(
"miniIsoAll");
58 produces<edm::ValueMap<float>>(
"PFIsoChg");
59 produces<edm::ValueMap<float>>(
"PFIsoAll");
60 produces<edm::ValueMap<float>>(
"PFIsoAll04");
64 produces<edm::ValueMap<float>>(
"PFIsoChg");
65 produces<edm::ValueMap<float>>(
"PFIsoAll");
107 template <
typename T>
120 template <
typename T>
134 template <
typename T>
141 unsigned int nInput =
src->size();
147 for (
const auto&
obj : *
src) {
148 auto iso =
obj.miniPFIsolation();
149 auto chg = iso.chargedHadronIso();
150 auto neu = iso.neutralHadronIso();
151 auto pho = iso.photonIso();
152 auto ea = ea_miniiso_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
155 float scale = relative_ ? 1.0 /
obj.pt() : 1;
176 template <
typename T>
186 unsigned int nInput =
src->size();
193 for (
const auto&
obj : *
src) {
194 auto iso =
obj.pfIsolationVariables();
195 auto chg = iso.sumChargedHadronPt;
196 auto neu = iso.sumNeutralHadronEt;
197 auto pho = iso.sumPhotonEt;
198 auto ea = ea_pfiso_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
199 float scale = relative_ ? 1.0 /
obj.pt() : 1;
203 std::max(0.0,
obj.neutralHadronIso() +
obj.photonIso() - (*rho) * ea * 16. / 9.)));
224 template <
typename T>
234 unsigned int nInput =
src->size();
240 for (
const auto&
obj : *
src) {
241 auto chg =
obj.chargedHadronIso();
242 auto neu =
obj.neutralHadronIso();
243 auto pho =
obj.photonIso();
244 auto ea_chg = ea_pfiso_chg_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
245 auto ea_neu = ea_pfiso_neu_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
246 auto ea_pho = ea_pfiso_pho_->getEffectiveArea(fabs(getEtaForEA(&
obj)));
247 float scale = relative_ ? 1.0 /
obj.pt() : 1;
267 template <
typename T>
271 desc.add<
bool>(
"relative")->setComment(
"compute relative isolation instead of absolute one");
275 ->setComment(
"txt file containing effective areas to be used for mini-isolation pileup subtraction");
277 ->setComment(
"rho to be used for effective-area based mini-isolation pileup subtraction");
282 "txt file containing effective areas to be used for PF-isolation pileup subtraction for electrons");
284 ->setComment(
"rho to be used for effective-area based PF-isolation pileup subtraction for electrons");
287 desc.add<
edm::InputTag>(
"mapIsoChg")->setComment(
"input charged PF isolation calculated in VID for photons");
288 desc.add<
edm::InputTag>(
"mapIsoNeu")->setComment(
"input neutral PF isolation calculated in VID for photons");
289 desc.add<
edm::InputTag>(
"mapIsoPho")->setComment(
"input photon PF isolation calculated in VID for photons");
292 "txt file containing effective areas to be used for charged PF-isolation pileup subtraction for photons");
295 "txt file containing effective areas to be used for neutral PF-isolation pileup subtraction for photons");
298 "txt file containing effective areas to be used for photon PF-isolation pileup subtraction for photons");
300 ->setComment(
"rho to be used for effective-area based PF-isolation pileup subtraction for photons");
311 modname +=
"IsoValueMapProducer";