30 float chiso = 0, nhiso = 0, phiso = 0, puiso = 0;
32 for (
auto const &pc : *
pfcands) {
34 if (dr2 > drcut * drcut)
36 float pt = pc.p4().pt();
39 bool fromPV = (pc.fromPV() > 1 || fabs(pc.dz()) < dZ_cut);
40 if (
fromPV && dr2 > deadcone_ch * deadcone_ch) {
43 }
else if (!
fromPV &&
pt > ptthresh && dr2 > deadcone_pu * deadcone_pu) {
49 if (
std::abs(
id) == 130 &&
pt > ptthresh && dr2 > deadcone_nh * deadcone_nh)
52 if (
std::abs(
id) == 22 &&
pt > ptthresh && dr2 > deadcone_ph * deadcone_ph)
63 const std::vector<double> &
area) {
69 else if (absEta < 1.300)
71 else if (absEta < 2.000)
73 else if (absEta < 2.200)
75 else if (absEta < 2.500)
78 double correction = rho * ea * (dr / 0.3) * (dr / 0.3);
80 return correctedIso / p4.pt();
float neutralHadronIso() const
std::vector< pat::PackedCandidate > PackedCandidateCollection
double muonRelMiniIsoPUCorrected(const PFIsolation &iso, const reco::Candidate::PolarLorentzVector &p4, double dr, double rho, const std::vector< double > &area)
float chargedHadronIso() const
Abs< T >::type abs(const T &t)
float miniIsoDr(const reco::Candidate::PolarLorentzVector &p4, float mindr, float maxdr, float kt_scale)
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const reco::Candidate::PolarLorentzVector &p4, float mindr=0.05, float maxdr=0.2, float kt_scale=10.0, float ptthresh=0.5, float deadcone_ch=0.0001, float deadcone_pu=0.01, float deadcone_ph=0.01, float deadcone_nh=0.01, float dZ_cut=0.0)
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.