DataFormats
RecoCandidate
interface
RecoChargedRefCandidate.h
Go to the documentation of this file.
1
#ifndef RecoCandidate_RecoChargedRefCandidate_h
2
#define RecoCandidate_RecoChargedRefCandidate_h
3
4
#include "
DataFormats/Candidate/interface/LeafRefCandidateT.h
"
5
#include "
DataFormats/TrackReco/interface/TrackFwd.h
"
6
#include "
DataFormats/TrackReco/interface/Track.h
"
7
8
namespace
reco
{
9
10
typedef
LeafRefCandidateT
RecoChargedRefCandidateBase
;
11
12
class
RecoChargedRefCandidate
:
public
LeafRefCandidateT
{
13
public
:
14
RecoChargedRefCandidate
() {}
15
RecoChargedRefCandidate
(
TrackRef
ref,
float
m
) :
LeafRefCandidateT
(ref,
m
) {}
16
17
~RecoChargedRefCandidate
()
override
{}
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
Generated for CMSSW Reference Manual by
1.8.16