6 #include <initializer_list>
27 GenParticle(TLorentzVector const &p4,
int pdgId = 0) noexcept;
90 collection_t daughters;
void SetPdgId(int pdgId_)
Sets the PDG ID code.
Definition: GenParticle.cpp:100
collection_t const & GetDaughters() const
Returns the collection of daughter particles.
Definition: GenParticle.cpp:64
GenParticle const * FindFirstDaughterRecursive(std::initializer_list< int > const &pdgIds) const
Recursively looks for a daughter with one of the specified PDG ID codes and returns the pointer to it...
Definition: GenParticle.cpp:43
Describes a generator-level particle.
Definition: GenParticle.hpp:16
void AddMother(GenParticle const *p)
Adds a mother particle.
Definition: GenParticle.cpp:24
Definition: BTagger.hpp:102
int GetPdgId() const
Returns the PDG ID code.
Definition: GenParticle.cpp:94
GenParticle const * GetFirstMother() const
A short-cut to access the first mother.
Definition: GenParticle.cpp:70
std::list< GenParticle const * > collection_t
Type of the container to store mothers and daughters.
Definition: GenParticle.hpp:20
GenParticle() noexcept
Default constructor.
Definition: GenParticle.cpp:6
collection_t const & GetMothers() const
Returns the collection of mother particles.
Definition: GenParticle.cpp:88
Represents a general object with a four-momentum.
Definition: PhysicsObjects.hpp:28
int GetFirstMotherPdgId() const
A short-cut to access PDG ID code of the first mother.
Definition: GenParticle.cpp:79
void AddDaughter(GenParticle const *p)
Adds a daughter particle.
Definition: GenParticle.cpp:18
GenParticle const * FindFirstDaughter(std::initializer_list< int > const &pdgIds) const
Returns the pointer to the first daughter that matches one of the given PDG ID codes.
Definition: GenParticle.cpp:30