6 pfCharged_(iConfig.getParameter<
edm::
InputTag>(
"chargedFromPV")),
7 pfPU_(iConfig.getParameter<
edm::
InputTag>(
"chargedFromPU")) {
8 produces<reco::PFCandidateCollection>();
46 if (
cand.charge() != 0) {
49 <<
"Trying to reweight charged particle... saving it to output collection without any change";
51 (
out->back()).setParticleType((
out->back()).translatePdgIdToType(
cand.pdgId()));
60 double sum = (chCand.pt() * chCand.pt()) / (
deltaR2(
eta,
phi, chCand.eta(), chCand.phi()));
64 sumNPU = 0.5 *
log(sumNPU);
67 double sum = (puCand.pt() * puCand.pt()) / (
deltaR2(
eta,
phi, puCand.eta(), puCand.phi()));
71 sumPU = 0.5 *
log(sumPU);
75 if (sumNPU + sumPU > 0)
76 neutral.
setP4(((sumNPU) / (sumNPU + sumPU)) * neutral.
p4());
77 out->push_back(neutral);