CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
heppy::IsolationComputer Class Reference

#include <IsolationComputer.h>

Public Types

enum  SelfVetoPolicy { selfVetoNone =0, selfVetoAll =1, selfVetoFirst =2 }
 Self-veto policy. More...
 

Public Member Functions

void addVetos (const reco::Candidate &cand)
 veto footprint from this candidate, for the isolation of all candidates and also for calculation of neutral weights (if used) More...
 
float chargedAbsIso (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from charged from the PV. More...
 
void clearVetos ()
 clear all vetos More...
 
 IsolationComputer (float weightCone=-1)
 Create the calculator; optionally specify a cone for computing deltaBeta weights. More...
 
float neutralAbsIsoRaw (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from all neutrals (uncorrected) More...
 
float neutralAbsIsoWeighted (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from all neutrals (with weights) More...
 
float neutralHadAbsIsoRaw (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from neutral hadrons (uncorrected) More...
 
float neutralHadAbsIsoWeighted (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from neutral hadrons (with weights) More...
 
float photonAbsIsoRaw (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from photons (uncorrected) More...
 
float photonAbsIsoWeighted (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from photons (with weights) More...
 
float puAbsIso (const reco::Candidate &cand, float dR, float innerR=0, float threshold=0, SelfVetoPolicy selfVeto=selfVetoAll) const
 Isolation from charged from PU. More...
 
void setPackedCandidates (const std::vector< pat::PackedCandidate > &all, int fromPV_thresh=1, float dz_thresh=9999., float dxy_thresh=9999., bool also_leptons=false)
 Initialize with the list of packed candidates (note: clears also all vetos) More...
 

Protected Member Functions

float isoSumNeutralsWeighted (const reco::Candidate &cand, float dR, float innerR, float threshold, SelfVetoPolicy selfVeto, int pdgId=-1) const
 
float isoSumRaw (const std::vector< const pat::PackedCandidate * > &cands, const reco::Candidate &cand, float dR, float innerR, float threshold, SelfVetoPolicy selfVeto, int pdgId=-1) const
 

Protected Attributes

const std::vector
< pat::PackedCandidate > * 
allcands_
 
std::vector< const
pat::PackedCandidate * > 
charged_
 
std::vector< const
pat::PackedCandidate * > 
neutral_
 
std::vector< const
pat::PackedCandidate * > 
pileup_
 
std::vector< const
reco::Candidate * > 
vetos_
 
float weightCone_
 
std::vector< float > weights_
 

Detailed Description

Definition at line 8 of file IsolationComputer.h.

Member Enumeration Documentation

Self-veto policy.

Enumerator
selfVetoNone 
selfVetoAll 
selfVetoFirst 

Definition at line 14 of file IsolationComputer.h.

Constructor & Destructor Documentation

heppy::IsolationComputer::IsolationComputer ( float  weightCone = -1)
inline

Create the calculator; optionally specify a cone for computing deltaBeta weights.

Definition at line 11 of file IsolationComputer.h.

11 : weightCone_(weightCone) {}

Member Function Documentation

void heppy::IsolationComputer::addVetos ( const reco::Candidate cand)

veto footprint from this candidate, for the isolation of all candidates and also for calculation of neutral weights (if used)

veto footprint from this candidate

Definition at line 49 of file IsolationComputer.cc.

float heppy::IsolationComputer::chargedAbsIso ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from charged from the PV.

Definition at line 62 of file IsolationComputer.cc.

void heppy::IsolationComputer::clearVetos ( )

clear all vetos

Definition at line 57 of file IsolationComputer.cc.

float heppy::IsolationComputer::isoSumNeutralsWeighted ( const reco::Candidate cand,
float  dR,
float  innerR,
float  threshold,
SelfVetoPolicy  selfVeto,
int  pdgId = -1 
) const
protected

Definition at line 132 of file IsolationComputer.cc.

float heppy::IsolationComputer::isoSumRaw ( const std::vector< const pat::PackedCandidate * > &  cands,
const reco::Candidate cand,
float  dR,
float  innerR,
float  threshold,
SelfVetoPolicy  selfVeto,
int  pdgId = -1 
) const
protected

Definition at line 95 of file IsolationComputer.cc.

float heppy::IsolationComputer::neutralAbsIsoRaw ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from all neutrals (uncorrected)

Definition at line 71 of file IsolationComputer.cc.

float heppy::IsolationComputer::neutralAbsIsoWeighted ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from all neutrals (with weights)

Definition at line 75 of file IsolationComputer.cc.

float heppy::IsolationComputer::neutralHadAbsIsoRaw ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from neutral hadrons (uncorrected)

Definition at line 79 of file IsolationComputer.cc.

float heppy::IsolationComputer::neutralHadAbsIsoWeighted ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from neutral hadrons (with weights)

Definition at line 83 of file IsolationComputer.cc.

float heppy::IsolationComputer::photonAbsIsoRaw ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from photons (uncorrected)

Definition at line 87 of file IsolationComputer.cc.

float heppy::IsolationComputer::photonAbsIsoWeighted ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from photons (with weights)

Definition at line 91 of file IsolationComputer.cc.

float heppy::IsolationComputer::puAbsIso ( const reco::Candidate cand,
float  dR,
float  innerR = 0,
float  threshold = 0,
SelfVetoPolicy  selfVeto = selfVetoAll 
) const

Isolation from charged from PU.

Definition at line 67 of file IsolationComputer.cc.

void heppy::IsolationComputer::setPackedCandidates ( const std::vector< pat::PackedCandidate > &  all,
int  fromPV_thresh = 1,
float  dz_thresh = 9999.,
float  dxy_thresh = 9999.,
bool  also_leptons = false 
)

Initialize with the list of packed candidates (note: clears also all vetos)

Definition at line 18 of file IsolationComputer.cc.

Member Data Documentation

const std::vector<pat::PackedCandidate>* heppy::IsolationComputer::allcands_
protected

Definition at line 51 of file IsolationComputer.h.

std::vector<const pat::PackedCandidate *> heppy::IsolationComputer::charged_
protected

Definition at line 54 of file IsolationComputer.h.

std::vector<const pat::PackedCandidate *> heppy::IsolationComputer::neutral_
protected

Definition at line 54 of file IsolationComputer.h.

std::vector<const pat::PackedCandidate *> heppy::IsolationComputer::pileup_
protected

Definition at line 54 of file IsolationComputer.h.

std::vector<const reco::Candidate *> heppy::IsolationComputer::vetos_
protected

Definition at line 56 of file IsolationComputer.h.

float heppy::IsolationComputer::weightCone_
protected

Definition at line 52 of file IsolationComputer.h.

std::vector<float> heppy::IsolationComputer::weights_
mutableprotected

Definition at line 55 of file IsolationComputer.h.