test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoCandidate.h
Go to the documentation of this file.
1 #ifndef RecoCandidate_RecoCandidate_h
2 #define RecoCandidate_RecoCandidate_h
3 
17 
18 namespace reco {
19 
20  class RecoCandidate : public LeafCandidate {
21  public:
25  template<typename P4>
26  RecoCandidate( Charge q, const P4 & p4, const Point & vtx = Point( 0, 0, 0 ),
27  int pdgId = 0, int status = 0 ) :
28  LeafCandidate( q, p4, vtx, pdgId, status ) { }
30  virtual ~RecoCandidate();
32  virtual bool overlap( const Candidate & ) const = 0;
34  virtual RecoCandidate * clone() const ;
35 
37  virtual reco::TrackRef track() const;
39  virtual reco::TrackRef track( size_t ) const;
41  virtual size_t numberOfTracks() const;
43  virtual reco::GsfTrackRef gsfTrack() const;
45  virtual reco::TrackRef standAloneMuon() const;
47  virtual reco::TrackRef combinedMuon() const;
49  virtual reco::SuperClusterRef superCluster() const;
51  virtual CaloTowerRef caloTower() const;
53  virtual const Track * bestTrack() const;
55  virtual TrackBaseRef bestTrackRef() const;
59  virtual TrackType bestTrackType() const;
61  virtual float dzError() const;
63  virtual float dxyError() const;
64 
65 
66  protected:
68  template<typename R>
69  bool checkOverlap( const R & r1, const R & r2 ) const {
70  return( ! r1.isNull() && ! r2.isNull() && r1 == r2 );
71  }
72 
73  private:
74  template<typename, typename, typename> friend struct component;
75  };
76 
78  struct StandAloneMuonTag { };
80  struct CombinedMuonTag { };
81 
100 
101 }
102 
103 #endif
virtual float dxyError() const
uncertainty on dxy
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
int Charge
electric charge type
Definition: Candidate.h:35
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
Definition: RecoCandidate.h:69
virtual int pdgId() const
PDG identifier.
virtual int status() const
status word
TrackType
track type
Definition: RecoCandidate.h:57
stand alone muon component tag
Definition: RecoCandidate.h:78
virtual TrackType bestTrackType() const
track type
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
virtual reco::TrackRef track() const
reference to a Track
RecoCandidate(Charge q, const P4 &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
constructor from values
Definition: RecoCandidate.h:26
virtual CaloTowerRef caloTower() const
reference to a CaloTower
virtual TrackBaseRef bestTrackRef() const
best track RefToBase
virtual size_t numberOfTracks() const
number of multiple Tracks
#define GET_DEFAULT_CANDIDATE_MULTIPLECOMPONENTS(CAND, TYPE, FUN, SIZE)
Definition: component.h:104
conbined muon component tag
Definition: RecoCandidate.h:80
virtual const Track * bestTrack() const
best track pointer
#define GET_DEFAULT_CANDIDATE_COMPONENT(CAND, TYPE, FUN)
Definition: component.h:92
virtual ~RecoCandidate()
destructor
Definition: RecoCandidate.cc:7
virtual bool overlap(const Candidate &) const =0
check overlap with another candidate
virtual RecoCandidate * clone() const
returns a clone of the Candidate object
Definition: RecoCandidate.cc:9
RecoCandidate()
default constructor
Definition: RecoCandidate.h:23
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
virtual float dzError() const
uncertainty on dz
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
#define GET_CANDIDATE_COMPONENT(CAND, TYPE, FUN, TAG)
Definition: component.h:86