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 
18 
19 namespace reco {
20 
21  class RecoCandidate : public LeafCandidate {
22  public:
26  RecoCandidate( Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ),
27  int pdgId = 0, int status = 0 ) :
28  LeafCandidate( q, p4, vtx, pdgId, status ) { }
30  RecoCandidate( Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ),
31  int pdgId = 0, int status = 0 ) :
32  LeafCandidate( q, p4, vtx, pdgId, status ) { }
34  virtual ~RecoCandidate();
36  virtual bool overlap( const Candidate & ) const = 0;
38  virtual RecoCandidate * clone() const ;
39 
41  virtual reco::TrackRef track() const;
43  virtual reco::TrackRef track( size_t ) const;
45  virtual size_t numberOfTracks() const;
47  virtual reco::GsfTrackRef gsfTrack() const;
49  virtual reco::TrackRef standAloneMuon() const;
51  virtual reco::TrackRef combinedMuon() const;
53  virtual reco::SuperClusterRef superCluster() const;
55  virtual CaloTowerRef caloTower() const;
57  virtual const Track * bestTrack() const;
59  virtual TrackBaseRef bestTrackRef() const;
63  virtual TrackType bestTrackType() const;
64  protected:
66  template<typename R>
67  bool checkOverlap( const R & r1, const R & r2 ) const {
68  return( ! r1.isNull() && ! r2.isNull() && r1 == r2 );
69  }
70 
71  private:
72  template<typename, typename, typename> friend struct component;
73  };
74 
76  struct StandAloneMuonTag { };
78  struct CombinedMuonTag { };
79 
98 
99 }
100 
101 #endif
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
int Charge
electric charge type
Definition: Candidate.h:36
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
Definition: RecoCandidate.h:67
virtual int pdgId() const
PDG identifier.
virtual int status() const
status word
TrackType
track type
Definition: RecoCandidate.h:61
stand alone muon component tag
Definition: RecoCandidate.h:76
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
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:78
virtual const Track * bestTrack() const
best track pointer
virtual ~RecoCandidate()
destructor
Definition: RecoCandidate.cc:8
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:38
virtual bool overlap(const Candidate &) const =0
check overlap with another candidate
virtual RecoCandidate * clone() const
returns a clone of the Candidate object
RecoCandidate(Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
constructor from values
Definition: RecoCandidate.h:26
RecoCandidate(Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
constructor from values
Definition: RecoCandidate.h:30
RecoCandidate()
default constructor
Definition: RecoCandidate.h:24
math::XYZPoint Point
point in the space
Definition: Candidate.h:42
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:29
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:40