CMS 3D CMS Logo

PFCandidate.h
Go to the documentation of this file.
1 #ifndef ParticleFlowCandidate_PFCandidate_h
2 #define ParticleFlowCandidate_PFCandidate_h
3 
9 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
10 #include <atomic>
11 #endif
12 #include <iosfwd>
13 
15 
32 namespace reco {
40 
41  public:
42 
44  enum ParticleType {
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  };
54 
55  enum Flags {
56  NORMAL=0,
73  };
74 
75 
76  enum PFVertexType {
86  };
87 
88 
90  PFCandidate();
91 
93  PFCandidate( const PFCandidatePtr& sourcePtr );
94 
95  /* PFCandidate( Charge q, */
96  /* const LorentzVector & p4, */
97  /* ParticleType particleId, */
98  /* reco::PFBlockRef blockRef ); */
100  const LorentzVector & p4,
102 
104  PFCandidate( const PFCandidate&);
105 
107  ~PFCandidate() override;
108 
110 
112  PFCandidate * clone() const override;
113 
114 
115  /* /// set source ref */
116  /* void setSourceRef(const PFCandidateRef& ref) { sourceRef_ = ref; } */
117 
118  /* size_type numberOfSourceCandidateRefs() const {return 1;} */
119 
120  /* CandidateBaseRef sourceCandidateRef( size_type i ) const { */
121  /* return CandidateBaseRef(sourceRef_); */
122  /* } */
123 
125  void setSourceCandidatePtr(const PFCandidatePtr& ptr) { sourcePtr_ = ptr; }
126 
127  size_t numberOfSourceCandidatePtrs() const override {
128  return 1;
129  }
130 
132  return sourcePtr_;
133  }
134 
140 
142  void setParticleType( ParticleType type );
143 
144 
146  /* void addElement( const reco::PFBlockElement* element ); */
147 
149  void addElementInBlock( const reco::PFBlockRef& blockref,
150  unsigned elementIndex );
151 
153  void setTrackRef(const reco::TrackRef& ref);
154 
157  reco::TrackRef trackRef() const;
158 
161  const reco::Track * bestTrack() const override {
162  if ( (abs(pdgId()) == 11 || pdgId() == 22) && gsfTrackRef().isNonnull() && gsfTrackRef().isAvailable() )
163  return &(*gsfTrackRef());
164  else if ( trackRef().isNonnull() && trackRef().isAvailable() )
165  return &(*trackRef());
166  else
167  return nullptr;
168  }
170  float dzError() const override { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dzError(); else return 0; }
172  float dxyError() const override { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dxyError(); else return 0; }
173 
175  void setGsfTrackRef(const reco::GsfTrackRef& ref);
176 
180 
182  void setMuonRef(const reco::MuonRef& ref);
183 
186  reco::MuonRef muonRef() const;
187 
188 
189 
190 
193 
197 
199  void setConversionRef(const reco::ConversionRef& ref);
200 
203 
206 
209 
212 
215 
217  void setEcalEnergy( float eeRaw, float eeCorr ) {
218  rawEcalEnergy_ = eeRaw; ecalERatio_= std::abs(eeRaw)<1.e-6 ? 1.0 : eeCorr/eeRaw;}
219 
221  double ecalEnergy() const { return ecalERatio_*rawEcalEnergy_;}
222 
224  double rawEcalEnergy() const { return rawEcalEnergy_;}
225 
227  void setHcalEnergy( float ehRaw, float ehCorr ) {
228  rawHcalEnergy_ = ehRaw; hcalERatio_= std::abs(ehRaw)<1.e-6 ? 1.0 : ehCorr/ehRaw;}
229 
231  double hcalEnergy() const { return hcalERatio_*rawHcalEnergy_;}
232 
234  double rawHcalEnergy() const { return rawHcalEnergy_;}
235 
237  void setHoEnergy( float eoRaw, float eoCorr ) {
238  rawHoEnergy_ = eoRaw; hoERatio_= std::abs(eoRaw)<1.e-6 ? 1.0 : eoCorr/eoRaw;}
239 
241  double hoEnergy() const { return hoERatio_*rawHoEnergy_;}
242 
244  double rawHoEnergy() const { return rawHoEnergy_;}
245 
247  void setGsfElectronRef (const reco::GsfElectronRef & ref);
248 
249  void setSuperClusterRef (const reco::SuperClusterRef& scRef);
250 
253 
255  void setPhotonRef(const reco::PhotonRef& phRef);
256 
258  reco::PhotonRef photonRef() const;
259 
262 
265 
268 
271 
273  void setPs1Energy( float e1 ) {ps1Energy_ = e1;}
274 
276  double pS1Energy() const { return ps1Energy_;}
277 
279  void setPs2Energy( float e2 ) {ps2Energy_ = e2;}
280 
282  double pS2Energy() const { return ps2Energy_;}
283 
285  void rescaleMomentum( double rescaleFactor );
286 
288  void setFlag(Flags theFlag, bool value);
289 
291  bool flag(Flags theFlag) const;
292 
294  void setDeltaP(double dp ) {deltaP_ = dp;}
295 
297  double deltaP() const { return deltaP_;}
298 
299  // int pdgId() const { return translateTypeToPdgId( particleId_ ); }
300 
306 
307  void set_mva_Isolated( float mvaI ){ mva_Isolated_=mvaI;}
308  // mva for isolated electrons
309  float mva_Isolated() const { return mva_Isolated_;}
310 
311  void set_mva_e_pi( float mvaNI ){ mva_e_pi_=mvaNI;}
313  float mva_e_pi() const { return mva_e_pi_;}
314 
316  void set_mva_e_mu( float mva ) { mva_e_mu_=mva;}
317 
319  float mva_e_mu() const { return mva_e_mu_;}
320 
322  void set_mva_pi_mu( float mva ) { mva_pi_mu_=mva;}
323 
325  float mva_pi_mu() const { return mva_pi_mu_;}
326 
327 
330 
332  float mva_nothing_gamma() const { return mva_nothing_gamma_;}
333 
336 
338  float mva_nothing_nh() const { return mva_nothing_nh_;}
339 
340 
343 
345  float mva_gamma_nh() const { return mva_gamma_nh_;}
346 
350  }
351 
354 
358  }
359 
361 
363  return muonTrackType_;
364  }
365 
369  }
370 
373  virtual ParticleType particleId() const { return translatePdgIdToType(pdgId());}
374 
375 
377  /* const std::vector<unsigned>& elementIndices() const { */
378  /* return elementIndices_; */
379  /* } */
381  /* const edm::OwnVector< reco::PFBlockElement >& elements() const */
382  /* {return elements_;} */
383 
385  typedef std::pair<reco::PFBlockRef, unsigned> ElementInBlock;
386  typedef std::vector< ElementInBlock > ElementsInBlocks;
387 
389  typedef std::vector<unsigned> Elements;
390 
391  const ElementsInBlocks& elementsInBlocks() const;
392 
393  static const float bigMva_;
394 
395  friend std::ostream& operator<<( std::ostream& out,
396  const PFCandidate& c );
397 
398  //Tips on setting the vertex efficiently
399  //There are two choices: a) use the vertex_ data member, or b) point to the vertex
400  //of one of the refs stored by this class. The PFVertexType enum gives the current list
401  //of possible references. For these references, use the setVeretxSource method and NOT
402  //the setVertex method. If none of the available refs have the vertex that you want for this
403  //PFCandidate, use the setVertex method. If you find that you are using frequently two store a
404  // vertex that is the same as one of the refs in this class, you should just extend the enum
405  // and modify the vertex() method accordingly.
407 
408  void setVertex( const math::XYZPoint& p) override {
410  }
411 
412  const Point & vertex() const override;
413  double vx() const override {return vertex().x();}
414  double vy() const override {return vertex().y();}
415  double vz() const override {return vertex().z();}
416 
418  bool isTimeValid() const { return timeError_ >= 0.f; }
420  float time() const { return time_; }
422  float timeError() const { return timeError_; }
424  void setTime(float time, float timeError = 0.f) { time_ = time; timeError_ = timeError; }
425 
426  private:
428  bool overlap( const Candidate & ) const override;
429 
430  void setFlag(unsigned shift, unsigned flag, bool value);
431 
432  bool flag(unsigned shift, unsigned flag) const;
433 
434 
435 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
436  mutable std::atomic<ElementsInBlocks*> elementsInBlocks_;
437 #else
438  mutable ElementsInBlocks* elementsInBlocks_;
439 #endif
442 
444  /* PFCandidateRef sourceRef_; */
446 
447 
451 
453  float ecalERatio_;
454 
456  float hcalERatio_;
457 
459  float hoERatio_;
460 
463 
466 
469 
471  float ps1Energy_;
472 
474  float ps2Energy_;
475 
477  unsigned flags_;
478 
480  float deltaP_;
481 
483 
484  // mva for isolated electrons
486 
488  float mva_e_pi_;
489 
491  float mva_e_mu_;
492 
494  float mva_pi_mu_;
495 
498 
501 
504 
507 
508 
509  //more efficiently stored refs
510  void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid,
511  const edm::RefCore& iCore, size_t iKey,
512  const edm::EDProductGetter*);
513  bool getRefInfo(unsigned int iMask, unsigned int iBit,
514  edm::ProductID& oProdID, size_t& oIndex, size_t& aIndex ) const;
515 
516 
517  const edm::EDProductGetter* getter_; //transient
518  unsigned short storedRefsBitPattern_;
519  std::vector<unsigned long long> refsInfo_;
520  std::vector<const void *> refsCollectionCache_;
521 
523  float time_;
525  float timeError_;
526 
527  };
528 
530  struct PFParticleIdTag { };
531 
534  /* GET_DEFAULT_CANDIDATE_COMPONENT( PFCandidate, PFBlockRef, block ); */
535 
539 
540  std::ostream& operator<<( std::ostream& out, const PFCandidate& c );
541 
542 
543 }
544 
545 #endif
bool isAvailable() const
Definition: Ref.h:577
type
Definition: HCALResponse.h:21
~PFCandidate() override
destructor
Definition: PFCandidate.cc:207
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:480
void setPs2Energy(float e2)
set corrected PS2 energy
Definition: PFCandidate.h:279
int pdgId() const final
PDG identifier.
int Charge
electric charge type
Definition: Candidate.h:35
void setDeltaP(double dp)
set uncertainty on momentum
Definition: PFCandidate.h:294
friend std::ostream & operator<<(std::ostream &out, const PFCandidate &c)
void setPs1Energy(float e1)
set corrected PS1 energy
Definition: PFCandidate.h:273
ParticleType
particle types
Definition: PFCandidate.h:44
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:450
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:517
void setPFPhotonExtraRef(const reco::PFCandidatePhotonExtraRef &ref)
set the PF Photon Extra Ref
Definition: PFCandidate.cc:641
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:224
void setGsfElectronRef(const reco::GsfElectronRef &ref)
set GsfElectronRef
Definition: PFCandidate.cc:574
void setFlag(Flags theFlag, bool value)
set a given flag
Definition: PFCandidate.cc:290
bool getRefInfo(unsigned int iMask, unsigned int iBit, edm::ProductID &oProdID, size_t &oIndex, size_t &aIndex) const
Definition: PFCandidate.cc:406
void set_mva_e_mu(float mva)
set mva for electron-muon discrimination
Definition: PFCandidate.h:316
virtual void setSourceCandidatePtr(const CandidatePtr &ptr)
Set the ptr to the source Candidate.
Definition: Candidate.h:182
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:525
void set_mva_nothing_gamma(float mva)
set mva for gamma detection
Definition: PFCandidate.h:329
size_t size_type
Definition: Candidate.h:30
void setPositionAtECALEntrance(const math::XYZPointF &pos)
set position at ECAL entrance
Definition: PFCandidate.h:348
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:332
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:456
double dxyError() const
error on dxy
Definition: TrackBase.h:796
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:465
const reco::Muon::MuonTrackType bestMuonTrackType() const
get the Best Muon Track Ref
Definition: PFCandidate.h:362
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:477
double rawHoEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:244
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:491
static const float bigMva_
Definition: PFCandidate.h:393
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: PFCandidate.cc:266
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:500
void setVertex(const math::XYZPoint &p) override
set vertex
Definition: PFCandidate.h:408
float time() const
Definition: PFCandidate.h:420
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:459
edm::RefVector< reco::PFBlockCollection > Blocks
Definition: PFCandidate.h:388
void setSourceCandidatePtr(const PFCandidatePtr &ptr)
Definition: PFCandidate.h:125
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
reco::PFCandidatePhotonExtraRef photonExtraRef() const
return a reference to the photon extra
Definition: PFCandidate.cc:597
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:503
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:453
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:494
particle ID component tag
Definition: PFCandidate.h:530
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:367
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:386
float mva_e_mu() const
mva for electron-muon discrimination
Definition: PFCandidate.h:319
void setVertex(const Point &vertex) override
set vertex
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:462
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:438
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:488
reco::PFDisplacedVertexRef displacedVertexRef(Flags type) const
Definition: PFCandidate.cc:524
void set_mva_pi_mu(float mva)
set mva for pi-muon discrimination
Definition: PFCandidate.h:322
float dxyError() const override
uncertainty on dxy
Definition: PFCandidate.h:172
void set_mva_nothing_nh(float mva)
set mva for neutral hadron detection
Definition: PFCandidate.h:335
void set_mva_e_pi(float mvaNI)
Definition: PFCandidate.h:311
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:652
double pS1Energy() const
return corrected PS1 energy
Definition: PFCandidate.h:276
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:519
float mva_pi_mu() const
mva for pi-muon discrimination
Definition: PFCandidate.h:325
bool isTimeValid() const
do we have a valid time information
Definition: PFCandidate.h:418
float dzError() const override
uncertainty on dz
Definition: PFCandidate.h:170
void setDisplacedVertexRef(const reco::PFDisplacedVertexRef &ref, Flags flag)
set displaced vertex reference
Definition: PFCandidate.cc:480
float mva_nothing_nh() const
mva for neutral hadron detection
Definition: PFCandidate.h:338
float mva_Isolated() const
Definition: PFCandidate.h:309
std::vector< unsigned > Elements
Definition: PFCandidate.h:389
void setVertexSource(PFVertexType vt)
Definition: PFCandidate.h:406
void set_mva_Isolated(float mvaI)
Definition: PFCandidate.h:307
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:471
CandidatePtr sourceCandidatePtr(size_type i) const override
Definition: PFCandidate.h:131
void addElementInBlock(const reco::PFBlockRef &blockref, unsigned elementIndex)
add an element to the current PFCandidate
Definition: PFCandidate.cc:216
size_t numberOfSourceCandidatePtrs() const override
Definition: PFCandidate.h:127
void setMuonTrackType(const reco::Muon::MuonTrackType &type)
set the Best Muon Track Ref
Definition: PFCandidate.h:356
void setPFElectronExtraRef(const reco::PFCandidateElectronExtraRef &ref)
set the PF Electron Extra Ref
Definition: PFCandidate.cc:584
void setParticleType(ParticleType type)
set Particle Type
Definition: PFCandidate.cc:261
reco::PhotonRef photonRef() const
return a reference to the corresponding Photon if any
Definition: PFCandidate.cc:593
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:300
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:518
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:243
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::GsfElectronRef gsfElectronRef() const
return a reference to the corresponding GsfElectron if any
Definition: PFCandidate.cc:579
double vx() const override
x coordinate of vertex position
Definition: PFCandidate.h:413
double f[11][100]
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:468
Definition: value.py:1
void rescaleMomentum(double rescaleFactor)
particle momentum *= rescaleFactor
Definition: PFCandidate.cc:283
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:455
PFCandidate * clone() const override
return a clone
Definition: PFCandidate.cc:211
void setEcalEnergy(float eeRaw, float eeCorr)
set corrected Ecal energy
Definition: PFCandidate.h:217
float mva_e_pi() const
mva for electron-pion discrimination
Definition: PFCandidate.h:313
double dzError() const
error on dz
Definition: TrackBase.h:814
Float e1
Definition: deltaR.h:20
double hoEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:241
double p() const final
magnitude of momentum vector
reco::PFCandidateElectronExtraRef electronExtraRef() const
return a reference to the electron extra
Definition: PFCandidate.cc:589
void setGsfTrackRef(const reco::GsfTrackRef &ref)
set gsftrack reference
Definition: PFCandidate.cc:459
PFCandidate()
default constructor
Definition: PFCandidate.cc:31
auto dp
Definition: deltaR.h:22
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void setPhotonRef(const reco::PhotonRef &phRef)
set ref to the corresponding reco::Photon if any
Definition: PFCandidate.cc:609
void setConversionRef(const reco::ConversionRef &ref)
set ref to original reco conversion
Definition: PFCandidate.cc:535
void set_mva_gamma_nh(float mva)
set mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:342
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:229
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
Float e2
Definition: deltaR.h:21
PFCandidate & operator=(PFCandidate const &)
Definition: PFCandidate.cc:166
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:436
PFVertexType vertexType_
Definition: PFCandidate.h:482
void setHoEnergy(float eoRaw, float eoCorr)
set corrected Hcal energy
Definition: PFCandidate.h:237
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:445
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
fixed size matrix
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:523
reco::VertexCompositeCandidateRef v0Ref() const
return a reference to the original conversion
Definition: PFCandidate.cc:569
void setMuonRef(const reco::MuonRef &ref)
set muon reference
Definition: PFCandidate.cc:441
double vy() const override
y coordinate of vertex position
Definition: PFCandidate.h:414
std::pair< reco::PFBlockRef, unsigned > ElementInBlock
return indices of elements used in the block
Definition: PFCandidate.h:385
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:506
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:497
reco::PFCandidateEGammaExtraRef egammaExtraRef() const
return a reference to the EGamma extra
Definition: PFCandidate.cc:601
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:476
void setPFEGammaExtraRef(const reco::PFCandidateEGammaExtraRef &ref)
set the PF EGamma Extra Ref
Definition: PFCandidate.cc:646
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:231
static unsigned int const shift
double pS2Energy() const
return corrected PS2 energy
Definition: PFCandidate.h:282
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:474
void setSuperClusterRef(const reco::SuperClusterRef &scRef)
Definition: PFCandidate.cc:625
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
MuonTrackType
map for Global Muon refitters
Definition: Muon.h:38
void setV0Ref(const reco::VertexCompositeCandidateRef &ref)
set ref to original reco conversion
Definition: PFCandidate.cc:564
float mva_gamma_nh() const
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:345
virtual ParticleType particleId() const
Definition: PFCandidate.h:373
void setTrackRef(const reco::TrackRef &ref)
set track reference
Definition: PFCandidate.cc:421
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:687
float timeError() const
Definition: PFCandidate.h:422
void setTime(float time, float timeError=0.f)
the timing information
Definition: PFCandidate.h:424
Elements elementsStorage_
Definition: PFCandidate.h:441
reco::ConversionRef conversionRef() const
return a reference to the original conversion
Definition: PFCandidate.cc:559
const reco::Track * bestTrack() const override
Definition: PFCandidate.h:161
void setHcalEnergy(float ehRaw, float ehCorr)
set corrected Hcal energy
Definition: PFCandidate.h:227
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:520
double deltaP() const
uncertainty on 3-momentum
Definition: PFCandidate.h:297
double vz() const override
z coordinate of vertex position
Definition: PFCandidate.h:415
double rawHcalEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:234
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:605
#define GET_CANDIDATE_COMPONENT(CAND, TYPE, FUN, TAG)
Definition: component.h:86
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:366