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
reco::RecoChargedRefCandidate
Definition: RecoChargedRefCandidate.h:12
reco::LeafRefCandidateT
Definition: LeafRefCandidateT.h:17
reco::RecoChargedRefCandidate::RecoChargedRefCandidate
RecoChargedRefCandidate(TrackRef ref, float m)
Definition: RecoChargedRefCandidate.h:15
reco::RecoChargedRefCandidate::RecoChargedRefCandidate
RecoChargedRefCandidate()
Definition: RecoChargedRefCandidate.h:14
reco::RecoChargedRefCandidateBase
LeafRefCandidateT RecoChargedRefCandidateBase
Definition: RecoChargedRefCandidate.h:10
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
reco::TrackBase::dxyError
double dxyError() const
error on dxy
Definition: TrackBase.h:769
edm::Ref< TrackCollection >
Track.h
TrackFwd.h
reco::RecoChargedRefCandidate::dxyError
float dxyError() const override
uncertainty on dxy
Definition: RecoChargedRefCandidate.h:40
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
reco::Track
Definition: Track.h:27
reco::TrackBase::dzError
double dzError() const
error on dz
Definition: TrackBase.h:778
reco::RecoChargedRefCandidate::dzError
float dzError() const override
uncertainty on dz
Definition: RecoChargedRefCandidate.h:32
LeafRefCandidateT.h
reco::RecoChargedRefCandidate::bestTrack
const reco::Track * bestTrack() const override
Definition: RecoChargedRefCandidate.h:24
reco::RecoChargedRefCandidate::clone
RecoChargedRefCandidate * clone() const override
returns a clone of the Candidate object
Definition: RecoChargedRefCandidate.h:19
reco::RecoChargedRefCandidate::track
reco::TrackRef track() const
Definition: RecoChargedRefCandidate.h:21
reco::RecoChargedRefCandidate::~RecoChargedRefCandidate
~RecoChargedRefCandidate() override
Definition: RecoChargedRefCandidate.h:17