CMS 3D CMS Logo

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  ~RecoCandidate() override;
32  bool overlap( const Candidate & ) const override = 0;
34  RecoCandidate * clone() const override ;
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  const Track * bestTrack() const override;
55  virtual TrackBaseRef bestTrackRef() const;
59  virtual TrackType bestTrackType() const;
61  float dzError() const override;
63  float dxyError() const override;
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 reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
int pdgId() const final
PDG identifier.
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
~RecoCandidate() override
destructor
Definition: RecoCandidate.cc:7
TrackType
track type
Definition: RecoCandidate.h:57
stand alone muon component tag
Definition: RecoCandidate.h:78
virtual TrackType bestTrackType() const
track type
float dxyError() const override
uncertainty on dxy
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
virtual reco::TrackRef track() const
reference to a Track
bool overlap(const Candidate &) const override=0
check overlap with another candidate
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
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
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
float dzError() const override
uncertainty on dz
#define GET_DEFAULT_CANDIDATE_COMPONENT(CAND, TYPE, FUN)
Definition: component.h:92
RecoCandidate * clone() const override
returns a clone of the Candidate object
Definition: RecoCandidate.cc:9
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
const Track * bestTrack() const override
best track pointer
int status() const final
status word
RecoCandidate()
default constructor
Definition: RecoCandidate.h:23
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