9#include <analysis/modules/V0DaughterMassUpdater/V0DaughterMassUpdaterModule.h>
10#include <analysis/dataobjects/ParticleList.h>
12#include <framework/datastore/StoreObjPtr.h>
13#include <framework/gearbox/Const.h>
24 setDescription(
"This module replaces the mass of two daughters of the selected V0 particles inside the given particleLists with masses of given pdgCode. The particle in selected particleList has to have 2 daughters.");
42 B2ERROR(
"ParticleList " << iList <<
" not found");
45 if (particlelist->getListSize() == 0)
continue;
46 for (
unsigned int i = 0; i < particlelist->getListSize(); ++i) {
47 Particle* iParticle = particlelist->getParticle(i);
48 if (iParticle->
getParticleSource() != Particle::EParticleSourceObject::c_Composite)
49 B2FATAL(
"This V0 particle is not a composite particle!");
51 std::vector<Belle2::Particle*> dau = iParticle -> getDaughters();
53 B2FATAL(
"This V0 particle has " << dau.size() <<
" daughters, the number of daughters has to be 2.");
56 bool correctOrder =
true;
57 if (dau[0]->getCharge() < 0 && dau[1]->getCharge() > 0) correctOrder =
false;
static const ChargedStable electron
electron particle
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Class to store reconstructed particles.
EParticleSourceObject getParticleSource() const
Returns particle source as defined with enum EParticleSourceObject.
Type-safe access to single objects in the data store.
int m_pdg_pos_dau
PDG code for V0's positive daughter.
V0DaughterMassUpdaterModule()
Constructor.
virtual void event() override
Method called for each event.
std::vector< std::string > m_strParticleLists
Name of the lists.
int m_pdg_neg_dau
PDG code for V0's negative daughter.
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.