Hi Slava,
The best part of this piece of software has been ported here from an analysis tool. And major changes have been done to correctly plug it in.
The pdgId can be replaced with the particle type, but it is a detail which I can fix at the next round, or by the end of this week.
Nancy
______________________________________

Nancy Marinelli

Research Associate Professor
University of Notre Dame, IN, US

CERN, Bdg 40/3-A01, 1211 Geneva,

SWITZERLAND

Phone +41-22-76-70809, fax +41-22-76-78940

From: slava77 <notifications@github.com<mailto:notifications@github.com>>
Reply-To: cms-sw/cmssw <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Mon, 28 Oct 2013 14:11:23 -0700
To: cms-sw/cmssw <cmssw@noreply.github.com<mailto:cmssw@noreply.github.com>>
Cc: Nancy Marinelli <nancy.marinelli@cern.ch<mailto:nancy.marinelli@cern.ch>>
Subject: Re: [cmssw] PF-Based Isolation for GED Electrons/Photons (#1174)


In RecoEgamma/PhotonIdentification/src/PFPhotonIsolationCalculator.cc:

> +
> +  iMissHits_ = 0;
> +
> +  refSC = photon->superCluster();
> +  pivotInBarrel = fabs((refSC->position().eta()))<1.479;
> +
> +  for(unsigned iPF=0; iPF<pfParticlesColl->size(); iPF++) {
> +
> +    const reco::PFCandidate& pfParticle= (*pfParticlesColl)[iPF];> +
> +    if (pfParticle.superClusterRef().isNonnull() &&
> +        photon->superCluster().isNonnull() &&
> +        pfParticle.superClusterRef() == photon->superCluster())
> +      continue;
> +
> +    if(pfParticle.pdgId()==22){


@lgray<https://github.com/lgray> @nancymarinelli<https://github.com/nancymarinelli> @beaudett<https://github.com/beaudett> @dbenedet<https://github.com/dbenedet>

Why not use the native PFCandidate::ParticleType ?
Same question to all of this file.

—
Reply to this email directly or view it on GitHub<https://github.com/cms-sw/cmssw/pull/1174/files#r7263630>.