CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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), int pdgId = 0, int status = 0)
27  : LeafCandidate(q, p4, vtx, pdgId, status) {}
29  ~RecoCandidate() override;
31  bool overlap(const Candidate &) const override = 0;
33  RecoCandidate *clone() const override;
34 
36  virtual reco::TrackRef track() const;
38  virtual reco::TrackRef track(size_t) const;
40  virtual size_t numberOfTracks() const;
42  virtual reco::GsfTrackRef gsfTrack() const;
44  virtual reco::TrackRef standAloneMuon() const;
46  virtual reco::TrackRef combinedMuon() const;
48  virtual reco::SuperClusterRef superCluster() const;
50  virtual CaloTowerRef caloTower() const;
52  const Track *bestTrack() const override;
54  virtual TrackBaseRef bestTrackRef() const;
58  virtual TrackType bestTrackType() const;
60  float dzError() const override;
62  float dxyError() const override;
63 
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>
73  friend struct component;
74  };
75 
77  struct StandAloneMuonTag {};
79  struct CombinedMuonTag {};
80 
99 
100 } // namespace reco
101 
102 #endif
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
Definition: RecoCandidate.h:67
float dxyError() const override
uncertainty on dxy
TrackType
track type
Definition: RecoCandidate.h:56
stand alone muon component tag
Definition: RecoCandidate.h:77
virtual TrackType bestTrackType() const
track type
int status() const final
status word
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
const LorentzVector & p4() const final
four-momentum Lorentz vector
float dzError() const override
uncertainty on dz
virtual reco::TrackRef track() const
reference to a Track
int pdgId() const final
PDG identifier.
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:109
const Track * bestTrack() const override
best track pointer
conbined muon component tag
Definition: RecoCandidate.h:79
#define GET_DEFAULT_CANDIDATE_COMPONENT(CAND, TYPE, FUN)
Definition: component.h:97
bool overlap(const Candidate &) const override=0
check overlap with another candidate
RecoCandidate * clone() const override
returns a clone of the Candidate object
Definition: RecoCandidate.cc:9
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
RecoCandidate()
default constructor
Definition: RecoCandidate.h:23
int Charge
electric charge type
Definition: LeafCandidate.h:21
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:91