![]() |
Belle II Software
light-2303-iriomote
|
The DecayDescriptor stores information about a decay tree or parts of a decay tree. More...
#include <DecayDescriptor.h>

Public Member Functions | |
| operator DecayDescriptor * () | |
| Dereference operator. | |
| DecayDescriptor () | |
| Default ctor. | |
| DecayDescriptor (const DecayDescriptor &)=default | |
| Want the default copy ctor. | |
| DecayDescriptor & | operator= (const DecayDescriptor &)=default |
| Want the default assignment operator. | |
| std::vector< std::vector< std::pair< int, std::string > > > | getHierarchyOfSelected () |
| Function to get hierarchy of selected particles and their names (for python use) | |
| std::vector< std::vector< std::pair< int, std::string > > > | getHierarchyOfSelected (const std::vector< std::pair< int, std::string >> ¤tPath) |
| Helper function to get hierarchy of selected particles and their names. More... | |
| bool | init (const std::string &str) |
| Initialise the DecayDescriptor from given string. More... | |
| bool | init (const DecayString &s) |
| Initialise the DecayDescriptor from a given DecayString. More... | |
| int | match (const Particle *p) |
| Check if the DecayDescriptor matches with the given Particle. More... | |
| int | match (const MCParticle *p) |
| See match(const Particle* p). | |
| int | getMatchedDaughter () |
| Particle daughter ID set by previous call of match(const Particle*) function. | |
| void | resetMatch () |
| Reset results from previous call of the match() function. | |
| std::vector< const Particle * > | getSelectionParticles (const Particle *particle) |
| Get a vector of pointers with selected daughters in the decay tree. | |
| std::vector< std::string > | getSelectionNames () |
| Return list of human readable names of selected particles. More... | |
| std::vector< int > | getSelectionPDGCodes () |
| Return list of PDG codes of selected particles. | |
| const DecayDescriptorParticle * | getMother () const |
| return mother. | |
| int | getNDaughters () const |
| return number of direct daughters. | |
| const DecayDescriptor * | getDaughter (int i) const |
| return i-th daughter (0 based index). | |
| int | getProperty () const |
| return property of the particle. | |
| bool | isIgnoreRadiatedPhotons () const |
| Check if additional radiated photons shall be ignored. | |
| bool | isIgnoreIntermediate () const |
| Check if intermediate resonances/particles shall be ignored. | |
| bool | isIgnoreMassive () const |
| Check if missing massive final state particles shall be ignored. | |
| bool | isIgnoreNeutrino () const |
| Check if missing neutrinos shall be ignored. | |
| bool | isIgnoreGamma () const |
| Check if missing gammas shall be ignored. | |
| bool | isIgnoreBrems () const |
| Check if added Brems gammas shall be ignored. | |
| bool | isSelfConjugated () const |
| Is the decay or the particle self conjugated. | |
| bool | isInitOK () const |
| Check if the object initialized correctly. | |
| bool | getSelectionParticlesAndNames (const Particle *particle, std::vector< const Particle * > &selparticles, std::vector< std::string > &selnames) |
| Takes as input argument a (reconstructed) Particle, tries to match with this DecayDescriptorElement and returns true when matched. | |
Static Public Attributes | |
| static const DecayDescriptor & | s_NULL = DecayDescriptor() |
| Singleton object representing NULL. | |
Private Member Functions | |
| template<class T > | |
| int | match (const T *p, int iDaughter_p) |
| Internally called by match(Particle*) and match(MCParticle*) function. | |
Private Attributes | |
| DecayDescriptorParticle | m_mother |
| Mother of the decay ('left side'). | |
| int | m_iDaughter_p |
| ID of the Daughter Particle* matched to this DecayDescriptor. More... | |
| std::vector< DecayDescriptor > | m_daughters |
| Direct daughters of the decaying particle. | |
| int | m_properties |
| Particle property. More... | |
| bool | m_isNULL |
| Is this the NULL object? | |
| std::vector< std::vector< std::pair< int, std::string > > > | m_hierarchy |
| Collection of hierarchy paths of selected particles. More... | |
| bool | m_isInitOK |
| Is this object initialized correctly? | |
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
It contains the mother <-> daughter relations.
User documentation is located at analysis/doc/DecayDescriptor.rst Please modify in accordingly to introduced changes.
Definition at line 33 of file DecayDescriptor.h.
| std::vector< std::vector< std::pair< int, std::string > > > getHierarchyOfSelected | ( | const std::vector< std::pair< int, std::string >> & | currentPath | ) |
Helper function to get hierarchy of selected particles and their names.
Called iteratively and get hierarchy path of a particle as an argument
Definition at line 416 of file DecayDescriptor.cc.
| vector< string > getSelectionNames | ( | ) |
Return list of human readable names of selected particles.
Example for the case that all particles are selected in B+ -> (anti-D0 -> K^- pi^+) pi^+: ["B", "D0", "D0_K", "D_pi", "pi"]
Definition at line 342 of file DecayDescriptor.cc.
| bool init | ( | const DecayString & | s | ) |
Initialise the DecayDescriptor from a given DecayString.
The DecayString struct is obtained from the parser called in the init(const std::string) function.
Definition at line 58 of file DecayDescriptor.cc.
| bool init | ( | const std::string & | str | ) |
Initialise the DecayDescriptor from given string.
Typically, the string is a parameter of an analysis module.
Definition at line 46 of file DecayDescriptor.cc.
|
inline |
Check if the DecayDescriptor matches with the given Particle.
0 = no match 1 = matches DecayDescriptor 2 = matches charge conjugated DecayDescriptor 3 = matches DeacyDescriptor AND charge conjugated DecayDescriptor -1, -2, -3 : same, but match is not unambiguous.
Definition at line 108 of file DecayDescriptor.h.
|
private |
Collection of hierarchy paths of selected particles.
Hierarchy path is vector of pairs of relative daughter numbers and particle names. For instance, in decay B+ -> [ D+ -> ^K+ pi0 ] pi0 decay path of K+ is [(0, B), (0, D), (0 K)] Every selected particle has its own hierarchy path and they are stored as a vector in this variable: For the decayString B+ -> [ D+ -> ^K+ pi0 ] ^pi0 m_hierarchy, once filled, is [[(0, B), (0, D), (0, K)], [(0, B), (1, pi0)]]
Definition at line 63 of file DecayDescriptor.h.
|
private |
ID of the Daughter Particle* matched to this DecayDescriptor.
If this DecayDescriptor was not matched, the value is -1.
Definition at line 39 of file DecayDescriptor.h.
|
private |
Particle property.
Flags are defined in Particle::PropertyFlags
Definition at line 43 of file DecayDescriptor.h.