CMS 3D CMS Logo

CompositeRefBaseCandidate.h
Go to the documentation of this file.
1 #ifndef Candidate_CompositeRefBaseCandidate_h
2 #define Candidate_CompositeRefBaseCandidate_h
15 namespace reco {
16 
18  public:
20  typedef std::vector<CandidateBaseRef> daughters;
25  const LorentzVector& p4,
26  const Point& vtx = Point(0, 0, 0),
27  int pdgId = 0,
28  int status = 0,
29  bool integerCharge = true)
30  : LeafCandidate(q, p4, vtx, pdgId, status, integerCharge) {}
33  const PolarLorentzVector& p4,
34  const Point& vtx = Point(0, 0, 0),
35  int pdgId = 0,
36  int status = 0,
37  bool integerCharge = true)
38  : LeafCandidate(q, p4, vtx, pdgId, status, integerCharge) {}
42  ~CompositeRefBaseCandidate() override;
44  CompositeRefBaseCandidate* clone() const override;
46  size_t numberOfDaughters() const override;
48  size_t numberOfMothers() const override;
50  const Candidate* daughter(size_type) const override;
52  const Candidate* mother(size_type) const override;
54  Candidate* daughter(size_type) override;
55  using reco::LeafCandidate::daughter; // avoid hiding the base
57  void addDaughter(const CandidateBaseRef&);
59  void clearDaughters() { dau.clear(); }
62 
63  private:
67  bool overlap(const Candidate&) const override;
68  };
69 
71 } // namespace reco
72 
73 #endif
int Charge
electric charge type
Definition: Candidate.h:34
CompositeRefBaseCandidate * clone() const override
returns a clone of the candidate
size_t size_type
Definition: Candidate.h:29
std::vector< CandidateBaseRef > daughters
collection of references to daughters
int status() const final
status word
CompositeRefBaseCandidate(const Candidate &c)
constructor from a particle
daughters dau
collection of references to daughters
const LorentzVector & p4() const final
four-momentum Lorentz vector
int pdgId() const final
PDG identifier.
const Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
size_t numberOfMothers() const override
number of mothers
bool overlap(const Candidate &) const override
check overlap with another candidate
~CompositeRefBaseCandidate() override
destructor
CompositeRefBaseCandidate(Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
CompositeRefBaseCandidate()
default constructor
CompositeRefBaseCandidate(Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
size_t numberOfDaughters() const override
number of daughters
void clearDaughters()
clear daughter references
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
const Candidate * mother(size_type) const override
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...
CandidateBaseRef daughterRef(size_type i) const
reference to daughter at given position
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
void addDaughter(const CandidateBaseRef &)
add a daughter via a reference
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38