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.");
37 addParam(
"particleLists", m_particleLists,
"Input ParticleList name", std::vector<std::string>());
38 addParam(
"selection", m_selection,
"Additional selection criteria", std::string(
""));
59 bool inTheLists =
false;
65 if (
m_cut->check(particle)) {
71 B2WARNING(
"Input list " << iParticlelist.
getName() <<
" was not created?");
75 const unsigned int numParticles = iParticlelist->getListSize();
76 if (numParticles == 0)
79 if (iParticlelist->contains(particle)) {
80 inTheLists =
true;
break;
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 setReturnValue(int value)
Sets the return value for this module as integer.
Class to store reconstructed particles.
The module returns true if the current RestOfEvent object is related to any of the Particles in the i...
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
std::vector< std::string > m_particleLists
Name of the input particle lists.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
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.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.