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.");
43 addParam(
"particleListName", m_particleListName,
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.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
const DecayDescriptorParticle * getMother() const
return mother.
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.
Class to store reconstructed particles.
The module creates a ParticleList and fills it with one of the daughter Particles.
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle does not exist and therefore the output anti-ParticleLis...
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.
#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.