Belle II Software development
|
Class to help managing creation and adding to ParticleLists. More...
#include <ParticleListHelper.h>
Public Member Functions | |
ParticleListHelper ()=default | |
Default constructor, does nothing. | |
ParticleListHelper (const std::string &listname, bool save=true) | |
Construct and initialize right away. | |
void | registerList (const std::string &listname, bool save=true) |
Register a list by name. | |
void | registerList (const DecayDescriptor &decay, bool save=true) |
Register a list using a decay descriptor. | |
int | getPDGCode () const |
Return the pdg code of the main list. | |
bool | isSelfConjugated () const |
Return whether or not this list is self conjugated. | |
void | create () |
Create the list objects. | |
template<class ... Args> | |
Particle & | add (Args &&... args) |
Add a particle to the list by forwarding all arguments to the constructor of the Particle object: Any valid arguments to construct a Belle2::Particle work here. | |
Particle & | addParticle (const Particle &particle) |
Non-templated convenience function to add a particle from an existing particle object. | |
Particle & | addParticle (const ROOT::Math::PxPyPzEVector &momentum, bool conjugated=false) |
Non-templated convenience function to add a particle from simple four momentum and an indicator whether it's particle or anti particle. | |
Private Attributes | |
StoreArray< Particle > | m_particles |
Store array for the particles. | |
StoreObjPtr< ParticleList > | m_list |
Store object for the list. | |
std::optional< StoreObjPtr< ParticleList > > | m_antiList |
Optional store object for the conjugated list if that exists. | |
int | m_pdg |
PDG code of the list. | |
Class to help managing creation and adding to ParticleLists.
There's a bit of management involved when trying to create a new particle list
This class is managing all this in a clean interface
initialize()
function call registerList()
with the full list name (or the DecayDescriptor)event()
function call create()
add()
or addParticle
(the second one is for the benefit of python as currently ROOT has problems with variadic template functions forwarding arguments) Definition at line 48 of file ParticleListHelper.h.
|
inlineexplicit |
Construct and initialize right away.
Useful in cases where you create these objects directly in the initialize()
function of a module
Definition at line 55 of file ParticleListHelper.h.
|
inline |
Add a particle to the list by forwarding all arguments to the constructor of the Particle object: Any valid arguments to construct a Belle2::Particle work here.
It will return a reference to the created particle for further modification.
Definition at line 89 of file ParticleListHelper.h.
Non-templated convenience function to add a particle from an existing particle object.
Definition at line 103 of file ParticleListHelper.h.
|
inline |
Non-templated convenience function to add a particle from simple four momentum and an indicator whether it's particle or anti particle.
Definition at line 110 of file ParticleListHelper.h.
|
inline |
Return the pdg code of the main list.
If it's not a self conjugated list there is also a list with the negative pdg value
Definition at line 77 of file ParticleListHelper.h.
|
inline |
Return whether or not this list is self conjugated.
Definition at line 79 of file ParticleListHelper.h.
|
private |
Optional store object for the conjugated list if that exists.
Definition at line 121 of file ParticleListHelper.h.
|
private |
Store object for the list.
Definition at line 119 of file ParticleListHelper.h.
|
private |
Store array for the particles.
Definition at line 117 of file ParticleListHelper.h.
|
private |
PDG code of the list.
Definition at line 123 of file ParticleListHelper.h.