 |
Belle II Software
release-05-02-19
|
13 #include <analysis/DecayDescriptor/DecayString.h>
14 #include <analysis/DecayDescriptor/DecayDescriptorParticle.h>
15 #include <analysis/dataobjects/Particle.h>
35 class DecayDescriptor {
50 int match(
const T* p,
int iDaughter_p);
65 std::vector<std::vector<std::pair<int, std::string>>>
m_hierarchy;
92 std::vector<std::vector<std::pair<int, std::string>>>
getHierarchyOfSelected(
const std::vector<std::pair<int, std::string>>&
97 bool init(
const std::string& str);
110 int match(
const Particle* p) {
return match<Particle>(p, -1);}
128 const DecayDescriptorParticle*
getMother()
const
150 return (
m_properties & Particle::PropertyFlags::c_IsIgnoreRadiatedPhotons) > 0;
155 return (
m_properties & Particle::PropertyFlags::c_IsIgnoreIntermediate) > 0;
160 return (
m_properties & Particle::PropertyFlags::c_IsIgnoreMassive) > 0;
165 return (
m_properties & Particle::PropertyFlags::c_IsIgnoreNeutrino) > 0;
170 return (
m_properties & Particle::PropertyFlags::c_IsIgnoreGamma) > 0;
175 return (
m_properties & Particle::PropertyFlags::c_IsIgnoreBrems) > 0;
190 std::vector<const Particle*>& selparticles,
191 std::vector<std::string>& selnames);
const static DecayDescriptor & s_NULL
Singleton object representing NULL.
boost::variant< boost::recursive_wrapper< DecayStringDecay >, DecayStringParticle > DecayString
The DecayStringElement can be either a DecayStringDecay or a vector of mother particles.
bool isIgnoreNeutrino() const
Check if missing neutrinos shall be ignored.
bool isIgnoreGamma() const
Check if missing gammas shall be ignored.
DecayDescriptor & operator=(const DecayDescriptor &)=default
Want the default assignment operator.
std::vector< std::string > getSelectionNames()
Return list of human readable names of selected particles.
std::vector< DecayDescriptor > m_daughters
Direct daughters of the decaying particle.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
int match(const T *p, int iDaughter_p)
Internally called by match(Particle*) and match(MCParticle*) function.
int getMatchedDaughter()
Particle daughter ID set by previous call of match(const Particle*) function.
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 a...
Abstract base class for different kinds of events.
std::vector< const Particle * > getSelectionParticles(const Particle *particle)
Get a vector of pointers with selected daughters in the decay tree.
DecayDescriptor()
Default ctor.
const DecayDescriptor * getDaughter(int i) const
return i-th daughter (0 based index).
std::vector< std::vector< std::pair< int, std::string > > > m_hierarchy
Collection of hierarchy pathes of selected particles.
int getNDaughters() const
return number of direct daughters.
bool isIgnoreBrems() const
Check if added Brems gammas shall be ignored.
Class to store reconstructed particles.
bool isIgnoreIntermediate() const
Check if intermediate resonances/particles shall be ignored.
bool m_isInitOK
Is this object initialized correctly?
The DecayDescriptor stores information about a decay tree or parts of a decay tree.
int getProperty() const
return property of the particle.
A Class to store the Monte Carlo particle information.
bool isIgnoreRadiatedPhotons() const
Check if additional radiated photons shall be ignored.
void resetMatch()
Reset results from previous call of the match() function.
bool isIgnoreMassive() const
Check if missing massive final state particles shall be ignored.
DecayDescriptorParticle m_mother
Mother of the decay ('left side').
int m_iDaughter_p
ID of the Daughter Particle* matched to this DecayDescriptor.
const DecayDescriptorParticle * getMother() const
return mother.
bool isSelfConjugated() const
Is the decay or the particle self conjugated.
std::vector< std::vector< std::pair< int, std::string > > > getHierarchyOfSelected()
Function to get hierarchy of selected particles and their names (for python use)
int m_properties
Particle property.
bool m_isNULL
Is this the NULL object?