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
}
 
- 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...
 
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
 
double ecalEnergy () const
 return corrected Ecal energy 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...
 
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_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
 
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)
 
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...
 
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 mva)
 
void set_mva_gamma_nh (float mva)
 set mva for neutral hadron - gamma discrimination More...
 
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 setMuonRef (const reco::MuonRef &ref)
 set muon reference More...
 
void setParticleType (ParticleType type)
 set Particle Type 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 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 (math::XYZPoint p)
 
void setVertexSource (PFVertexType vt)
 
CandidatePtr sourceCandidatePtr (size_type i) const
 
reco::SuperClusterRef superClusterRef () const
 return a reference to the corresponding SuperCluster if any More...
 
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 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::auto_ptr< Candidate >, const std::string &s="")
 add a clone of the passed candidate as daughter More...
 
void applyRoles ()
 
virtual const_iterator begin () const
 first daughter const_iterator More...
 
virtual iterator begin ()
 first daughter iterator More...
 
void clearDaughters ()
 clear daughters More...
 
void clearRoles ()
 
 CompositeCandidate (std::string name="")
 default constructor More...
 
 CompositeCandidate (Charge q, const LorentzVector &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 (Charge q, const PolarLorentzVector &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_iterator end () const
 last daughter const_iterator More...
 
virtual iterator end ()
 last daughter const_iterator 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
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
virtual Vector boostToCM () const
 
virtual int charge () const
 electric charge More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
virtual double energy () const
 energy More...
 
virtual double et () const
 transverse energy More...
 
virtual double eta () const
 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 ()
 default constructor More...
 
 LeafCandidate (const Candidate &c)
 
 LeafCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 LeafCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
virtual bool longLived () const
 is long lived? More...
 
virtual double mass () const
 mass More...
 
virtual bool massConstraint () const
 do mass constraint? More...
 
virtual double massSqr () const
 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
 spatial momentum vector More...
 
virtual double mt () const
 transverse mass More...
 
virtual double mtSqr () const
 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...
 
virtual double p () const
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const
 four-momentum Lorentz vector More...
 
virtual int pdgId () const
 PDG identifier. More...
 
virtual double phi () const
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const
 four-momentum Lorentz vector More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double px () const
 x coordinate of momentum vector More...
 
virtual double py () const
 y coordinate of momentum vector More...
 
virtual double pz () const
 z coordinate of momentum vector More...
 
virtual double rapidity () const
 rapidity More...
 
virtual void setCharge (Charge q)
 set electric charge More...
 
virtual void setLongLived ()
 set long lived flag More...
 
virtual void setMass (double m)
 set particle mass More...
 
virtual void setMassConstraint ()
 set mass constraint flag More...
 
virtual void setP4 (const LorentzVector &p4)
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4)
 set 4-momentum More...
 
virtual void setPdgId (int pdgId)
 
virtual void setPz (double pz)
 
virtual void setStatus (int status)
 set status word More...
 
virtual void setThreeCharge (Charge qx3)
 set electric charge More...
 
virtual void setVertex (const Point &vertex)
 set vertex More...
 
virtual int status () const
 status word More...
 
virtual double theta () const
 momentum polar angle More...
 
virtual int threeCharge () const
 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
 return SMatrix More...
 
virtual double vertexNdof () const
 
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
virtual double y () const
 rapidity More...
 
virtual ~LeafCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
 Candidate ()
 default constructor More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
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.
 
- Static Public Attributes inherited from reco::LeafCandidate
static const unsigned int longLivedTag = 65536
 long lived flag More...
 
static const unsigned int massConstraintTag = 131072
 do mass constraint flag More...
 

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...
 
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 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_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...
 
std::vector< const void * > refsCollectionCache_
 
std::vector< unsigned long long > refsInfo_
 
PFCandidatePtr sourcePtr_
 reference to the source PFCandidate, if any More...
 
unsigned short storedRefsBitPattern_
 
PFVertexType vertexType_
 

Friends

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

Additional Inherited Members

- Protected Member Functions inherited from reco::LeafCandidate
void cacheCartesian () const
 set internal cache More...
 
void cachePolar () const
 set internal cache More...
 
void clearCache () const
 clear internal cache More...
 
- Protected Attributes inherited from reco::LeafCandidate
edm::BoolCache cacheCartesianFixed_
 
edm::BoolCache cachePolarFixed_
 has cache been set? More...
 
float eta_
 
float mass_
 
LorentzVector p4Cartesian_
 internal cache for p4 More...
 
PolarLorentzVector p4Polar_
 internal cache for p4 More...
 
int pdgId_
 PDG identifier. More...
 
float phi_
 
float pt_
 four-momentum Lorentz vector More...
 
Charge qx3_
 electric charge More...
 
int status_
 status word More...
 
Point vertex_
 vertex position More...
 

Detailed Description

Particle reconstructed by the particle flow algorithm.

particle candidate from particle flow

Author
Colin Bernet
Date
February 2007

Definition at line 33 of file PFCandidate.h.

Member Typedef Documentation

Definition at line 329 of file PFCandidate.h.

return indices of elements used in the block

return elements return elements in blocks

Definition at line 326 of file PFCandidate.h.

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

Definition at line 330 of file PFCandidate.h.

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

particle types

Enumerator
X 
h 
e 
mu 
gamma 
h0 
h_HF 
egamma_HF 

Definition at line 38 of file PFCandidate.h.

38  {
39  X=0, // undefined
40  h, // charged hadron
41  e, // electron
42  mu, // muon
43  gamma, // photon
44  h0, // neutral hadron
45  h_HF, // HF tower identified as a hadron
46  egamma_HF // HF tower identified as an EM particle
47  };
Enumerator
kCandVertex 
kTrkVertex 
kComMuonVertex 
kSAMuonVertex 
kTrkMuonVertex 
kGSFVertex 

Definition at line 70 of file PFCandidate.h.

Constructor & Destructor Documentation

PFCandidate::PFCandidate ( )

default constructor

Definition at line 30 of file PFCandidate.cc.

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

Referenced by clone().

30  :
31  ecalERatio_(1.),
32  hcalERatio_(1.),
33  rawEcalEnergy_(0.),
34  rawHcalEnergy_(0.),
35  ps1Energy_(0.),
36  ps2Energy_(0.),
37  flags_(0),
38  deltaP_(0.),
47 {
48 
50  refsInfo_.reserve(3);
51 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:409
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:443
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:391
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:397
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:406
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:417
static const float bigMva_
Definition: PFCandidate.h:345
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:426
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:429
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:388
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:420
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:394
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:414
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:445
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:400
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:444
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:144
PFVertexType vertexType_
Definition: PFCandidate.h:411
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:423
virtual void setPdgId(int pdgId)
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:403
PFCandidate::PFCandidate ( const PFCandidatePtr sourcePtr)

constructor from a reference (keeps track of source relationship)

Definition at line 54 of file PFCandidate.cc.

References sourcePtr_.

54  {
55  *this = *sourcePtr;
56  sourcePtr_ = sourcePtr;
57 }
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:384
PFCandidate::PFCandidate ( Charge  q,
const LorentzVector p4,
ParticleType  particleId 
)

Definition at line 60 of file PFCandidate.cc.

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

62  :
63 
65  ecalERatio_(1.),
66  hcalERatio_(1.),
67  rawEcalEnergy_(0),
68  rawHcalEnergy_(0),
69  ps1Energy_(0.),
70  ps2Energy_(0.),
71  flags_(0),
72  deltaP_(0.),
81 {
82  refsInfo_.reserve(3);
84  elementsStorage_.reserve(10);
85 
86  // proceed with various consistency checks
87 
88  // charged candidate: track ref and charge must be non null
89  if( partId == h ||
90  partId == e ||
91  partId == mu ) {
92 
93  if( charge == 0 ) {
94  string err;
95  err+="Attempt to construct a charged PFCandidate with a zero charge";
96  throw cms::Exception("InconsistentValue",
97  err.c_str() );
98  }
99  }
100  else {
101  if( charge ) {
102  string err;
103  err += "Attempt to construct a neutral PFCandidate ";
104  err += "with a non-zero charge";
105  throw cms::Exception("InconsistentValue",
106  err.c_str() );
107  }
108  }
109  setPdgId( translateTypeToPdgId( partId ) );
110 }
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:409
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:443
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:391
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:397
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:406
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:417
static const float bigMva_
Definition: PFCandidate.h:345
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:426
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:429
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:388
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:420
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:394
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:414
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:445
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:400
virtual int charge() const
electric charge
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:444
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:144
CompositeCandidate(std::string name="")
default constructor
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:90
PFVertexType vertexType_
Definition: PFCandidate.h:411
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:423
virtual void setPdgId(int pdgId)
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:403
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Elements elementsStorage_
Definition: PFCandidate.h:380
virtual reco::PFCandidate::~PFCandidate ( )
inlinevirtual

destructor

Definition at line 95 of file PFCandidate.h.

95 {}

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

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

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

120  {
121  //elementsInBlocks_.push_back( make_pair(blockref.key(), elementIndex) );
122  if (blocksStorage_.size()==0)
123  blocksStorage_ =Blocks(blockref.id());
124  blocksStorage_.push_back(blockref);
125  elementsStorage_.push_back(elementIndex);
126 }
edm::RefVector< reco::PFBlockCollection > Blocks
Definition: PFCandidate.h:329
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:60
size_type size() const
Size of the RefVector.
Definition: RefVector.h:84
ProductID id() const
Accessor for product ID.
Definition: Ref.h:255
Elements elementsStorage_
Definition: PFCandidate.h:380
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 114 of file PFCandidate.cc.

References PFCandidate().

Referenced by DistortedPFCandProducer::produce().

114  {
115  return new PFCandidate( * this );
116 }
PFCandidate()
default constructor
Definition: PFCandidate.cc:30
reco::ConversionRef PFCandidate::conversionRef ( ) const

return a reference to the original conversion

Definition at line 451 of file PFCandidate.cc.

References GETREF, kRefConversionBit, and kRefConversionMask.

451  {
453 }
#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4145
double reco::PFCandidate::deltaP ( ) const
inline

uncertainty on 3-momentum

Definition at line 250 of file PFCandidate.h.

References deltaP_.

Referenced by PFElectronTranslator::createGsfElectrons().

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

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

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

416  {
417  if (type == T_TO_DISP) {
419  }
420  else if (type == T_FROM_DISP) {
422  }
424 }
type
Definition: HCALResponse.h:22
Block of elements.
edm::Ref< PFDisplacedVertexCollection > PFDisplacedVertexRef
persistent reference to a PFDisplacedVertex objects
#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4145
double reco::PFCandidate::ecalEnergy ( ) const
inline

return corrected Ecal energy

Definition at line 189 of file PFCandidate.h.

References ecalERatio_, and rawEcalEnergy_.

Referenced by PFCandConnector::analyseNuclearWPrim(), and PFCandidateBenchmark::fillOne().

189 { return ecalERatio_*rawEcalEnergy_;}
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:388
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:394
reco::PFCandidateElectronExtraRef PFCandidate::electronExtraRef ( ) const
const ElementsInBlocks& reco::PFCandidate::elementsInBlocks ( ) const
inline
bool PFCandidate::flag ( Flags  theFlag) const

return a given flag

Definition at line 201 of file PFCandidate.cc.

References flags_.

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

201  {
202 
203  return (flags_>>theFlag) & 1;
204 }
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:406
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 299 of file PFCandidate.cc.

References refsInfo_, s_refsBefore, and storedRefsBitPattern_.

300  {
301 
302  if( 0 == (iBit & storedRefsBitPattern_) ) {
303  return false;
304  }
305  aIndex = s_refsBefore[storedRefsBitPattern_ & iMask];
306  unsigned long long bitPacked = refsInfo_[aIndex];
307  oIndex = bitPacked & 0xFFFFFFFFULL; //low 32 bits are the index
308  unsigned short productIndex = (bitPacked & 0x0000FFFF00000000ULL)>>32;
309  unsigned short processIndex = (bitPacked & 0xFFFF000000000000ULL)>>48;
310  oProductID = edm::ProductID(processIndex,productIndex);
311  return true;
312 }
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:445
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:444
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 471 of file PFCandidate.cc.

References GETREF, kRefGsfElectronBit, and kRefGsfElectronMask.

reco::GsfTrackRef PFCandidate::gsfTrackRef ( ) const

return a reference to the corresponding GSF track, if an electron. otherwise, return a null reference

Definition at line 368 of file PFCandidate.cc.

References GETREF, kRefGsfTrackBit, and kRefGsfTrackMask.

Referenced by PFElectronTranslator::fillMVAValueMap(), LeptonRecoSkim::filter(), PFElectronTranslator::produce(), GsfElectronLinker::produce(), and vertex().

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

return corrected Hcal energy

Definition at line 199 of file PFCandidate.h.

References hcalERatio_, and rawHcalEnergy_.

Referenced by PFCandConnector::analyseNuclearWPrim(), and PFCandidateBenchmark::fillOne().

199 { return hcalERatio_*rawHcalEnergy_;}
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:391
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:397
reco::MuonRef PFCandidate::muonRef ( ) const

return a reference to the corresponding muon, if a muon. otherwise, return a null reference

Definition at line 347 of file PFCandidate.cc.

References GETREF, kRefMuonBit, and kRefMuonMask.

Referenced by PFAlgo::postMuonCleaning(), DistortedPFCandProducer::produce(), RecoMuonFromPFProducer::produce(), pat::PATMuonProducer::produce(), and vertex().

#define GETREF(_class_, _mask_, _bit_)
Definition: CountBits.h:4145
float reco::PFCandidate::mva_e_mu ( ) const
inline

mva for electron-muon discrimination

Definition at line 271 of file PFCandidate.h.

References mva_e_mu_.

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

mva for electron-pion discrimination

Definition at line 264 of file PFCandidate.h.

References mva_e_pi_.

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

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

mva for neutral hadron - gamma discrimination

Definition at line 297 of file PFCandidate.h.

References mva_gamma_nh_.

297 { return mva_gamma_nh_;}
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:429
float reco::PFCandidate::mva_nothing_gamma ( ) const
inline

mva for gamma detection

Definition at line 284 of file PFCandidate.h.

References mva_nothing_gamma_.

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

mva for neutral hadron detection

Definition at line 290 of file PFCandidate.h.

References mva_nothing_nh_.

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

mva for pi-muon discrimination

Definition at line 277 of file PFCandidate.h.

References mva_pi_mu_.

277 { return mva_pi_mu_;}
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:420
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 113 of file PFCandidate.h.

113  {
114  return 1;
115  }
bool PFCandidate::overlap ( const Candidate other) const
privatevirtual

Polymorphic overlap.

Reimplemented from reco::CompositeCandidate.

Definition at line 167 of file PFCandidate.cc.

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

167  {
168  CandidatePtr myPtr = sourceCandidatePtr(0);
169  if (myPtr.isNull()) return false;
170  for (size_t i = 0, n = other.numberOfSourceCandidatePtrs(); i < n; ++i) {
171  CandidatePtr otherPtr = other.sourceCandidatePtr(i);
172  if ((otherPtr == myPtr) ||
173  (sourcePtr_.isNonnull() && otherPtr.isNonnull() && sourcePtr_->overlap(*otherPtr))) {
174  return true;
175  }
176  }
177  return false;
178 }
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:117
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:157
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:384
bool isNull() const
Checks for null.
Definition: Ptr.h:153
virtual size_t numberOfSourceCandidatePtrs() const =0
virtual ParticleType reco::PFCandidate::particleId ( ) const
inlinevirtual

particle identification code

Definition at line 314 of file PFCandidate.h.

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

Referenced by PFSpecificAlgo::addInfo(), PFTester::analyze(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::color(), metsig::SignAlgoResolutions::evalPF(), PFElectronTranslator::fillMVAValueMap(), PFCandidateBenchmark::fillOne(), PFRootEventManager::fillOutEventWithPFCandidates(), LeptonRecoSkim::filter(), PFRootEventManager::highPtPFCandidate(), reco::tau::RecoTauIsolationMasking::inCone(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isBoson(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isGluon(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isHiggs(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isLepton(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isPhoton(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::isQuark(), python.Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::lineStyle(), JetMaker::makeSpecific(), reco::makeSpecific(), reco::tau::qcuts::mapAndCutByType(), reco::operator<<(), PFAlgo::postCleaning(), PFAlgo::postMuonCleaning(), DistortedPFCandProducer::produce(), MuonWithPFIsoProducer::produce(), RecoMuonFromPFProducer::produce(), PFElectronTranslator::produce(), GsfElectronLinker::produce(), pf2pat::PFMETAlgo::produce(), PFPhotonTranslator::produce(), reco::tau::RecoTauIsolationMasking::resolution(), pf2pat::PFIsoDepositAlgo::sameParticle(), setConversionRef(), setDisplacedVertexRef(), setPhotonRef(), setSuperClusterRef(), setTrackRef(), and PFRootEventManager::tauBenchmark().

314 { return translatePdgIdToType(pdgId_);}
int pdgId_
PDG identifier.
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:130
reco::PFCandidatePhotonExtraRef PFCandidate::photonExtraRef ( ) const

return a reference to the photon extra

Definition at line 490 of file PFCandidate.cc.

References GETREF, kRefPFPhotonExtraBit, and kRefPFPhotonExtraMask.

reco::PhotonRef PFCandidate::photonRef ( ) const

return a reference to the corresponding Photon if any

Definition at line 486 of file PFCandidate.cc.

References GETREF, kRefPhotonBit, and kRefPhotonMask.

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

Definition at line 308 of file PFCandidate.h.

References positionAtECALEntrance_.

Referenced by reco::tau::RecoTauIsolationMasking::inCone().

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

return corrected PS1 energy

Definition at line 229 of file PFCandidate.h.

References ps1Energy_.

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

return corrected PS2 energy

Definition at line 235 of file PFCandidate.h.

References ps2Energy_.

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

return corrected Ecal energy

Definition at line 192 of file PFCandidate.h.

References rawEcalEnergy_.

Referenced by PFElectronTranslator::createBasicCluster(), PFPhotonTranslator::createBasicCluster(), and PFAlgo::postMuonCleaning().

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

return raw Hcal energy

Definition at line 202 of file PFCandidate.h.

References rawHcalEnergy_.

Referenced by PFAlgo::postMuonCleaning().

202 { return rawHcalEnergy_;}
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:397
void PFCandidate::rescaleMomentum ( double  rescaleFactor)

particle momentum *= rescaleFactor

Definition at line 184 of file PFCandidate.cc.

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

184  {
185  LorentzVector rescaledp4 = p4();
186  rescaledp4 *= rescaleFactor;
187  setP4( rescaledp4 );
188 }
math::XYZTLorentzVector LorentzVector
virtual void setP4(const LorentzVector &p4)
set 4-momentum
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
void reco::PFCandidate::set_mva_e_mu ( float  mva)
inline

set mva for electron-muon discrimination

Definition at line 268 of file PFCandidate.h.

References mva_e_mu_.

268 { mva_e_mu_=mva;}
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:417
void reco::PFCandidate::set_mva_e_pi ( float  mva)
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 261 of file PFCandidate.h.

References mva_e_pi_.

Referenced by PFElectronAlgo::SetCandidates().

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

set mva for neutral hadron - gamma discrimination

Definition at line 294 of file PFCandidate.h.

References mva_gamma_nh_.

294 { mva_gamma_nh_=mva;}
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:429
void reco::PFCandidate::set_mva_nothing_gamma ( float  mva)
inline

set mva for gamma detection

Definition at line 281 of file PFCandidate.h.

References mva_nothing_gamma_.

Referenced by PFPhotonAlgo::RunPFPhoton().

281 { mva_nothing_gamma_=mva;}
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:423
void reco::PFCandidate::set_mva_nothing_nh ( float  mva)
inline

set mva for neutral hadron detection

Definition at line 287 of file PFCandidate.h.

References mva_nothing_nh_.

287 { mva_nothing_nh_=mva;}
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:426
void reco::PFCandidate::set_mva_pi_mu ( float  mva)
inline

set mva for pi-muon discrimination

Definition at line 274 of file PFCandidate.h.

References mva_pi_mu_.

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

set ref to original reco conversion

Definition at line 427 of file PFCandidate.cc.

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

Referenced by PFConversionAlgo::setCandidates().

427  {
428  if( particleId() != gamma ) {
429  string err;
430  err += "PFCandidate::setConversionRef: this is not a (converted) photon ! particleId_=";
431  char num[4];
432  sprintf( num, "%d", particleId());
433  err += num;
434 
435  throw cms::Exception("InconsistentReference",
436  err.c_str() );
437  }
438  else if( !flag( GAMMA_TO_GAMMACONV ) ) {
439  string err;
440  err += "PFCandidate::setConversionRef: particule flag is not GAMMA_TO_GAMMACONV";
441 
442  throw cms::Exception("InconsistentReference",
443  err.c_str() );
444  }
445 
447  iRef.refCore(), iRef.key(),iRef.productGetter());
448 }
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:201
long long int num
Definition: procUtils.cc:71
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void reco::PFCandidate::setDeltaP ( double  dp)
inline

set uncertainty on momentum

Definition at line 247 of file PFCandidate.h.

References deltaP_.

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

set displaced vertex reference

Definition at line 372 of file PFCandidate.cc.

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

372  {
373 
374  if( particleId() != h ) {
375  string err;
376  err += "PFCandidate::setDisplacedVertexRef: this is not a hadron! particleId_=";
377  char num[4];
378  sprintf( num, "%d", particleId());
379  err += num;
380 
381  throw cms::Exception("InconsistentReference",
382  err.c_str() );
383  }
384  else if( !flag( T_FROM_DISP ) && !flag( T_TO_DISP ) ) {
385  string err;
386  err += "PFCandidate::setDisplacedVertexRef: particule flag is neither T_FROM_DISP nor T_TO_DISP";
387 
388  throw cms::Exception("InconsistentReference",
389  err.c_str() );
390  }
391 
392 
393  if (type == T_TO_DISP && flag( T_TO_DISP ))
395  iRef.isNonnull(),
396  iRef.refCore(), iRef.key(),iRef.productGetter());
397  else if (type == T_FROM_DISP && flag( T_FROM_DISP ))
399  iRef.isNonnull(),
400  iRef.refCore(), iRef.key(),iRef.productGetter());
401  else if ( (type == T_FROM_DISP && !flag( T_FROM_DISP ))
402  ||
403  (type == T_TO_DISP && !flag( T_TO_DISP )) ){
404  string err;
405  err += "PFCandidate::setDisplacedVertexRef: particule flag is not switched on";
406 
407  throw cms::Exception("InconsistentReference",
408  err.c_str() );
409  }
410 
411 }
type
Definition: HCALResponse.h:22
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:201
long long int num
Definition: procUtils.cc:71
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void reco::PFCandidate::setEcalEnergy ( float  eeRaw,
float  eeCorr 
)
inline

set corrected Ecal energy

Definition at line 185 of file PFCandidate.h.

References abs, ecalERatio_, and rawEcalEnergy_.

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

185  {
186  rawEcalEnergy_ = eeRaw; ecalERatio_= std::abs(eeRaw)<1.e-6 ? 1.0 : eeCorr/eeRaw;}
#define abs(x)
Definition: mlp_lapack.h:159
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:388
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:394
void PFCandidate::setFlag ( Flags  theFlag,
bool  value 
)

set a given flag

Definition at line 191 of file PFCandidate.cc.

References flags_.

Referenced by PFPhotonAlgo::RunPFPhoton(), and PFConversionAlgo::setCandidates().

191  {
192 
193  if(value)
194  flags_ = flags_ | (1<<theFlag);
195  else
196  flags_ = flags_ ^ (1<<theFlag);
197 }
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:406
void reco::PFCandidate::setFlag ( unsigned  shift,
unsigned  flag,
bool  value 
)
private
void PFCandidate::setGsfElectronRef ( const reco::GsfElectronRef ref)

set GsfElectronRef

Definition at line 466 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 GsfElectronLinker::produce().

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

set gsftrack reference

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

351  {
352 // Removed by F. Beaudette. Would like to be able to save the GsfTrackRef even for charged pions
353 // if( particleId() != e ) {
354 // string err;
355 // err += "PFCandidate::setGsfTrackRef: this is not an electron ! particleId_=";
356 // char num[4];
357 // sprintf( num, "%d", particleId());
358 // err += num;
359 //
360 // throw cms::Exception("InconsistentReference",
361 // err.c_str() );
362 // }
363 
364  storeRefInfo(kRefGsfTrackMask, kRefGsfTrackBit, iRef.isNonnull(),
365  iRef.refCore(), iRef.key(),iRef.productGetter());
366 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void reco::PFCandidate::setHcalEnergy ( float  ehRaw,
float  ehCorr 
)
inline

set corrected Hcal energy

Definition at line 195 of file PFCandidate.h.

References abs, hcalERatio_, and rawHcalEnergy_.

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

195  {
196  rawHcalEnergy_ = ehRaw; hcalERatio_= std::abs(ehRaw)<1.e-6 ? 1.0 : ehCorr/ehRaw;}
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:391
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:397
#define abs(x)
Definition: mlp_lapack.h:159
void PFCandidate::setMuonRef ( const reco::MuonRef ref)

set muon reference

Definition at line 334 of file PFCandidate.cc.

References edm::hlt::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().

334  {
335  if( trackRef() != iRef->track() ) {
336  string err;
337  err += "PFCandidate::setMuonRef: inconsistent track references!";
338 
339  throw cms::Exception("InconsistentReference",
340  err.c_str() );
341  }
342 
343  storeRefInfo(kRefMuonMask, kRefMuonBit, iRef.isNonnull(),
344  iRef.refCore(), iRef.key(),iRef.productGetter());
345 }
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:331
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void PFCandidate::setParticleType ( ParticleType  type)

set Particle Type

Definition at line 162 of file PFCandidate.cc.

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

162  {
164 }
type
Definition: HCALResponse.h:22
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:144
virtual void setPdgId(int pdgId)
void PFCandidate::setPFElectronExtraRef ( const reco::PFCandidateElectronExtraRef ref)

set the PF Electron Extra Ref

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

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

set the PF Photon Extra Ref

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

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

set ref to the corresponding reco::Photon if any

Definition at line 498 of file PFCandidate.cc.

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

498  {
499  if( particleId() != gamma && particleId() != e) {
500  string err;
501  err += "PFCandidate::setSuperClusterRef: this is not an electron neither a photon ! particleId_=";
502  char num[4];
503  sprintf( num, "%d", particleId());
504  err += num;
505 
506  throw cms::Exception("InconsistentReference", err.c_str() );
507  }
508 
509  storeRefInfo(kRefPhotonMask, kRefPhotonBit, iRef.isNonnull(),
510  iRef.refCore(), iRef.key(),iRef.productGetter());
511 
512 }
long long int num
Definition: procUtils.cc:71
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void reco::PFCandidate::setPositionAtECALEntrance ( const math::XYZPointF pos)
inline

set position at ECAL entrance

Definition at line 300 of file PFCandidate.h.

References pos, and positionAtECALEntrance_.

Referenced by PFElectronAlgo::SetCandidates().

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

set corrected PS1 energy

Definition at line 226 of file PFCandidate.h.

References ps1Energy_.

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

226 {ps1Energy_ = e1;}
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:400
void reco::PFCandidate::setPs2Energy ( float  e2)
inline

set corrected PS2 energy

Definition at line 232 of file PFCandidate.h.

References ps2Energy_.

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

232 {ps2Energy_ = e2;}
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:403
void reco::PFCandidate::setSourceCandidatePtr ( const PFCandidatePtr ptr)
inline

Definition at line 111 of file PFCandidate.h.

References sourcePtr_.

Referenced by GsfElectronLinker::produce().

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

Definition at line 514 of file PFCandidate.cc.

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

Referenced by PFPhotonAlgo::RunPFPhoton().

514  {
515  if( particleId() != gamma && particleId() != e) {
516  string err;
517  err += "PFCandidate::setSuperClusterRef: this is not an electron neither a photon ! particleId_=";
518  char num[4];
519  sprintf( num, "%d", particleId());
520  err += num;
521 
522  throw cms::Exception("InconsistentReference", err.c_str() );
523  }
524 
526  iRef.refCore(), iRef.key(),iRef.productGetter());
527 
528 }
long long int num
Definition: procUtils.cc:71
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void PFCandidate::setTrackRef ( const reco::TrackRef ref)

set track reference

Definition at line 314 of file PFCandidate.cc.

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

Referenced by PFElectronAlgo::SetCandidates().

314  {
315  if(!charge()) {
316  string err;
317  err += "PFCandidate::setTrackRef: this is a neutral candidate! ";
318  err += "particleId_=";
319  char num[4];
320  sprintf( num, "%d", particleId());
321  err += num;
322 
323  throw cms::Exception("InconsistentReference",
324  err.c_str() );
325  }
326 
327  storeRefInfo(kRefTrackMask, kRefTrackBit, iRef.isNonnull(),
328  iRef.refCore(), iRef.key(),iRef.productGetter());
329 }
virtual int charge() const
electric charge
long long int num
Definition: procUtils.cc:71
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
void PFCandidate::setV0Ref ( const reco::VertexCompositeCandidateRef ref)

set ref to original reco conversion

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

456  {
457  storeRefInfo(kRefV0Mask, kRefV0Bit, iRef.isNonnull(),
458  iRef.refCore(), iRef.key(),iRef.productGetter());
459 }
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:263
virtual void reco::PFCandidate::setVertex ( math::XYZPoint  p)
inlinevirtual

Definition at line 360 of file PFCandidate.h.

References kCandVertex, reco::LeafCandidate::p(), reco::LeafCandidate::vertex_, and vertexType_.

Referenced by PFConcretePFCandidateProducer::produce().

360  {
362  }
virtual double p() const
magnitude of momentum vector
Point vertex_
vertex position
PFVertexType vertexType_
Definition: PFCandidate.h:411
void reco::PFCandidate::setVertexSource ( PFVertexType  vt)
inline

Definition at line 358 of file PFCandidate.h.

References kCandVertex, reco::LeafCandidate::vertex_, and vertexType_.

Referenced by PFElectronAlgo::SetCandidates().

358 { vertexType_=vt; if (vertexType_!=kCandVertex) vertex_=Point(0.,0.,0.);}
Point vertex_
vertex position
PFVertexType vertexType_
Definition: PFCandidate.h:411
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:29
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 117 of file PFCandidate.h.

References sourcePtr_.

Referenced by overlap().

117  {
118  return sourcePtr_;
119  }
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:384
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 263 of file PFCandidate.cc.

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

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

265  {
266 
267  size_t index = s_refsBefore[storedRefsBitPattern_ & iMask];
268  if ( 0 == getter_) {
269  getter_ = iGetter;
270  }
271 
272  if(iIsValid) {
273  if(0 == (storedRefsBitPattern_ & iBit) ) {
274  refsInfo_.insert(refsInfo_.begin()+index, bitPackRefInfo(iCore,iKey));
275  if (iGetter==0)
276  refsCollectionCache_.insert(refsCollectionCache_.begin()+index,(void*)iCore.productPtr());
277  else
279  } else {
280  assert(refsInfo_.size()>index);
281  *(refsInfo_.begin()+index)=bitPackRefInfo(iCore,iKey);
282  if (iGetter==0)
283  *(refsCollectionCache_.begin()+index)=(void*)iCore.productPtr();
284  else
285  *(refsCollectionCache_.begin()+index)=0;
286 
287  }
288  storedRefsBitPattern_ |= iBit;
289  } else{
290  if( storedRefsBitPattern_ & iBit) {
291  refsInfo_.erase(refsInfo_.begin()+index);
293  storedRefsBitPattern_ ^= iBit;
294  }
295  }
296 
297 }
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:443
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:445
static unsigned long long bitPackRefInfo(const edm::RefCore &iCore, size_t iIndex)
Definition: PFCandidate.cc:256
void const * productPtr() const
Definition: RefCore.h:26
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:444
unsigned int index
Definition: LeafCandidate.h:33
static const unsigned int s_refsBefore[]
Definition: CountBits.h:14
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:446
reco::SuperClusterRef PFCandidate::superClusterRef ( ) const

return a reference to the corresponding SuperCluster if any

Definition at line 494 of file PFCandidate.cc.

References GETREF, kRefSuperClusterBit, and kRefSuperClusterMask.

Referenced by PFPhotonTranslator::produce().

reco::TrackRef PFCandidate::trackRef ( ) const
PFCandidate::ParticleType PFCandidate::translatePdgIdToType ( int  pdgid) const

Definition at line 130 of file PFCandidate.cc.

References abs, e, egamma_HF, gamma, h, h0, h_HF, mu, and X.

Referenced by particleId().

130  {
131  switch (std::abs(pdgid)) {
132  case 211: return h;
133  case 11: return e;
134  case 13: return mu;
135  case 22: return gamma;
136  case 130: return h0;
137  case 1: return h_HF;
138  case 2: return egamma_HF;
139  case 0: return X;
140  default: return X;
141  }
142 }
#define abs(x)
Definition: mlp_lapack.h:159
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 144 of file PFCandidate.cc.

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

Referenced by PFCandidate(), and setParticleType().

144  {
145 
146  int thecharge = charge();
147 
148  switch( type ) {
149  case h: return thecharge*211; // pi+
150  case e: return thecharge*(-11);
151  case mu: return thecharge*(-13);
152  case gamma: return 22;
153  case h0: return 130; // K_L0
154  case h_HF: return 1; // dummy pdg code
155  case egamma_HF: return 2; // dummy pdg code
156  case X:
157  default: return 0;
158  }
159 }
type
Definition: HCALResponse.h:22
virtual int charge() const
electric charge
reco::VertexCompositeCandidateRef PFCandidate::v0Ref ( ) const

return a reference to the original conversion

Definition at line 461 of file PFCandidate.cc.

References GETREF, kRefV0Bit, and kRefV0Mask.

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

vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 538 of file PFCandidate.cc.

References gsfTrackRef(), kCandVertex, kComMuonVertex, kGSFVertex, kSAMuonVertex, kTrkMuonVertex, kTrkVertex, muonRef(), trackRef(), reco::LeafCandidate::vertex_, and vertexType_.

Referenced by FWPFCandidate3DProxyBuilder::build(), PFPileUp::chargedHadronVertex(), PFConcretePFCandidateProducer::produce(), vx(), vy(), and vz().

538  {
539  switch (vertexType_) {
540  case kCandVertex:
541  return vertex_;
542  break;
543  case kTrkVertex:
544  return trackRef()->vertex();
545  break;
546  case kComMuonVertex:
547  return muonRef()->combinedMuon()->vertex();
548  break;
549  case kSAMuonVertex:
550  return muonRef()->standAloneMuon()->vertex();
551  break;
552  case kTrkMuonVertex:
553  return muonRef()->track()->vertex();
554  break;
555  case kGSFVertex:
556  return gsfTrackRef()->vertex();
557  break;
558  }
559  return vertex_;
560 }
Point vertex_
vertex position
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:331
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:347
PFVertexType vertexType_
Definition: PFCandidate.h:411
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:368
virtual double reco::PFCandidate::vx ( ) const
inlinevirtual

x coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 365 of file PFCandidate.h.

References vertex().

Referenced by PFAlgo::postMuonCleaning().

365 {return vertex().x();}
virtual const Point & vertex() const
vertex position
Definition: PFCandidate.cc:538
virtual double reco::PFCandidate::vy ( ) const
inlinevirtual

y coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 366 of file PFCandidate.h.

References vertex().

Referenced by PFAlgo::postMuonCleaning().

366 {return vertex().y();}
virtual const Point & vertex() const
vertex position
Definition: PFCandidate.cc:538
virtual double reco::PFCandidate::vz ( ) const
inlinevirtual

z coordinate of vertex position

Reimplemented from reco::LeafCandidate.

Definition at line 367 of file PFCandidate.h.

References vertex().

367 {return vertex().z();}
virtual const Point & vertex() const
vertex position
Definition: PFCandidate.cc:538

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

Blocks reco::PFCandidate::blocksStorage_
private

Definition at line 379 of file PFCandidate.h.

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

float reco::PFCandidate::deltaP_
private

uncertainty on 3-momentum

Definition at line 409 of file PFCandidate.h.

Referenced by deltaP(), and setDeltaP().

float reco::PFCandidate::ecalERatio_
private

corrected ECAL energy ratio (corrected/raw)

Definition at line 388 of file PFCandidate.h.

Referenced by ecalEnergy(), and setEcalEnergy().

ElementsInBlocks reco::PFCandidate::elementsInBlocks_
mutableprivate

Definition at line 378 of file PFCandidate.h.

Referenced by elementsInBlocks().

Elements reco::PFCandidate::elementsStorage_
private

Definition at line 380 of file PFCandidate.h.

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

unsigned reco::PFCandidate::flags_
private

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

Definition at line 406 of file PFCandidate.h.

Referenced by flag(), and setFlag().

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

Definition at line 443 of file PFCandidate.h.

Referenced by storeRefInfo().

float reco::PFCandidate::hcalERatio_
private

corrected HCAL energy ratio (corrected/raw)

Definition at line 391 of file PFCandidate.h.

Referenced by hcalEnergy(), and setHcalEnergy().

float reco::PFCandidate::mva_e_mu_
private

mva for electron-muon discrimination

Definition at line 417 of file PFCandidate.h.

Referenced by mva_e_mu(), and set_mva_e_mu().

float reco::PFCandidate::mva_e_pi_
private

mva for electron-pion discrimination

Definition at line 414 of file PFCandidate.h.

Referenced by mva_e_pi(), and set_mva_e_pi().

float reco::PFCandidate::mva_gamma_nh_
private

mva for neutral hadron - gamma discrimination

Definition at line 429 of file PFCandidate.h.

Referenced by mva_gamma_nh(), and set_mva_gamma_nh().

float reco::PFCandidate::mva_nothing_gamma_
private

mva for gamma detection

Definition at line 423 of file PFCandidate.h.

Referenced by mva_nothing_gamma(), and set_mva_nothing_gamma().

float reco::PFCandidate::mva_nothing_nh_
private

mva for neutral hadron detection

Definition at line 426 of file PFCandidate.h.

Referenced by mva_nothing_nh(), and set_mva_nothing_nh().

float reco::PFCandidate::mva_pi_mu_
private

mva for pi-muon discrimination

Definition at line 420 of file PFCandidate.h.

Referenced by mva_pi_mu(), and set_mva_pi_mu().

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

position at ECAL entrance, from the PFRecTrack

Definition at line 432 of file PFCandidate.h.

Referenced by positionAtECALEntrance(), and setPositionAtECALEntrance().

float reco::PFCandidate::ps1Energy_
private

corrected PS1 energy

Definition at line 400 of file PFCandidate.h.

Referenced by pS1Energy(), and setPs1Energy().

float reco::PFCandidate::ps2Energy_
private

corrected PS2 energy

Definition at line 403 of file PFCandidate.h.

Referenced by pS2Energy(), and setPs2Energy().

float reco::PFCandidate::rawEcalEnergy_
private

raw ECAL energy

Definition at line 394 of file PFCandidate.h.

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

float reco::PFCandidate::rawHcalEnergy_
private

raw HCAL energy

Definition at line 397 of file PFCandidate.h.

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

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

Definition at line 446 of file PFCandidate.h.

Referenced by storeRefInfo().

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

Definition at line 445 of file PFCandidate.h.

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

PFCandidatePtr reco::PFCandidate::sourcePtr_
private

reference to the source PFCandidate, if any

Definition at line 384 of file PFCandidate.h.

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

unsigned short reco::PFCandidate::storedRefsBitPattern_
private

Definition at line 444 of file PFCandidate.h.

Referenced by getRefInfo(), and storeRefInfo().

PFVertexType reco::PFCandidate::vertexType_
private

Definition at line 411 of file PFCandidate.h.

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