CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | 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::PFBlockCollection
Blocks
 
typedef std::pair
< reco::PFBlockRef, unsigned > 
ElementInBlock
 return indices of elements used in the block More...
 
typedef std::vector< unsigned > Elements
 
typedef std::vector
< ElementInBlock
ElementsInBlocks
 
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...
 
virtual const reco::TrackbestTrack () const
 
virtual PFCandidateclone () const
 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
 
virtual float dxyError () const
 uncertainty on dxy More...
 
virtual float dzError () const
 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
 
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
 
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 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...
 
virtual void setVertex (const math::XYZPoint &p)
 set vertex More...
 
void setVertexSource (PFVertexType vt)
 
CandidatePtr sourceCandidatePtr (size_type i) const
 
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...
 
virtual const Pointvertex () const
 vertex position (overwritten by PF...) More...
 
virtual double vx () const
 x coordinate of vertex position More...
 
virtual double vy () const
 y coordinate of vertex position More...
 
virtual double vz () const
 z coordinate of vertex position More...
 
virtual ~PFCandidate ()
 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...
 
virtual const Candidatedaughter (size_type) const
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) More...
 
virtual Candidatedaughter (size_type)
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 More...
 
virtual Candidatedaughter (const std::string &s)
 return daughter with a specified role name More...
 
virtual const Candidatedaughter (const std::string &s) const
 return daughter with a specified role name More...
 
virtual const Candidatemother (size_type i=0) const
 return pointer to mother More...
 
std::string name () const
 get the name of the candidate More...
 
virtual size_type numberOfDaughters () const
 number of daughters More...
 
virtual size_type numberOfMothers () const
 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...
 
virtual ~CompositeCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
virtual Vector boostToCM () const final
 
virtual 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)
 
virtual double energy () const final
 energy More...
 
virtual double et () const final
 transverse energy More...
 
virtual double et2 () const final
 transverse energy squared (use this for cut!) More...
 
virtual double eta () const final
 momentum pseudorapidity More...
 
virtual void fillVertexCovariance (CovarianceMatrix &v) const
 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...
 
virtual bool hasMasterClone () const
 
virtual bool hasMasterClonePtr () const
 
virtual bool isCaloMuon () const
 
virtual bool isConvertedPhoton () const
 
virtual bool isElectron () const
 
virtual bool isGlobalMuon () const
 
virtual bool isJet () const
 
virtual bool isMuon () const
 
virtual bool isPhoton () const
 
virtual bool isStandAloneMuon () const
 
virtual bool isTrackerMuon () const
 
 LeafCandidate ()
 
 LeafCandidate (const Candidate &c)
 
template<typename... Args>
 LeafCandidate (Args &&...args)
 
 LeafCandidate (LeafCandidate &rh)
 
 LeafCandidate (LeafCandidate &&)=default
 
 LeafCandidate (LeafCandidate const &)=default
 
virtual bool longLived () const final
 is long lived? More...
 
virtual double mass () const final
 mass More...
 
virtual bool massConstraint () const final
 do mass constraint? More...
 
virtual double massSqr () const final
 mass squared More...
 
virtual const CandidateBaseRefmasterClone () const
 
virtual const CandidatePtrmasterClonePtr () const
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
virtual Vector momentum () const final
 spatial momentum vector More...
 
virtual double mt () const final
 transverse mass More...
 
virtual 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...
 
LeafCandidateoperator= (LeafCandidate &&)=default
 
LeafCandidateoperator= (LeafCandidate const &)=default
 
virtual double p () const final
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const final
 four-momentum Lorentz vector More...
 
virtual int pdgId () const final
 PDG identifier. More...
 
virtual double phi () const final
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const final
 four-momentum Lorentz vector More...
 
virtual double pt () const final
 transverse momentum More...
 
virtual double px () const final
 x coordinate of momentum vector More...
 
virtual double py () const final
 y coordinate of momentum vector More...
 
virtual double pz () const final
 z coordinate of momentum vector More...
 
virtual double rapidity () const final
 rapidity More...
 
virtual void setCharge (Charge q) final
 set electric charge More...
 
virtual void setLongLived () final
 
virtual void setMass (double m) final
 set particle mass More...
 
virtual void setMassConstraint () final
 
virtual void setP4 (const LorentzVector &p4) final
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4) final
 set 4-momentum More...
 
virtual void setPdgId (int pdgId) final
 
virtual void setPz (double pz) final
 
virtual void setStatus (int status) final
 set status word More...
 
virtual void setThreeCharge (Charge qx3) final
 set electric charge More...
 
virtual int status () const final
 status word More...
 
virtual double theta () const final
 momentum polar angle More...
 
virtual int threeCharge () const final
 electric charge More...
 
virtual double vertexChi2 () const
 chi-squares More...
 
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix vertexCovariance () const final
 return SMatrix More...
 
virtual double vertexNdof () const
 
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
virtual double y () const final
 rapidity More...
 
virtual ~LeafCandidate ()
 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
 
virtual bool overlap (const Candidate &) const
 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_
 
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 39 of file PFCandidate.h.

Member Typedef Documentation

Definition at line 388 of file PFCandidate.h.

return indices of elements used in the block

return elements return elements in blocks

Definition at line 385 of file PFCandidate.h.

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

Definition at line 389 of file PFCandidate.h.

Definition at line 386 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 55 of file PFCandidate.h.

particle types

Enumerator
X 
h 
e 
mu 
gamma 
h0 
h_HF 
egamma_HF 

Definition at line 44 of file PFCandidate.h.

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

Definition at line 76 of file PFCandidate.h.

Constructor & Destructor Documentation

PFCandidate::PFCandidate ( )

default constructor

Definition at line 31 of file PFCandidate.cc.

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

Referenced by clone().

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.),
52  time_(0.f),timeError_(-1.f)
53 {
54 
56 
58  refsInfo_.reserve(3);
59 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:480
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:517
float timeError_
timing information uncertainty (&lt;0 if timing not available)
Definition: PFCandidate.h:525
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
virtual void setPdgId(int pdgId) final
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:491
static const float bigMva_
Definition: PFCandidate.h:393
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:500
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:459
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:503
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:494
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:488
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:471
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:243
double f[11][100]
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:468
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
PFVertexType vertexType_
Definition: PFCandidate.h:482
float time_
timing information (valid if timeError_ &gt;= 0)
Definition: PFCandidate.h:523
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:497
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:474
PFCandidate::PFCandidate ( const PFCandidatePtr sourcePtr)

constructor from a reference (keeps track of source relationship)

Definition at line 62 of file PFCandidate.cc.

References sourcePtr_.

62  :
63  PFCandidate(*sourcePtr)
64 {
65  sourcePtr_ = sourcePtr;
66 }
PFCandidate()
default constructor
Definition: PFCandidate.cc:31
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:445
PFCandidate::PFCandidate ( Charge  q,
const LorentzVector p4,
ParticleType  particleId 
)

Definition at line 69 of file PFCandidate.cc.

References blocksStorage_, e, elementsStorage_, Exception, h, mu, muonTrackType_, reco::Muon::None, refsInfo_, edm::RefVector< C, T, F >::reserve(), reco::LeafCandidate::setPdgId(), and translateTypeToPdgId().

71  :
72 
74  elementsInBlocks_(nullptr),
75  ecalERatio_(1.),
76  hcalERatio_(1.),
77  hoERatio_(1.),
78  rawEcalEnergy_(0.),
79  rawHcalEnergy_(0.),
80  rawHoEnergy_(0.),
81  ps1Energy_(0.),
82  ps2Energy_(0.),
83  flags_(0),
84  deltaP_(0.),
94  time_(0.f),timeError_(-1.f)
95 {
96  refsInfo_.reserve(3);
98  elementsStorage_.reserve(10);
99 
101 
102  // proceed with various consistency checks
103 
104  // charged candidate: track ref and charge must be non null
105  if( partId == h ||
106  partId == e ||
107  partId == mu ) {
108 
109  if( charge == 0 ) {
110  string err;
111  err+="Attempt to construct a charged PFCandidate with a zero charge";
112  throw cms::Exception("InconsistentValue",
113  err.c_str() );
114  }
115  }
116  else {
117  if( charge ) {
118  string err;
119  err += "Attempt to construct a neutral PFCandidate ";
120  err += "with a non-zero charge";
121  throw cms::Exception("InconsistentValue",
122  err.c_str() );
123  }
124  }
125  setPdgId( translateTypeToPdgId( partId ) );
126 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:480
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:517
float timeError_
timing information uncertainty (&lt;0 if timing not available)
Definition: PFCandidate.h:525
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
virtual void setPdgId(int pdgId) final
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:491
static const float bigMva_
Definition: PFCandidate.h:393
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:500
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:459
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:503
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:494
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:488
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:471
virtual int charge() const final
electric charge
Definition: LeafCandidate.h:91
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:243
CompositeCandidate(std::string name="")
default constructor
double f[11][100]
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:468
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:113
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
PFVertexType vertexType_
Definition: PFCandidate.h:482
float time_
timing information (valid if timeError_ &gt;= 0)
Definition: PFCandidate.h:523
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:497
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:474
Elements elementsStorage_
Definition: PFCandidate.h:441
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
PFCandidate::PFCandidate ( const PFCandidate iOther)

copy constructor

Definition at line 128 of file PFCandidate.cc.

References elementsInBlocks_, and tmp.

128  :
129  CompositeCandidate(iOther),
130  elementsInBlocks_(nullptr),
133  sourcePtr_(iOther.sourcePtr_),
135  ecalERatio_(iOther.ecalERatio_),
136  hcalERatio_(iOther.hcalERatio_),
137  hoERatio_(iOther.hoERatio_),
140  rawHoEnergy_(iOther.rawHoEnergy_),
141  ps1Energy_(iOther.ps1Energy_),
142  ps2Energy_(iOther.ps2Energy_),
143  flags_(iOther.flags_),
144  deltaP_(iOther.deltaP_),
145  vertexType_(iOther.vertexType_),
147  mva_e_pi_(iOther.mva_e_pi_),
148  mva_e_mu_(iOther.mva_e_mu_),
149  mva_pi_mu_(iOther.mva_pi_mu_),
154  getter_(iOther.getter_),
156  refsInfo_(iOther.refsInfo_),
158  time_(iOther.time_),timeError_(iOther.timeError_)
159 {
160  auto tmp = iOther.elementsInBlocks_.load(std::memory_order_acquire);
161  if(nullptr != tmp) {
162  elementsInBlocks_.store( new ElementsInBlocks{*tmp}, std::memory_order_release);
163  }
164 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:480
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:517
float timeError_
timing information uncertainty (&lt;0 if timing not available)
Definition: PFCandidate.h:525
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:491
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:500
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:459
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:503
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:494
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:488
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:471
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
CompositeCandidate(std::string name="")
default constructor
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:468
std::vector< ElementInBlock > ElementsInBlocks
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
PFVertexType vertexType_
Definition: PFCandidate.h:482
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:445
float time_
timing information (valid if timeError_ &gt;= 0)
Definition: PFCandidate.h:523
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:506
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:497
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:474
Elements elementsStorage_
Definition: PFCandidate.h:441
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:520
PFCandidate::~PFCandidate ( )
virtual

destructor

Definition at line 207 of file PFCandidate.cc.

References elementsInBlocks_.

207  {
208  delete elementsInBlocks_.load(std::memory_order_acquire);
209 }
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436

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 216 of file PFCandidate.cc.

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

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

217  {
218  //elementsInBlocks_.push_back( make_pair(blockref.key(), elementIndex) );
219  if (blocksStorage_.size()==0)
220  blocksStorage_ =Blocks(blockref.id());
221  blocksStorage_.push_back(blockref);
222  elementsStorage_.push_back(elementIndex);
223  auto ptr = elementsInBlocks_.exchange(nullptr);
224  delete ptr;
225 }
edm::RefVector< reco::PFBlockCollection > Blocks
Definition: PFCandidate.h:388
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:69
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
Elements elementsStorage_
Definition: PFCandidate.h:441
const reco::Muon::MuonTrackType reco::PFCandidate::bestMuonTrackType ( ) const
inline

get the Best Muon Track Ref

Definition at line 362 of file PFCandidate.h.

References muonTrackType_.

362  {
363  return muonTrackType_;
364  }
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
virtual const reco::Track* reco::PFCandidate::bestTrack ( ) const
inlinevirtual

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

Reimplemented from reco::Candidate.

Definition at line 161 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 dxyError(), dzError(), and Muon.Muon::ptErr().

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

return a clone

Reimplemented from reco::CompositeCandidate.

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

Definition at line 211 of file PFCandidate.cc.

References PFCandidate().

Referenced by DistortedPFCandProducer::produce().

211  {
212  return new PFCandidate( * this );
213 }
PFCandidate()
default constructor
Definition: PFCandidate.cc:31
reco::ConversionRef PFCandidate::conversionRef ( ) const

return a reference to the original conversion

Definition at line 559 of file PFCandidate.cc.

References GETREF, kRefConversionBit, and kRefConversionMask.

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

uncertainty on 3-momentum

Definition at line 297 of file PFCandidate.h.

References deltaP_.

Referenced by PFElectronTranslator::createGsfElectrons().

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

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

Definition at line 524 of file PFCandidate.cc.

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

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

524  {
525  if (type == T_TO_DISP) {
527  }
528  else if (type == T_FROM_DISP) {
530  }
532 }
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
virtual float reco::PFCandidate::dxyError ( ) const
inlinevirtual

uncertainty on dxy

Reimplemented from reco::Candidate.

Definition at line 172 of file PFCandidate.h.

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

172 { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dxyError(); else return 0; }
virtual const reco::Track * bestTrack() const
Definition: PFCandidate.h:161
virtual float reco::PFCandidate::dzError ( ) const
inlinevirtual

uncertainty on dz

Reimplemented from reco::Candidate.

Definition at line 170 of file PFCandidate.h.

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

170 { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dzError(); else return 0; }
virtual const reco::Track * bestTrack() const
Definition: PFCandidate.h:161
double reco::PFCandidate::ecalEnergy ( ) const
inline

return corrected Ecal energy

Definition at line 221 of file PFCandidate.h.

References ecalERatio_, and rawEcalEnergy_.

Referenced by PFCandConnector::analyseNuclearWPrim(), PFCandidateBenchmark::fillOne(), FWECalPFCandidateProxyBuilder::getEt(), pat::PATPackedCandidateProducer::produce(), and pat::PATMuonProducer::produce().

221 { return ecalERatio_*rawEcalEnergy_;}
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
reco::PFCandidateEGammaExtraRef PFCandidate::egammaExtraRef ( ) const
reco::PFCandidateElectronExtraRef PFCandidate::electronExtraRef ( ) const
const PFCandidate::ElementsInBlocks & PFCandidate::elementsInBlocks ( ) const

Definition at line 687 of file PFCandidate.cc.

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

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

687  {
688 
689  if (nullptr == elementsInBlocks_.load(std::memory_order_acquire))
690  {
691  std::unique_ptr<ElementsInBlocks> temp( new ElementsInBlocks(blocksStorage_.size()));
692  for(unsigned int icopy=0;icopy!=blocksStorage_.size();++icopy)
693  (*temp)[icopy]=std::make_pair(blocksStorage_[icopy],elementsStorage_[icopy]);
694  ElementsInBlocks* expected=nullptr;
695  if(elementsInBlocks_.compare_exchange_strong(expected,temp.get(),std::memory_order_acq_rel)) {
696  temp.release();
697  }
698  }
699  return *(elementsInBlocks_.load(std::memory_order_acquire));
700 }
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:386
std::vector< ElementInBlock > ElementsInBlocks
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
Elements elementsStorage_
Definition: PFCandidate.h:441
bool PFCandidate::flag ( Flags  theFlag) const

return a given flag

Definition at line 300 of file PFCandidate.cc.

References flags_.

Referenced by PFCandConnector::isPrimaryNucl(), PFCandConnector::isSecondaryNucl(), setConversionRef(), and setDisplacedVertexRef().

300  {
301 
302  return (flags_>>theFlag) & 1;
303 }
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
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 406 of file PFCandidate.cc.

References refsInfo_, s_refsBefore, and storedRefsBitPattern_.

407  {
408 
409  if( 0 == (iBit & storedRefsBitPattern_) ) {
410  return false;
411  }
412  aIndex = s_refsBefore[storedRefsBitPattern_ & iMask];
413  unsigned long long bitPacked = refsInfo_[aIndex];
414  oIndex = bitPacked & 0xFFFFFFFFULL; //low 32 bits are the index
415  unsigned short productIndex = (bitPacked & 0x0000FFFF00000000ULL)>>32;
416  unsigned short processIndex = (bitPacked & 0xFFFF000000000000ULL)>>48;
417  oProductID = edm::ProductID(processIndex,productIndex);
418  return true;
419 }
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
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 579 of file PFCandidate.cc.

References GETREF, kRefGsfElectronBit, and kRefGsfElectronMask.

Referenced by SelectionStep< Object >::select().

reco::GsfTrackRef PFCandidate::gsfTrackRef ( ) const
double reco::PFCandidate::hcalEnergy ( ) const
inline

return corrected Hcal energy

Definition at line 231 of file PFCandidate.h.

References hcalERatio_, and rawHcalEnergy_.

Referenced by PFCandConnector::analyseNuclearWPrim(), DQMPFCandidateAnalyzer::analyze(), PFCandidateBenchmark::fillOne(), FWHCalPFCandidateProxyBuilder::getEt(), and pat::PATPackedCandidateProducer::produce().

231 { return hcalERatio_*rawHcalEnergy_;}
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
double reco::PFCandidate::hoEnergy ( ) const
inline

return corrected Hcal energy

Definition at line 241 of file PFCandidate.h.

References hoERatio_, and rawHoEnergy_.

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

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

do we have a valid time information

Definition at line 418 of file PFCandidate.h.

References timeError_.

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

mva for electron-muon discrimination

Definition at line 319 of file PFCandidate.h.

References mva_e_mu_.

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

mva for electron-pion discrimination

Definition at line 313 of file PFCandidate.h.

References mva_e_pi_.

Referenced by PFElectronTranslator::createGsfElectrons(), PFElectronTranslator::fillMVAValueMap(), PFCandidateBenchmark::fillOne(), PFAlgo::processBlock(), and PFElectronTranslator::produce().

313 { return mva_e_pi_;}
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:488
float reco::PFCandidate::mva_gamma_nh ( ) const
inline

mva for neutral hadron - gamma discrimination

Definition at line 345 of file PFCandidate.h.

References mva_gamma_nh_.

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

Definition at line 309 of file PFCandidate.h.

References mva_Isolated_.

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

mva for gamma detection

Definition at line 332 of file PFCandidate.h.

References mva_nothing_gamma_.

Referenced by PFPhotonIsolationCalculator::isPhotonParticleVetoed(), PFIsolationEstimator::isPhotonParticleVetoed(), PFLinker::produce(), and PFPhotonTranslator::produce().

332 { return mva_nothing_gamma_;}
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:497
float reco::PFCandidate::mva_nothing_nh ( ) const
inline

mva for neutral hadron detection

Definition at line 338 of file PFCandidate.h.

References mva_nothing_nh_.

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

mva for pi-muon discrimination

Definition at line 325 of file PFCandidate.h.

References mva_pi_mu_.

325 { return mva_pi_mu_;}
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:494
size_t reco::PFCandidate::numberOfSourceCandidatePtrs ( ) const
inlinevirtual

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

Reimplemented from reco::LeafCandidate.

Definition at line 127 of file PFCandidate.h.

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

Definition at line 166 of file PFCandidate.cc.

References blocksStorage_, deltaP_, ecalERatio_, elementsInBlocks_, elementsStorage_, flags_, getter_, 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_.

166  {
168  auto tmp = iOther.elementsInBlocks_.load(std::memory_order_acquire);
169  if(nullptr != tmp) {
170  delete elementsInBlocks_.exchange( new ElementsInBlocks{*tmp}, std::memory_order_acq_rel);
171  } else {
172  delete elementsInBlocks_.exchange(nullptr, std::memory_order_acq_rel);
173  }
174  blocksStorage_=iOther.blocksStorage_;
175  elementsStorage_=iOther.elementsStorage_;
176  sourcePtr_=iOther.sourcePtr_;
177  muonTrackType_=iOther.muonTrackType_;
178  ecalERatio_=iOther.ecalERatio_;
179  hcalERatio_=iOther.hcalERatio_;
180  hoERatio_=iOther.hoERatio_;
181  rawEcalEnergy_=iOther.rawEcalEnergy_;
182  rawHcalEnergy_=iOther.rawHcalEnergy_;
183  rawHoEnergy_=iOther.rawHoEnergy_;
184  ps1Energy_=iOther.ps1Energy_;
185  ps2Energy_=iOther.ps2Energy_;
186  flags_=iOther.flags_;
187  deltaP_=iOther.deltaP_;
188  vertexType_=iOther.vertexType_;
189  mva_Isolated_=iOther.mva_Isolated_;
190  mva_e_pi_=iOther.mva_e_pi_;
191  mva_e_mu_=iOther.mva_e_mu_;
192  mva_pi_mu_=iOther.mva_pi_mu_;
193  mva_nothing_gamma_=iOther.mva_nothing_gamma_;
194  mva_nothing_nh_=iOther.mva_nothing_nh_;
195  mva_gamma_nh_=iOther.mva_gamma_nh_;
196  positionAtECALEntrance_=iOther.positionAtECALEntrance_;
197  getter_=iOther.getter_;
198  storedRefsBitPattern_=iOther.storedRefsBitPattern_;
199  refsInfo_=iOther.refsInfo_;
200  refsCollectionCache_=iOther.refsCollectionCache_;
201  time_=iOther.time_;
202  timeError_=iOther.timeError_;
203 
204  return *this;
205 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:480
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:517
float timeError_
timing information uncertainty (&lt;0 if timing not available)
Definition: PFCandidate.h:525
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:491
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:500
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:459
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:503
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:494
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:488
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:471
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:468
std::vector< ElementInBlock > ElementsInBlocks
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
PFVertexType vertexType_
Definition: PFCandidate.h:482
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:445
float time_
timing information (valid if timeError_ &gt;= 0)
Definition: PFCandidate.h:523
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:506
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:497
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:474
LeafCandidate & operator=(LeafCandidate &&)=default
Elements elementsStorage_
Definition: PFCandidate.h:441
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:520
bool PFCandidate::overlap ( const Candidate other) const
privatevirtual

Polymorphic overlap.

Reimplemented from reco::CompositeCandidate.

Definition at line 266 of file PFCandidate.cc.

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

266  {
267  CandidatePtr myPtr = sourceCandidatePtr(0);
268  if (myPtr.isNull()) return false;
269  for (size_t i = 0, n = other.numberOfSourceCandidatePtrs(); i < n; ++i) {
270  CandidatePtr otherPtr = other.sourceCandidatePtr(i);
271  if ((otherPtr == myPtr) ||
272  (sourcePtr_.isNonnull() && otherPtr.isNonnull() && sourcePtr_->overlap(*otherPtr))) {
273  return true;
274  }
275  }
276  return false;
277 }
int i
Definition: DBlmapReader.cc:9
virtual CandidatePtr sourceCandidatePtr(size_type i) const
Definition: Candidate.h:170
CandidatePtr sourceCandidatePtr(size_type i) const
Definition: PFCandidate.h:131
bool isNull() const
Checks for null.
Definition: Ptr.h:165
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:169
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:445
virtual size_t numberOfSourceCandidatePtrs() const =0
virtual ParticleType reco::PFCandidate::particleId ( ) const
inlinevirtual

particle identification code

Definition at line 373 of file PFCandidate.h.

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

Referenced by PFTester::analyze(), JetTester_HeavyIons::analyze(), DQMPFCandidateAnalyzer::analyze(), JetAnalyzer_HeavyIons::analyze(), 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(), 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(), pf2pat::PFMETAlgo::produce(), Type0PFMETcorrInputProducer::produce(), PFLinker::produce(), PFPhotonTranslator::produce(), reco::tau::RecoTauIsolationMasking::resolution(), pf2pat::PFIsoDepositAlgo::sameParticle(), setConversionRef(), setDisplacedVertexRef(), setPhotonRef(), setSuperClusterRef(), and setTrackRef().

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

return a reference to the photon extra

Definition at line 597 of file PFCandidate.cc.

References GETREF, kRefPFPhotonExtraBit, and kRefPFPhotonExtraMask.

Referenced by PFPhotonTranslator::produce().

reco::PhotonRef PFCandidate::photonRef ( ) const

return a reference to the corresponding Photon if any

Definition at line 593 of file PFCandidate.cc.

References GETREF, kRefPhotonBit, and kRefPhotonMask.

593  {
595 }
#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 367 of file PFCandidate.h.

References positionAtECALEntrance_.

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

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

return corrected PS1 energy

Definition at line 276 of file PFCandidate.h.

References ps1Energy_.

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

return corrected PS2 energy

Definition at line 282 of file PFCandidate.h.

References ps2Energy_.

282 { return ps2Energy_;}
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:474
double reco::PFCandidate::rawEcalEnergy ( ) const
inline

return corrected Ecal energy

Definition at line 224 of file PFCandidate.h.

References rawEcalEnergy_.

Referenced by DQMPFCandidateAnalyzer::analyze(), PFMuonAlgo::cleanPunchThroughAndFakes(), PFElectronTranslator::createBasicCluster(), and GreedyMuonPFCandidateFilter::filter().

224 { return rawEcalEnergy_;}
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
double reco::PFCandidate::rawHcalEnergy ( ) const
inline

return raw Hcal energy

Definition at line 234 of file PFCandidate.h.

References rawHcalEnergy_.

Referenced by DQMPFCandidateAnalyzer::analyze(), PFMuonAlgo::cleanPunchThroughAndFakes(), and GreedyMuonPFCandidateFilter::filter().

234 { return rawHcalEnergy_;}
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
double reco::PFCandidate::rawHoEnergy ( ) const
inline

return raw Hcal energy

Definition at line 244 of file PFCandidate.h.

References rawHoEnergy_.

244 { return rawHoEnergy_;}
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:468
void PFCandidate::rescaleMomentum ( double  rescaleFactor)

particle momentum *= rescaleFactor

Definition at line 283 of file PFCandidate.cc.

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

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

set mva for electron-muon discrimination

Definition at line 316 of file PFCandidate.h.

References HLT_FULL_cff::mva, and mva_e_mu_.

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

Definition at line 311 of file PFCandidate.h.

References mva_e_pi_.

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

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

set mva for neutral hadron - gamma discrimination

Definition at line 342 of file PFCandidate.h.

References HLT_FULL_cff::mva, and mva_gamma_nh_.

342 { mva_gamma_nh_=mva;}
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:503
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 307 of file PFCandidate.h.

References mva_Isolated_.

Referenced by PFAlgo::processBlock().

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

set mva for gamma detection

Definition at line 329 of file PFCandidate.h.

References HLT_FULL_cff::mva, and mva_nothing_gamma_.

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

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

set mva for neutral hadron detection

Definition at line 335 of file PFCandidate.h.

References HLT_FULL_cff::mva, and mva_nothing_nh_.

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

set mva for pi-muon discrimination

Definition at line 322 of file PFCandidate.h.

References HLT_FULL_cff::mva, and mva_pi_mu_.

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

set ref to original reco conversion

Definition at line 535 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().

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

set uncertainty on momentum

Definition at line 294 of file PFCandidate.h.

References deltaP_, and reco::dp.

Referenced by PFLinker::produce().

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

set displaced vertex reference

Definition at line 480 of file PFCandidate.cc.

References Exception, flag(), h, 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.

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

set corrected Ecal energy

Definition at line 217 of file PFCandidate.h.

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

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

217  {
218  rawEcalEnergy_ = eeRaw; ecalERatio_= std::abs(eeRaw)<1.e-6 ? 1.0 : eeCorr/eeRaw;}
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
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 290 of file PFCandidate.cc.

References flags_.

Referenced by PFPhotonAlgo::RunPFPhoton().

290  {
291 
292  if(value)
293  flags_ = flags_ | (1<<theFlag);
294  else
295  flags_ = flags_ ^ (1<<theFlag);
296 }
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
void reco::PFCandidate::setFlag ( unsigned  shift,
unsigned  flag,
bool  value 
)
private
void PFCandidate::setGsfElectronRef ( const reco::GsfElectronRef ref)

set GsfElectronRef

Definition at line 574 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().

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

set gsftrack reference

Definition at line 459 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 PFEGammaAlgo::fillPFCandidates(), and PFElectronAlgo::SetCandidates().

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

set corrected Hcal energy

Definition at line 227 of file PFCandidate.h.

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

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

227  {
228  rawHcalEnergy_ = ehRaw; hcalERatio_= std::abs(ehRaw)<1.e-6 ? 1.0 : ehCorr/ehRaw;}
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
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 237 of file PFCandidate.h.

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

Referenced by PFAlgo::processBlock().

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

set muon reference

Definition at line 441 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 PFLinker::produce(), and PFMuonAlgo::reconstructMuon().

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

set the Best Muon Track Ref

Definition at line 356 of file PFCandidate.h.

References muonTrackType_.

Referenced by PFMuonAlgo::changeTrack().

356  {
358  }
type
Definition: HCALResponse.h:21
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
void PFCandidate::setParticleType ( ParticleType  type)

set Particle Type

Definition at line 261 of file PFCandidate.cc.

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

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

261  {
263 }
type
Definition: HCALResponse.h:21
virtual void setPdgId(int pdgId) final
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:243
void PFCandidate::setPFEGammaExtraRef ( const reco::PFCandidateEGammaExtraRef ref)

set the PF EGamma Extra Ref

Definition at line 646 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().

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

set the PF Electron Extra Ref

Definition at line 584 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().

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

set the PF Photon Extra Ref

Definition at line 641 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().

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

set ref to the corresponding reco::Photon if any

Definition at line 609 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().

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

set position at ECAL entrance

Definition at line 348 of file PFCandidate.h.

References positionAtECALEntrance_.

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

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

set corrected PS1 energy

Definition at line 273 of file PFCandidate.h.

References reco::e1, and ps1Energy_.

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

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

set corrected PS2 energy

Definition at line 279 of file PFCandidate.h.

References reco::e2, and ps2Energy_.

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

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

Definition at line 125 of file PFCandidate.h.

References sourcePtr_.

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

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

Definition at line 625 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(), PFPhotonAlgo::RunPFPhoton(), and PFElectronAlgo::SetCandidates().

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

the timing information

Definition at line 424 of file PFCandidate.h.

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

Referenced by PFEGammaAlgo::fillPFCandidates().

424 { time_ = time; timeError_ = timeError; }
float timeError_
timing information uncertainty (&lt;0 if timing not available)
Definition: PFCandidate.h:525
float time() const
Definition: PFCandidate.h:420
float time_
timing information (valid if timeError_ &gt;= 0)
Definition: PFCandidate.h:523
float timeError() const
Definition: PFCandidate.h:422
void PFCandidate::setTrackRef ( const reco::TrackRef ref)

set track reference

Definition at line 421 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(), and PFElectronAlgo::SetCandidates().

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

set ref to original reco conversion

Definition at line 564 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().

564  {
565  storeRefInfo(kRefV0Mask, kRefV0Bit, iRef.isNonnull(),
566  iRef.refCore(), iRef.key(),iRef.productGetter());
567 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:366
virtual void reco::PFCandidate::setVertex ( const math::XYZPoint vertex)
inlinevirtual

set vertex

Reimplemented from reco::LeafCandidate.

Definition at line 408 of file PFCandidate.h.

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

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

408  {
410  }
virtual void setVertex(const Point &vertex)
set vertex
virtual double p() const final
magnitude of momentum vector
PFVertexType vertexType_
Definition: PFCandidate.h:482
void reco::PFCandidate::setVertexSource ( PFVertexType  vt)
inline

Definition at line 406 of file PFCandidate.h.

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

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

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

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

Reimplemented from reco::LeafCandidate.

Definition at line 131 of file PFCandidate.h.

References sourcePtr_.

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

131  {
132  return sourcePtr_;
133  }
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:445
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 366 of file PFCandidate.cc.

References assert(), bitPackRefInfo(), edmStreamStallGrapher::const, 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().

371  {
372 
373  size_t index = s_refsBefore[storedRefsBitPattern_ & iMask];
374  if ( 0 == getter_) {
375  getter_ = iGetter;
376  }
377 
378  if(iIsValid) {
379  if(0 == (storedRefsBitPattern_ & iBit) ) {
380  refsInfo_.insert(refsInfo_.begin()+index, bitPackRefInfo(iCore,iKey));
381  if (iGetter==0)
383  static_cast<void const*>(iCore.productPtr()));
384  else
386  } else {
387  assert(refsInfo_.size()>index);
388  *(refsInfo_.begin()+index)=bitPackRefInfo(iCore,iKey);
389  if (iGetter==0)
390  *(refsCollectionCache_.begin()+index)=static_cast<void const*>(iCore.productPtr());
391  else
392  *(refsCollectionCache_.begin()+index)=nullptr;
393 
394  }
395  storedRefsBitPattern_ |= iBit;
396  } else{
397  if( storedRefsBitPattern_ & iBit) {
398  refsInfo_.erase(refsInfo_.begin()+index);
400  storedRefsBitPattern_ ^= iBit;
401  }
402  }
403 
404 }
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:517
assert(m_qm.get())
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
static unsigned long long bitPackRefInfo(const edm::RefCore &iCore, size_t iIndex)
Definition: PFCandidate.cc:359
void const * productPtr() const
Definition: RefCore.h:52
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
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:520
reco::SuperClusterRef PFCandidate::superClusterRef ( ) const
float reco::PFCandidate::time ( ) const
inline
Returns
the timing

Definition at line 420 of file PFCandidate.h.

References time_.

Referenced by setTime().

420 { return time_; }
float time_
timing information (valid if timeError_ &gt;= 0)
Definition: PFCandidate.h:523
float reco::PFCandidate::timeError ( ) const
inline
Returns
the timing uncertainty

Definition at line 422 of file PFCandidate.h.

References timeError_.

Referenced by setTime().

422 { return timeError_; }
float timeError_
timing information uncertainty (&lt;0 if timing not available)
Definition: PFCandidate.h:525
reco::TrackRef PFCandidate::trackRef ( ) const

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

Definition at line 438 of file PFCandidate.cc.

References GETREF, kRefTrackBit, and kRefTrackMask.

Referenced by PFMuonAlgo::addMissingMuons(), bestTrack(), 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_(), PFPhotonIsolationCalculator::isChargedParticleVetoed(), PFIsolationEstimator::isChargedParticleVetoed(), reco::modules::HICaloCompatibleTrackSelector::matchPFCandToTrack(), MuonWithPFIsoProducer::produce(), PFElectronTranslator::produce(), pat::PATLostTracks::produce(), EgammaHLTPFChargedIsolationProducer::produce(), PuppiProducer::produce(), pat::PATPackedCandidateProducer::produce(), setMuonRef(), BoostedDoubleSVProducer::setTracksPV(), PFRecoTauDiscriminationByFlightPathSignificance::threeProngFlightPathSig(), and vertex().

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

Definition at line 229 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(), and SoftKillerProducer::produce().

229  {
230  switch (std::abs(pdgid)) {
231  case 211: return h;
232  case 11: return e;
233  case 13: return mu;
234  case 22: return gamma;
235  case 130: return h0;
236  case 1: return h_HF;
237  case 2: return egamma_HF;
238  case 0: return X;
239  default: return X;
240  }
241 }
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 243 of file PFCandidate.cc.

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

Referenced by PFCandidate(), and setParticleType().

243  {
244 
245  int thecharge = charge();
246 
247  switch( type ) {
248  case h: return thecharge*211; // pi+
249  case e: return thecharge*(-11);
250  case mu: return thecharge*(-13);
251  case gamma: return 22;
252  case h0: return 130; // K_L0
253  case h_HF: return 1; // dummy pdg code
254  case egamma_HF: return 2; // dummy pdg code
255  case X:
256  default: return 0;
257  }
258 }
type
Definition: HCALResponse.h:21
virtual 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 569 of file PFCandidate.cc.

References GETREF, kRefV0Bit, and kRefV0Mask.

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

vertex position (overwritten by PF...)

Reimplemented from reco::LeafCandidate.

Definition at line 652 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(), PFPileUpAlgo::chargedHadronVertex(), PFIsolationEstimator::chargedHadronVertex(), PFPhotonIsolationCalculator::chargedHadronVertex(), PFCandWithSuperClusterExtractor::depositFromObject(), Tau.Tau::dxy(), FFTJetPFPileupCleaner::findSomeVertexWFakes(), PFConcretePFCandidateProducer::produce(), EgammaHLTPFNeutralIsolationProducer::produce(), pat::PATPackedCandidateProducer::produce(), vx(), vy(), and vz().

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

x coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 413 of file PFCandidate.h.

References vertex().

Referenced by PFIsolationEstimator::fGetIsolationInRings().

413 {return vertex().x();}
virtual const Point & vertex() const
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:652
virtual double reco::PFCandidate::vy ( ) const
inlinevirtual

y 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().y();}
virtual const Point & vertex() const
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:652
virtual double reco::PFCandidate::vz ( ) const
inlinevirtual

z coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 415 of file PFCandidate.h.

References vertex().

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

415 {return vertex().z();}
virtual const Point & vertex() const
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:652

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 393 of file PFCandidate.h.

Blocks reco::PFCandidate::blocksStorage_
private

Definition at line 440 of file PFCandidate.h.

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

float reco::PFCandidate::deltaP_
private

uncertainty on 3-momentum

Definition at line 480 of file PFCandidate.h.

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

float reco::PFCandidate::ecalERatio_
private

corrected ECAL energy ratio (corrected/raw)

Definition at line 453 of file PFCandidate.h.

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

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

Definition at line 441 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 477 of file PFCandidate.h.

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

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

Definition at line 517 of file PFCandidate.h.

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

float reco::PFCandidate::hcalERatio_
private

corrected HCAL energy ratio (corrected/raw)

Definition at line 456 of file PFCandidate.h.

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

float reco::PFCandidate::hoERatio_
private

corrected HO energy ratio (corrected/raw)

Definition at line 459 of file PFCandidate.h.

Referenced by hoEnergy(), operator=(), 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 450 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 491 of file PFCandidate.h.

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

float reco::PFCandidate::mva_e_pi_
private

mva for electron-pion discrimination

Definition at line 488 of file PFCandidate.h.

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

float reco::PFCandidate::mva_gamma_nh_
private

mva for neutral hadron - gamma discrimination

Definition at line 503 of file PFCandidate.h.

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

float reco::PFCandidate::mva_Isolated_
private

Definition at line 485 of file PFCandidate.h.

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

float reco::PFCandidate::mva_nothing_gamma_
private

mva for gamma detection

Definition at line 497 of file PFCandidate.h.

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

float reco::PFCandidate::mva_nothing_nh_
private

mva for neutral hadron detection

Definition at line 500 of file PFCandidate.h.

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

float reco::PFCandidate::mva_pi_mu_
private

mva for pi-muon discrimination

Definition at line 494 of file PFCandidate.h.

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

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

position at ECAL entrance, from the PFRecTrack

Definition at line 506 of file PFCandidate.h.

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

float reco::PFCandidate::ps1Energy_
private

corrected PS1 energy

Definition at line 471 of file PFCandidate.h.

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

float reco::PFCandidate::ps2Energy_
private

corrected PS2 energy

Definition at line 474 of file PFCandidate.h.

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

float reco::PFCandidate::rawEcalEnergy_
private

raw ECAL energy

Definition at line 462 of file PFCandidate.h.

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

float reco::PFCandidate::rawHcalEnergy_
private

raw HCAL energy

Definition at line 465 of file PFCandidate.h.

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

float reco::PFCandidate::rawHoEnergy_
private

raw HO energy

Definition at line 468 of file PFCandidate.h.

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

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

Definition at line 520 of file PFCandidate.h.

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

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

Definition at line 519 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 445 of file PFCandidate.h.

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

unsigned short reco::PFCandidate::storedRefsBitPattern_
private

Definition at line 518 of file PFCandidate.h.

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

float reco::PFCandidate::time_
private

timing information (valid if timeError_ >= 0)

Definition at line 523 of file PFCandidate.h.

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

float reco::PFCandidate::timeError_
private

timing information uncertainty (<0 if timing not available)

Definition at line 525 of file PFCandidate.h.

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

PFVertexType reco::PFCandidate::vertexType_
private

Definition at line 482 of file PFCandidate.h.

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