CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoCandidate.cc
Go to the documentation of this file.
1 // $Id: RecoCandidate.cc,v 1.15 2010/10/21 07:54:49 gpetrucc Exp $
5 
6 using namespace reco;
7 
9 
11  throw cms::Exception("LogicError", "reco::RecoCandidate is abstract, so it's clone() method can't be implemented.\n");
12 }
13 
15  return TrackRef();
16 }
17 
18 TrackRef RecoCandidate::track( size_t ) const {
19  return TrackRef();
20 }
21 
23  return 0;
24 }
25 
27  return GsfTrackRef();
28 }
29 
31  return TrackRef();
32 }
33 
35  return TrackRef();
36 }
37 
39  return SuperClusterRef();
40 }
41 
43  return CaloTowerRef();
44 }
45 
47  TrackRef muRef = combinedMuon();
48  if( muRef.isNonnull() )
49  return muRef.get();
50  TrackRef trkRef = track();
51  if ( trkRef.isNonnull() )
52  return trkRef.get();
53  GsfTrackRef gsfTrkRef = gsfTrack();
54  if ( gsfTrkRef.isNonnull() )
55  return gsfTrkRef.get();
56  TrackRef staRef = standAloneMuon();
57  if ( staRef.isNonnull() )
58  return staRef.get();
59  return 0;
60 }
61 
63  TrackRef muRef = combinedMuon();
64  if( muRef.isNonnull() ) return TrackBaseRef(muRef);
65  TrackRef trkRef = track();
66  if ( trkRef.isNonnull() ) return TrackBaseRef(trkRef);
67  GsfTrackRef gsfTrkRef = gsfTrack();
68  if ( gsfTrkRef.isNonnull() ) return TrackBaseRef(gsfTrkRef);
69  TrackRef staRef = standAloneMuon();
70  if ( staRef.isNonnull() ) return TrackBaseRef(staRef);
71  return TrackBaseRef();
72 }
73 
74 
76  if( combinedMuon().isNonnull() )
77  return recoTrackType;
78  if ( track().isNonnull() )
79  return recoTrackType;
80  if ( gsfTrack().isNonnull() )
81  return gsfTrackType;
82  return noTrackType;
83 }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
TrackType
track type
Definition: RecoCandidate.h:61
virtual TrackType bestTrackType() const
track type
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
virtual reco::TrackRef track() const
reference to a Track
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
Definition: TrackFwd.h:22
virtual CaloTowerRef caloTower() const
reference to a CaloTower
virtual TrackBaseRef bestTrackRef() const
best track RefToBase
virtual size_t numberOfTracks() const
number of multiple Tracks
virtual const Track * bestTrack() const
best track pointer
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14
virtual ~RecoCandidate()
destructor
Definition: RecoCandidate.cc:8
virtual RecoCandidate * clone() const
returns a clone of the Candidate object
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
edm::Ref< CaloTowerCollection > CaloTowerRef
Definition: CaloTowerFwd.h:16
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track