Belle II Software development
|
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. | |
bool | init (const std::string &str) |
Initialise the DecayDescriptor from given string. | |
bool | init (const DecayString &s) |
Initialise the DecayDescriptor from a given DecayString. | |
int | match (const Particle *p) |
Check if the DecayDescriptor matches with the given Particle. | |
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. | |
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. | |
std::vector< DecayDescriptor > | m_daughters |
Direct daughters of the decaying particle. | |
int | m_properties |
Particle property. | |
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. | |
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.
DecayDescriptor | ( | ) |
Default ctor.
Definition at line 36 of file DecayDescriptor.cc.
|
inline |
return i-th daughter (0 based index).
Definition at line 139 of file DecayDescriptor.h.
std::vector< std::vector< std::pair< int, std::string > > > getHierarchyOfSelected | ( | ) |
Function to get hierarchy of selected particles and their names (for python use)
Definition at line 405 of file DecayDescriptor.cc.
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.
|
inline |
Particle daughter ID set by previous call of match(const Particle*) function.
Definition at line 114 of file DecayDescriptor.h.
|
inline |
|
inline |
return number of direct daughters.
Definition at line 134 of file DecayDescriptor.h.
|
inline |
return property of the particle.
Definition at line 144 of file DecayDescriptor.h.
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.
Get a vector of pointers with selected daughters in the decay tree.
Definition at line 283 of file DecayDescriptor.cc.
vector< int > getSelectionPDGCodes | ( | ) |
Return list of PDG codes of selected particles.
Definition at line 393 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 added Brems gammas shall be ignored.
Definition at line 174 of file DecayDescriptor.h.
|
inline |
Check if missing gammas shall be ignored.
Definition at line 169 of file DecayDescriptor.h.
|
inline |
Check if intermediate resonances/particles shall be ignored.
Definition at line 154 of file DecayDescriptor.h.
|
inline |
Check if missing massive final state particles shall be ignored.
Definition at line 159 of file DecayDescriptor.h.
|
inline |
Check if missing neutrinos shall be ignored.
Definition at line 164 of file DecayDescriptor.h.
|
inline |
Check if additional radiated photons shall be ignored.
Definition at line 149 of file DecayDescriptor.h.
|
inline |
Check if the object initialized correctly.
Definition at line 183 of file DecayDescriptor.h.
bool isSelfConjugated | ( | ) | const |
Is the decay or the particle self conjugated.
Definition at line 324 of file DecayDescriptor.cc.
|
inline |
Definition at line 111 of file DecayDescriptor.h.
|
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 |
Internally called by match(Particle*) and match(MCParticle*) function.
Definition at line 136 of file DecayDescriptor.cc.
|
inline |
Dereference operator.
Definition at line 73 of file DecayDescriptor.h.
void resetMatch | ( | ) |
Reset results from previous call of the match() function.
Definition at line 276 of file DecayDescriptor.cc.
|
private |
Direct daughters of the decaying particle.
Definition at line 41 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 |
Is this object initialized correctly?
Definition at line 66 of file DecayDescriptor.h.
|
private |
Is this the NULL object?
Definition at line 45 of file DecayDescriptor.h.
|
private |
Mother of the decay ('left side').
Definition at line 36 of file DecayDescriptor.h.
|
private |
Particle property.
Flags are defined in Particle::PropertyFlags
Definition at line 43 of file DecayDescriptor.h.
|
static |
Singleton object representing NULL.
Definition at line 70 of file DecayDescriptor.h.