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 
10 
12 
13 
15  public:
18 
20 
21  RecoChargedRefCandidate * clone() const override { return new RecoChargedRefCandidate(*this);}
22 
24  return getRef<reco::TrackRef>();
25  }
26  // return a pointer to the best track, if available.
27  // otherwise, return a null pointer
28  const reco::Track * bestTrack() const override {
29  if ( track().isNonnull() && track().isAvailable() )
30  return &(*track());
31  else
32  return nullptr;
33  }
34 
36  float dzError() const override { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dzError(); else return 0; }
38  float dxyError() const override { const Track * tr=bestTrack(); if(tr!=nullptr) return tr->dxyError(); else return 0; }
39 
40  };
41 }
42 
43 #endif
float dzError() const override
uncertainty on dz
double dxyError() const
error on dxy
Definition: TrackBase.h:841
RecoChargedRefCandidate(TrackRef ref, float m)
LeafRefCandidateT RecoChargedRefCandidateBase
RecoChargedRefCandidate * clone() const override
returns a clone of the Candidate object
double dzError() const
error on dz
Definition: TrackBase.h:859
float dxyError() const override
uncertainty on dxy
fixed size matrix
const reco::Track * bestTrack() const override