CMS 3D CMS Logo

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

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

#include <PFCandidate.h>

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

Public Types

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

Public Member Functions

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

Static Public Attributes

static const float bigMva_ = -999.
 

Private Member Functions

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

Private Attributes

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

Friends

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

Additional Inherited Members

Detailed Description

Particle reconstructed by the particle flow algorithm.

particle candidate from particle flow

Author
Colin Bernet
Date
February 2007

Definition at line 41 of file PFCandidate.h.

Member Typedef Documentation

◆ Blocks

Definition at line 381 of file PFCandidate.h.

◆ ElementInBlock

return indices of elements used in the block

return elements return elements in blocks

Definition at line 378 of file PFCandidate.h.

◆ Elements

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

Definition at line 382 of file PFCandidate.h.

◆ ElementsInBlocks

Definition at line 379 of file PFCandidate.h.

Member Enumeration Documentation

◆ Flags

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.

55  {
56  NORMAL = 0,
58  E_ETA_0,
64  H_ETA_0,
68  T_TO_DISP,
70  T_FROM_V0,
73  };

◆ ParticleType

particle types

Enumerator
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  };

◆ PFVertexType

Enumerator
kCandVertex 
kTrkVertex 
kComMuonVertex 
kSAMuonVertex 
kTrkMuonVertex 
kGSFVertex 
kTPFMSMuonVertex 
kPickyMuonVertex 
kDYTMuonVertex 

Definition at line 75 of file PFCandidate.h.

75  {
76  kCandVertex = 0,
77  kTrkVertex = 1,
78  kComMuonVertex = 2,
79  kSAMuonVertex = 3,
80  kTrkMuonVertex = 4,
81  kGSFVertex = 5,
82  kTPFMSMuonVertex = 6,
83  kPickyMuonVertex = 7,
84  kDYTMuonVertex = 8
85  };

Constructor & Destructor Documentation

◆ PFCandidate() [1/4]

PFCandidate::PFCandidate ( )

default constructor

Definition at line 25 of file PFCandidate.cc.

26  : elementsInBlocks_(nullptr),
27  ecalERatio_(1.),
28  hcalERatio_(1.),
29  hoERatio_(1.),
30  rawEcalEnergy_(0.),
31  rawHcalEnergy_(0.),
32  rawHoEnergy_(0.),
33  ps1Energy_(0.),
34  ps2Energy_(0.),
35  flags_(0),
36  deltaP_(0.),
45  getter_(nullptr),
47  time_(0.f),
48  timeError_(-1.f) {
50 
52  refsInfo_.reserve(3);
54 }

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

Referenced by clone().

◆ PFCandidate() [2/4]

PFCandidate::PFCandidate ( const PFCandidatePtr sourcePtr)

constructor from a reference (keeps track of source relationship)

Definition at line 58 of file PFCandidate.cc.

58  : PFCandidate(*sourcePtr) {
59  sourcePtr_ = sourcePtr;
60  hcalDepthEnergyFractions_ = sourcePtr->hcalDepthEnergyFractions_; // GP not sure it's needed
61 }

References hcalDepthEnergyFractions_, and sourcePtr_.

◆ PFCandidate() [3/4]

PFCandidate::PFCandidate ( Charge  q,
const LorentzVector p4,
ParticleType  particleId 
)

Definition at line 63 of file PFCandidate.cc.

65  elementsInBlocks_(nullptr),
66  ecalERatio_(1.),
67  hcalERatio_(1.),
68  hoERatio_(1.),
69  rawEcalEnergy_(0.),
70  rawHcalEnergy_(0.),
71  rawHoEnergy_(0.),
72  ps1Energy_(0.),
73  ps2Energy_(0.),
74  flags_(0),
75  deltaP_(0.),
84  getter_(nullptr),
86  time_(0.f),
87  timeError_(-1.f) {
88  refsInfo_.reserve(3);
90  elementsStorage_.reserve(10);
92 
94 
95  // proceed with various consistency checks
96 
97  // charged candidate: track ref and charge must be non null
98  if (partId == h || partId == e || partId == mu) {
99  if (charge == 0) {
100  string err;
101  err += "Attempt to construct a charged PFCandidate with a zero charge";
102  throw cms::Exception("InconsistentValue", err.c_str());
103  }
104  } else {
105  if (charge) {
106  string err;
107  err += "Attempt to construct a neutral PFCandidate ";
108  err += "with a non-zero charge";
109  throw cms::Exception("InconsistentValue", err.c_str());
110  }
111  }
113 }

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

◆ PFCandidate() [4/4]

PFCandidate::PFCandidate ( const PFCandidate iOther)

copy constructor

Definition at line 115 of file PFCandidate.cc.

116  : CompositeCandidate(iOther),
117  elementsInBlocks_(nullptr),
120  sourcePtr_(iOther.sourcePtr_),
122  ecalERatio_(iOther.ecalERatio_),
123  hcalERatio_(iOther.hcalERatio_),
124  hoERatio_(iOther.hoERatio_),
127  rawHoEnergy_(iOther.rawHoEnergy_),
128  ps1Energy_(iOther.ps1Energy_),
129  ps2Energy_(iOther.ps2Energy_),
130  flags_(iOther.flags_),
131  deltaP_(iOther.deltaP_),
132  vertexType_(iOther.vertexType_),
134  mva_e_pi_(iOther.mva_e_pi_),
135  mva_e_mu_(iOther.mva_e_mu_),
136  mva_pi_mu_(iOther.mva_pi_mu_),
141  getter_(iOther.getter_),
143  refsInfo_(iOther.refsInfo_),
145  time_(iOther.time_),
146  timeError_(iOther.timeError_),
148  auto tmp = iOther.elementsInBlocks_.load(std::memory_order_acquire);
149  if (nullptr != tmp) {
150  elementsInBlocks_.store(new ElementsInBlocks{*tmp}, std::memory_order_release);
151  }
152 }

References elementsInBlocks_, and createJobs::tmp.

◆ ~PFCandidate()

PFCandidate::~PFCandidate ( )
override

destructor

Definition at line 195 of file PFCandidate.cc.

195 { delete elementsInBlocks_.load(std::memory_order_acquire); }

References elementsInBlocks_.

Member Function Documentation

◆ addElementInBlock()

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

add an element to the current PFCandidate

add element in block

Definition at line 199 of file PFCandidate.cc.

199  {
200  //elementsInBlocks_.push_back( make_pair(blockref.key(), elementIndex) );
201  if (blocksStorage_.empty())
202  blocksStorage_ = Blocks(blockref.id());
203  blocksStorage_.push_back(blockref);
204  elementsStorage_.push_back(elementIndex);
205  auto ptr = elementsInBlocks_.exchange(nullptr);
206  delete ptr;
207 }

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

◆ bestMuonTrackType()

const reco::Muon::MuonTrackType reco::PFCandidate::bestMuonTrackType ( ) const
inline

get the Best Muon Track Ref

Definition at line 360 of file PFCandidate.h.

360 { return muonTrackType_; }

References muonTrackType_.

◆ bestTrack()

const reco::Track* reco::PFCandidate::bestTrack ( ) const
inlineoverridevirtual

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

Reimplemented from reco::Candidate.

Definition at line 150 of file PFCandidate.h.

150  {
151  if ((abs(pdgId()) == 11 || pdgId() == 22) && gsfTrackRef().isNonnull() && gsfTrackRef().isAvailable())
152  return &(*gsfTrackRef());
153  else if (trackRef().isNonnull() && trackRef().isAvailable())
154  return &(*trackRef());
155  else
156  return nullptr;
157  }

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(), Muon.Muon::ptErr(), and btagbtvdeep::recoCandidateToFeatures().

◆ clone()

PFCandidate * PFCandidate::clone ( void  ) const
overridevirtual

return a clone

Reimplemented from reco::CompositeCandidate.

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

Definition at line 197 of file PFCandidate.cc.

197 { return new PFCandidate(*this); }

References PFCandidate().

◆ conversionRef()

reco::ConversionRef PFCandidate::conversionRef ( ) const

return a reference to the original conversion

Definition at line 511 of file PFCandidate.cc.

References GETREF, kRefConversionBit, and kRefConversionMask.

◆ deltaP()

double reco::PFCandidate::deltaP ( ) const
inline

uncertainty on 3-momentum

Definition at line 301 of file PFCandidate.h.

301 { return deltaP_; }

References deltaP_.

Referenced by PFElectronTranslator::createGsfElectrons().

◆ displacedVertexRef()

reco::PFDisplacedVertexRef PFCandidate::displacedVertexRef ( Flags  type) const

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

Definition at line 481 of file PFCandidate.cc.

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

Referenced by PFCandConnector::analyseNuclearWPrim().

◆ dxyError()

float reco::PFCandidate::dxyError ( ) const
inlineoverridevirtual

uncertainty on dxy

Reimplemented from reco::Candidate.

Definition at line 167 of file PFCandidate.h.

167  {
168  const Track* tr = bestTrack();
169  if (tr != nullptr)
170  return tr->dxyError();
171  else
172  return 0;
173  }

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

◆ dzError()

float reco::PFCandidate::dzError ( ) const
inlineoverridevirtual

uncertainty on dz

Reimplemented from reco::Candidate.

Definition at line 159 of file PFCandidate.h.

159  {
160  const Track* tr = bestTrack();
161  if (tr != nullptr)
162  return tr->dzError();
163  else
164  return 0;
165  }

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

◆ ecalEnergy()

double reco::PFCandidate::ecalEnergy ( ) const
inline

◆ egammaExtraRef()

reco::PFCandidateEGammaExtraRef PFCandidate::egammaExtraRef ( ) const

return a reference to the EGamma extra

Definition at line 554 of file PFCandidate.cc.

References GETREF, kRefPFEGammaExtraBit, and kRefPFEGammaExtraMask.

Referenced by PFAlgo::egammaFilters().

◆ electronExtraRef()

reco::PFCandidateElectronExtraRef PFCandidate::electronExtraRef ( ) const

return a reference to the electron extra

Definition at line 544 of file PFCandidate.cc.

References GETREF, kRefPFElectronExtraBit, and kRefPFElectronExtraMask.

Referenced by PFElectronTranslator::createGsfElectrons().

◆ elementsInBlocks()

const PFCandidate::ElementsInBlocks & PFCandidate::elementsInBlocks ( ) const

Definition at line 636 of file PFCandidate.cc.

636  {
637  if (nullptr == elementsInBlocks_.load(std::memory_order_acquire)) {
638  std::unique_ptr<ElementsInBlocks> temp(new ElementsInBlocks(blocksStorage_.size()));
639  for (unsigned int icopy = 0; icopy != blocksStorage_.size(); ++icopy)
640  (*temp)[icopy] = std::make_pair(blocksStorage_[icopy], elementsStorage_[icopy]);
641  ElementsInBlocks* expected = nullptr;
642  if (elementsInBlocks_.compare_exchange_strong(expected, temp.get(), std::memory_order_acq_rel)) {
643  temp.release();
644  }
645  }
646  return *(elementsInBlocks_.load(std::memory_order_acquire));
647 }

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

Referenced by PFMuonAlgo::cleanPunchThroughAndFakes(), PFPhotonTranslator::correspondingDaughterCandidate(), PFElectronTranslator::correspondingDaughterCandidate(), PFCandidateBenchmark::fillOne(), PFBlockBasedIsolation::getHighestEtECALCluster(), reco::modules::HICaloCompatibleTrackSelector::matchPFCandToTrack(), and PFAlgo::recoTracksNotHCAL().

◆ flag() [1/2]

bool PFCandidate::flag ( Flags  theFlag) const

return a given flag

Definition at line 284 of file PFCandidate.cc.

284 { return (flags_ >> theFlag) & 1; }

References flags_.

Referenced by setConversionRef(), and setDisplacedVertexRef().

◆ flag() [2/2]

bool reco::PFCandidate::flag ( unsigned  shift,
unsigned  flag 
) const
private

◆ getRefInfo()

bool PFCandidate::getRefInfo ( unsigned int  iMask,
unsigned int  iBit,
edm::ProductID oProdID,
size_t &  oIndex,
size_t &  aIndex 
) const
private

Definition at line 379 of file PFCandidate.cc.

380  {
381  if (0 == (iBit & storedRefsBitPattern_)) {
382  return false;
383  }
384  aIndex = s_refsBefore[storedRefsBitPattern_ & iMask];
385  unsigned long long bitPacked = refsInfo_[aIndex];
386  oIndex = bitPacked & 0xFFFFFFFFULL; //low 32 bits are the index
387  unsigned short productIndex = (bitPacked & 0x0000FFFF00000000ULL) >> 32;
388  unsigned short processIndex = (bitPacked & 0xFFFF000000000000ULL) >> 48;
389  oProductID = edm::ProductID(processIndex, productIndex);
390  return true;
391 }

References refsInfo_, s_refsBefore, and storedRefsBitPattern_.

◆ gsfElectronRef()

reco::GsfElectronRef PFCandidate::gsfElectronRef ( ) const

return a reference to the corresponding GsfElectron if any

Definition at line 530 of file PFCandidate.cc.

References GETREF, kRefGsfElectronBit, and kRefGsfElectronMask.

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

◆ gsfTrackRef()

reco::GsfTrackRef PFCandidate::gsfTrackRef ( ) const

◆ hcalDepthEnergyFraction()

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

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

Definition at line 408 of file PFCandidate.h.

408 { return hcalDepthEnergyFractions_[depth - 1]; }

References LEDCalibrationChannels::depth, and hcalDepthEnergyFractions_.

◆ hcalDepthEnergyFractions()

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

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

Definition at line 410 of file PFCandidate.h.

410 { return hcalDepthEnergyFractions_; }

References hcalDepthEnergyFractions_.

◆ hcalEnergy()

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

◆ hoEnergy()

double reco::PFCandidate::hoEnergy ( ) const
inline

return corrected Hcal energy

Definition at line 245 of file PFCandidate.h.

245 { return hoERatio_ * rawHoEnergy_; }

References hoERatio_, and rawHoEnergy_.

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

◆ isTimeValid()

bool reco::PFCandidate::isTimeValid ( ) const
inline

do we have a valid time information

Definition at line 396 of file PFCandidate.h.

396 { return timeError_ >= 0.f; }

References timeError_.

Referenced by TransientTrackBuilder::build().

◆ muonRef()

reco::MuonRef PFCandidate::muonRef ( ) const

◆ mva_e_mu()

float reco::PFCandidate::mva_e_mu ( ) const
inline

mva for electron-muon discrimination

Definition at line 323 of file PFCandidate.h.

323 { return mva_e_mu_; }

References mva_e_mu_.

◆ mva_e_pi()

float reco::PFCandidate::mva_e_pi ( ) const
inline

mva for electron-pion discrimination

Definition at line 317 of file PFCandidate.h.

317 { return mva_e_pi_; }

References mva_e_pi_.

Referenced by PFElectronTranslator::createGsfElectrons(), PFAlgo::egammaFilters(), and PFCandidateBenchmark::fillOne().

◆ mva_gamma_nh()

float reco::PFCandidate::mva_gamma_nh ( ) const
inline

mva for neutral hadron - gamma discrimination

Definition at line 347 of file PFCandidate.h.

347 { return mva_gamma_nh_; }

References mva_gamma_nh_.

◆ mva_Isolated()

float reco::PFCandidate::mva_Isolated ( ) const
inline

Definition at line 313 of file PFCandidate.h.

313 { return mva_Isolated_; }

References mva_Isolated_.

◆ mva_nothing_gamma()

float reco::PFCandidate::mva_nothing_gamma ( ) const
inline

mva for gamma detection

Definition at line 335 of file PFCandidate.h.

335 { return mva_nothing_gamma_; }

References mva_nothing_gamma_.

Referenced by PFIsolationEstimator::isPhotonParticleVetoed().

◆ mva_nothing_nh()

float reco::PFCandidate::mva_nothing_nh ( ) const
inline

mva for neutral hadron detection

Definition at line 341 of file PFCandidate.h.

341 { return mva_nothing_nh_; }

References mva_nothing_nh_.

◆ mva_pi_mu()

float reco::PFCandidate::mva_pi_mu ( ) const
inline

mva for pi-muon discrimination

Definition at line 329 of file PFCandidate.h.

329 { return mva_pi_mu_; }

References mva_pi_mu_.

◆ numberOfSourceCandidatePtrs()

size_t reco::PFCandidate::numberOfSourceCandidatePtrs ( ) const
inlineoverridevirtual

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

Reimplemented from reco::LeafCandidate.

Definition at line 122 of file PFCandidate.h.

122 { return 1; }

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

◆ operator=()

PFCandidate & PFCandidate::operator= ( PFCandidate const &  iOther)

Definition at line 154 of file PFCandidate.cc.

154  {
156  auto tmp = iOther.elementsInBlocks_.load(std::memory_order_acquire);
157  if (nullptr != tmp) {
158  delete elementsInBlocks_.exchange(new ElementsInBlocks{*tmp}, std::memory_order_acq_rel);
159  } else {
160  delete elementsInBlocks_.exchange(nullptr, std::memory_order_acq_rel);
161  }
162  blocksStorage_ = iOther.blocksStorage_;
163  elementsStorage_ = iOther.elementsStorage_;
164  sourcePtr_ = iOther.sourcePtr_;
165  muonTrackType_ = iOther.muonTrackType_;
166  ecalERatio_ = iOther.ecalERatio_;
167  hcalERatio_ = iOther.hcalERatio_;
168  hoERatio_ = iOther.hoERatio_;
169  rawEcalEnergy_ = iOther.rawEcalEnergy_;
170  rawHcalEnergy_ = iOther.rawHcalEnergy_;
171  rawHoEnergy_ = iOther.rawHoEnergy_;
172  ps1Energy_ = iOther.ps1Energy_;
173  ps2Energy_ = iOther.ps2Energy_;
174  flags_ = iOther.flags_;
175  deltaP_ = iOther.deltaP_;
176  vertexType_ = iOther.vertexType_;
177  mva_Isolated_ = iOther.mva_Isolated_;
178  mva_e_pi_ = iOther.mva_e_pi_;
179  mva_e_mu_ = iOther.mva_e_mu_;
180  mva_pi_mu_ = iOther.mva_pi_mu_;
181  mva_nothing_gamma_ = iOther.mva_nothing_gamma_;
182  mva_nothing_nh_ = iOther.mva_nothing_nh_;
183  mva_gamma_nh_ = iOther.mva_gamma_nh_;
184  positionAtECALEntrance_ = iOther.positionAtECALEntrance_;
185  getter_ = iOther.getter_;
186  storedRefsBitPattern_ = iOther.storedRefsBitPattern_;
187  refsInfo_ = iOther.refsInfo_;
188  refsCollectionCache_ = iOther.refsCollectionCache_;
189  time_ = iOther.time_;
190  timeError_ = iOther.timeError_;
191  hcalDepthEnergyFractions_ = iOther.hcalDepthEnergyFractions_;
192  return *this;
193 }

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

◆ overlap()

bool PFCandidate::overlap ( const Candidate other) const
overrideprivatevirtual

Polymorphic overlap.

Reimplemented from reco::CompositeCandidate.

Definition at line 258 of file PFCandidate.cc.

258  {
259  CandidatePtr myPtr = sourceCandidatePtr(0);
260  if (myPtr.isNull())
261  return false;
262  for (size_t i = 0, n = other.numberOfSourceCandidatePtrs(); i < n; ++i) {
263  CandidatePtr otherPtr = other.sourceCandidatePtr(i);
264  if ((otherPtr == myPtr) || (sourcePtr_.isNonnull() && otherPtr.isNonnull() && sourcePtr_->overlap(*otherPtr))) {
265  return true;
266  }
267  }
268  return false;
269 }

References mps_fire::i, edm::Ptr< T >::isNonnull(), edm::Ptr< T >::isNull(), dqmiodumpmetadata::n, trackingPlots::other, overlap(), sourceCandidatePtr(), and sourcePtr_.

Referenced by overlap().

◆ particleId()

virtual ParticleType reco::PFCandidate::particleId ( ) const
inlinevirtual

◆ photonExtraRef()

reco::PFCandidatePhotonExtraRef PFCandidate::photonExtraRef ( ) const

return a reference to the photon extra

Definition at line 550 of file PFCandidate.cc.

References GETREF, kRefPFPhotonExtraBit, and kRefPFPhotonExtraMask.

◆ photonRef()

reco::PhotonRef PFCandidate::photonRef ( ) const

return a reference to the corresponding Photon if any

Definition at line 548 of file PFCandidate.cc.

References GETREF, kRefPhotonBit, and kRefPhotonMask.

◆ positionAtECALEntrance()

const math::XYZPointF& reco::PFCandidate::positionAtECALEntrance ( ) const
inline

◆ pS1Energy()

double reco::PFCandidate::pS1Energy ( ) const
inline

return corrected PS1 energy

Definition at line 280 of file PFCandidate.h.

280 { return ps1Energy_; }

References ps1Energy_.

◆ pS2Energy()

double reco::PFCandidate::pS2Energy ( ) const
inline

return corrected PS2 energy

Definition at line 286 of file PFCandidate.h.

286 { return ps2Energy_; }

References ps2Energy_.

◆ rawEcalEnergy()

double reco::PFCandidate::rawEcalEnergy ( ) const
inline

return corrected Ecal energy

Definition at line 224 of file PFCandidate.h.

224 { return rawEcalEnergy_; }

References rawEcalEnergy_.

Referenced by PFMuonAlgo::cleanPunchThroughAndFakes(), and PFElectronTranslator::createBasicCluster().

◆ rawHcalEnergy()

double reco::PFCandidate::rawHcalEnergy ( ) const
inline

return raw Hcal energy

Definition at line 236 of file PFCandidate.h.

236 { return rawHcalEnergy_; }

References rawHcalEnergy_.

Referenced by PFMuonAlgo::cleanPunchThroughAndFakes().

◆ rawHoEnergy()

double reco::PFCandidate::rawHoEnergy ( ) const
inline

return raw Hcal energy

Definition at line 248 of file PFCandidate.h.

248 { return rawHoEnergy_; }

References rawHoEnergy_.

◆ rescaleMomentum()

void PFCandidate::rescaleMomentum ( double  rescaleFactor)

particle momentum *= rescaleFactor

Definition at line 271 of file PFCandidate.cc.

271  {
272  LorentzVector rescaledp4 = p4();
273  rescaledp4 *= rescaleFactor;
274  setP4(rescaledp4);
275 }

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

◆ set_mva_e_mu()

void reco::PFCandidate::set_mva_e_mu ( float  mva)
inline

set mva for electron-muon discrimination

Definition at line 320 of file PFCandidate.h.

320 { mva_e_mu_ = mva; }

References beam_dqm_sourceclient-live_cfg::mva, and mva_e_mu_.

◆ set_mva_e_pi()

void reco::PFCandidate::set_mva_e_pi ( float  mvaNI)
inline

Definition at line 315 of file PFCandidate.h.

315 { mva_e_pi_ = mvaNI; }

References mva_e_pi_.

Referenced by PFAlgo::egammaFilters().

◆ set_mva_gamma_nh()

void reco::PFCandidate::set_mva_gamma_nh ( float  mva)
inline

set mva for neutral hadron - gamma discrimination

Definition at line 344 of file PFCandidate.h.

344 { mva_gamma_nh_ = mva; }

References beam_dqm_sourceclient-live_cfg::mva, and mva_gamma_nh_.

◆ set_mva_Isolated()

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

311 { mva_Isolated_ = mvaI; }

References mva_Isolated_.

Referenced by PFAlgo::egammaFilters().

◆ set_mva_nothing_gamma()

void reco::PFCandidate::set_mva_nothing_gamma ( float  mva)
inline

set mva for gamma detection

Definition at line 332 of file PFCandidate.h.

332 { mva_nothing_gamma_ = mva; }

References beam_dqm_sourceclient-live_cfg::mva, and mva_nothing_gamma_.

Referenced by PFAlgo::egammaFilters().

◆ set_mva_nothing_nh()

void reco::PFCandidate::set_mva_nothing_nh ( float  mva)
inline

set mva for neutral hadron detection

Definition at line 338 of file PFCandidate.h.

338 { mva_nothing_nh_ = mva; }

References beam_dqm_sourceclient-live_cfg::mva, and mva_nothing_nh_.

◆ set_mva_pi_mu()

void reco::PFCandidate::set_mva_pi_mu ( float  mva)
inline

set mva for pi-muon discrimination

Definition at line 326 of file PFCandidate.h.

326 { mva_pi_mu_ = mva; }

References beam_dqm_sourceclient-live_cfg::mva, and mva_pi_mu_.

◆ setConversionRef()

void PFCandidate::setConversionRef ( const reco::ConversionRef ref)

set ref to original reco conversion

Definition at line 491 of file PFCandidate.cc.

491  {
492  if (particleId() != gamma) {
493  string err;
494  err += "PFCandidate::setConversionRef: this is not a (converted) photon ! particleId_=";
495  char num[4];
496  sprintf(num, "%d", particleId());
497  err += num;
498 
499  throw cms::Exception("InconsistentReference", err.c_str());
500  } else if (!flag(GAMMA_TO_GAMMACONV)) {
501  string err;
502  err += "PFCandidate::setConversionRef: particule flag is not GAMMA_TO_GAMMACONV";
503 
504  throw cms::Exception("InconsistentReference", err.c_str());
505  }
506 
507  storeRefInfo(
508  kRefConversionMask, kRefConversionBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
509 }

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

◆ setDeltaP()

void reco::PFCandidate::setDeltaP ( double  dp)
inline

set uncertainty on momentum

Definition at line 298 of file PFCandidate.h.

298 { deltaP_ = dp; }

References deltaP_, and Calorimetry_cff::dp.

◆ setDisplacedVertexRef()

void PFCandidate::setDisplacedVertexRef ( const reco::PFDisplacedVertexRef ref,
Flags  flag 
)

set displaced vertex reference

Definition at line 443 of file PFCandidate.cc.

443  {
444  if (particleId() != h) {
445  string err;
446  err += "PFCandidate::setDisplacedVertexRef: this is not a hadron! particleId_=";
447  char num[4];
448  sprintf(num, "%d", particleId());
449  err += num;
450 
451  throw cms::Exception("InconsistentReference", err.c_str());
452  } else if (!flag(T_FROM_DISP) && !flag(T_TO_DISP)) {
453  string err;
454  err += "PFCandidate::setDisplacedVertexRef: particule flag is neither T_FROM_DISP nor T_TO_DISP";
455 
456  throw cms::Exception("InconsistentReference", err.c_str());
457  }
458 
459  if (type == T_TO_DISP && flag(T_TO_DISP))
462  iRef.isNonnull(),
463  iRef.refCore(),
464  iRef.key(),
465  iRef.productGetter());
466  else if (type == T_FROM_DISP && flag(T_FROM_DISP))
469  iRef.isNonnull(),
470  iRef.refCore(),
471  iRef.key(),
472  iRef.productGetter());
473  else if ((type == T_FROM_DISP && !flag(T_FROM_DISP)) || (type == T_TO_DISP && !flag(T_TO_DISP))) {
474  string err;
475  err += "PFCandidate::setDisplacedVertexRef: particule flag is not switched on";
476 
477  throw cms::Exception("InconsistentReference", err.c_str());
478  }
479 }

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

◆ setEcalEnergy()

void reco::PFCandidate::setEcalEnergy ( float  eeRaw,
float  eeCorr 
)
inline

set corrected Ecal energy

Definition at line 215 of file PFCandidate.h.

215  {
216  rawEcalEnergy_ = eeRaw;
217  ecalERatio_ = std::abs(eeRaw) < 1.e-6 ? 1.0 : eeCorr / eeRaw;
218  }

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

◆ setFlag() [1/2]

void PFCandidate::setFlag ( Flags  theFlag,
bool  value 
)

set a given flag

Definition at line 277 of file PFCandidate.cc.

277  {
278  if (value)
279  flags_ = flags_ | (1 << theFlag);
280  else
281  flags_ = flags_ ^ (1 << theFlag);
282 }

References flags_.

◆ setFlag() [2/2]

void reco::PFCandidate::setFlag ( unsigned  shift,
unsigned  flag,
bool  value 
)
private

◆ setGsfElectronRef()

void PFCandidate::setGsfElectronRef ( const reco::GsfElectronRef ref)

set GsfElectronRef

Definition at line 525 of file PFCandidate.cc.

525  {
526  storeRefInfo(
527  kRefGsfElectronMask, kRefGsfElectronBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
528 }

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().

◆ setGsfTrackRef()

void PFCandidate::setGsfTrackRef ( const reco::GsfTrackRef ref)

set gsftrack reference

Definition at line 424 of file PFCandidate.cc.

424  {
425  // Removed by F. Beaudette. Would like to be able to save the GsfTrackRef even for charged pions
426  // if( particleId() != e ) {
427  // string err;
428  // err += "PFCandidate::setGsfTrackRef: this is not an electron ! particleId_=";
429  // char num[4];
430  // sprintf( num, "%d", particleId());
431  // err += num;
432  //
433  // throw cms::Exception("InconsistentReference",
434  // err.c_str() );
435  // }
436 
437  storeRefInfo(kRefGsfTrackMask, kRefGsfTrackBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
438 }

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().

◆ setHcalDepthEnergyFractions()

void reco::PFCandidate::setHcalDepthEnergyFractions ( const std::array< float, 7 > &  fracs)
inline

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

Definition at line 412 of file PFCandidate.h.

412 { hcalDepthEnergyFractions_ = fracs; }

References hcalDepthEnergyFractions_.

◆ setHcalEnergy()

void reco::PFCandidate::setHcalEnergy ( float  ehRaw,
float  ehCorr 
)
inline

set corrected Hcal energy

Definition at line 227 of file PFCandidate.h.

227  {
228  rawHcalEnergy_ = ehRaw;
229  hcalERatio_ = std::abs(ehRaw) < 1.e-6 ? 1.0 : ehCorr / ehRaw;
230  }

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

◆ setHoEnergy()

void reco::PFCandidate::setHoEnergy ( float  eoRaw,
float  eoCorr 
)
inline

set corrected Hcal energy

Definition at line 239 of file PFCandidate.h.

239  {
240  rawHoEnergy_ = eoRaw;
241  hoERatio_ = std::abs(eoRaw) < 1.e-6 ? 1.0 : eoCorr / eoRaw;
242  }

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

◆ setMuonRef()

void PFCandidate::setMuonRef ( const reco::MuonRef ref)

set muon reference

Definition at line 410 of file PFCandidate.cc.

410  {
411  if (trackRef() != iRef->track()) {
412  string err;
413  err += "PFCandidate::setMuonRef: inconsistent track references!";
414 
415  throw cms::Exception("InconsistentReference", err.c_str());
416  }
417 
418  storeRefInfo(kRefMuonMask, kRefMuonBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
419 }

References submitPVResolutionJobs::err, 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 PFMuonAlgo::reconstructMuon().

◆ setMuonTrackType()

void reco::PFCandidate::setMuonTrackType ( const reco::Muon::MuonTrackType type)
inline

set the Best Muon Track Ref

Definition at line 356 of file PFCandidate.h.

356 { muonTrackType_ = type; }

References muonTrackType_.

Referenced by PFMuonAlgo::changeTrack().

◆ setParticleType()

void PFCandidate::setParticleType ( ParticleType  type)

◆ setPFEGammaExtraRef()

void PFCandidate::setPFEGammaExtraRef ( const reco::PFCandidateEGammaExtraRef ref)

set the PF EGamma Extra Ref

Definition at line 596 of file PFCandidate.cc.

596  {
597  storeRefInfo(
598  kRefPFEGammaExtraMask, kRefPFEGammaExtraBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
599 }

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().

◆ setPFElectronExtraRef()

void PFCandidate::setPFElectronExtraRef ( const reco::PFCandidateElectronExtraRef ref)

set the PF Electron Extra Ref

Definition at line 535 of file PFCandidate.cc.

535  {
538  iRef.isNonnull(),
539  iRef.refCore(),
540  iRef.key(),
541  iRef.productGetter());
542 }

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().

◆ setPFPhotonExtraRef()

void PFCandidate::setPFPhotonExtraRef ( const reco::PFCandidatePhotonExtraRef ref)

set the PF Photon Extra Ref

Definition at line 591 of file PFCandidate.cc.

591  {
592  storeRefInfo(
593  kRefPFPhotonExtraMask, kRefPFPhotonExtraBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
594 }

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().

◆ setPhotonRef()

void PFCandidate::setPhotonRef ( const reco::PhotonRef phRef)

set ref to the corresponding reco::Photon if any

Definition at line 562 of file PFCandidate.cc.

562  {
563  if (particleId() != gamma && particleId() != e) {
564  string err;
565  err += "PFCandidate::setSuperClusterRef: this is not an electron neither a photon ! particleId_=";
566  char num[4];
567  sprintf(num, "%d", particleId());
568  err += num;
569 
570  throw cms::Exception("InconsistentReference", err.c_str());
571  }
572 
573  storeRefInfo(kRefPhotonMask, kRefPhotonBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
574 }

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

◆ setPositionAtECALEntrance()

void reco::PFCandidate::setPositionAtECALEntrance ( const math::XYZPointF pos)
inline

set position at ECAL entrance

Definition at line 350 of file PFCandidate.h.

References positionAtECALEntrance_.

◆ setPs1Energy()

void reco::PFCandidate::setPs1Energy ( float  e1)
inline

set corrected PS1 energy

Definition at line 277 of file PFCandidate.h.

277 { ps1Energy_ = e1; }

References StorageManager_cfg::e1, and ps1Energy_.

◆ setPs2Energy()

void reco::PFCandidate::setPs2Energy ( float  e2)
inline

set corrected PS2 energy

Definition at line 283 of file PFCandidate.h.

283 { ps2Energy_ = e2; }

References ps2Energy_.

◆ setSourceCandidatePtr()

void reco::PFCandidate::setSourceCandidatePtr ( const PFCandidatePtr ptr)
inline

Definition at line 120 of file PFCandidate.h.

120 { sourcePtr_ = ptr; }

References sourcePtr_.

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

◆ setSuperClusterRef()

void PFCandidate::setSuperClusterRef ( const reco::SuperClusterRef scRef)

Definition at line 576 of file PFCandidate.cc.

576  {
577  if (particleId() != gamma && particleId() != e) {
578  string err;
579  err += "PFCandidate::setSuperClusterRef: this is not an electron neither a photon ! particleId_=";
580  char num[4];
581  sprintf(num, "%d", particleId());
582  err += num;
583 
584  throw cms::Exception("InconsistentReference", err.c_str());
585  }
586 
587  storeRefInfo(
588  kRefSuperClusterMask, kRefSuperClusterBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
589 }

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

◆ setTime()

void reco::PFCandidate::setTime ( float  time,
float  timeError = 0.f 
)
inline

\set the timing information

Definition at line 402 of file PFCandidate.h.

402  {
403  time_ = time;
405  }

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

◆ setTrackRef()

void PFCandidate::setTrackRef ( const reco::TrackRef ref)

set track reference

Definition at line 393 of file PFCandidate.cc.

393  {
394  if (!charge()) {
395  string err;
396  err += "PFCandidate::setTrackRef: this is a neutral candidate! ";
397  err += "particleId_=";
398  char num[4];
399  sprintf(num, "%d", particleId());
400  err += num;
401 
402  throw cms::Exception("InconsistentReference", err.c_str());
403  }
404 
405  storeRefInfo(kRefTrackMask, kRefTrackBit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
406 }

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

◆ setV0Ref()

void PFCandidate::setV0Ref ( const reco::VertexCompositeCandidateRef ref)

set ref to original reco conversion

Definition at line 516 of file PFCandidate.cc.

516  {
517  storeRefInfo(kRefV0Mask, kRefV0Bit, iRef.isNonnull(), iRef.refCore(), iRef.key(), iRef.productGetter());
518 }

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().

◆ sourceCandidatePtr()

CandidatePtr reco::PFCandidate::sourceCandidatePtr ( size_type  i) const
inlineoverridevirtual

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

Reimplemented from reco::LeafCandidate.

Definition at line 124 of file PFCandidate.h.

124 { return sourcePtr_; }

References sourcePtr_.

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

◆ storeRefInfo()

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

348  {
349  size_t index = s_refsBefore[storedRefsBitPattern_ & iMask];
350  if (nullptr == getter_) {
351  getter_ = iGetter;
352  }
353 
354  if (iIsValid) {
355  if (0 == (storedRefsBitPattern_ & iBit)) {
356  refsInfo_.insert(refsInfo_.begin() + index, bitPackRefInfo(iCore, iKey));
357  if (iGetter == nullptr)
358  refsCollectionCache_.insert(refsCollectionCache_.begin() + index, static_cast<void const*>(iCore.productPtr()));
359  else
360  refsCollectionCache_.insert(refsCollectionCache_.begin() + index, nullptr);
361  } else {
362  assert(refsInfo_.size() > index);
363  *(refsInfo_.begin() + index) = bitPackRefInfo(iCore, iKey);
364  if (iGetter == nullptr)
365  *(refsCollectionCache_.begin() + index) = static_cast<void const*>(iCore.productPtr());
366  else
367  *(refsCollectionCache_.begin() + index) = nullptr;
368  }
369  storedRefsBitPattern_ |= iBit;
370  } else {
371  if (storedRefsBitPattern_ & iBit) {
372  refsInfo_.erase(refsInfo_.begin() + index);
374  storedRefsBitPattern_ ^= iBit;
375  }
376  }
377 }

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

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

◆ superClusterRef()

reco::SuperClusterRef PFCandidate::superClusterRef ( ) const

◆ time()

float reco::PFCandidate::time ( ) const
inline
Returns
the timing

Definition at line 398 of file PFCandidate.h.

398 { return time_; }

References time_.

Referenced by TransientTrackBuilder::build(), and setTime().

◆ timeError()

float reco::PFCandidate::timeError ( ) const
inline
Returns
the timing uncertainty

Definition at line 400 of file PFCandidate.h.

400 { return timeError_; }

References timeError_.

Referenced by TransientTrackBuilder::build(), and setTime().

◆ trackRef()

reco::TrackRef PFCandidate::trackRef ( ) const

◆ translatePdgIdToType()

PFCandidate::ParticleType PFCandidate::translatePdgIdToType ( int  pdgid) const

Definition at line 209 of file PFCandidate.cc.

209  {
210  switch (std::abs(pdgid)) {
211  case 211:
212  return h;
213  case 11:
214  return e;
215  case 13:
216  return mu;
217  case 22:
218  return gamma;
219  case 130:
220  return h0;
221  case 1:
222  return h_HF;
223  case 2:
224  return egamma_HF;
225  case 0:
226  return X;
227  default:
228  return X;
229  }
230 }

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

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

◆ translateTypeToPdgId()

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

232  {
233  int thecharge = charge();
234 
235  switch (type) {
236  case h:
237  return thecharge * 211; // pi+
238  case e:
239  return thecharge * (-11);
240  case mu:
241  return thecharge * (-13);
242  case gamma:
243  return 22;
244  case h0:
245  return 130; // K_L0
246  case h_HF:
247  return 1; // dummy pdg code
248  case egamma_HF:
249  return 2; // dummy pdg code
250  case X:
251  default:
252  return 0;
253  }
254 }

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

Referenced by PFCandidate(), and setParticleType().

◆ v0Ref()

reco::VertexCompositeCandidateRef PFCandidate::v0Ref ( ) const

return a reference to the original conversion

Definition at line 520 of file PFCandidate.cc.

References GETREF, kRefV0Bit, and kRefV0Mask.

◆ vertex()

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

vertex position (overwritten by PF...)

Reimplemented from reco::LeafCandidate.

Definition at line 56 of file PFCandidate.cc.

56 { return vertexLegacy(vertexType_); }

References vertexLegacy(), and vertexType_.

Referenced by FWPFCandidate3DProxyBuilder::build(), Tau.Tau::dxy(), vx(), vy(), and vz().

◆ vertexLegacy()

const math::XYZPoint & PFCandidate::vertexLegacy ( PFCandidate::PFVertexType  vertexType) const
private

Definition at line 601 of file PFCandidate.cc.

601  {
602  switch (vertexType) {
603  case kCandVertex:
604  return LeafCandidate::vertex();
605  break;
606  //the following cases will only be called for legacy AOD which does not have an embedded vertex
607  case kTrkVertex:
608  return trackRef()->vertex();
609  break;
610  case kComMuonVertex:
611  return muonRef()->combinedMuon()->vertex();
612  break;
613  case kSAMuonVertex:
614  return muonRef()->standAloneMuon()->vertex();
615  break;
616  case kTrkMuonVertex:
617  return muonRef()->track()->vertex();
618  break;
619  case kTPFMSMuonVertex:
620  return muonRef()->tpfmsTrack()->vertex();
621  break;
622  case kPickyMuonVertex:
623  return muonRef()->pickyTrack()->vertex();
624  break;
625  case kDYTMuonVertex:
626  return muonRef()->dytTrack()->vertex();
627  break;
628 
629  case kGSFVertex:
630  return gsfTrackRef()->vertex();
631  break;
632  }
633  return LeafCandidate::vertex();
634 }

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

Referenced by vertex().

◆ vx()

double reco::PFCandidate::vx ( ) const
inlineoverridevirtual

x coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 391 of file PFCandidate.h.

391 { return vertex().x(); }

References vertex().

Referenced by PFIsolationEstimator::fGetIsolationInRings().

◆ vy()

double reco::PFCandidate::vy ( ) const
inlineoverridevirtual

y coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 392 of file PFCandidate.h.

392 { return vertex().y(); }

References vertex().

Referenced by PFIsolationEstimator::fGetIsolationInRings().

◆ vz()

double reco::PFCandidate::vz ( ) const
inlineoverridevirtual

z coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 393 of file PFCandidate.h.

393 { return vertex().z(); }

References vertex().

Referenced by PFIsolationEstimator::fGetIsolationInRings().

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ bigMva_

const float PFCandidate::bigMva_ = -999.
static

Definition at line 386 of file PFCandidate.h.

◆ blocksStorage_

Blocks reco::PFCandidate::blocksStorage_
private

Definition at line 430 of file PFCandidate.h.

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

◆ deltaP_

float reco::PFCandidate::deltaP_
private

uncertainty on 3-momentum

Definition at line 469 of file PFCandidate.h.

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

◆ ecalERatio_

float reco::PFCandidate::ecalERatio_
private

corrected ECAL energy ratio (corrected/raw)

Definition at line 442 of file PFCandidate.h.

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

◆ elementsInBlocks_

std::atomic<ElementsInBlocks*> reco::PFCandidate::elementsInBlocks_
mutableprivate

◆ elementsStorage_

Elements reco::PFCandidate::elementsStorage_
private

Definition at line 431 of file PFCandidate.h.

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

◆ flags_

unsigned reco::PFCandidate::flags_
private

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

Definition at line 466 of file PFCandidate.h.

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

◆ getter_

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

Definition at line 508 of file PFCandidate.h.

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

◆ hcalDepthEnergyFractions_

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

◆ hcalERatio_

float reco::PFCandidate::hcalERatio_
private

corrected HCAL energy ratio (corrected/raw)

Definition at line 445 of file PFCandidate.h.

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

◆ hoERatio_

float reco::PFCandidate::hoERatio_
private

corrected HO energy ratio (corrected/raw)

Definition at line 448 of file PFCandidate.h.

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

◆ muonTrackType_

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

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

◆ mva_e_mu_

float reco::PFCandidate::mva_e_mu_
private

mva for electron-muon discrimination

Definition at line 481 of file PFCandidate.h.

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

◆ mva_e_pi_

float reco::PFCandidate::mva_e_pi_
private

mva for electron-pion discrimination

Definition at line 478 of file PFCandidate.h.

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

◆ mva_gamma_nh_

float reco::PFCandidate::mva_gamma_nh_
private

mva for neutral hadron - gamma discrimination

Definition at line 493 of file PFCandidate.h.

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

◆ mva_Isolated_

float reco::PFCandidate::mva_Isolated_
private

Definition at line 475 of file PFCandidate.h.

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

◆ mva_nothing_gamma_

float reco::PFCandidate::mva_nothing_gamma_
private

mva for gamma detection

Definition at line 487 of file PFCandidate.h.

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

◆ mva_nothing_nh_

float reco::PFCandidate::mva_nothing_nh_
private

mva for neutral hadron detection

Definition at line 490 of file PFCandidate.h.

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

◆ mva_pi_mu_

float reco::PFCandidate::mva_pi_mu_
private

mva for pi-muon discrimination

Definition at line 484 of file PFCandidate.h.

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

◆ positionAtECALEntrance_

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

position at ECAL entrance, from the PFRecTrack

Definition at line 496 of file PFCandidate.h.

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

◆ ps1Energy_

float reco::PFCandidate::ps1Energy_
private

corrected PS1 energy

Definition at line 460 of file PFCandidate.h.

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

◆ ps2Energy_

float reco::PFCandidate::ps2Energy_
private

corrected PS2 energy

Definition at line 463 of file PFCandidate.h.

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

◆ rawEcalEnergy_

float reco::PFCandidate::rawEcalEnergy_
private

raw ECAL energy

Definition at line 451 of file PFCandidate.h.

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

◆ rawHcalEnergy_

float reco::PFCandidate::rawHcalEnergy_
private

raw HCAL energy

Definition at line 454 of file PFCandidate.h.

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

◆ rawHoEnergy_

float reco::PFCandidate::rawHoEnergy_
private

raw HO energy

Definition at line 457 of file PFCandidate.h.

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

◆ refsCollectionCache_

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

Definition at line 511 of file PFCandidate.h.

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

◆ refsInfo_

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

Definition at line 510 of file PFCandidate.h.

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

◆ sourcePtr_

PFCandidatePtr reco::PFCandidate::sourcePtr_
private

reference to the source PFCandidate, if any

Definition at line 435 of file PFCandidate.h.

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

◆ storedRefsBitPattern_

unsigned short reco::PFCandidate::storedRefsBitPattern_
private

Definition at line 509 of file PFCandidate.h.

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

◆ time_

float reco::PFCandidate::time_
private

timing information (valid if timeError_ >= 0)

Definition at line 514 of file PFCandidate.h.

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

◆ timeError_

float reco::PFCandidate::timeError_
private

timing information uncertainty (<0 if timing not available)

Definition at line 516 of file PFCandidate.h.

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

◆ vertexType_

PFVertexType reco::PFCandidate::vertexType_
private

Definition at line 472 of file PFCandidate.h.

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

reco::PFCandidate::trackRef
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:408
reco::PFCandidate::kCandVertex
Definition: PFCandidate.h:76
reco::PFCandidate::sourcePtr_
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:435
reco::LeafCandidate::setPdgId
void setPdgId(int pdgId) final
Definition: LeafCandidate.h:178
reco::PFCandidate::hcalDepthEnergyFractions_
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:518
edm::RefVector::reserve
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:108
reco::Conversion
Definition: Conversion.h:23
kRefPFPhotonExtraMask
Definition: CountBits.h:4651
reco::PFCandidate::getter_
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:508
mps_fire.i
i
Definition: mps_fire.py:428
reco::PFCandidate::timeError_
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:516
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
reco::PFCandidate::T_FROM_GAMMACONV
Definition: PFCandidate.h:71
kRefV0Bit
Definition: CountBits.h:4632
reco::PFCandidate::e
Definition: PFCandidate.h:47
reco::PFCandidate::ps1Energy_
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:460
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
reco::PFCandidate::rawHcalEnergy_
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:454
reco::LeafCandidate::index
unsigned int index
Definition: LeafCandidate.h:31
reco::SuperCluster
Definition: SuperCluster.h:18
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
reco::PFCandidate::E_ETA_MODULES
Definition: PFCandidate.h:59
reco::PFCandidate::flag
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:284
pos
Definition: PixelAliasList.h:18
reco::PFCandidatePhotonExtra
Definition: PFCandidatePhotonExtra.h:16
reco::PFCandidate::h
Definition: PFCandidate.h:46
reco::PFCandidate::hcalERatio_
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:445
reco::PFCandidate::h_HF
Definition: PFCandidate.h:51
reco::ElementsInBlocks
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidateEGammaExtra.h:23
cms::cuda::assert
assert(be >=bs)
kRefConversionMask
Definition: CountBits.h:4646
reco::PFCandidate::vertex
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:56
reco::LeafCandidate::operator=
LeafCandidate & operator=(LeafCandidate &&)=default
kRefV0Mask
Definition: CountBits.h:4647
reco::PFCandidate::E_BARREL_ENDCAP
Definition: PFCandidate.h:60
kRefSuperClusterBit
Definition: CountBits.h:4637
reco::PFCandidate::refsInfo_
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:510
reco::VertexCompositeCandidate
Definition: VertexCompositeCandidate.h:16
reco::PFCandidate::mva_pi_mu_
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:484
reco::PFCandidate::blocksStorage_
Blocks blocksStorage_
Definition: PFCandidate.h:430
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:124
reco::PFCandidate::sourceCandidatePtr
CandidatePtr sourceCandidatePtr(size_type i) const override
Definition: PFCandidate.h:124
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
kRefDisplacedVertexDauBit
Definition: CountBits.h:4629
kRefDisplacedVertexDauMask
Definition: CountBits.h:4644
reco::PFCandidateEGammaExtra
Definition: PFCandidateEGammaExtra.h:25
reco::PFCandidate::positionAtECALEntrance_
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:496
reco::PFCandidate::kDYTMuonVertex
Definition: PFCandidate.h:84
kRefPFElectronExtraMask
Definition: CountBits.h:4649
reco::PFCandidate::mva_e_pi_
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:478
reco::PFCandidate::X
Definition: PFCandidate.h:45
reco::Muon
Definition: Muon.h:27
reco::PFCandidate::hoERatio_
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:448
reco::PFCandidate::H_ETA_0
Definition: PFCandidate.h:64
reco::PFCandidate::kSAMuonVertex
Definition: PFCandidate.h:79
reco::PFCandidate::vertexLegacy
const math::XYZPoint & vertexLegacy(PFCandidate::PFVertexType vertexType) const
Definition: PFCandidate.cc:601
reco::GsfTrack
Definition: GsfTrack.h:12
reco::PFCandidate::ecalERatio_
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:442
reco::PFCandidate::muonRef
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:421
reco::PFCandidate::mva_nothing_nh_
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:490
reco::PFCandidate::time_
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:514
h
kRefDisplacedVertexMotBit
Definition: CountBits.h:4630
reco::PFCandidate::mu
Definition: PFCandidate.h:48
edm::RefVector::empty
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
kRefConversionBit
Definition: CountBits.h:4631
kRefTrackMask
Definition: CountBits.h:4641
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:157
s_refsBefore
static const unsigned int s_refsBefore[]
Definition: CountBits.h:14
reco::PFCandidate::overlap
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: PFCandidate.cc:258
reco::PFCandidate::rawHoEnergy_
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:457
reco::PFCandidate::elementsStorage_
Elements elementsStorage_
Definition: PFCandidate.h:431
reco::Track
Definition: Track.h:27
reco::PFCandidate::mva_e_mu_
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:481
reco::PFCandidate::E_PHI_SMODULES
Definition: PFCandidate.h:57
reco::PFCandidate::NORMAL
Definition: PFCandidate.h:56
trackingPlots.other
other
Definition: trackingPlots.py:1467
reco::PFCandidate::elementsInBlocks_
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:426
reco::GsfElectron
Definition: GsfElectron.h:35
reco::PFCandidate::refsCollectionCache_
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:511
kRefPFEGammaExtraMask
Definition: CountBits.h:4653
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
reco::PFCandidate::ElementsInBlocks
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:379
reco::PFCandidate::Blocks
edm::RefVector< reco::PFBlockCollection > Blocks
Definition: PFCandidate.h:381
ntuplemaker.fill
fill
Definition: ntuplemaker.py:304
reco::PFCandidate::PFCandidate
PFCandidate()
default constructor
Definition: PFCandidate.cc:25
reco::PFCandidate::H_ENDCAP_VFCAL
Definition: PFCandidate.h:66
reco::PFCandidate::kGSFVertex
Definition: PFCandidate.h:81
reco::PFCandidate::gsfTrackRef
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:440
reco::PFDisplacedVertex
Block of elements.
Definition: PFDisplacedVertex.h:23
kRefPFElectronExtraBit
Definition: CountBits.h:4634
kRefTrackBit
Definition: CountBits.h:4626
reco::PFCandidate::particleId
virtual ParticleType particleId() const
Definition: PFCandidate.h:367
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
reco::PFCandidate::muonTrackType_
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:439
reco::PFCandidate::time
float time() const
Definition: PFCandidate.h:398
reco::LeafCandidate::pdgId
int pdgId() const final
PDG identifier.
Definition: LeafCandidate.h:176
kRefGsfElectronMask
Definition: CountBits.h:4648
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
reco::PFCandidateElectronExtra
Definition: PFCandidateElectronExtra.h:16
reco::PFCandidate::T_FROM_DISP
Definition: PFCandidate.h:69
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
reco::PFCandidate::egamma_HF
Definition: PFCandidate.h:52
StorageManager_cfg.e1
e1
Definition: StorageManager_cfg.py:16
reco::PFCandidate::kTPFMSMuonVertex
Definition: PFCandidate.h:82
reco::PFCandidate::vertexType_
PFVertexType vertexType_
Definition: PFCandidate.h:472
reco::PFCandidate::GAMMA_TO_GAMMACONV
Definition: PFCandidate.h:72
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
value
Definition: value.py:1
reco::CompositeCandidate::CompositeCandidate
CompositeCandidate(std::string name="")
default constructor
Definition: CompositeCandidate.h:27
kRefPhotonMask
Definition: CountBits.h:4650
reco::PFCandidate::gamma
Definition: PFCandidate.h:49
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition: LeafCandidate.h:106
reco::PFCandidate::translateTypeToPdgId
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:232
kRefSuperClusterMask
Definition: CountBits.h:4652
reco::PFCandidate::rawEcalEnergy_
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:451
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
reco::PFCandidate::E_ETA_0
Definition: PFCandidate.h:58
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
reco::PFCandidate::kTrkMuonVertex
Definition: PFCandidate.h:80
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
reco::PFCandidate::storeRefInfo
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:343
reco::LeafCandidate::vertex
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: LeafCandidate.h:165
edm::Ptr< Candidate >
edm::RefCore::productPtr
void const * productPtr() const
Definition: RefCore.h:51
kRefGsfTrackMask
Definition: CountBits.h:4642
reco::PFCandidate::E_ENDCAP_EDGE
Definition: PFCandidate.h:63
reco::Photon
Definition: Photon.h:21
edm::Ref::id
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition: LeafCandidate.h:158
GETREF
#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4656
reco::PFCandidate::bigMva_
static const float bigMva_
Definition: PFCandidate.h:386
reco::PFCandidate::timeError
float timeError() const
Definition: PFCandidate.h:400
kRefPFPhotonExtraBit
Definition: CountBits.h:4636
reco::PFCandidate::E_PRESHOWER
Definition: PFCandidate.h:62
kRefMuonMask
Definition: CountBits.h:4643
bitPackRefInfo
static unsigned long long bitPackRefInfo(const edm::RefCore &iCore, size_t iIndex)
Definition: PFCandidate.cc:336
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
reco::PFCandidate::E_PRESHOWER_EDGE
Definition: PFCandidate.h:61
reco::PFCandidate::T_TO_DISP
Definition: PFCandidate.h:68
reco::PFCandidate::h0
Definition: PFCandidate.h:50
Exception
Definition: hltDiff.cc:246
reco::PFCandidate::storedRefsBitPattern_
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:509
reco::PFCandidate::mva_Isolated_
float mva_Isolated_
Definition: PFCandidate.h:475
reco::PFCandidate::translatePdgIdToType
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:209
reco::PFCandidate::kComMuonVertex
Definition: PFCandidate.h:78
edm::Ptr::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
reco::PFCandidate::H_VFCAL_EDGE
Definition: PFCandidate.h:67
reco::PFCandidate::flags_
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:466
reco::PFCandidate::bestTrack
const reco::Track * bestTrack() const override
Definition: PFCandidate.h:150
kRefPhotonBit
Definition: CountBits.h:4635
reco::PFCandidate::kPickyMuonVertex
Definition: PFCandidate.h:83
kRefDisplacedVertexMotMask
Definition: CountBits.h:4645
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
kRefMuonBit
Definition: CountBits.h:4628
reco::PFCandidate::kTrkVertex
Definition: PFCandidate.h:77
reco::PFCandidate::ps2Energy_
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:463
reco::PFCandidate::H_BARREL_ENDCAP
Definition: PFCandidate.h:65
reco::PFCandidate::T_FROM_V0
Definition: PFCandidate.h:70
reco::Muon::None
Definition: Muon.h:36
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30
kRefGsfTrackBit
Definition: CountBits.h:4627
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
kRefPFEGammaExtraBit
Definition: CountBits.h:4638
edm::Ptr::isNull
bool isNull() const
Checks for null.
Definition: Ptr.h:142
reco::PFCandidate::deltaP_
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:469
edm::ProductID
Definition: ProductID.h:27
reco::PFCandidate::mva_nothing_gamma_
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:487
kRefGsfElectronBit
Definition: CountBits.h:4633
reco::PFCandidate::mva_gamma_nh_
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:493
reco::PFDisplacedVertexRef
edm::Ref< PFDisplacedVertexCollection > PFDisplacedVertexRef
persistent reference to a PFDisplacedVertex objects
Definition: PFDisplacedVertexFwd.h:16