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
reco::CompositeRefBaseCandidate::~CompositeRefBaseCandidate
~CompositeRefBaseCandidate() override
destructor
Definition: CompositeRefBaseCandidate.cc:6
reco::CompositeRefBaseCandidate::overlap
bool overlap(const Candidate &) const override
check overlap with another candidate
Definition: CompositeRefBaseCandidate.cc:22
mps_fire.i
i
Definition: mps_fire.py:355
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate
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
Definition: CompositeRefBaseCandidate.h:24
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate
CompositeRefBaseCandidate()
default constructor
Definition: CompositeRefBaseCandidate.h:22
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::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
data-class-funcs.q
q
Definition: data-class-funcs.py:169
reco::Candidate::Charge
int Charge
electric charge type
Definition: Candidate.h:34
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate
CompositeRefBaseCandidate(const Candidate &c)
constructor from a particle
Definition: CompositeRefBaseCandidate.h:40
reco::CompositeRefBaseCandidate
Definition: CompositeRefBaseCandidate.h:17
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::CompositeRefBaseCandidate::clearDaughters
void clearDaughters()
clear daughter references
Definition: CompositeRefBaseCandidate.h:59
reco::CompositeRefBaseCandidate::daughterRef
CandidateBaseRef daughterRef(size_type i) const
reference to daughter at given position
Definition: CompositeRefBaseCandidate.h:61
reco::CompositeRefBaseCandidate::addDaughter
void addDaughter(const CandidateBaseRef &)
add a daughter via a reference
Definition: CompositeRefBaseCandidate.h:70
reco::CompositeRefBaseCandidate::numberOfDaughters
size_t numberOfDaughters() const override
number of daughters
Definition: CompositeRefBaseCandidate.cc:18
reco::CompositeRefBaseCandidate::clone
CompositeRefBaseCandidate * clone() const override
returns a clone of the candidate
Definition: CompositeRefBaseCandidate.cc:8
LeafCandidate.h
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
reco::LeafCandidate::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
Definition: LeafCandidate.cc:29
reco::LeafCandidate::pdgId
int pdgId() const final
PDG identifier.
Definition: LeafCandidate.h:176
cand
Definition: decayParser.h:34
reco::CompositeRefBaseCandidate::dau
daughters dau
collection of references to daughters
Definition: CompositeRefBaseCandidate.h:65
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
reco::Candidate
Definition: Candidate.h:27
reco::CompositeRefBaseCandidate::numberOfMothers
size_t numberOfMothers() const override
number of mothers
Definition: CompositeRefBaseCandidate.cc:20
reco::CompositeRefBaseCandidate::daughters
std::vector< CandidateBaseRef > daughters
collection of references to daughters
Definition: CompositeRefBaseCandidate.h:20
edm::RefToBase< Candidate >
reco::LeafCandidate
Definition: LeafCandidate.h:16
reco::CompositeRefBaseCandidate::CompositeRefBaseCandidate
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
Definition: CompositeRefBaseCandidate.h:32
reco::CompositeRefBaseCandidate::mother
const Candidate * mother(size_type) const override
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode)
Definition: CompositeRefBaseCandidate.cc:14
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
reco::CompositeRefBaseCandidate::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
Definition: CompositeRefBaseCandidate.cc:10
reco::Candidate::size_type
size_t size_type
Definition: Candidate.h:29