CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ShallowCloneCandidate.h
Go to the documentation of this file.
1 #ifndef Candidate_ShallowCloneCandidate_h
2 #define Candidate_ShallowCloneCandidate_h
3 
13 
14 namespace reco {
16  public:
23  : LeafCandidate(*masterClone),
24  masterClone_(masterClone->hasMasterClone() ? masterClone->masterClone() : masterClone) {}
27  Charge q,
28  const LorentzVector& p4,
29  const Point& vtx = Point(0, 0, 0))
30  : LeafCandidate(q, p4, vtx), masterClone_(masterClone) {}
33  Charge q,
34  const PolarLorentzVector& p4,
35  const Point& vtx = Point(0, 0, 0))
36  : LeafCandidate(q, p4, vtx), masterClone_(masterClone) {}
38  ~ShallowCloneCandidate() override;
40  ShallowCloneCandidate* clone() const override;
42  size_t numberOfDaughters() const override;
44  size_t numberOfMothers() const override;
46  const Candidate* daughter(size_type i) const override;
48  const Candidate* mother(size_type i) const override;
50  Candidate* daughter(size_type i) override;
51  using reco::LeafCandidate::daughter; // avoid hiding the base
53  bool hasMasterClone() const override;
55  const CandidateBaseRef& masterClone() const override;
56 
57  bool isElectron() const override;
58  bool isMuon() const override;
59  bool isGlobalMuon() const override;
60  bool isStandAloneMuon() const override;
61  bool isTrackerMuon() const override;
62  bool isCaloMuon() const override;
63  bool isPhoton() const override;
64  bool isConvertedPhoton() const override;
65  bool isJet() const override;
66 
67  private:
69  bool overlap(const Candidate& c) const override { return masterClone_->overlap(c); }
72  };
73 
74 } // namespace reco
75 
76 #endif
CandidateBaseRef masterClone_
CandidateBaseReference to master clone.
size_t numberOfMothers() const override
number of daughters
int Charge
electric charge type
Definition: Candidate.h:34
CandidateCollection daughters
collection of daughter candidates
const edm::EventSetup & c
size_t size_type
Definition: Candidate.h:29
ShallowCloneCandidate(const CandidateBaseRef &masterClone, Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
size_t numberOfDaughters() const override
number of daughters
bool isGlobalMuon() const override
ShallowCloneCandidate(const CandidateBaseRef &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
bool isElectron() const override
const Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
bool hasMasterClone() const override
has master clone
bool isTrackerMuon() const override
ShallowCloneCandidate(const CandidateBaseRef &masterClone)
constructor from Particle
const CandidateBaseRef & masterClone() const override
returns reference to master clone
bool overlap(const Candidate &c) const override
check overlap with another Candidate
ShallowCloneCandidate * clone() const override
returns a clone of the Candidate object
~ShallowCloneCandidate() override
destructor
ShallowCloneCandidate()
default constructor
const Candidate * daughter(size_type i) const override
return daughter at a given position (throws an exception)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
bool isStandAloneMuon() const override
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
bool isConvertedPhoton() const override
bool isCaloMuon() const override
virtual bool overlap(const Candidate &) const =0
check overlap with another Candidate
const Candidate * mother(size_type i) const override
return daughter at a given position (throws an exception)
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38