CMS 3D CMS Logo

RecoChargedRefCandidate.h
Go to the documentation of this file.
1 #ifndef RecoCandidate_RecoChargedRefCandidate_h
2 #define RecoCandidate_RecoChargedRefCandidate_h
3 
7 
8 namespace reco {
9 
11 
13  public:
16 
18 
19  RecoChargedRefCandidate* clone() const override { return new RecoChargedRefCandidate(*this); }
20 
21  reco::TrackRef track() const { return getRef<reco::TrackRef>(); }
22  // return a pointer to the best track, if available.
23  // otherwise, return a null pointer
24  const reco::Track* bestTrack() const override {
25  if (track().isNonnull() && track().isAvailable())
26  return &(*track());
27  else
28  return nullptr;
29  }
30 
32  float dzError() const override {
33  const Track* tr = bestTrack();
34  if (tr != nullptr)
35  return tr->dzError();
36  else
37  return 0;
38  }
40  float dxyError() const override {
41  const Track* tr = bestTrack();
42  if (tr != nullptr)
43  return tr->dxyError();
44  else
45  return 0;
46  }
47  };
48 } // namespace reco
49 
50 #endif
const reco::Track * bestTrack() const override
RecoChargedRefCandidate(TrackRef ref, float m)
LeafRefCandidateT RecoChargedRefCandidateBase
double dxyError() const
error on dxy
Definition: TrackBase.h:769
float dxyError() const override
uncertainty on dxy
double dzError() const
error on dz
Definition: TrackBase.h:778
RecoChargedRefCandidate * clone() const override
returns a clone of the Candidate object
fixed size matrix
float dzError() const override
uncertainty on dz