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 #include <array>
14 
16 
33 namespace reco {
42  public:
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  enum PFVertexType {
85  };
86 
88  PFCandidate();
89 
91  PFCandidate(const PFCandidatePtr& sourcePtr);
92 
93  /* PFCandidate( Charge q, */
94  /* const LorentzVector & p4, */
95  /* ParticleType particleId, */
96  /* reco::PFBlockRef blockRef ); */
98 
100  PFCandidate(const PFCandidate&);
101 
103  ~PFCandidate() override;
104 
106 
108  PFCandidate* clone() const override;
109 
110  /* /// set source ref */
111  /* void setSourceRef(const PFCandidateRef& ref) { sourceRef_ = ref; } */
112 
113  /* size_type numberOfSourceCandidateRefs() const {return 1;} */
114 
115  /* CandidateBaseRef sourceCandidateRef( size_type i ) const { */
116  /* return CandidateBaseRef(sourceRef_); */
117  /* } */
118 
120  void setSourceCandidatePtr(const PFCandidatePtr& ptr) { sourcePtr_ = ptr; }
121 
122  size_t numberOfSourceCandidatePtrs() const override { return 1; }
123 
125 
131 
134 
136  /* void addElement( const reco::PFBlockElement* element ); */
137 
139  void addElementInBlock(const reco::PFBlockRef& blockref, unsigned elementIndex);
140 
142  void setTrackRef(const reco::TrackRef& ref);
143 
146  reco::TrackRef trackRef() const;
147 
150  const reco::Track* bestTrack() const override {
151  if ((abs(pdgId()) == 11 || pdgId() == 22) && gsfTrackRef().isNonnull() && gsfTrackRef().isAvailable())
152  return &(*gsfTrackRef());
153  else if (trackRef().isNonnull() && trackRef().isAvailable())
154  return &(*trackRef());
155  else
156  return nullptr;
157  }
159  float dzError() const override {
160  const Track* tr = bestTrack();
161  if (tr != nullptr)
162  return tr->dzError();
163  else
164  return 0;
165  }
167  float dxyError() const override {
168  const Track* tr = bestTrack();
169  if (tr != nullptr)
170  return tr->dxyError();
171  else
172  return 0;
173  }
174 
176  void setGsfTrackRef(const reco::GsfTrackRef& ref);
177 
181 
183  void setMuonRef(const reco::MuonRef& ref);
184 
187  reco::MuonRef muonRef() const;
188 
191 
195 
197  void setConversionRef(const reco::ConversionRef& ref);
198 
201 
204 
207 
210 
213 
215  void setEcalEnergy(float eeRaw, float eeCorr) {
216  rawEcalEnergy_ = eeRaw;
217  ecalERatio_ = std::abs(eeRaw) < 1.e-6 ? 1.0 : eeCorr / eeRaw;
218  }
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;
229  hcalERatio_ = std::abs(ehRaw) < 1.e-6 ? 1.0 : ehCorr / ehRaw;
230  }
231 
233  double hcalEnergy() const { return hcalERatio_ * rawHcalEnergy_; }
234 
236  double rawHcalEnergy() const { return rawHcalEnergy_; }
237 
239  void setHoEnergy(float eoRaw, float eoCorr) {
240  rawHoEnergy_ = eoRaw;
241  hoERatio_ = std::abs(eoRaw) < 1.e-6 ? 1.0 : eoCorr / eoRaw;
242  }
243 
245  double hoEnergy() const { return hoERatio_ * rawHoEnergy_; }
246 
248  double rawHoEnergy() const { return rawHoEnergy_; }
249 
251  void setGsfElectronRef(const reco::GsfElectronRef& ref);
252 
253  void setSuperClusterRef(const reco::SuperClusterRef& scRef);
254 
257 
259  void setPhotonRef(const reco::PhotonRef& phRef);
260 
262  reco::PhotonRef photonRef() const;
263 
266 
269 
272 
275 
277  void setPs1Energy(float e1) { ps1Energy_ = e1; }
278 
280  double pS1Energy() const { return ps1Energy_; }
281 
283  void setPs2Energy(float e2) { ps2Energy_ = e2; }
284 
286  double pS2Energy() const { return ps2Energy_; }
287 
289  void rescaleMomentum(double rescaleFactor);
290 
292  void setFlag(Flags theFlag, bool value);
293 
295  bool flag(Flags theFlag) const;
296 
298  void setDeltaP(double dp) { deltaP_ = dp; }
299 
301  double deltaP() const { return deltaP_; }
302 
303  // int pdgId() const { return translateTypeToPdgId( particleId_ ); }
304 
310 
311  void set_mva_Isolated(float mvaI) { mva_Isolated_ = mvaI; }
312  // mva for isolated electrons
313  float mva_Isolated() const { return mva_Isolated_; }
314 
315  void set_mva_e_pi(float mvaNI) { mva_e_pi_ = mvaNI; }
317  float mva_e_pi() const { return mva_e_pi_; }
318 
320  void set_mva_e_mu(float mva) { mva_e_mu_ = mva; }
321 
323  float mva_e_mu() const { return mva_e_mu_; }
324 
326  void set_mva_pi_mu(float mva) { mva_pi_mu_ = mva; }
327 
329  float mva_pi_mu() const { return mva_pi_mu_; }
330 
333 
335  float mva_nothing_gamma() const { return mva_nothing_gamma_; }
336 
339 
341  float mva_nothing_nh() const { return mva_nothing_nh_; }
342 
345 
346  // set DNN for electron PFID
347  // mva for ele PFID DNN sigIsolated class
348  float dnn_e_sigIsolated() const { return dnn_e_sigIsolated_; }
350 
351  // mva for ele PFID DNN sigNonIsolated class
352  float dnn_e_sigNonIsolated() const { return dnn_e_sigNonIsolated_; }
354 
355  // mva for ele PFID DNN bkgNonIsolated class
356  float dnn_e_bkgNonIsolated() const { return dnn_e_bkgNonIsolated_; }
358 
359  // mva for ele PFID DNN bkgTau class
360  float dnn_e_bkgTau() const { return dnn_e_bkgTau_; }
362 
363  // mva for ele PFID DNN bkgPhoton class
364  float dnn_e_bkgPhoton() const { return dnn_e_bkgPhoton_; }
366 
367  // set DNN for gamma PFID
368  float dnn_gamma() const { return dnn_gamma_; }
369  void set_dnn_gamma(float mva) { dnn_gamma_ = mva; }
370 
372  float mva_gamma_nh() const { return mva_gamma_nh_; }
373 
376 
379 
382 
384 
386 
389 
392  virtual ParticleType particleId() const { return translatePdgIdToType(pdgId()); }
393 
395  /* const std::vector<unsigned>& elementIndices() const { */
396  /* return elementIndices_; */
397  /* } */
399  /* const edm::OwnVector< reco::PFBlockElement >& elements() const */
400  /* {return elements_;} */
401 
403  typedef std::pair<reco::PFBlockRef, unsigned> ElementInBlock;
404  typedef std::vector<ElementInBlock> ElementsInBlocks;
405 
407  typedef std::vector<unsigned> Elements;
408 
409  const ElementsInBlocks& elementsInBlocks() const;
410 
411  static constexpr float bigMva_ = -999.;
412 
413  friend std::ostream& operator<<(std::ostream& out, const PFCandidate& c);
414 
415  const Point& vertex() const override;
416  double vx() const override { return vertex().x(); }
417  double vy() const override { return vertex().y(); }
418  double vz() const override { return vertex().z(); }
419 
421  bool isTimeValid() const { return timeError_ >= 0.f; }
423  float time() const { return time_; }
425  float timeError() const { return timeError_; }
427  void setTime(float time, float timeError = 0.f) {
428  time_ = time;
430  }
431 
433  float hcalDepthEnergyFraction(unsigned int depth) const { return hcalDepthEnergyFractions_[depth - 1]; }
435  const std::array<float, 7>& hcalDepthEnergyFractions() const { return hcalDepthEnergyFractions_; }
437  void setHcalDepthEnergyFractions(const std::array<float, 7>& fracs) { hcalDepthEnergyFractions_ = fracs; }
438 
439  private:
440  //function used before PR #31456, retained for backwards compatibility with old AOD where the vertex was not embedded
441  const math::XYZPoint& vertexLegacy(PFCandidate::PFVertexType vertexType) const;
442 
444  bool overlap(const Candidate&) const override;
445 
446  void setFlag(unsigned shift, unsigned flag, bool value);
447 
448  bool flag(unsigned shift, unsigned flag) const;
449 
450 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
451  mutable std::atomic<ElementsInBlocks*> elementsInBlocks_;
452 #else
454 #endif
457 
459  /* PFCandidateRef sourceRef_; */
461 
465 
467  float ecalERatio_;
468 
470  float hcalERatio_;
471 
473  float hoERatio_;
474 
477 
480 
483 
485  float ps1Energy_;
486 
488  float ps2Energy_;
489 
491  unsigned flags_;
492 
494  float deltaP_;
495 
496  //legacy vertex type to read AOD created before PR #31456
498 
499  // mva for isolated electrons
501 
503  float mva_e_pi_;
504 
506  float mva_e_mu_;
507 
509  float mva_pi_mu_;
510 
513 
516 
519 
522 
525 
528 
531 
534 
535  // DNN for gamma PFid
536  float dnn_gamma_;
537 
540 
541  //more efficiently stored refs
542  void storeRefInfo(unsigned int iMask,
543  unsigned int iBit,
544  bool iIsValid,
545  const edm::RefCore& iCore,
546  size_t iKey,
547  const edm::EDProductGetter*);
548  bool getRefInfo(
549  unsigned int iMask, unsigned int iBit, edm::ProductID& oProdID, size_t& oIndex, size_t& aIndex) const;
550 
551  const edm::EDProductGetter* getter_; //transient
552  unsigned short storedRefsBitPattern_;
553  std::vector<unsigned long long> refsInfo_;
554  std::vector<const void*> refsCollectionCache_;
555 
557  float time_;
559  float timeError_;
560 
561  std::array<float, 7> hcalDepthEnergyFractions_;
562  };
563 
565  struct PFParticleIdTag {};
566 
569  /* GET_DEFAULT_CANDIDATE_COMPONENT( PFCandidate, PFBlockRef, block ); */
570 
574 
575  std::ostream& operator<<(std::ostream& out, const PFCandidate& c);
576 
577 } // namespace reco
578 
579 #endif
float mva_e_mu() const
mva for electron-muon discrimination
Definition: PFCandidate.h:323
void set_dnn_e_sigIsolated(float mva)
Definition: PFCandidate.h:349
~PFCandidate() override
destructor
Definition: PFCandidate.cc:217
reco::PFDisplacedVertexRef displacedVertexRef(Flags type) const
Definition: PFCandidate.cc:503
float deltaP_
uncertainty on 3-momentum
Definition: PFCandidate.h:494
void setPs2Energy(float e2)
set corrected PS2 energy
Definition: PFCandidate.h:283
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:462
void setDeltaP(double dp)
set uncertainty on momentum
Definition: PFCandidate.h:298
friend std::ostream & operator<<(std::ostream &out, const PFCandidate &c)
void setPs1Energy(float e1)
set corrected PS1 energy
Definition: PFCandidate.h:277
ParticleType
particle types
Definition: PFCandidate.h:44
float dnn_gamma() const
Definition: PFCandidate.h:368
reco::Muon::MuonTrackType muonTrackType_
Definition: PFCandidate.h:464
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: PFCandidate.cc:280
const edm::EDProductGetter * getter_
Definition: PFCandidate.h:551
void setPFPhotonExtraRef(const reco::PFCandidatePhotonExtraRef &ref)
set the PF Photon Extra Ref
Definition: PFCandidate.cc:613
void setGsfElectronRef(const reco::GsfElectronRef &ref)
set GsfElectronRef
Definition: PFCandidate.cc:547
void setFlag(Flags theFlag, bool value)
set a given flag
Definition: PFCandidate.cc:299
void set_mva_e_mu(float mva)
set mva for electron-muon discrimination
Definition: PFCandidate.h:320
virtual void setSourceCandidatePtr(const CandidatePtr &ptr)
Set the ptr to the source Candidate.
Definition: Candidate.h:179
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFCandidate.h:559
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:335
reco::ConversionRef conversionRef() const
return a reference to the original conversion
Definition: PFCandidate.cc:533
void set_mva_nothing_gamma(float mva)
set mva for gamma detection
Definition: PFCandidate.h:332
size_t size_type
Definition: Candidate.h:29
void setPositionAtECALEntrance(const math::XYZPointF &pos)
set position at ECAL entrance
Definition: PFCandidate.h:375
float hcalERatio_
corrected HCAL energy ratio (corrected/raw)
Definition: PFCandidate.h:470
float time() const
Definition: PFCandidate.h:423
double rawHcalEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:236
const reco::Track * bestTrack() const override
Definition: PFCandidate.h:150
float rawHcalEnergy_
raw HCAL energy
Definition: PFCandidate.h:479
float mva_gamma_nh() const
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:372
unsigned flags_
all flags, packed (ecal regional, hcal regional, tracking)
Definition: PFCandidate.h:491
float dzError() const override
uncertainty on dz
Definition: PFCandidate.h:159
float mva_nothing_nh() const
mva for neutral hadron detection
Definition: PFCandidate.h:341
float hcalDepthEnergyFraction(unsigned int depth) const
fraction of hcal energy at a given depth (depth = 1 .. 7)
Definition: PFCandidate.h:433
float dnn_e_bkgTau_
DNN for electron PFid: tau bkg.
Definition: PFCandidate.h:530
float dnn_e_sigNonIsolated_
DNN for electron PFid: non-isolated signal.
Definition: PFCandidate.h:524
float mva_e_mu_
mva for electron-muon discrimination
Definition: PFCandidate.h:506
void set_dnn_gamma(float mva)
Definition: PFCandidate.h:369
double pS2Energy() const
return corrected PS2 energy
Definition: PFCandidate.h:286
float dxyError() const override
uncertainty on dxy
Definition: PFCandidate.h:167
double vy() const override
y coordinate of vertex position
Definition: PFCandidate.h:417
void set_dnn_e_bkgNonIsolated(float mva)
Definition: PFCandidate.h:357
float mva_nothing_nh_
mva for neutral hadron detection
Definition: PFCandidate.h:515
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
std::vector< const void * > refsCollectionCache_
Definition: PFCandidate.h:554
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:388
reco::GsfElectronRef gsfElectronRef() const
return a reference to the corresponding GsfElectron if any
Definition: PFCandidate.cc:552
float hoERatio_
corrected HO energy ratio (corrected/raw)
Definition: PFCandidate.h:473
edm::RefVector< reco::PFBlockCollection > Blocks
Definition: PFCandidate.h:406
void setSourceCandidatePtr(const PFCandidatePtr &ptr)
Definition: PFCandidate.h:120
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
float mva_gamma_nh_
mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:518
float ecalERatio_
corrected ECAL energy ratio (corrected/raw)
Definition: PFCandidate.h:467
double rawHoEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:248
float timeError() const
Definition: PFCandidate.h:425
float mva_pi_mu() const
mva for pi-muon discrimination
Definition: PFCandidate.h:329
float mva_pi_mu_
mva for pi-muon discrimination
Definition: PFCandidate.h:509
bool flag(Flags theFlag) const
return a given flag
Definition: PFCandidate.cc:306
particle ID component tag
Definition: PFCandidate.h:565
const LorentzVector & p4() const final
four-momentum Lorentz vector
float dnn_e_bkgPhoton_
DNN for electron PFid: photon bkg.
Definition: PFCandidate.h:533
float dnn_e_bkgTau() const
Definition: PFCandidate.h:360
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:404
float rawEcalEnergy_
raw ECAL energy
Definition: PFCandidate.h:476
float mva_e_pi_
mva for electron-pion discrimination
Definition: PFCandidate.h:503
int pdgId() const final
PDG identifier.
void set_mva_pi_mu(float mva)
set mva for pi-muon discrimination
Definition: PFCandidate.h:326
reco::PFCandidateEGammaExtraRef egammaExtraRef() const
return a reference to the EGamma extra
Definition: PFCandidate.cc:576
reco::PhotonRef photonRef() const
return a reference to the corresponding Photon if any
Definition: PFCandidate.cc:570
void set_mva_nothing_nh(float mva)
set mva for neutral hadron detection
Definition: PFCandidate.h:338
void set_mva_e_pi(float mvaNI)
Definition: PFCandidate.h:315
std::vector< unsigned long long > refsInfo_
Definition: PFCandidate.h:553
float dnn_e_sigNonIsolated() const
Definition: PFCandidate.h:352
void setDisplacedVertexRef(const reco::PFDisplacedVertexRef &ref, Flags flag)
set displaced vertex reference
Definition: PFCandidate.cc:465
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
reco::PFCandidatePhotonExtraRef photonExtraRef() const
return a reference to the photon extra
Definition: PFCandidate.cc:572
std::vector< unsigned > Elements
Definition: PFCandidate.h:407
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:658
void set_mva_Isolated(float mvaI)
Definition: PFCandidate.h:311
double dxyError() const
error on dxy
Definition: TrackBase.h:769
float ps1Energy_
corrected PS1 energy
Definition: PFCandidate.h:485
double dzError() const
error on dz
Definition: TrackBase.h:778
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233
void addElementInBlock(const reco::PFBlockRef &blockref, unsigned elementIndex)
add an element to the current PFCandidate
Definition: PFCandidate.cc:221
void setMuonTrackType(const reco::Muon::MuonTrackType &type)
set the Best Muon Track Ref
Definition: PFCandidate.h:381
void setPFElectronExtraRef(const reco::PFCandidateElectronExtraRef &ref)
set the PF Electron Extra Ref
Definition: PFCandidate.cc:557
void setParticleType(ParticleType type)
set Particle Type
Definition: PFCandidate.cc:278
bool isAvailable() const
Definition: Ref.h:537
unsigned short storedRefsBitPattern_
Definition: PFCandidate.h:552
PFCandidate * clone() const override
return a clone
Definition: PFCandidate.cc:219
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZTLorentzVector LorentzVector
double f[11][100]
float dnn_e_sigIsolated() const
Definition: PFCandidate.h:348
float rawHoEnergy_
raw HO energy
Definition: PFCandidate.h:482
Definition: value.py:1
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:443
void rescaleMomentum(double rescaleFactor)
particle momentum *= rescaleFactor
Definition: PFCandidate.cc:293
float dnn_e_bkgPhoton() const
Definition: PFCandidate.h:364
void set_dnn_e_sigNonIsolated(float mva)
Definition: PFCandidate.h:353
int translateTypeToPdgId(ParticleType type) const
Definition: PFCandidate.cc:254
void setEcalEnergy(float eeRaw, float eeCorr)
set corrected Ecal energy
Definition: PFCandidate.h:215
void set_dnn_e_bkgPhoton(float mva)
Definition: PFCandidate.h:365
void setHcalDepthEnergyFractions(const std::array< float, 7 > &fracs)
set the fraction of hcal energy as function of depth (index 0..6 for depth 1..7)
Definition: PFCandidate.h:437
double hoEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:245
const reco::Muon::MuonTrackType bestMuonTrackType() const
get the Best Muon Track Ref
Definition: PFCandidate.h:385
float dnn_e_sigIsolated_
DNN for electron PFid: isolated signal.
Definition: PFCandidate.h:521
void setGsfTrackRef(const reco::GsfTrackRef &ref)
set gsftrack reference
Definition: PFCandidate.cc:446
reco::VertexCompositeCandidateRef v0Ref() const
return a reference to the original conversion
Definition: PFCandidate.cc:542
PFCandidate()
default constructor
Definition: PFCandidate.cc:23
float mva_Isolated() const
Definition: PFCandidate.h:313
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:584
void setConversionRef(const reco::ConversionRef &ref)
set ref to original reco conversion
Definition: PFCandidate.cc:513
void set_mva_gamma_nh(float mva)
set mva for neutral hadron - gamma discrimination
Definition: PFCandidate.h:344
void set_dnn_e_bkgTau(float mva)
Definition: PFCandidate.h:361
float dnn_e_bkgNonIsolated() const
Definition: PFCandidate.h:356
bool getRefInfo(unsigned int iMask, unsigned int iBit, edm::ProductID &oProdID, size_t &oIndex, size_t &aIndex) const
Definition: PFCandidate.cc:401
PFCandidate & operator=(PFCandidate const &)
Definition: PFCandidate.cc:170
std::atomic< ElementsInBlocks * > elementsInBlocks_
Definition: PFCandidate.h:451
PFVertexType vertexType_
Definition: PFCandidate.h:497
bool isTimeValid() const
do we have a valid time information
Definition: PFCandidate.h:421
void setHoEnergy(float eoRaw, float eoCorr)
set corrected Hcal energy
Definition: PFCandidate.h:239
PFCandidatePtr sourcePtr_
reference to the source PFCandidate, if any
Definition: PFCandidate.h:460
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:60
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
fixed size matrix
float time_
timing information (valid if timeError_ >= 0)
Definition: PFCandidate.h:557
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:231
void setMuonRef(const reco::MuonRef &ref)
set muon reference
Definition: PFCandidate.cc:432
std::pair< reco::PFBlockRef, unsigned > ElementInBlock
return indices of elements used in the block
Definition: PFCandidate.h:403
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance, from the PFRecTrack
Definition: PFCandidate.h:539
float mva_nothing_gamma_
mva for gamma detection
Definition: PFCandidate.h:512
static constexpr float bigMva_
Definition: PFCandidate.h:411
void setPFEGammaExtraRef(const reco::PFCandidateEGammaExtraRef &ref)
set the PF EGamma Extra Ref
Definition: PFCandidate.cc:618
double pS1Energy() const
return corrected PS1 energy
Definition: PFCandidate.h:280
static unsigned int const shift
float ps2Energy_
corrected PS2 energy
Definition: PFCandidate.h:488
reco::PFCandidateElectronExtraRef electronExtraRef() const
return a reference to the electron extra
Definition: PFCandidate.cc:566
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:430
void setSuperClusterRef(const reco::SuperClusterRef &scRef)
Definition: PFCandidate.cc:598
const math::XYZPoint & vertexLegacy(PFCandidate::PFVertexType vertexType) const
Definition: PFCandidate.cc:623
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:224
MuonTrackType
map for Global Muon refitters
Definition: Muon.h:36
void setV0Ref(const reco::VertexCompositeCandidateRef &ref)
set ref to original reco conversion
Definition: PFCandidate.cc:538
double vz() const override
z coordinate of vertex position
Definition: PFCandidate.h:418
void setTrackRef(const reco::TrackRef &ref)
set track reference
Definition: PFCandidate.cc:415
double vx() const override
x coordinate of vertex position
Definition: PFCandidate.h:416
float dnn_e_bkgNonIsolated_
DNN for electron PFid: non-isolated bkg.
Definition: PFCandidate.h:527
double deltaP() const
uncertainty on 3-momentum
Definition: PFCandidate.h:301
void setTime(float time, float timeError=0.f)
the timing information
Definition: PFCandidate.h:427
Elements elementsStorage_
Definition: PFCandidate.h:456
CandidatePtr sourceCandidatePtr(size_type i) const override
Definition: PFCandidate.h:124
void setHcalEnergy(float ehRaw, float ehCorr)
set corrected Hcal energy
Definition: PFCandidate.h:227
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:580
int Charge
electric charge type
Definition: LeafCandidate.h:21
size_t numberOfSourceCandidatePtrs() const override
Definition: PFCandidate.h:122
float mva_e_pi() const
mva for electron-pion discrimination
Definition: PFCandidate.h:317
const std::array< float, 7 > & hcalDepthEnergyFractions() const
fraction of hcal energy at a given depth (index 0..6 for depth 1..7)
Definition: PFCandidate.h:435
std::array< float, 7 > hcalDepthEnergyFractions_
Definition: PFCandidate.h:561
#define GET_CANDIDATE_COMPONENT(CAND, TYPE, FUN, TAG)
Definition: component.h:91
void storeRefInfo(unsigned int iMask, unsigned int iBit, bool iIsValid, const edm::RefCore &iCore, size_t iKey, const edm::EDProductGetter *)
Definition: PFCandidate.cc:365
virtual ParticleType particleId() const
Definition: PFCandidate.h:392