9#include <analysis/modules/SignalSideParticleListCreator/SignalSideParticleListCreatorModule.h>
12#include <framework/datastore/DataStore.h>
13#include <framework/datastore/StoreObjPtr.h>
16#include <framework/logging/Logger.h>
19#include <analysis/dataobjects/Particle.h>
20#include <analysis/dataobjects/ParticleList.h>
21#include <analysis/dataobjects/RestOfEvent.h>
24#include <analysis/DecayDescriptor/ParticleListName.h>
40 setDescription(
"The module creates a ParticleList and fills it with one of the daughter Particles.");
44 "Name of the ParticleList to be created and filled with signal side daughter Particle", std::string(
""));
45 addParam(
"decayString",
m_decayString,
"DecayString specifying the daughter Particle to be included in the ParticleList",
57 B2ERROR(
"SignalSideParticleListCreatorModule::initialize Invalid output ParticleList name: " <<
m_particleListName);
77 B2ERROR(
"SignalSideParticleListCreatorModule::initialize Invalid Decay Descriptor: " <<
m_decayString);
80 int nDecayProducts = strNames.size();
81 if (nDecayProducts != 1)
82 B2ERROR(
"SignalSideParticleListCreatorModule::initialize Only one particle can be selected. The specified decayString " <<
90 bool existingList = plist.isValid();
102 antiPlist->bindAntiParticleList(*(plist));
113 plist->addParticle(selparticles[0]);
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
Represents a particle in the DecayDescriptor.
int getPDGCode() const
Return PDG code.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
std::vector< std::string > getSelectionNames()
Return list of human readable names of selected particles.
std::vector< const Particle * > getSelectionParticles(const Particle *particle)
Get a vector of pointers with selected daughters in the decay tree.
const DecayDescriptorParticle * getMother() const
return mother.
void setDescription(const std::string &description)
Sets the description of the module.
Class to store reconstructed particles.
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle does not exist and therefore the output anti-ParticleLis...
SignalSideParticleListCreatorModule()
Constructor: Sets the description, the properties and the parameters of the module.
std::string m_particleListName
Name of the ParticleList to be created and filled with signal side daughter Particle.
std::string m_antiParticleListName
Name of the anti-ParticleList to be created and filled with signal side daughter Particle.
virtual void initialize() override
initialize method
DecayDescriptor m_pListDDescriptor
Decay descriptor of the particle list being selected.
virtual void event() override
event method
std::string m_decayString
DecayString specifying the daughter Particle to be included in the ParticleList.
DecayDescriptor m_pDDescriptor
Decay descriptor of the particle being selected.
int m_pdgCode
PDG code of the selected particle.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool create(bool replace=false)
Create a default object 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.
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
Abstract base class for different kinds of events.