12#include <framework/logging/Logger.h>
14#include <analysis/VertexFitting/TreeFitter/FitParams.h>
15#include <analysis/VertexFitting/TreeFitter/ParticleBase.h>
16#include <analysis/VertexFitting/TreeFitter/DecayChain.h>
31 if (config.m_ipConstraint && config.m_customOrigin) {
32 B2FATAL(
"Setup error. Can't have both custom origin and ip constraint.");
34 config.m_headOfTreePDG = std::abs(particle->getPDGCode());
35 if (config.m_ipConstraint || config.m_customOrigin) {
36 m_headOfChain = ParticleBase::createOrigin(particle, config, forceFitAll);
38 m_headOfChain = ParticleBase::createParticle(particle, nullptr, config, forceFitAll);
63 for (
auto removeConstraint :
m_config.m_removeConstraintList) {
65 [&](
const Constraint & constraint) { return constraint.name() == removeConstraint ;}),
88 status |= constraint.filter(par);
100 status |= constraint.filterWithReference(par, ref);
134 return base->index();
143 return base->posIndex();
152 return base->momIndex();
161 return base->tauIndex();
Class to store reconstructed particles.
constraint configuration class
class to manage the order of constraints and their filtering
double chiSquare(const FitParams &par) const
get the chi2 for the head of the chain
const ConstraintConfiguration m_config
config container
ErrCode initialize(FitParams &par)
initialize the chain
int m_dim
the dimension of constraint
ParticleBase::constraintlist m_constraintlist
list of constraints
void removeConstraintFromList()
remove constraints from list
void initConstraintList()
init contraintlist
ParticleBase * m_headOfChain
head of decay tree
const ParticleBase * locate(Belle2::Particle *bc) const
convert Belle2::particle into particle base(fitter base particle)
ErrCode filterWithReference(FitParams &par, const FitParams &ref)
filter with respect to a previous iteration for better stability
const bool m_isOwner
internal class member to check if we own the chain
const ParticleBase * m_cand
fit candidate (not same to mother in case of bs/be constraint)
int index(Belle2::Particle *bc) const
get the particle index
DecayChain()
empty constructor
int tauIndex(Belle2::Particle *bc) const
get tau (i.e.
int momIndex() const
!NOT IMPLEMENTED
ErrCode filter(FitParams &par)
filter down the chain
int posIndex(Belle2::Particle *bc) const
get the vertex index of the particle in state vector
ParticleMap m_particleMap
the map from Belle2::Particles to TreeFitter::ParticleBase
abstract errorocode be aware that the default is success
Class to store and manage fitparams (statevector)
void resetStateVector()
reset the statevector
void resetChiSquare()
reset chi2
void resetCovariance()
reset the statevector
base class for all particles
Belle2::Particle * particle() const
get basf2 particle