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), 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
int Charge
electric charge type
Definition: Candidate.h:34
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
~RecoCandidate() override
destructor
Definition: RecoCandidate.cc:7
float dxyError() const override
uncertainty on dxy
TrackType
track type
Definition: RecoCandidate.h:56
stand alone muon component tag
Definition: RecoCandidate.h:77
int status() const final
status word
const LorentzVector & p4() const final
four-momentum Lorentz vector
float dzError() const override
uncertainty on dz
int pdgId() const final
PDG identifier.
virtual CaloTowerRef caloTower() const
reference to a CaloTower
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 TrackBaseRef bestTrackRef() const
best track RefToBase
virtual TrackType bestTrackType() const
track type
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
Definition: RecoCandidate.h:67
#define GET_DEFAULT_CANDIDATE_MULTIPLECOMPONENTS(CAND, TYPE, FUN, SIZE)
Definition: component.h:109
const Track * bestTrack() const override
best track pointer
virtual size_t numberOfTracks() const
number of multiple Tracks
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
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
virtual reco::TrackRef track() const
reference to a Track
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
RecoCandidate()
default constructor
Definition: RecoCandidate.h:23
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
#define GET_CANDIDATE_COMPONENT(CAND, TYPE, FUN, TAG)
Definition: component.h:91