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;
60  protected:
62  template<typename R>
63  bool checkOverlap( const R & r1, const R & r2 ) const {
64  return( ! r1.isNull() && ! r2.isNull() && r1 == r2 );
65  }
66 
67  private:
68  template<typename, typename, typename> friend struct component;
69  };
70 
72  struct StandAloneMuonTag { };
74  struct CombinedMuonTag { };
75 
94 
95 }
96 
97 #endif
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
int Charge
electric charge type
Definition: Candidate.h:39
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
Definition: RecoCandidate.h:63
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
virtual int pdgId() const GCC11_FINAL
PDG identifier.
TrackType
track type
Definition: RecoCandidate.h:57
stand alone muon component tag
Definition: RecoCandidate.h:72
virtual TrackType bestTrackType() const
track type
GET_DEFAULT_CANDIDATE_MULTIPLECOMPONENTS(RecoCandidate, TrackRef, track, numberOfTracks)
get multuple tracks
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 int status() const GCC11_FINAL
status word
GET_DEFAULT_CANDIDATE_COMPONENT(CaloRecHitCandidate, edm::RefToBase< CaloRecHit >, caloRecHit)
get default Track component
virtual CaloTowerRef caloTower() const
reference to a CaloTower
virtual TrackBaseRef bestTrackRef() const
best track RefToBase
GET_CANDIDATE_COMPONENT(PFCandidate, PFCandidate::ParticleType, particleId, PFParticleIdTag)
virtual size_t numberOfTracks() const
number of multiple Tracks
conbined muon component tag
Definition: RecoCandidate.h:74
virtual const Track * bestTrack() const
best track pointer
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:45
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:30
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track