9#include <analysis/modules/SignalSideParticleFilter/SignalSideParticleFilterModule.h>
11#include <framework/datastore/StoreArray.h>
12#include <framework/datastore/StoreObjPtr.h>
14#include <analysis/dataobjects/Particle.h>
15#include <analysis/dataobjects/ParticleList.h>
16#include <analysis/dataobjects/RestOfEvent.h>
32 setDescription(
"The module returns true if the current RestOfEvent object is related to\n"
33 "any of the Particles from the input ParticleList and passes selection criteria.\n"
34 "The module should be executed only in the for_each ROE path.");
72 B2WARNING(
"Input list " << iParticlelist.
getName() <<
" was not created?");
76 const unsigned int numParticles = iParticlelist->getListSize();
77 if (numParticles == 0)
80 if (iParticlelist->contains(particle)) {
82 if (
m_cut->check(particle)) {
static std::unique_ptr< GeneralCut > compile(const std::string &cut)
Creates an instance of a cut and returns a unique_ptr to it, if you need a copy-able object instead y...
void setDescription(const std::string &description)
Sets the description of the module.
void setReturnValue(int value)
Sets the return value for this module as integer.
Class to store reconstructed particles.
std::string m_selection
Additional selection criteria.
virtual void initialize() override
initialize the module (setup the data store)
virtual void event() override
process event
std::unique_ptr< Variable::Cut > m_cut
cut object which performs the cuts
SignalSideParticleFilterModule()
constructor
std::vector< std::string > m_particleLists
Name of the input particle lists.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
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.