CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ShallowClonePtrCandidate.h
Go to the documentation of this file.
1 #ifndef Candidate_ShallowClonePtrCandidate_h
2 #define Candidate_ShallowClonePtrCandidate_h
3 
13 
14 namespace reco {
16  public:
23  : LeafCandidate(*masterClone), masterClone_(masterClone) {}
26  Charge q,
27  const LorentzVector& p4,
28  const Point& vtx = Point(0, 0, 0))
29  : LeafCandidate(q, p4, vtx), masterClone_(masterClone) {}
32  Charge q,
33  const PolarLorentzVector& p4,
34  const Point& vtx = Point(0, 0, 0))
35  : LeafCandidate(q, p4, vtx), masterClone_(masterClone) {}
37  ~ShallowClonePtrCandidate() override;
39  ShallowClonePtrCandidate* clone() const override;
41  size_t numberOfDaughters() const override;
43  size_t numberOfMothers() const override;
45  const Candidate* daughter(size_type i) const override;
47  const Candidate* mother(size_type i) const override;
49  Candidate* daughter(size_type i) override;
50  using reco::LeafCandidate::daughter; // avoid hiding the base
52  bool hasMasterClonePtr() const override;
54  const CandidatePtr& masterClonePtr() const override;
55 
56  bool isElectron() const override;
57  bool isMuon() const override;
58  bool isGlobalMuon() const override;
59  bool isStandAloneMuon() const override;
60  bool isTrackerMuon() const override;
61  bool isCaloMuon() const override;
62  bool isPhoton() const override;
63  bool isConvertedPhoton() const override;
64  bool isJet() const override;
65 
66  private:
68  bool overlap(const Candidate& c) const override { return masterClone_->overlap(c); }
71  };
72 
73 } // namespace reco
74 
75 #endif
int Charge
electric charge type
Definition: Candidate.h:34
const edm::EventSetup & c
size_t size_type
Definition: Candidate.h:29
const Candidate * daughter(size_type i) const override
return daughter at a given position (throws an exception)
CandidatePtr masterClone_
CandidatePtrerence to master clone.
ShallowClonePtrCandidate(const CandidatePtr &masterClone, Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
const LorentzVector & p4() const final
four-momentum Lorentz vector
ShallowClonePtrCandidate * clone() const override
returns a clone of the Candidate object
const Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
const Candidate * mother(size_type i) const override
return mother at a given position (throws an exception)
ShallowClonePtrCandidate(const CandidatePtr &masterClone)
constructor from Particle
bool hasMasterClonePtr() const override
has master clone pointer
ShallowClonePtrCandidate()
default constructor
size_t numberOfMothers() const override
number of mothers
const CandidatePtr & masterClonePtr() const override
returns reference to master clone pointer
CandidateCollection daughters
collection of daughter candidates
bool overlap(const Candidate &c) const override
check overlap with another Candidate
~ShallowClonePtrCandidate() override
destructor
ShallowClonePtrCandidate(const CandidatePtr &masterClone, Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
size_t numberOfDaughters() const override
number of daughters
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
const CandidateBaseRef & masterClone() const override
Definition: LeafCandidate.cc:7
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38