 |
Belle II Software
release-05-02-19
|
11 #include <analysis/modules/SignalSideParticleListCreator/SignalSideParticleListCreatorModule.h>
14 #include <framework/datastore/DataStore.h>
15 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/logging/Logger.h>
21 #include <analysis/dataobjects/Particle.h>
22 #include <analysis/dataobjects/ParticleList.h>
23 #include <analysis/dataobjects/RestOfEvent.h>
26 #include <analysis/DecayDescriptor/ParticleListName.h>
42 setDescription(
"The module creates a ParticleList and fills it with one of the daughter Particles.");
45 addParam(
"particleListName", m_particleListName,
46 "Name of the ParticleList to be created and filled with signal side daughter Particle", std::string(
""));
47 addParam(
"decayString", m_decayString,
"DecayString specifying the daughter Particle to be included in the ParticleList",
59 B2ERROR(
"SignalSideParticleListCreatorModule::initialize Invalid output ParticleList name: " <<
m_particleListName);
79 B2ERROR(
"SignalSideParticleListCreatorModule::initialize Invalid Decay Descriptor: " <<
m_decayString);
82 int nDecayProducts = strNames.size();
83 if (nDecayProducts != 1)
84 B2ERROR(
"SignalSideParticleListCreatorModule::initialize Only one particle can be selected. The specified decayString " <<
92 bool existingList = plist.
isValid();
104 antiPlist->bindAntiParticleList(*(plist));
115 plist->addParticle(selparticles[0]);
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
std::string m_decayString
DecayString specifying the daughter Particle to be included in the ParticleList.
std::string m_antiParticleListName
Name of the anti-ParticleList to be created and filled with signal side daughter Particle.
Represents a particle in the DecayDescriptor.
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
std::vector< std::string > getSelectionNames()
Return list of human readable names of selected particles.
bool init(const std::string &str)
Initialise the DecayDescriptor from given string.
std::string antiParticleListName(const std::string &listName)
Returns name of anti-particle-list corresponding to listName.
virtual void initialize() override
initialize method
DecayDescriptor m_pDDescriptor
Decay descriptor of the particle being selected.
Abstract base class for different kinds of events.
std::vector< const Particle * > getSelectionParticles(const Particle *particle)
Get a vector of pointers with selected daughters in the decay tree.
Type-safe access to single objects in the data store.
bool m_isSelfConjugatedParticle
flag that indicates whether an anti-particle does not exist and therefore the output anti-ParticleLis...
virtual void event() override
event method
Class to store reconstructed particles.
DecayDescriptor m_pListDDescriptor
Decay descriptor of the particle list being selected.
const DecayDescriptorParticle * getMother() const
return mother.
int m_pdgCode
PDG code of the selected particle.
The module creates a ParticleList and fills it with one of the daughter Particles.
std::string m_particleListName
Name of the ParticleList to be created and filled with signal side daughter Particle.
bool isValid() const
Check whether the object was created.