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
reco::CombinedMuonTag
conbined muon component tag
Definition: RecoCandidate.h:79
reco::LeafCandidate::Point
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
reco::LeafCandidate::status
int status() const final
status word
Definition: LeafCandidate.h:180
reco::RecoCandidate::combinedMuon
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
Definition: RecoCandidate.cc:23
reco::RecoCandidate::checkOverlap
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
Definition: RecoCandidate.h:67
reco::RecoCandidate::RecoCandidate
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
reco::RecoCandidate::superCluster
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: RecoCandidate.cc:25
reco::RecoCandidate::dzError
float dzError() const override
uncertainty on dz
Definition: RecoCandidate.cc:71
data-class-funcs.q
q
Definition: data-class-funcs.py:169
reco::Candidate::Charge
int Charge
electric charge type
Definition: Candidate.h:34
reco::RecoCandidate::standAloneMuon
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
Definition: RecoCandidate.cc:21
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::RecoCandidate::gsfTrack
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: RecoCandidate.cc:19
reco::RecoCandidate::noTrackType
Definition: RecoCandidate.h:56
reco::RecoCandidate::track
virtual reco::TrackRef track() const
reference to a Track
Definition: RecoCandidate.cc:13
edm::Ref< TrackCollection >
reco::RecoCandidate::TrackType
TrackType
track type
Definition: RecoCandidate.h:56
reco::RecoCandidate::bestTrack
const Track * bestTrack() const override
best track pointer
Definition: RecoCandidate.cc:29
reco::StandAloneMuonTag
stand alone muon component tag
Definition: RecoCandidate.h:77
TrackFwd.h
GET_DEFAULT_CANDIDATE_MULTIPLECOMPONENTS
#define GET_DEFAULT_CANDIDATE_MULTIPLECOMPONENTS(CAND, TYPE, FUN, SIZE)
Definition: component.h:109
reco::RecoCandidate::numberOfTracks
virtual size_t numberOfTracks() const
number of multiple Tracks
Definition: RecoCandidate.cc:17
reco::Track
Definition: Track.h:27
CaloTowerDefs.h
LeafCandidate.h
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
GET_DEFAULT_CANDIDATE_COMPONENT
#define GET_DEFAULT_CANDIDATE_COMPONENT(CAND, TYPE, FUN)
Definition: component.h:97
reco::RecoCandidate::bestTrackType
virtual TrackType bestTrackType() const
track type
Definition: RecoCandidate.cc:61
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
reco::RecoCandidate::overlap
bool overlap(const Candidate &) const override=0
check overlap with another candidate
reco::RecoCandidate::dxyError
float dxyError() const override
uncertainty on dxy
Definition: RecoCandidate.cc:78
reco::LeafCandidate::pdgId
int pdgId() const final
PDG identifier.
Definition: LeafCandidate.h:176
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
reco::RecoCandidate::caloTower
virtual CaloTowerRef caloTower() const
reference to a CaloTower
Definition: RecoCandidate.cc:27
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
reco::RecoCandidate::recoTrackType
Definition: RecoCandidate.h:56
reco::RecoCandidate::RecoCandidate
RecoCandidate()
default constructor
Definition: RecoCandidate.h:23
reco::RecoCandidate
Definition: RecoCandidate.h:20
reco::Candidate
Definition: Candidate.h:27
CaloTowerCollection.h
GsfTrackFwd.h
SuperClusterFwd.h
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
edm::RefToBase< reco::Track >
GET_CANDIDATE_COMPONENT
#define GET_CANDIDATE_COMPONENT(CAND, TYPE, FUN, TAG)
Definition: component.h:91
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
reco::LeafCandidate
Definition: LeafCandidate.h:16
reco::RecoCandidate::clone
RecoCandidate * clone() const override
returns a clone of the Candidate object
Definition: RecoCandidate.cc:9
susybsm::HSCParticleType::standAloneMuon
Definition: HSCParticle.h:20
reco::component
Definition: component.h:57
dttmaxenums::R
Definition: DTTMax.h:29
reco::RecoCandidate::gsfTrackType
Definition: RecoCandidate.h:56
reco::RecoCandidate::~RecoCandidate
~RecoCandidate() override
destructor
Definition: RecoCandidate.cc:7
reco::RecoCandidate::bestTrackRef
virtual TrackBaseRef bestTrackRef() const
best track RefToBase
Definition: RecoCandidate.cc:45