9#include <analysis/modules/SelectDaughters/SelectDaughtersModule.h>
12#include <analysis/dataobjects/Particle.h>
13#include <analysis/dataobjects/ParticleList.h>
16#include <framework/geometry/BFieldManager.h>
54 B2ERROR(
"ParticleList " <<
m_listName <<
" not found");
58 B2ERROR(
"decay descriptor cannot be empty");
62 unsigned int n = plist->getListSize();
63 for (
unsigned i = 0; i < n; i++) {
64 Particle* particle = plist->getParticle(i);
66 std::vector<Particle*> daughters = particle->
getDaughters();
69 for (
auto& daughter : daughters) {
71 for (
auto& selParticle : selParticles) {
72 if (daughter == selParticle) isSel =
true;
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
std::vector< const Particle * > getSelectionParticles(const Particle *particle)
Get a vector of pointers with selected daughters in the decay tree.
void setDescription(const std::string &description)
Sets the description of the module.
Class to store reconstructed particles.
std::vector< Belle2::Particle * > getDaughters() const
Returns a vector of pointers to daughter particles.
void removeDaughter(const Particle *daughter, const bool updateType=true)
Removes index of daughter from daughters index array.
virtual void initialize() override
set up datastore
virtual void event() override
process the event
std::string m_decayString
daughter particles selection
std::string m_listName
name of particle list
SelectDaughtersModule()
constructor
DecayDescriptor m_decaydescriptor
Decay descriptor of decays to look for.
Type-safe access to single objects in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.