16 float kt_scale,
float ptthresh,
float deadcone_ch,
17 float deadcone_pu,
float deadcone_ph,
float deadcone_nh,
21 float chiso=0, nhiso=0, phiso=0, puiso=0;
23 for(
auto const & pc : *pfcands){
27 float pt = pc.p4().pt();
30 bool fromPV = (pc.fromPV()>1 || fabs(pc.dz()) < dZ_cut);
31 if(fromPV && dr > deadcone_ch){
34 }
else if(!fromPV && pt > ptthresh && dr > deadcone_pu){
40 if(
std::abs(
id)==130 && pt>ptthresh && dr>deadcone_nh)
43 if(
std::abs(
id)==22 && pt>ptthresh && dr>deadcone_ph)
std::vector< pat::PackedCandidate > PackedCandidateCollection
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Abs< T >::type abs(const T &t)
double deltaR(double eta1, double eta2, double phi1, double phi2)
PFIsolation getMiniPFIsolation(const pat::PackedCandidateCollection *pfcands, const math::XYZTLorentzVector &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)