CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends
reco::PFCandidate Class Reference

Particle reconstructed by the particle flow algorithm. More...

#include <PFCandidate.h>

Inheritance diagram for reco::PFCandidate:
reco::CompositeCandidate reco::LeafCandidate reco::Candidate pat::PATObject< reco::PFCandidate > reco::IsolatedPFCandidate reco::PileUpPFCandidate pat::PFParticle

Public Types

typedef edm::RefVector< reco::PFBlockCollectionBlocks
 
typedef std::pair< reco::PFBlockRef, unsigned > ElementInBlock
 return indices of elements used in the block More...
 
typedef std::vector< unsigned > Elements
 
typedef std::vector< ElementInBlockElementsInBlocks
 
enum  Flags {
  NORMAL =0, E_PHI_SMODULES, E_ETA_0, E_ETA_MODULES,
  E_BARREL_ENDCAP, E_PRESHOWER_EDGE, E_PRESHOWER, E_ENDCAP_EDGE,
  H_ETA_0, H_BARREL_ENDCAP, H_ENDCAP_VFCAL, H_VFCAL_EDGE,
  T_TO_DISP, T_FROM_DISP, T_FROM_V0, T_FROM_GAMMACONV,
  GAMMA_TO_GAMMACONV
}
 
enum  ParticleType {
  X =0, h, e, mu,
  gamma, h0, h_HF, egamma_HF
}
 particle types More...
 
enum  PFVertexType {
  kCandVertex =0, kTrkVertex =1, kComMuonVertex =2, kSAMuonVertex =3,
  kTrkMuonVertex =4, kGSFVertex =5, kTPFMSMuonVertex =6, kPickyMuonVertex =7,
  kDYTMuonVertex =8
}
 
- Public Types inherited from reco::CompositeCandidate
typedef CandidateCollection daughters
 collection of daughters More...
 
typedef std::vector< std::string > role_collection
 
- Public Types inherited from reco::LeafCandidate
typedef int Charge
 electric charge type More...
 
typedef CandidateCollection daughters
 collection of daughter candidates More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef math::PtEtaPhiMLorentzVector PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 
- Public Types inherited from reco::Candidate
enum  { dimension = 3 }
 
enum  { size = dimension * (dimension + 1)/2 }
 matix size More...
 
typedef int Charge
 electric charge type More...
 
typedef candidate::const_iterator const_iterator
 
typedef math::Error< dimension >::type CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef candidate::iterator iterator
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef math::PtEtaPhiMLorentzVector PolarLorentzVector
 Lorentz vector. More...
 
typedef size_t size_type
 
typedef math::XYZVector Vector
 point in the space More...
 

Public Member Functions

void addElementInBlock (const reco::PFBlockRef &blockref, unsigned elementIndex)
 add an element to the current PFCandidate More...
 
const reco::Muon::MuonTrackType bestMuonTrackType () const
 get the Best Muon Track Ref More...
 
const reco::TrackbestTrack () const override
 
PFCandidateclone () const override
 return a clone More...
 
reco::ConversionRef conversionRef () const
 return a reference to the original conversion More...
 
double deltaP () const
 uncertainty on 3-momentum More...
 
reco::PFDisplacedVertexRef displacedVertexRef (Flags type) const
 
float dxyError () const override
 uncertainty on dxy More...
 
float dzError () const override
 uncertainty on dz More...
 
double ecalEnergy () const
 return corrected Ecal energy More...
 
reco::PFCandidateEGammaExtraRef egammaExtraRef () const
 return a reference to the EGamma extra More...
 
reco::PFCandidateElectronExtraRef electronExtraRef () const
 return a reference to the electron extra More...
 
const ElementsInBlockselementsInBlocks () const
 
bool flag (Flags theFlag) const
 return a given flag More...
 
reco::GsfElectronRef gsfElectronRef () const
 return a reference to the corresponding GsfElectron if any More...
 
reco::GsfTrackRef gsfTrackRef () const
 
float hcalDepthEnergyFraction (unsigned int depth) const
 fraction of hcal energy at a given depth (depth = 1 .. 7) More...
 
const std::array< float, 7 > & hcalDepthEnergyFractions () const
 fraction of hcal energy at a given depth (index 0..6 for depth 1..7) More...
 
double hcalEnergy () const
 return corrected Hcal energy More...
 
double hoEnergy () const
 return corrected Hcal energy More...
 
bool isTimeValid () const
 do we have a valid time information More...
 
reco::MuonRef muonRef () const
 
float mva_e_mu () const
 mva for electron-muon discrimination More...
 
float mva_e_pi () const
 mva for electron-pion discrimination More...
 
float mva_gamma_nh () const
 mva for neutral hadron - gamma discrimination More...
 
float mva_Isolated () const
 
float mva_nothing_gamma () const
 mva for gamma detection More...
 
float mva_nothing_nh () const
 mva for neutral hadron detection More...
 
float mva_pi_mu () const
 mva for pi-muon discrimination More...
 
size_t numberOfSourceCandidatePtrs () const override
 
PFCandidateoperator= (PFCandidate const &)
 
virtual ParticleType particleId () const
 
 PFCandidate ()
 default constructor More...
 
 PFCandidate (const PFCandidatePtr &sourcePtr)
 constructor from a reference (keeps track of source relationship) More...
 
 PFCandidate (Charge q, const LorentzVector &p4, ParticleType particleId)
 
 PFCandidate (const PFCandidate &)
 copy constructor More...
 
reco::PFCandidatePhotonExtraRef photonExtraRef () const
 return a reference to the photon extra More...
 
reco::PhotonRef photonRef () const
 return a reference to the corresponding Photon if any More...
 
const math::XYZPointFpositionAtECALEntrance () const
 
double pS1Energy () const
 return corrected PS1 energy More...
 
double pS2Energy () const
 return corrected PS2 energy More...
 
double rawEcalEnergy () const
 return corrected Ecal energy More...
 
double rawHcalEnergy () const
 return raw Hcal energy More...
 
double rawHoEnergy () const
 return raw Hcal energy More...
 
void rescaleMomentum (double rescaleFactor)
 particle momentum *= rescaleFactor More...
 
void set_mva_e_mu (float mva)
 set mva for electron-muon discrimination More...
 
void set_mva_e_pi (float mvaNI)
 
void set_mva_gamma_nh (float mva)
 set mva for neutral hadron - gamma discrimination More...
 
void set_mva_Isolated (float mvaI)
 
void set_mva_nothing_gamma (float mva)
 set mva for gamma detection More...
 
void set_mva_nothing_nh (float mva)
 set mva for neutral hadron detection More...
 
void set_mva_pi_mu (float mva)
 set mva for pi-muon discrimination More...
 
void setConversionRef (const reco::ConversionRef &ref)
 set ref to original reco conversion More...
 
void setDeltaP (double dp)
 set uncertainty on momentum More...
 
void setDisplacedVertexRef (const reco::PFDisplacedVertexRef &ref, Flags flag)
 set displaced vertex reference More...
 
void setEcalEnergy (float eeRaw, float eeCorr)
 set corrected Ecal energy More...
 
void setFlag (Flags theFlag, bool value)
 set a given flag More...
 
void setGsfElectronRef (const reco::GsfElectronRef &ref)
 set GsfElectronRef More...
 
void setGsfTrackRef (const reco::GsfTrackRef &ref)
 set gsftrack reference More...
 
void setHcalDepthEnergyFractions (const std::array< float, 7 > &fracs)
 set the fraction of hcal energy as function of depth (index 0..6 for depth 1..7) More...
 
void setHcalEnergy (float ehRaw, float ehCorr)
 set corrected Hcal energy More...
 
void setHoEnergy (float eoRaw, float eoCorr)
 set corrected Hcal energy More...
 
void setMuonRef (const reco::MuonRef &ref)
 set muon reference More...
 
void setMuonTrackType (const reco::Muon::MuonTrackType &type)
 set the Best Muon Track Ref More...
 
void setParticleType (ParticleType type)
 set Particle Type More...
 
void setPFEGammaExtraRef (const reco::PFCandidateEGammaExtraRef &ref)
 set the PF EGamma Extra Ref More...
 
void setPFElectronExtraRef (const reco::PFCandidateElectronExtraRef &ref)
 set the PF Electron Extra Ref More...
 
void setPFPhotonExtraRef (const reco::PFCandidatePhotonExtraRef &ref)
 set the PF Photon Extra Ref More...
 
void setPhotonRef (const reco::PhotonRef &phRef)
 set ref to the corresponding reco::Photon if any More...
 
void setPositionAtECALEntrance (const math::XYZPointF &pos)
 set position at ECAL entrance More...
 
void setPs1Energy (float e1)
 set corrected PS1 energy More...
 
void setPs2Energy (float e2)
 set corrected PS2 energy More...
 
void setSourceCandidatePtr (const PFCandidatePtr &ptr)
 
void setSuperClusterRef (const reco::SuperClusterRef &scRef)
 
void setTime (float time, float timeError=0.f)
 the timing information More...
 
void setTrackRef (const reco::TrackRef &ref)
 set track reference More...
 
void setV0Ref (const reco::VertexCompositeCandidateRef &ref)
 set ref to original reco conversion More...
 
void setVertex (const math::XYZPoint &p) override
 set vertex More...
 
void setVertexSource (PFVertexType vt)
 
CandidatePtr sourceCandidatePtr (size_type i) const override
 
reco::SuperClusterRef superClusterRef () const
 return a reference to the corresponding SuperCluster if any More...
 
float time () const
 
float timeError () const
 
reco::TrackRef trackRef () const
 
ParticleType translatePdgIdToType (int pdgid) const
 
int translateTypeToPdgId (ParticleType type) const
 
reco::VertexCompositeCandidateRef v0Ref () const
 return a reference to the original conversion More...
 
const Pointvertex () const override
 vertex position (overwritten by PF...) More...
 
double vx () const override
 x coordinate of vertex position More...
 
double vy () const override
 y coordinate of vertex position More...
 
double vz () const override
 z coordinate of vertex position More...
 
 ~PFCandidate () override
 destructor More...
 
- Public Member Functions inherited from reco::CompositeCandidate
void addDaughter (const Candidate &, const std::string &s="")
 add a clone of the passed candidate as daughter More...
 
void addDaughter (std::unique_ptr< Candidate >, const std::string &s="")
 add a clone of the passed candidate as daughter More...
 
void applyRoles ()
 
void clearDaughters ()
 clear daughters More...
 
void clearRoles ()
 
 CompositeCandidate (std::string name="")
 default constructor More...
 
template<typename P4 >
 CompositeCandidate (Charge q, const P4 &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true, std::string name="")
 constructor from values More...
 
 CompositeCandidate (const Candidate &p, const std::string &name="")
 constructor from values More...
 
 CompositeCandidate (const Candidate &p, const std::string &name, role_collection const &roles)
 constructor from values More...
 
const Candidatedaughter (size_type) const override
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) More...
 
Candidatedaughter (size_type) override
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 More...
 
Candidatedaughter (const std::string &s) override
 return daughter with a specified role name More...
 
const Candidatedaughter (const std::string &s) const override
 return daughter with a specified role name More...
 
const Candidatemother (size_type i=0) const override
 return pointer to mother More...
 
std::string name () const
 get the name of the candidate More...
 
size_type numberOfDaughters () const override
 number of daughters More...
 
size_type numberOfMothers () const override
 number of mothers (zero or one in most of but not all the cases) More...
 
role_collection const & roles () const
 get the roles More...
 
void setName (std::string name)
 set the name of the candidate More...
 
void setRoles (const role_collection &roles)
 set the roles More...
 
 ~CompositeCandidate () override
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
Vector boostToCM () const final
 
int charge () const final
 electric charge More...
 
void construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status)
 
const Candidatedaughter (size_type) const override
 return daughter at a given position (throws an exception) More...
 
Candidatedaughter (size_type) override
 return daughter at a given position (throws an exception) More...
 
Candidatedaughter (const std::string &s) override
 return daughter with a specified role name More...
 
const Candidatedaughter (const std::string &s) const override
 return daughter with a specified role name More...
 
double energy () const final
 energy More...
 
double et () const final
 transverse energy More...
 
double et2 () const final
 transverse energy squared (use this for cut!) More...
 
double eta () const final
 momentum pseudorapidity More...
 
void fillVertexCovariance (CovarianceMatrix &v) const override
 fill SMatrix More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
bool hasMasterClone () const override
 
bool hasMasterClonePtr () const override
 
bool isCaloMuon () const override
 
bool isConvertedPhoton () const override
 
bool isElectron () const override
 
bool isGlobalMuon () const override
 
bool isJet () const override
 
bool isMuon () const override
 
bool isPhoton () const override
 
bool isStandAloneMuon () const override
 
bool isTrackerMuon () const override
 
 LeafCandidate ()
 
 LeafCandidate (const Candidate &c)
 
template<typename... Args>
 LeafCandidate (Args &&...args)
 
 LeafCandidate (LeafCandidate &rh)
 
 LeafCandidate (LeafCandidate &&)=default
 
 LeafCandidate (LeafCandidate const &)=default
 
bool longLived () const final
 is long lived? More...
 
double mass () const final
 mass More...
 
bool massConstraint () const final
 do mass constraint? More...
 
double massSqr () const final
 mass squared More...
 
const CandidateBaseRefmasterClone () const override
 
const CandidatePtrmasterClonePtr () const override
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
Vector momentum () const final
 spatial momentum vector More...
 
const Candidatemother (size_type) const override
 return mother at a given position (throws an exception) More...
 
double mt () const final
 transverse mass More...
 
double mtSqr () const final
 transverse mass squared More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
size_t numberOfDaughters () const override
 number of daughters More...
 
size_t numberOfMothers () const override
 number of mothers More...
 
LeafCandidateoperator= (LeafCandidate &&)=default
 
LeafCandidateoperator= (LeafCandidate const &)=default
 
double p () const final
 magnitude of momentum vector More...
 
const LorentzVectorp4 () const final
 four-momentum Lorentz vector More...
 
int pdgId () const final
 PDG identifier. More...
 
double phi () const final
 momentum azimuthal angle More...
 
const PolarLorentzVectorpolarP4 () const final
 four-momentum Lorentz vector More...
 
double pt () const final
 transverse momentum More...
 
double px () const final
 x coordinate of momentum vector More...
 
double py () const final
 y coordinate of momentum vector More...
 
double pz () const final
 z coordinate of momentum vector More...
 
double rapidity () const final
 rapidity More...
 
void setCharge (Charge q) final
 set electric charge More...
 
void setLongLived () final
 
void setMass (double m) final
 set particle mass More...
 
void setMassConstraint () final
 
void setP4 (const LorentzVector &p4) final
 set 4-momentum More...
 
void setP4 (const PolarLorentzVector &p4) final
 set 4-momentum More...
 
void setPdgId (int pdgId) final
 
void setPz (double pz) final
 
void setStatus (int status) final
 set status word More...
 
void setThreeCharge (Charge qx3) final
 set electric charge More...
 
int status () const final
 status word More...
 
double theta () const final
 momentum polar angle More...
 
int threeCharge () const final
 electric charge More...
 
double vertexChi2 () const override
 chi-squares More...
 
double vertexCovariance (int i, int j) const override
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix vertexCovariance () const final
 return SMatrix More...
 
double vertexNdof () const override
 
double vertexNormalizedChi2 () const override
 chi-squared divided by n.d.o.f. More...
 
double y () const final
 rapidity More...
 
 ~LeafCandidate () override
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
const_iterator begin () const
 first daughter const_iterator More...
 
iterator begin ()
 first daughter iterator More...
 
 Candidate ()
 default constructor More...
 
const_iterator end () const
 last daughter const_iterator More...
 
iterator end ()
 last daughter iterator More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual void setSourceCandidatePtr (const CandidatePtr &ptr)
 Set the ptr to the source Candidate. More...
 
virtual ~Candidate ()
 destructor More...
 

Static Public Attributes

static const float bigMva_ = -999.
 

Private Member Functions

bool flag (unsigned shift, unsigned flag) const
 
bool getRefInfo (unsigned int iMask, unsigned int iBit, edm::ProductID &oProdID, size_t &oIndex, size_t &aIndex) const
 
bool overlap (const Candidate &) const override
 Polymorphic overlap. More...
 
void setFlag (unsigned shift, unsigned flag, bool value)
 
void storeRefInfo (unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
 

Private Attributes

Blocks blocksStorage_
 
float deltaP_
 uncertainty on 3-momentum More...
 
float ecalERatio_
 corrected ECAL energy ratio (corrected/raw) More...
 
std::atomic< ElementsInBlocks * > elementsInBlocks_
 
Elements elementsStorage_
 
unsigned flags_
 all flags, packed (ecal regional, hcal regional, tracking) More...
 
const edm::EDProductGettergetter_
 
std::array< float, 7 > hcalDepthEnergyFractions_
 
float hcalERatio_
 corrected HCAL energy ratio (corrected/raw) More...
 
float hoERatio_
 corrected HO energy ratio (corrected/raw) More...
 
reco::Muon::MuonTrackType muonTrackType_
 
float mva_e_mu_
 mva for electron-muon discrimination More...
 
float mva_e_pi_
 mva for electron-pion discrimination More...
 
float mva_gamma_nh_
 mva for neutral hadron - gamma discrimination More...
 
float mva_Isolated_
 
float mva_nothing_gamma_
 mva for gamma detection More...
 
float mva_nothing_nh_
 mva for neutral hadron detection More...
 
float mva_pi_mu_
 mva for pi-muon discrimination More...
 
math::XYZPointF positionAtECALEntrance_
 position at ECAL entrance, from the PFRecTrack More...
 
float ps1Energy_
 corrected PS1 energy More...
 
float ps2Energy_
 corrected PS2 energy More...
 
float rawEcalEnergy_
 raw ECAL energy More...
 
float rawHcalEnergy_
 raw HCAL energy More...
 
float rawHoEnergy_
 raw HO energy More...
 
std::vector< const void * > refsCollectionCache_
 
std::vector< unsigned long long > refsInfo_
 
PFCandidatePtr sourcePtr_
 reference to the source PFCandidate, if any More...
 
unsigned short storedRefsBitPattern_
 
float time_
 timing information (valid if timeError_ >= 0) More...
 
float timeError_
 timing information uncertainty (<0 if timing not available) More...
 
PFVertexType vertexType_
 

Friends

std::ostream & operator<< (std::ostream &out, const PFCandidate &c)
 

Additional Inherited Members

Detailed Description

Particle reconstructed by the particle flow algorithm.

particle candidate from particle flow

Author
Colin Bernet
Date
February 2007

Definition at line 40 of file PFCandidate.h.

Member Typedef Documentation

Definition at line 389 of file PFCandidate.h.

return indices of elements used in the block

return elements return elements in blocks

Definition at line 386 of file PFCandidate.h.

typedef std::vector<unsigned> reco::PFCandidate::Elements

Definition at line 390 of file PFCandidate.h.

Definition at line 387 of file PFCandidate.h.

Member Enumeration Documentation

Enumerator
NORMAL 
E_PHI_SMODULES 
E_ETA_0 
E_ETA_MODULES 
E_BARREL_ENDCAP 
E_PRESHOWER_EDGE 
E_PRESHOWER 
E_ENDCAP_EDGE 
H_ETA_0 
H_BARREL_ENDCAP 
H_ENDCAP_VFCAL 
H_VFCAL_EDGE 
T_TO_DISP 
T_FROM_DISP 
T_FROM_V0 
T_FROM_GAMMACONV 
GAMMA_TO_GAMMACONV 

Definition at line 56 of file PFCandidate.h.

particle types

Enumerator
mu 
gamma 
h0 
h_HF 
egamma_HF 

Definition at line 45 of file PFCandidate.h.

45  {
46  X=0, // undefined
47  h, // charged hadron
48  e, // electron
49  mu, // muon
50  gamma, // photon
51  h0, // neutral hadron
52  h_HF, // HF tower identified as a hadron
53  egamma_HF // HF tower identified as an EM particle
54  };
Enumerator
kCandVertex 
kTrkVertex 
kComMuonVertex 
kSAMuonVertex 
kTrkMuonVertex 
kGSFVertex 
kTPFMSMuonVertex 
kPickyMuonVertex 
kDYTMuonVertex 

Definition at line 77 of file PFCandidate.h.

Constructor & Destructor Documentation

PFCandidate::PFCandidate ( )

default constructor

Definition at line 31 of file PFCandidate.cc.

References lumiContext::fill, hcalDepthEnergyFractions_, muonTrackType_, reco::Muon::None, refsInfo_, reco::LeafCandidate::setPdgId(), translateTypeToPdgId(), and X.

Referenced by clone(), and PFCandidate().

31  :
32  elementsInBlocks_(nullptr),
33  ecalERatio_(1.),
34  hcalERatio_(1.),
35  hoERatio_(1.),
36  rawEcalEnergy_(0.),
37  rawHcalEnergy_(0.),
38  rawHoEnergy_(0.),
39  ps1Energy_(0.),
40  ps2Energy_(0.),
41  flags_(0),
42  deltaP_(0.),
51  getter_(nullptr),storedRefsBitPattern_(0),
52  time_(0.f),timeError_(-1.f)
53 {
54 
56 
58  refsInfo_.reserve(3);
60 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:487
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:457
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:524
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:532
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:463
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:472
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:484
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:498
static const float bigMva_
Definition: PFCandidate.h:394
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:534
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:507
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:466
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:510
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:460
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:501
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:469
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:495
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:526
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:478
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:525
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:247
double f[11][100]
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:475
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:443
PFVertexType vertexType_
Definition: PFCandidate.h:489
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:530
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:504
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:481
void setPdgId(int pdgId) final
PFCandidate::PFCandidate ( const PFCandidatePtr sourcePtr)

constructor from a reference (keeps track of source relationship)

Definition at line 63 of file PFCandidate.cc.

References hcalDepthEnergyFractions_, and sourcePtr_.

63  :
64  PFCandidate(*sourcePtr)
65 {
66  sourcePtr_ = sourcePtr;
67  hcalDepthEnergyFractions_ = sourcePtr->hcalDepthEnergyFractions_; // GP not sure it's needed
68 }
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:534
PFCandidate()
default constructor
Definition: PFCandidate.cc:31
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:452
PFCandidate::PFCandidate ( Charge  q,
const LorentzVector p4,
ParticleType  particleId 
)

Definition at line 71 of file PFCandidate.cc.

References blocksStorage_, reco::CompositeCandidate::CompositeCandidate(), deltaP_, e, ecalERatio_, elementsInBlocks_, elementsStorage_, Exception, lumiContext::fill, flags_, getter_, hcalDepthEnergyFractions_, hcalERatio_, hoERatio_, mu, muonTrackType_, mva_e_mu_, mva_e_pi_, mva_gamma_nh_, mva_Isolated_, mva_nothing_gamma_, mva_nothing_nh_, mva_pi_mu_, reco::Muon::None, PFCandidate(), positionAtECALEntrance_, ps1Energy_, ps2Energy_, rawEcalEnergy_, rawHcalEnergy_, rawHoEnergy_, refsCollectionCache_, refsInfo_, edm::RefVector< C, T, F >::reserve(), reco::LeafCandidate::setPdgId(), sourcePtr_, storedRefsBitPattern_, time_, timeError_, tmp, translateTypeToPdgId(), and vertexType_.

73  :
74 
76  elementsInBlocks_(nullptr),
77  ecalERatio_(1.),
78  hcalERatio_(1.),
79  hoERatio_(1.),
80  rawEcalEnergy_(0.),
81  rawHcalEnergy_(0.),
82  rawHoEnergy_(0.),
83  ps1Energy_(0.),
84  ps2Energy_(0.),
85  flags_(0),
86  deltaP_(0.),
95  getter_(nullptr),storedRefsBitPattern_(0),
96  time_(0.f),timeError_(-1.f)
97 {
98  refsInfo_.reserve(3);
100  elementsStorage_.reserve(10);
102 
104 
105  // proceed with various consistency checks
106 
107  // charged candidate: track ref and charge must be non null
108  if( partId == h ||
109  partId == e ||
110  partId == mu ) {
111 
112  if( charge == 0 ) {
113  string err;
114  err+="Attempt to construct a charged PFCandidate with a zero charge";
115  throw cms::Exception("InconsistentValue",
116  err.c_str() );
117  }
118  }
119  else {
120  if( charge ) {
121  string err;
122  err += "Attempt to construct a neutral PFCandidate ";
123  err += "with a non-zero charge";
124  throw cms::Exception("InconsistentValue",
125  err.c_str() );
126  }
127  }
128  setPdgId( translateTypeToPdgId( partId ) );
129 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:487
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:457
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:524
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:532
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:463
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:472
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:484
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:498
static const float bigMva_
Definition: PFCandidate.h:394
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:534
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:507
int charge() const final
electric charge
Definition: LeafCandidate.h:91
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:466
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:510
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:460
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:501
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:469
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:495
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:526
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:478
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:525
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:247
CompositeCandidate(std::string name="")
default constructor
double f[11][100]
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:475
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:113
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:443
PFVertexType vertexType_
Definition: PFCandidate.h:489
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:530
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:504
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:481
void setPdgId(int pdgId) final
Elements elementsStorage_
Definition: PFCandidate.h:448
reco::PFCandidate::PFCandidate ( const PFCandidate )

copy constructor

PFCandidate::~PFCandidate ( )
override

destructor

Definition at line 211 of file PFCandidate.cc.

References elementsInBlocks_.

211  {
212  delete elementsInBlocks_.load(std::memory_order_acquire);
213 }
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:443

Member Function Documentation

void PFCandidate::addElementInBlock ( const reco::PFBlockRef blockref,
unsigned  elementIndex 
)

add an element to the current PFCandidate

add element in block

Definition at line 220 of file PFCandidate.cc.

References blocksStorage_, elementsInBlocks_, elementsStorage_, edm::RefVector< C, T, F >::empty(), edm::Ref< C, T, F >::id(), and edm::RefVector< C, T, F >::push_back().

Referenced by PFEGammaAlgo::fillPFCandidates(), PFPhotonAlgo::RunPFPhoton(), PFElectronAlgo::SetCandidates(), and sourceCandidatePtr().

221  {
222  //elementsInBlocks_.push_back( make_pair(blockref.key(), elementIndex) );
223  if (blocksStorage_.empty())
224  blocksStorage_ =Blocks(blockref.id());
225  blocksStorage_.push_back(blockref);
226  elementsStorage_.push_back(elementIndex);
227  auto ptr = elementsInBlocks_.exchange(nullptr);
228  delete ptr;
229 }
edm::RefVector< reco::PFBlockCollection > Blocks
Definition: PFCandidate.h:389
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:104
ProductID id() const
Accessor for product ID.
Definition: Ref.h:259
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:443
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:69
Elements elementsStorage_
Definition: PFCandidate.h:448
const reco::Muon::MuonTrackType reco::PFCandidate::bestMuonTrackType ( ) const
inline

get the Best Muon Track Ref

Definition at line 363 of file PFCandidate.h.

References muonTrackType_.

363  {
364  return muonTrackType_;
365  }
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:457
const reco::Track* reco::PFCandidate::bestTrack ( ) const
inlineoverridevirtual

return a pointer to the best track, if available. otherwise, return a null pointer

Reimplemented from reco::Candidate.

Definition at line 162 of file PFCandidate.h.

References funct::abs(), gsfTrackRef(), edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), reco::LeafCandidate::pdgId(), and trackRef().

Referenced by pat::MuonMvaEstimator::computeMva(), dxyError(), dzError(), and Muon.Muon::ptErr().

162  {
163  if ( (abs(pdgId()) == 11 || pdgId() == 22) && gsfTrackRef().isNonnull() && gsfTrackRef().isAvailable() )
164  return &(*gsfTrackRef());
165  else if ( trackRef().isNonnull() && trackRef().isAvailable() )
166  return &(*trackRef());
167  else
168  return nullptr;
169  }
bool isAvailable() const
Definition: Ref.h:577
int pdgId() const final
PDG identifier.
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:442
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:480
PFCandidate * PFCandidate::clone ( void  ) const
overridevirtual

return a clone

Reimplemented from reco::CompositeCandidate.

Reimplemented in pat::PFParticle, and reco::PileUpPFCandidate.

Definition at line 215 of file PFCandidate.cc.

References PFCandidate().

Referenced by DistortedPFCandProducer::produce().

215  {
216  return new PFCandidate( * this );
217 }
PFCandidate()
default constructor
Definition: PFCandidate.cc:31
reco::ConversionRef PFCandidate::conversionRef ( ) const

return a reference to the original conversion

Definition at line 563 of file PFCandidate.cc.

References GETREF, kRefConversionBit, and kRefConversionMask.

Referenced by dxyError().

563  {
565 }
#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4660
double reco::PFCandidate::deltaP ( ) const
inline

uncertainty on 3-momentum

Definition at line 298 of file PFCandidate.h.

References deltaP_.

Referenced by PFElectronTranslator::createGsfElectrons().

298 { return deltaP_;}
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:487
reco::PFDisplacedVertexRef PFCandidate::displacedVertexRef ( Flags  type) const

return a reference to the corresponding displaced vertex, otherwise, return a null reference

Definition at line 528 of file PFCandidate.cc.

References GETREF, kRefDisplacedVertexDauBit, kRefDisplacedVertexDauMask, kRefDisplacedVertexMotBit, kRefDisplacedVertexMotMask, T_FROM_DISP, and T_TO_DISP.

Referenced by PFCandConnector::analyseNuclearWPrim(), dxyError(), PFCandConnector::isPrimaryNucl(), and PFCandConnector::isSecondaryNucl().

528  {
529  if (type == T_TO_DISP) {
531  }
532  else if (type == T_FROM_DISP) {
534  }
536 }
type
Definition: HCALResponse.h:21
Block of elements.
edm::Ref< PFDisplacedVertexCollection > PFDisplacedVertexRef
persistent reference to a PFDisplacedVertex objects
#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4660
float reco::PFCandidate::dxyError ( ) const
inlineoverridevirtual

uncertainty on dxy

Reimplemented from reco::Candidate.

Definition at line 173 of file PFCandidate.h.

References bestTrack(), conversionRef(), displacedVertexRef(), reco::TrackBase::dxyError(), electronExtraRef(), flag(), gsfElectronRef(), gsfTrackRef(), muonRef(), setConversionRef(), setDisplacedVertexRef(), setGsfTrackRef(), setMuonRef(), setV0Ref(), and v0Ref().

173 { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dxyError(); else return 0; }
const reco::Track * bestTrack() const override
Definition: PFCandidate.h:162
float reco::PFCandidate::dzError ( ) const
inlineoverridevirtual

uncertainty on dz

Reimplemented from reco::Candidate.

Definition at line 171 of file PFCandidate.h.

References bestTrack(), and reco::TrackBase::dzError().

171 { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dzError(); else return 0; }
const reco::Track * bestTrack() const override
Definition: PFCandidate.h:162
double reco::PFCandidate::ecalEnergy ( ) const
inline
reco::PFCandidateEGammaExtraRef PFCandidate::egammaExtraRef ( ) const
reco::PFCandidateElectronExtraRef PFCandidate::electronExtraRef ( ) const
const PFCandidate::ElementsInBlocks & PFCandidate::elementsInBlocks ( ) const

Definition at line 691 of file PFCandidate.cc.

References blocksStorage_, elementsInBlocks_, elementsStorage_, edm::RefVector< C, T, F >::size(), and groupFilesInBlocks::temp.

Referenced by FWPFCandidateWithHitsProxyBuilder::addHitsForCandidate(), DQMPFCandidateAnalyzer::analyze(), reco::tau::PFRecoTauChargedHadronFromPFCandidatePlugin::beginEvent(), PFMuonAlgo::cleanPunchThroughAndFakes(), PFElectronTranslator::correspondingDaughterCandidate(), PFPhotonTranslator::correspondingDaughterCandidate(), PFPhotonAlgo::EvaluateGCorrMVA(), PFPhotonAlgo::EvaluateResMVA(), PFCandidateBenchmark::fillOne(), flag(), PFBlockBasedIsolation::getHighestEtECALCluster(), reco::modules::HICaloCompatibleTrackSelector::matchPFCandToTrack(), PFCandidateChecker::printElementsInBlocks(), PFAlgo::processBlock(), PFElectronTranslator::produce(), and PFPhotonTranslator::produce().

691  {
692 
693  if (nullptr == elementsInBlocks_.load(std::memory_order_acquire))
694  {
695  std::unique_ptr<ElementsInBlocks> temp( new ElementsInBlocks(blocksStorage_.size()));
696  for(unsigned int icopy=0;icopy!=blocksStorage_.size();++icopy)
697  (*temp)[icopy]=std::make_pair(blocksStorage_[icopy],elementsStorage_[icopy]);
698  ElementsInBlocks* expected=nullptr;
699  if(elementsInBlocks_.compare_exchange_strong(expected,temp.get(),std::memory_order_acq_rel)) {
700  temp.release();
701  }
702  }
703  return *(elementsInBlocks_.load(std::memory_order_acquire));
704 }
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:387
std::vector< ElementInBlock > ElementsInBlocks
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:443
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
Elements elementsStorage_
Definition: PFCandidate.h:448
bool PFCandidate::flag ( Flags  theFlag) const
bool reco::PFCandidate::flag ( unsigned  shift,
unsigned  flag 
) const
private
bool PFCandidate::getRefInfo ( unsigned int  iMask,
unsigned int  iBit,
edm::ProductID oProdID,
size_t &  oIndex,
size_t &  aIndex 
) const
private

Definition at line 410 of file PFCandidate.cc.

References refsInfo_, s_refsBefore, and storedRefsBitPattern_.

411  {
412 
413  if( 0 == (iBit & storedRefsBitPattern_) ) {
414  return false;
415  }
416  aIndex = s_refsBefore[storedRefsBitPattern_ & iMask];
417  unsigned long long bitPacked = refsInfo_[aIndex];
418  oIndex = bitPacked & 0xFFFFFFFFULL; //low 32 bits are the index
419  unsigned short productIndex = (bitPacked & 0x0000FFFF00000000ULL)>>32;
420  unsigned short processIndex = (bitPacked & 0xFFFF000000000000ULL)>>48;
421  oProductID = edm::ProductID(processIndex,productIndex);
422  return true;
423 }
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:526
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:525
static const unsigned int s_refsBefore[]
Definition: CountBits.h:14
reco::GsfElectronRef PFCandidate::gsfElectronRef ( ) const

return a reference to the corresponding GsfElectron if any

Definition at line 583 of file PFCandidate.cc.

References GETREF, kRefGsfElectronBit, and kRefGsfElectronMask.

Referenced by dxyError(), and SelectionStep< Object >::select().

reco::GsfTrackRef PFCandidate::gsfTrackRef ( ) const
float reco::PFCandidate::hcalDepthEnergyFraction ( unsigned int  depth) const
inline

fraction of hcal energy at a given depth (depth = 1 .. 7)

Definition at line 428 of file PFCandidate.h.

References hcalDepthEnergyFractions_.

const std::array<float,7>& reco::PFCandidate::hcalDepthEnergyFractions ( ) const
inline

fraction of hcal energy at a given depth (index 0..6 for depth 1..7)

Definition at line 430 of file PFCandidate.h.

References hcalDepthEnergyFractions_.

430 { return hcalDepthEnergyFractions_; }
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:534
double reco::PFCandidate::hcalEnergy ( ) const
inline
double reco::PFCandidate::hoEnergy ( ) const
inline

return corrected Hcal energy

Definition at line 242 of file PFCandidate.h.

References hoERatio_, and rawHoEnergy_.

Referenced by Jet.Jet::hoEnergyFraction(), and reco::makeSpecific().

242 { return hoERatio_*rawHoEnergy_;}
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:466
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:475
bool reco::PFCandidate::isTimeValid ( ) const
inline

do we have a valid time information

Definition at line 419 of file PFCandidate.h.

References timeError_.

Referenced by TransientTrackBuilder::build(), PrimaryVertexAssignment::chargedHadronVertex(), and pat::PATPackedCandidateProducer::produce().

419 { return timeError_ >= 0.f; }
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:532
reco::MuonRef PFCandidate::muonRef ( ) const
float reco::PFCandidate::mva_e_mu ( ) const
inline

mva for electron-muon discrimination

Definition at line 320 of file PFCandidate.h.

References mva_e_mu_.

320 { return mva_e_mu_;}
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:498
float reco::PFCandidate::mva_e_pi ( ) const
inline
float reco::PFCandidate::mva_gamma_nh ( ) const
inline

mva for neutral hadron - gamma discrimination

Definition at line 346 of file PFCandidate.h.

References mva_gamma_nh_.

346 { return mva_gamma_nh_;}
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:510
float reco::PFCandidate::mva_Isolated ( ) const
inline

Definition at line 310 of file PFCandidate.h.

References mva_Isolated_.

310 { return mva_Isolated_;}
float reco::PFCandidate::mva_nothing_gamma ( ) const
inline
float reco::PFCandidate::mva_nothing_nh ( ) const
inline

mva for neutral hadron detection

Definition at line 339 of file PFCandidate.h.

References mva_nothing_nh_.

339 { return mva_nothing_nh_;}
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:507
float reco::PFCandidate::mva_pi_mu ( ) const
inline

mva for pi-muon discrimination

Definition at line 326 of file PFCandidate.h.

References mva_pi_mu_.

326 { return mva_pi_mu_;}
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:501
size_t reco::PFCandidate::numberOfSourceCandidatePtrs ( ) const
inlineoverridevirtual

return the number of source Candidates ( the candidates used to construct this Candidate)

Reimplemented from reco::LeafCandidate.

Definition at line 128 of file PFCandidate.h.

Referenced by reco::PFCandidateFwdPtrFactory::operator()().

128  {
129  return 1;
130  }
PFCandidate & PFCandidate::operator= ( PFCandidate const &  iOther)

Definition at line 170 of file PFCandidate.cc.

References blocksStorage_, deltaP_, ecalERatio_, elementsInBlocks_, elementsStorage_, flags_, getter_, hcalDepthEnergyFractions_, hcalERatio_, hoERatio_, muonTrackType_, mva_e_mu_, mva_e_pi_, mva_gamma_nh_, mva_Isolated_, mva_nothing_gamma_, mva_nothing_nh_, mva_pi_mu_, reco::LeafCandidate::operator=(), positionAtECALEntrance_, ps1Energy_, ps2Energy_, rawEcalEnergy_, rawHcalEnergy_, rawHoEnergy_, refsCollectionCache_, refsInfo_, sourcePtr_, storedRefsBitPattern_, time_, timeError_, tmp, and vertexType_.

170  {
172  auto tmp = iOther.elementsInBlocks_.load(std::memory_order_acquire);
173  if(nullptr != tmp) {
174  delete elementsInBlocks_.exchange( new ElementsInBlocks{*tmp}, std::memory_order_acq_rel);
175  } else {
176  delete elementsInBlocks_.exchange(nullptr, std::memory_order_acq_rel);
177  }
178  blocksStorage_=iOther.blocksStorage_;
179  elementsStorage_=iOther.elementsStorage_;
180  sourcePtr_=iOther.sourcePtr_;
181  muonTrackType_=iOther.muonTrackType_;
182  ecalERatio_=iOther.ecalERatio_;
183  hcalERatio_=iOther.hcalERatio_;
184  hoERatio_=iOther.hoERatio_;
185  rawEcalEnergy_=iOther.rawEcalEnergy_;
186  rawHcalEnergy_=iOther.rawHcalEnergy_;
187  rawHoEnergy_=iOther.rawHoEnergy_;
188  ps1Energy_=iOther.ps1Energy_;
189  ps2Energy_=iOther.ps2Energy_;
190  flags_=iOther.flags_;
191  deltaP_=iOther.deltaP_;
192  vertexType_=iOther.vertexType_;
193  mva_Isolated_=iOther.mva_Isolated_;
194  mva_e_pi_=iOther.mva_e_pi_;
195  mva_e_mu_=iOther.mva_e_mu_;
196  mva_pi_mu_=iOther.mva_pi_mu_;
197  mva_nothing_gamma_=iOther.mva_nothing_gamma_;
198  mva_nothing_nh_=iOther.mva_nothing_nh_;
199  mva_gamma_nh_=iOther.mva_gamma_nh_;
200  positionAtECALEntrance_=iOther.positionAtECALEntrance_;
201  getter_=iOther.getter_;
202  storedRefsBitPattern_=iOther.storedRefsBitPattern_;
203  refsInfo_=iOther.refsInfo_;
204  refsCollectionCache_=iOther.refsCollectionCache_;
205  time_=iOther.time_;
206  timeError_=iOther.timeError_;
207  hcalDepthEnergyFractions_=iOther.hcalDepthEnergyFractions_;
208  return *this;
209 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:487
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:457
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:524
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:532
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:463
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:472
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:484
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:498
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:534
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:507
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:466
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:510
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:460
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:501
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:469
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:495
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:526
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:478
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:525
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:475
std::vector< ElementInBlock > ElementsInBlocks
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:443
PFVertexType vertexType_
Definition: PFCandidate.h:489
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:452
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:530
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:513
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:504
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:481
LeafCandidate & operator=(LeafCandidate &&)=default
Elements elementsStorage_
Definition: PFCandidate.h:448
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:527
bool PFCandidate::overlap ( const Candidate other) const
overrideprivatevirtual

Polymorphic overlap.

Reimplemented from reco::CompositeCandidate.

Definition at line 270 of file PFCandidate.cc.

References mps_fire::i, edm::Ptr< T >::isNonnull(), edm::Ptr< T >::isNull(), gen::n, reco::Candidate::numberOfSourceCandidatePtrs(), overlap(), sourceCandidatePtr(), reco::Candidate::sourceCandidatePtr(), and sourcePtr_.

Referenced by overlap(), and setHcalDepthEnergyFractions().

270  {
271  CandidatePtr myPtr = sourceCandidatePtr(0);
272  if (myPtr.isNull()) return false;
273  for (size_t i = 0, n = other.numberOfSourceCandidatePtrs(); i < n; ++i) {
274  CandidatePtr otherPtr = other.sourceCandidatePtr(i);
275  if ((otherPtr == myPtr) ||
276  (sourcePtr_.isNonnull() && otherPtr.isNonnull() && sourcePtr_->overlap(*otherPtr))) {
277  return true;
278  }
279  }
280  return false;
281 }
virtual CandidatePtr sourceCandidatePtr(size_type i) const
Definition: Candidate.h:170
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: PFCandidate.cc:270
virtual size_t numberOfSourceCandidatePtrs() const =0
CandidatePtr sourceCandidatePtr(size_type i) const override
Definition: PFCandidate.h:132
bool isNull() const
Checks for null.
Definition: Ptr.h:164
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:452
virtual ParticleType reco::PFCandidate::particleId ( ) const
inlinevirtual

particle identification code

Definition at line 374 of file PFCandidate.h.

References reco::LeafCandidate::pdgId(), and translatePdgIdToType().

Referenced by PFTester::analyze(), JetTester_HeavyIons::analyze(), DQMPFCandidateAnalyzer::analyze(), JetAnalyzer_HeavyIons::analyze(), BoostedTauSeedsProducer::BoostedTauSeedsProducer(), PFMuonAlgo::cleanPunchThroughAndFakes(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::color(), metsig::SignAlgoResolutions::evalPF(), METAnalyzer::fillMonitorElement(), PFElectronTranslator::fillMVAValueMap(), PFCandidateBenchmark::fillOne(), GreedyMuonPFCandidateFilter::filter(), InconsistentMuonPFCandidateFilter::filter(), LeptonRecoSkim::filter(), reco::tau::RecoTauQualityCuts::filterCandByType(), flag(), reco::tau::RecoTauIsolationMasking::inCone(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isBoson(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isGluon(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isHiggs(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isLepton(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isPhoton(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isQuark(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::lineStyle(), reco::tau::qcuts::mapAndCutByType(), reco::modules::HICaloCompatibleTrackSelector::matchPFCandToTrack(), PFMuonAlgo::postClean(), PFAlgo::postCleaning(), reco::RecoTauPiZero::print(), PFPileUpAlgo::process(), MuonWithPFIsoProducer::produce(), DistortedPFCandProducer::produce(), PFElectronTranslator::produce(), EgammaHLTPFChargedIsolationProducer::produce(), EgammaHLTPFNeutralIsolationProducer::produce(), Type0PFMETcorrInputProducer::produce(), pf2pat::PFMETAlgo::produce(), PFLinker::produce(), pat::PATPackedCandidateProducer::produce(), PFPhotonTranslator::produce(), reco::tau::RecoTauIsolationMasking::resolution(), pf2pat::PFIsoDepositAlgo::sameParticle(), setConversionRef(), setDisplacedVertexRef(), setPhotonRef(), setSuperClusterRef(), and setTrackRef().

374 { return translatePdgIdToType(pdgId());}
int pdgId() const final
PDG identifier.
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:233
reco::PFCandidatePhotonExtraRef PFCandidate::photonExtraRef ( ) const

return a reference to the photon extra

Definition at line 601 of file PFCandidate.cc.

References GETREF, kRefPFPhotonExtraBit, and kRefPFPhotonExtraMask.

Referenced by PFPhotonTranslator::produce(), and rawHoEnergy().

reco::PhotonRef PFCandidate::photonRef ( ) const

return a reference to the corresponding Photon if any

Definition at line 597 of file PFCandidate.cc.

References GETREF, kRefPhotonBit, and kRefPhotonMask.

Referenced by rawHoEnergy().

597  {
599 }
#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4660
const math::XYZPointF& reco::PFCandidate::positionAtECALEntrance ( ) const
inline
Returns
position at ECAL entrance

Definition at line 368 of file PFCandidate.h.

References positionAtECALEntrance_.

Referenced by HPSPFRecoTauAlgorithm::applyElectronRejection(), PFRecoTauAlgorithm::buildPFTau(), PFCandIsolatorFromDeposits::SingleDeposit::compute(), PFIsolationEstimator::fGetIsolationInRings(), and reco::tau::RecoTauIsolationMasking::inCone().

368  {
370  }
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:513
double reco::PFCandidate::pS1Energy ( ) const
inline

return corrected PS1 energy

Definition at line 277 of file PFCandidate.h.

References ps1Energy_.

277 { return ps1Energy_;}
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:478
double reco::PFCandidate::pS2Energy ( ) const
inline

return corrected PS2 energy

Definition at line 283 of file PFCandidate.h.

References flag(), ps2Energy_, rescaleMomentum(), and setFlag().

283 { return ps2Energy_;}
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:481
double reco::PFCandidate::rawEcalEnergy ( ) const
inline
double reco::PFCandidate::rawHcalEnergy ( ) const
inline
double reco::PFCandidate::rawHoEnergy ( ) const
inline
void PFCandidate::rescaleMomentum ( double  rescaleFactor)

particle momentum *= rescaleFactor

Definition at line 287 of file PFCandidate.cc.

References reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().

Referenced by pS2Energy().

287  {
288  LorentzVector rescaledp4 = p4();
289  rescaledp4 *= rescaleFactor;
290  setP4( rescaledp4 );
291 }
math::XYZTLorentzVector LorentzVector
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
void setP4(const LorentzVector &p4) final
set 4-momentum
void reco::PFCandidate::set_mva_e_mu ( float  mva)
inline

set mva for electron-muon discrimination

Definition at line 317 of file PFCandidate.h.

References DetachedQuadStep_cff::mva, and mva_e_mu_.

317 { mva_e_mu_=mva;}
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:498
void reco::PFCandidate::set_mva_e_pi ( float  mvaNI)
inline

Definition at line 312 of file PFCandidate.h.

References mva_e_pi_.

Referenced by PFEGammaAlgo::fillPFCandidates(), PFAlgo::processBlock(), and PFElectronAlgo::SetCandidates().

312 { mva_e_pi_=mvaNI;}
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:495
void reco::PFCandidate::set_mva_gamma_nh ( float  mva)
inline

set mva for neutral hadron - gamma discrimination

Definition at line 343 of file PFCandidate.h.

References DetachedQuadStep_cff::mva, and mva_gamma_nh_.

343 { mva_gamma_nh_=mva;}
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:510
void reco::PFCandidate::set_mva_Isolated ( float  mvaI)
inline

set mva for electron-pion discrimination. For charged particles, this variable is set to 0 for particles that are not preided to 1 otherwise For neutral particles, it is set to the default value

Definition at line 308 of file PFCandidate.h.

References mva_Isolated_.

Referenced by PFAlgo::processBlock().

308 { mva_Isolated_=mvaI;}
void reco::PFCandidate::set_mva_nothing_gamma ( float  mva)
inline

set mva for gamma detection

Definition at line 330 of file PFCandidate.h.

References DetachedQuadStep_cff::mva, and mva_nothing_gamma_.

Referenced by PFAlgo::processBlock(), and PFPhotonAlgo::RunPFPhoton().

float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:504
void reco::PFCandidate::set_mva_nothing_nh ( float  mva)
inline

set mva for neutral hadron detection

Definition at line 336 of file PFCandidate.h.

References DetachedQuadStep_cff::mva, and mva_nothing_nh_.

float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:507
void reco::PFCandidate::set_mva_pi_mu ( float  mva)
inline

set mva for pi-muon discrimination

Definition at line 323 of file PFCandidate.h.

References DetachedQuadStep_cff::mva, and mva_pi_mu_.

323 { mva_pi_mu_=mva;}
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:501
void PFCandidate::setConversionRef ( const reco::ConversionRef ref)

set ref to original reco conversion

Definition at line 539 of file PFCandidate.cc.

References Exception, flag(), gamma, GAMMA_TO_GAMMACONV, edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefConversionBit, kRefConversionMask, pileupDistInMC::num, particleId(), edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by dxyError().

539  {
540  if( particleId() != gamma ) {
541  string err;
542  err += "PFCandidate::setConversionRef: this is not a (converted) photon ! particleId_=";
543  char num[4];
544  sprintf( num, "%d", particleId());
545  err += num;
546 
547  throw cms::Exception("InconsistentReference",
548  err.c_str() );
549  }
550  else if( !flag( GAMMA_TO_GAMMACONV ) ) {
551  string err;
552  err += "PFCandidate::setConversionRef: particule flag is not GAMMA_TO_GAMMACONV";
553 
554  throw cms::Exception("InconsistentReference",
555  err.c_str() );
556  }
557 
559  iRef.refCore(), iRef.key(),iRef.productGetter());
560 }
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:304
virtual ParticleType particleId() const
Definition: PFCandidate.h:374
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setDeltaP ( double  dp)
inline

set uncertainty on momentum

Definition at line 295 of file PFCandidate.h.

References deltaP_, and reco::dp.

Referenced by PFLinker::produce().

295 {deltaP_ = dp;}
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:487
auto dp
Definition: deltaR.h:22
void PFCandidate::setDisplacedVertexRef ( const reco::PFDisplacedVertexRef ref,
Flags  flag 
)

set displaced vertex reference

Definition at line 484 of file PFCandidate.cc.

References Exception, flag(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefDisplacedVertexDauBit, kRefDisplacedVertexDauMask, kRefDisplacedVertexMotBit, kRefDisplacedVertexMotMask, pileupDistInMC::num, particleId(), edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), storeRefInfo(), T_FROM_DISP, and T_TO_DISP.

Referenced by dxyError().

484  {
485 
486  if( particleId() != h ) {
487  string err;
488  err += "PFCandidate::setDisplacedVertexRef: this is not a hadron! particleId_=";
489  char num[4];
490  sprintf( num, "%d", particleId());
491  err += num;
492 
493  throw cms::Exception("InconsistentReference",
494  err.c_str() );
495  }
496  else if( !flag( T_FROM_DISP ) && !flag( T_TO_DISP ) ) {
497  string err;
498  err += "PFCandidate::setDisplacedVertexRef: particule flag is neither T_FROM_DISP nor T_TO_DISP";
499 
500  throw cms::Exception("InconsistentReference",
501  err.c_str() );
502  }
503 
504 
505  if (type == T_TO_DISP && flag( T_TO_DISP ))
507  iRef.isNonnull(),
508  iRef.refCore(), iRef.key(),iRef.productGetter());
509  else if (type == T_FROM_DISP && flag( T_FROM_DISP ))
511  iRef.isNonnull(),
512  iRef.refCore(), iRef.key(),iRef.productGetter());
513  else if ( (type == T_FROM_DISP && !flag( T_FROM_DISP ))
514  ||
515  (type == T_TO_DISP && !flag( T_TO_DISP )) ){
516  string err;
517  err += "PFCandidate::setDisplacedVertexRef: particule flag is not switched on";
518 
519  throw cms::Exception("InconsistentReference",
520  err.c_str() );
521  }
522 
523 }
type
Definition: HCALResponse.h:21
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:304
virtual ParticleType particleId() const
Definition: PFCandidate.h:374
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setEcalEnergy ( float  eeRaw,
float  eeCorr 
)
inline

set corrected Ecal energy

Definition at line 218 of file PFCandidate.h.

References funct::abs(), ecalERatio_, and rawEcalEnergy_.

Referenced by PFEGammaAlgo::fillPFCandidates(), PFAlgo::processBlock(), PFLinker::produce(), PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

218  {
219  rawEcalEnergy_ = eeRaw; ecalERatio_= std::abs(eeRaw)<1.e-6 ? 1.0 : eeCorr/eeRaw;}
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:460
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:469
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void PFCandidate::setFlag ( Flags  theFlag,
bool  value 
)

set a given flag

Definition at line 294 of file PFCandidate.cc.

References flags_.

Referenced by pS2Energy(), PFPhotonAlgo::RunPFPhoton(), and setHcalDepthEnergyFractions().

294  {
295 
296  if(value)
297  flags_ = flags_ | (1<<theFlag);
298  else
299  flags_ = flags_ ^ (1<<theFlag);
300 }
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:484
Definition: value.py:1
void reco::PFCandidate::setFlag ( unsigned  shift,
unsigned  flag,
bool  value 
)
private
void PFCandidate::setGsfElectronRef ( const reco::GsfElectronRef ref)

set GsfElectronRef

Definition at line 578 of file PFCandidate.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefGsfElectronBit, kRefGsfElectronMask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by PFLinker::produce(), and rawHoEnergy().

578  {
580  iRef.refCore(), iRef.key(),iRef.productGetter());
581 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void PFCandidate::setGsfTrackRef ( const reco::GsfTrackRef ref)

set gsftrack reference

Definition at line 463 of file PFCandidate.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefGsfTrackBit, kRefGsfTrackMask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by dxyError(), PFEGammaAlgo::fillPFCandidates(), and PFElectronAlgo::SetCandidates().

463  {
464 // Removed by F. Beaudette. Would like to be able to save the GsfTrackRef even for charged pions
465 // if( particleId() != e ) {
466 // string err;
467 // err += "PFCandidate::setGsfTrackRef: this is not an electron ! particleId_=";
468 // char num[4];
469 // sprintf( num, "%d", particleId());
470 // err += num;
471 //
472 // throw cms::Exception("InconsistentReference",
473 // err.c_str() );
474 // }
475 
476  storeRefInfo(kRefGsfTrackMask, kRefGsfTrackBit, iRef.isNonnull(),
477  iRef.refCore(), iRef.key(),iRef.productGetter());
478 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setHcalDepthEnergyFractions ( const std::array< float, 7 > &  fracs)
inline

set the fraction of hcal energy as function of depth (index 0..6 for depth 1..7)

Definition at line 432 of file PFCandidate.h.

References flag(), hcalDepthEnergyFractions_, overlap(), setFlag(), and edm::shift.

Referenced by PFAlgo::setHcalDepthInfo().

432 { hcalDepthEnergyFractions_ = fracs; }
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:534
void reco::PFCandidate::setHcalEnergy ( float  ehRaw,
float  ehCorr 
)
inline

set corrected Hcal energy

Definition at line 228 of file PFCandidate.h.

References funct::abs(), hcalERatio_, and rawHcalEnergy_.

Referenced by PFAlgo::processBlock(), PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

228  {
229  rawHcalEnergy_ = ehRaw; hcalERatio_= std::abs(ehRaw)<1.e-6 ? 1.0 : ehCorr/ehRaw;}
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:463
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:472
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void reco::PFCandidate::setHoEnergy ( float  eoRaw,
float  eoCorr 
)
inline

set corrected Hcal energy

Definition at line 238 of file PFCandidate.h.

References funct::abs(), hoERatio_, and rawHoEnergy_.

Referenced by PFAlgo::processBlock().

238  {
239  rawHoEnergy_ = eoRaw; hoERatio_= std::abs(eoRaw)<1.e-6 ? 1.0 : eoCorr/eoRaw;}
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:466
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:475
void PFCandidate::setMuonRef ( const reco::MuonRef ref)

set muon reference

Definition at line 445 of file PFCandidate.cc.

References Exception, edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefMuonBit, kRefMuonMask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), storeRefInfo(), and trackRef().

Referenced by dxyError(), PFLinker::produce(), and PFMuonAlgo::reconstructMuon().

445  {
446 
447  if( trackRef() != iRef->track() ) {
448  string err;
449  err += "PFCandidate::setMuonRef: inconsistent track references!";
450 
451  throw cms::Exception("InconsistentReference",
452  err.c_str() );
453  }
454 
455  storeRefInfo(kRefMuonMask, kRefMuonBit, iRef.isNonnull(),
456  iRef.refCore(), iRef.key(),iRef.productGetter());
457 }
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:442
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setMuonTrackType ( const reco::Muon::MuonTrackType type)
inline

set the Best Muon Track Ref

Definition at line 357 of file PFCandidate.h.

References muonTrackType_.

Referenced by PFMuonAlgo::changeTrack().

357  {
359  }
type
Definition: HCALResponse.h:21
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:457
void PFCandidate::setParticleType ( ParticleType  type)

set Particle Type

Definition at line 265 of file PFCandidate.cc.

References reco::LeafCandidate::setPdgId(), and translateTypeToPdgId().

Referenced by PFMuonAlgo::changeTrack(), PFAlgo::processBlock(), DeltaBetaWeights::produce(), and sourceCandidatePtr().

265  {
267 }
type
Definition: HCALResponse.h:21
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:247
void setPdgId(int pdgId) final
void PFCandidate::setPFEGammaExtraRef ( const reco::PFCandidateEGammaExtraRef ref)

set the PF EGamma Extra Ref

Definition at line 650 of file PFCandidate.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefPFEGammaExtraBit, kRefPFEGammaExtraMask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by PFEGammaProducer::produce(), and rawHoEnergy().

650  {
651  //std::cout << " before storeRefInfo " << kRefPFEGammaExtraMask << " " << kRefPFEGammaExtraBit << " " << iRef.isNonnull() << " " << iRef.key() << " " << std::endl;
653  iRef.refCore(), iRef.key(),iRef.productGetter());
654 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void PFCandidate::setPFElectronExtraRef ( const reco::PFCandidateElectronExtraRef ref)

set the PF Electron Extra Ref

Definition at line 588 of file PFCandidate.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefPFElectronExtraBit, kRefPFElectronExtraMask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by setPositionAtECALEntrance().

588  {
590  iRef.refCore(), iRef.key(),iRef.productGetter());
591 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void PFCandidate::setPFPhotonExtraRef ( const reco::PFCandidatePhotonExtraRef ref)

set the PF Photon Extra Ref

Definition at line 645 of file PFCandidate.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefPFPhotonExtraBit, kRefPFPhotonExtraMask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by rawHoEnergy().

645  {
647  iRef.refCore(), iRef.key(),iRef.productGetter());
648 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void PFCandidate::setPhotonRef ( const reco::PhotonRef phRef)

set ref to the corresponding reco::Photon if any

Definition at line 613 of file PFCandidate.cc.

References e, Exception, gamma, edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefPhotonBit, kRefPhotonMask, pileupDistInMC::num, particleId(), edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by PFLinker::produce(), and rawHoEnergy().

613  {
614  if( particleId() != gamma && particleId() != e) {
615  string err;
616  err += "PFCandidate::setSuperClusterRef: this is not an electron neither a photon ! particleId_=";
617  char num[4];
618  sprintf( num, "%d", particleId());
619  err += num;
620 
621  throw cms::Exception("InconsistentReference", err.c_str() );
622  }
623 
624  storeRefInfo(kRefPhotonMask, kRefPhotonBit, iRef.isNonnull(),
625  iRef.refCore(), iRef.key(),iRef.productGetter());
626 
627 }
virtual ParticleType particleId() const
Definition: PFCandidate.h:374
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setPositionAtECALEntrance ( const math::XYZPointF pos)
inline

set position at ECAL entrance

Definition at line 349 of file PFCandidate.h.

References positionAtECALEntrance_, and setPFElectronExtraRef().

Referenced by PFEGammaAlgo::fillPFCandidates(), PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

349  {
351  }
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:513
void reco::PFCandidate::setPs1Energy ( float  e1)
inline

set corrected PS1 energy

Definition at line 274 of file PFCandidate.h.

References reco::e1, and ps1Energy_.

Referenced by PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

274 {ps1Energy_ = e1;}
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:478
Float e1
Definition: deltaR.h:20
void reco::PFCandidate::setPs2Energy ( float  e2)
inline

set corrected PS2 energy

Definition at line 280 of file PFCandidate.h.

References reco::e2, and ps2Energy_.

Referenced by PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

280 {ps2Energy_ = e2;}
Float e2
Definition: deltaR.h:21
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:481
void reco::PFCandidate::setSourceCandidatePtr ( const PFCandidatePtr ptr)
inline

Definition at line 126 of file PFCandidate.h.

References sourcePtr_.

Referenced by reco::PFCandidateWithSrcPtrFactory::operator()(), PuppiPhoton::produce(), and VirtualJetProducer::writeJetsWithConstituents().

126 { sourcePtr_ = ptr; }
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:452
void PFCandidate::setSuperClusterRef ( const reco::SuperClusterRef scRef)

Definition at line 629 of file PFCandidate.cc.

References e, Exception, gamma, edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefSuperClusterBit, kRefSuperClusterMask, pileupDistInMC::num, particleId(), edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by PFEGammaAlgo::fillPFCandidates(), PFLinker::produce(), PFEGammaProducer::produce(), rawHoEnergy(), PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

629  {
630  if( particleId() != gamma && particleId() != e) {
631  string err;
632  err += "PFCandidate::setSuperClusterRef: this is not an electron neither a photon ! particleId_=";
633  char num[4];
634  sprintf( num, "%d", particleId());
635  err += num;
636 
637  throw cms::Exception("InconsistentReference", err.c_str() );
638  }
639 
641  iRef.refCore(), iRef.key(),iRef.productGetter());
642 
643 }
virtual ParticleType particleId() const
Definition: PFCandidate.h:374
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setTime ( float  time,
float  timeError = 0.f 
)
inline

the timing information

Definition at line 425 of file PFCandidate.h.

References time(), time_, timeError(), and timeError_.

Referenced by PFEGammaAlgo::fillPFCandidates().

425 { time_ = time; timeError_ = timeError; }
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:532
float time() const
Definition: PFCandidate.h:421
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:530
float timeError() const
Definition: PFCandidate.h:423
void PFCandidate::setTrackRef ( const reco::TrackRef ref)

set track reference

Definition at line 425 of file PFCandidate.cc.

References reco::LeafCandidate::charge(), Exception, edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefTrackBit, kRefTrackMask, pileupDistInMC::num, particleId(), edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by PFEGammaAlgo::fillPFCandidates(), PFElectronAlgo::SetCandidates(), and sourceCandidatePtr().

425  {
426  if(!charge()) {
427  string err;
428  err += "PFCandidate::setTrackRef: this is a neutral candidate! ";
429  err += "particleId_=";
430  char num[4];
431  sprintf( num, "%d", particleId());
432  err += num;
433 
434  throw cms::Exception("InconsistentReference",
435  err.c_str() );
436  }
437 
438  storeRefInfo(kRefTrackMask, kRefTrackBit, iRef.isNonnull(),
439  iRef.refCore(), iRef.key(),iRef.productGetter());
440 }
int charge() const final
electric charge
Definition: LeafCandidate.h:91
virtual ParticleType particleId() const
Definition: PFCandidate.h:374
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void PFCandidate::setV0Ref ( const reco::VertexCompositeCandidateRef ref)

set ref to original reco conversion

Definition at line 568 of file PFCandidate.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), kRefV0Bit, kRefV0Mask, edm::Ref< C, T, F >::productGetter(), edm::Ref< C, T, F >::refCore(), and storeRefInfo().

Referenced by dxyError().

568  {
569  storeRefInfo(kRefV0Mask, kRefV0Bit, iRef.isNonnull(),
570  iRef.refCore(), iRef.key(),iRef.productGetter());
571 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:370
void reco::PFCandidate::setVertex ( const math::XYZPoint vertex)
inlineoverridevirtual

set vertex

Reimplemented from reco::LeafCandidate.

Definition at line 409 of file PFCandidate.h.

References kCandVertex, reco::LeafCandidate::setVertex(), vertex(), and vertexType_.

Referenced by PFAlgo::processBlock(), and PFPhotonAlgo::RunPFPhoton().

409  {
411  }
void setVertex(const Point &vertex) override
set vertex
double p() const final
magnitude of momentum vector
PFVertexType vertexType_
Definition: PFCandidate.h:489
void reco::PFCandidate::setVertexSource ( PFVertexType  vt)
inline

Definition at line 407 of file PFCandidate.h.

References kCandVertex, reco::LeafCandidate::setVertex(), and vertexType_.

Referenced by PFMuonAlgo::changeTrack(), and PFElectronAlgo::SetCandidates().

void setVertex(const Point &vertex) override
set vertex
PFVertexType vertexType_
Definition: PFCandidate.h:489
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
CandidatePtr reco::PFCandidate::sourceCandidatePtr ( size_type  i) const
inlineoverridevirtual

return a Ptr to one of the source Candidates ( the candidates used to construct this Candidate)

Reimplemented from reco::LeafCandidate.

Definition at line 132 of file PFCandidate.h.

References addElementInBlock(), BPhysicsValidation_cfi::pdgid, setParticleType(), setTrackRef(), sourcePtr_, trackRef(), translatePdgIdToType(), and translateTypeToPdgId().

Referenced by reco::PFCandidateFwdPtrFactory::operator()(), reco::operator<<(), and overlap().

132  {
133  return sourcePtr_;
134  }
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:452
void PFCandidate::storeRefInfo ( unsigned int  iMask,
unsigned int  iBit,
bool  iIsValid,
const edm::RefCore iCore,
size_t  iKey,
const edm::EDProductGetter iGetter 
)
private

Definition at line 370 of file PFCandidate.cc.

References bitPackRefInfo(), getter_, edm::RefCore::productPtr(), refsCollectionCache_, refsInfo_, s_refsBefore, and storedRefsBitPattern_.

Referenced by setConversionRef(), setDisplacedVertexRef(), setGsfElectronRef(), setGsfTrackRef(), setMuonRef(), setPFEGammaExtraRef(), setPFElectronExtraRef(), setPFPhotonExtraRef(), setPhotonRef(), setSuperClusterRef(), setTrackRef(), and setV0Ref().

375  {
376 
377  size_t index = s_refsBefore[storedRefsBitPattern_ & iMask];
378  if ( nullptr == getter_) {
379  getter_ = iGetter;
380  }
381 
382  if(iIsValid) {
383  if(0 == (storedRefsBitPattern_ & iBit) ) {
384  refsInfo_.insert(refsInfo_.begin()+index, bitPackRefInfo(iCore,iKey));
385  if (iGetter==nullptr)
387  static_cast<void const*>(iCore.productPtr()));
388  else
389  refsCollectionCache_.insert(refsCollectionCache_.begin()+index,nullptr);
390  } else {
391  assert(refsInfo_.size()>index);
392  *(refsInfo_.begin()+index)=bitPackRefInfo(iCore,iKey);
393  if (iGetter==nullptr)
394  *(refsCollectionCache_.begin()+index)=static_cast<void const*>(iCore.productPtr());
395  else
396  *(refsCollectionCache_.begin()+index)=nullptr;
397 
398  }
399  storedRefsBitPattern_ |= iBit;
400  } else{
401  if( storedRefsBitPattern_ & iBit) {
402  refsInfo_.erase(refsInfo_.begin()+index);
404  storedRefsBitPattern_ ^= iBit;
405  }
406  }
407 
408 }
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:524
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:526
static unsigned long long bitPackRefInfo(const edm::RefCore &iCore, size_t iIndex)
Definition: PFCandidate.cc:363
void const * productPtr() const
Definition: RefCore.h:52
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:525
unsigned int index
Definition: LeafCandidate.h:31
static const unsigned int s_refsBefore[]
Definition: CountBits.h:14
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:527
reco::SuperClusterRef PFCandidate::superClusterRef ( ) const
float reco::PFCandidate::time ( ) const
inline
Returns
the timing

Definition at line 421 of file PFCandidate.h.

References time_.

Referenced by TransientTrackBuilder::build(), PrimaryVertexAssignment::chargedHadronVertex(), pat::PATPackedCandidateProducer::produce(), and setTime().

421 { return time_; }
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:530
float reco::PFCandidate::timeError ( ) const
inline
Returns
the timing uncertainty

Definition at line 423 of file PFCandidate.h.

References timeError_.

Referenced by TransientTrackBuilder::build(), PrimaryVertexAssignment::chargedHadronVertex(), pat::PATPackedCandidateProducer::produce(), and setTime().

423 { return timeError_; }
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:532
reco::TrackRef PFCandidate::trackRef ( ) const

return a reference to the corresponding track, if charged. otherwise, return a null reference

Definition at line 442 of file PFCandidate.cc.

References GETREF, kRefTrackBit, and kRefTrackMask.

Referenced by reco::tau::RecoTauPiZeroStripPlugin2::addCandsToStrip(), reco::tau::RecoTauPiZeroStripPlugin3::addCandsToStrip(), PFMuonAlgo::addMissingMuons(), HPSPFRecoTauAlgorithm::applyElectronRejection(), bestTrack(), PFRecoTauAlgorithm::buildPFTau(), HPSPFRecoTauAlgorithm::buildPFTau(), HPSPFRecoTauAlgorithm::buildThreeProngs(), reco::PFMETProducerMVA::chargedFracInCone(), PFPileUpAlgo::chargedHadronVertex(), PrimaryVertexAssignment::chargedHadronVertex(), PFIsolationEstimator::chargedHadronVertex(), PFPhotonIsolationCalculator::chargedHadronVertex(), PileupJetIdAlgo::computeIdVariables(), reco::PFMETProducerMVA::computePFCandidateInfo(), metsig::SignAlgoResolutions::evalPF(), PFCandCommonVertexFitterBase::fill(), ChargedHadronTrackResolutionFilter::filter(), MuonBadTrackFilter::filter(), reco::tau::RecoTauQualityCuts::filterCand(), FFTJetPFPileupCleaner::findSomeVertexWFakes(), BPHTrackReference::getFromPF(), pat::helper::VertexingHelper::getTrack_(), reco::PFJet::getTrackRefs(), PFPhotonIsolationCalculator::isChargedParticleVetoed(), PFIsolationEstimator::isChargedParticleVetoed(), reco::modules::HICaloCompatibleTrackSelector::matchPFCandToTrack(), MuonWithPFIsoProducer::produce(), reco::ParticleFlowForChargedMETProducer::produce(), PFElectronTranslator::produce(), EgammaHLTPFChargedIsolationProducer::produce(), PuppiProducer::produce(), pat::PATPackedCandidateProducer::produce(), pat::PATLostTracks::produce(), HPSPFRecoTauAlgorithm::refitThreeProng(), setMuonRef(), BoostedDoubleSVProducer::setTracksPV(), sourceCandidatePtr(), PFRecoTauDiscriminationByFlightPathSignificance::threeProngFlightPathSig(), toTrackRef(), and vertex().

#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4660
PFCandidate::ParticleType PFCandidate::translatePdgIdToType ( int  pdgid) const

Definition at line 233 of file PFCandidate.cc.

References funct::abs(), e, egamma_HF, gamma, h, h0, h_HF, mu, and X.

Referenced by particleId(), PuppiPhoton::produce(), DeltaBetaWeights::produce(), citk::PFIsolationSumProducerForPUPPI::produce(), PuppiProducer::produce(), citk::PFIsolationSumProducer::produce(), SoftKillerProducer::produce(), sourceCandidatePtr(), and VirtualJetProducer::writeJetsWithConstituents().

233  {
234  switch (std::abs(pdgid)) {
235  case 211: return h;
236  case 11: return e;
237  case 13: return mu;
238  case 22: return gamma;
239  case 130: return h0;
240  case 1: return h_HF;
241  case 2: return egamma_HF;
242  case 0: return X;
243  default: return X;
244  }
245 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int PFCandidate::translateTypeToPdgId ( ParticleType  type) const

returns the pdg id corresponding to the particle type. the particle type could be removed at some point to gain some space. low priority

Definition at line 247 of file PFCandidate.cc.

References reco::LeafCandidate::charge(), e, egamma_HF, gamma, h0, h_HF, mu, and X.

Referenced by PFCandidate(), setParticleType(), and sourceCandidatePtr().

247  {
248 
249  int thecharge = charge();
250 
251  switch( type ) {
252  case h: return thecharge*211; // pi+
253  case e: return thecharge*(-11);
254  case mu: return thecharge*(-13);
255  case gamma: return 22;
256  case h0: return 130; // K_L0
257  case h_HF: return 1; // dummy pdg code
258  case egamma_HF: return 2; // dummy pdg code
259  case X:
260  default: return 0;
261  }
262 }
type
Definition: HCALResponse.h:21
int charge() const final
electric charge
Definition: LeafCandidate.h:91
reco::VertexCompositeCandidateRef PFCandidate::v0Ref ( ) const

return a reference to the original conversion

Definition at line 573 of file PFCandidate.cc.

References GETREF, kRefV0Bit, and kRefV0Mask.

Referenced by dxyError().

const math::XYZPoint & PFCandidate::vertex ( ) const
overridevirtual

vertex position (overwritten by PF...)

Reimplemented from reco::LeafCandidate.

Definition at line 656 of file PFCandidate.cc.

References gsfTrackRef(), kCandVertex, kComMuonVertex, kDYTMuonVertex, kGSFVertex, kPickyMuonVertex, kSAMuonVertex, kTPFMSMuonVertex, kTrkMuonVertex, kTrkVertex, muonRef(), trackRef(), reco::LeafCandidate::vertex(), and vertexType_.

Referenced by FWPFCandidateWithHitsProxyBuilder::build(), FWPFCandidate3DProxyBuilder::build(), HPSPFRecoTauAlgorithm::buildOneProng(), HPSPFRecoTauAlgorithm::buildThreeProngs(), PFPileUpAlgo::chargedHadronVertex(), PFIsolationEstimator::chargedHadronVertex(), PFPhotonIsolationCalculator::chargedHadronVertex(), PFCandWithSuperClusterExtractor::depositFromObject(), Tau.Tau::dxy(), FFTJetPFPileupCleaner::findSomeVertexWFakes(), PFConcretePFCandidateProducer::produce(), L1THLTTauMatching::produce(), L1HLTTauMatching::produce(), EgammaHLTPFNeutralIsolationProducer::produce(), pat::PATPackedCandidateProducer::produce(), setVertex(), vx(), vy(), and vz().

656  {
657  switch (vertexType_) {
658  case kCandVertex:
659  return LeafCandidate::vertex();
660  break;
661  case kTrkVertex:
662  return trackRef()->vertex();
663  break;
664  case kComMuonVertex:
665  return muonRef()->combinedMuon()->vertex();
666  break;
667  case kSAMuonVertex:
668  return muonRef()->standAloneMuon()->vertex();
669  break;
670  case kTrkMuonVertex:
671  return muonRef()->track()->vertex();
672  break;
673  case kTPFMSMuonVertex:
674  return muonRef()->tpfmsTrack()->vertex();
675  break;
676  case kPickyMuonVertex:
677  return muonRef()->pickyTrack()->vertex();
678  break;
679  case kDYTMuonVertex:
680  return muonRef()->dytTrack()->vertex();
681  break;
682 
683  case kGSFVertex:
684  return gsfTrackRef()->vertex();
685  break;
686  }
687  return LeafCandidate::vertex();
688 }
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:442
const Point & vertex() const override
vertex position (overwritten by PF...)
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:459
PFVertexType vertexType_
Definition: PFCandidate.h:489
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:480
double reco::PFCandidate::vx ( ) const
inlineoverridevirtual

x coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 414 of file PFCandidate.h.

References vertex().

Referenced by PFIsolationEstimator::fGetIsolationInRings().

414 {return vertex().x();}
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:656
double reco::PFCandidate::vy ( ) const
inlineoverridevirtual

y coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 415 of file PFCandidate.h.

References vertex().

Referenced by PFIsolationEstimator::fGetIsolationInRings().

415 {return vertex().y();}
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:656
double reco::PFCandidate::vz ( ) const
inlineoverridevirtual

z coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 416 of file PFCandidate.h.

References vertex().

Referenced by PFCandWithSuperClusterExtractor::depositFromObject(), and PFIsolationEstimator::fGetIsolationInRings().

416 {return vertex().z();}
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:656

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const PFCandidate c 
)
friend

Member Data Documentation

const float PFCandidate::bigMva_ = -999.
static

Definition at line 394 of file PFCandidate.h.

Blocks reco::PFCandidate::blocksStorage_
private

Definition at line 447 of file PFCandidate.h.

Referenced by addElementInBlock(), elementsInBlocks(), operator=(), and PFCandidate().

float reco::PFCandidate::deltaP_
private

uncertainty on 3-momentum

Definition at line 487 of file PFCandidate.h.

Referenced by deltaP(), operator=(), PFCandidate(), and setDeltaP().

float reco::PFCandidate::ecalERatio_
private

corrected ECAL energy ratio (corrected/raw)

Definition at line 460 of file PFCandidate.h.

Referenced by ecalEnergy(), operator=(), PFCandidate(), and setEcalEnergy().

std::atomic<ElementsInBlocks*> reco::PFCandidate::elementsInBlocks_
mutableprivate
Elements reco::PFCandidate::elementsStorage_
private

Definition at line 448 of file PFCandidate.h.

Referenced by addElementInBlock(), elementsInBlocks(), operator=(), and PFCandidate().

unsigned reco::PFCandidate::flags_
private

all flags, packed (ecal regional, hcal regional, tracking)

Definition at line 484 of file PFCandidate.h.

Referenced by flag(), operator=(), PFCandidate(), and setFlag().

const edm::EDProductGetter* reco::PFCandidate::getter_
private

Definition at line 524 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), and storeRefInfo().

std::array<float,7> reco::PFCandidate::hcalDepthEnergyFractions_
private
float reco::PFCandidate::hcalERatio_
private

corrected HCAL energy ratio (corrected/raw)

Definition at line 463 of file PFCandidate.h.

Referenced by hcalEnergy(), operator=(), PFCandidate(), and setHcalEnergy().

float reco::PFCandidate::hoERatio_
private

corrected HO energy ratio (corrected/raw)

Definition at line 466 of file PFCandidate.h.

Referenced by hoEnergy(), operator=(), PFCandidate(), and setHoEnergy().

reco::Muon::MuonTrackType reco::PFCandidate::muonTrackType_
private

Reference to the best track if it is a muon pF is allowed to switch the default muon track

Definition at line 457 of file PFCandidate.h.

Referenced by bestMuonTrackType(), operator=(), PFCandidate(), and setMuonTrackType().

float reco::PFCandidate::mva_e_mu_
private

mva for electron-muon discrimination

Definition at line 498 of file PFCandidate.h.

Referenced by mva_e_mu(), operator=(), PFCandidate(), and set_mva_e_mu().

float reco::PFCandidate::mva_e_pi_
private

mva for electron-pion discrimination

Definition at line 495 of file PFCandidate.h.

Referenced by mva_e_pi(), operator=(), PFCandidate(), and set_mva_e_pi().

float reco::PFCandidate::mva_gamma_nh_
private

mva for neutral hadron - gamma discrimination

Definition at line 510 of file PFCandidate.h.

Referenced by mva_gamma_nh(), operator=(), PFCandidate(), and set_mva_gamma_nh().

float reco::PFCandidate::mva_Isolated_
private

Definition at line 492 of file PFCandidate.h.

Referenced by mva_Isolated(), operator=(), PFCandidate(), and set_mva_Isolated().

float reco::PFCandidate::mva_nothing_gamma_
private

mva for gamma detection

Definition at line 504 of file PFCandidate.h.

Referenced by mva_nothing_gamma(), operator=(), PFCandidate(), and set_mva_nothing_gamma().

float reco::PFCandidate::mva_nothing_nh_
private

mva for neutral hadron detection

Definition at line 507 of file PFCandidate.h.

Referenced by mva_nothing_nh(), operator=(), PFCandidate(), and set_mva_nothing_nh().

float reco::PFCandidate::mva_pi_mu_
private

mva for pi-muon discrimination

Definition at line 501 of file PFCandidate.h.

Referenced by mva_pi_mu(), operator=(), PFCandidate(), and set_mva_pi_mu().

math::XYZPointF reco::PFCandidate::positionAtECALEntrance_
private

position at ECAL entrance, from the PFRecTrack

Definition at line 513 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), positionAtECALEntrance(), and setPositionAtECALEntrance().

float reco::PFCandidate::ps1Energy_
private

corrected PS1 energy

Definition at line 478 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), pS1Energy(), and setPs1Energy().

float reco::PFCandidate::ps2Energy_
private

corrected PS2 energy

Definition at line 481 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), pS2Energy(), and setPs2Energy().

float reco::PFCandidate::rawEcalEnergy_
private

raw ECAL energy

Definition at line 469 of file PFCandidate.h.

Referenced by ecalEnergy(), operator=(), PFCandidate(), rawEcalEnergy(), and setEcalEnergy().

float reco::PFCandidate::rawHcalEnergy_
private

raw HCAL energy

Definition at line 472 of file PFCandidate.h.

Referenced by hcalEnergy(), operator=(), PFCandidate(), rawHcalEnergy(), and setHcalEnergy().

float reco::PFCandidate::rawHoEnergy_
private

raw HO energy

Definition at line 475 of file PFCandidate.h.

Referenced by hoEnergy(), operator=(), PFCandidate(), rawHoEnergy(), and setHoEnergy().

std::vector<const void *> reco::PFCandidate::refsCollectionCache_
private

Definition at line 527 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), and storeRefInfo().

std::vector<unsigned long long> reco::PFCandidate::refsInfo_
private

Definition at line 526 of file PFCandidate.h.

Referenced by getRefInfo(), operator=(), PFCandidate(), and storeRefInfo().

PFCandidatePtr reco::PFCandidate::sourcePtr_
private

reference to the source PFCandidate, if any

Definition at line 452 of file PFCandidate.h.

Referenced by flag(), operator=(), overlap(), PFCandidate(), setSourceCandidatePtr(), and sourceCandidatePtr().

unsigned short reco::PFCandidate::storedRefsBitPattern_
private

Definition at line 525 of file PFCandidate.h.

Referenced by getRefInfo(), operator=(), PFCandidate(), and storeRefInfo().

float reco::PFCandidate::time_
private

timing information (valid if timeError_ >= 0)

Definition at line 530 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), setTime(), and time().

float reco::PFCandidate::timeError_
private

timing information uncertainty (<0 if timing not available)

Definition at line 532 of file PFCandidate.h.

Referenced by isTimeValid(), operator=(), PFCandidate(), setTime(), and timeError().

PFVertexType reco::PFCandidate::vertexType_
private

Definition at line 489 of file PFCandidate.h.

Referenced by operator=(), PFCandidate(), setVertex(), setVertexSource(), and vertex().