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>
26 m_headOfChain(nullptr),
32 B2FATAL(
"Setup error. Can't have both custom origin and ip constraint.");
65 [&](
const Constraint & constraint) { return constraint.name() == removeConstraint ;}),
88 status |= constraint.filter(par);
100 status |= constraint.filterWithReference(par, ref);
134 return base->
index();
Class to store reconstructed particles.
int getPDGCode(void) const
Returns PDG code.
constraint configuration class
const bool m_customOrigin
is custom origin
int m_headOfTreePDG
PDG code of the head particle.
const bool m_ipConstraint
is IP constraint
const std::vector< std::string > m_removeConstraintList
list of constraints not to apply in tree fit
class to manage the order of constraints and their filtering
this class does a lot of stuff: Build decaytree structure allowing to index particles and handle the ...
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
virtual void addToConstraintList(constraintlist &alist, int depth) const =0
add to constraint list
virtual void updateIndex(int &offset)
this sets the index for momentum, position, etc.
Belle2::Particle * particle() const
get basf2 particle
static ParticleBase * createOrigin(Belle2::Particle *daughter, const ConstraintConfiguration &config, bool forceFitAll)
create a custom origin particle or a beamspot
static ParticleBase * createParticle(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll=false)
create the according treeFitter particle obj for a basf2 particle type
const ParticleBase * locate(Belle2::Particle *particle) const
get particle base from basf2 particle
virtual ErrCode initCovariance(FitParams &) const
init covariance matrix
virtual ErrCode initMotherlessParticle(FitParams &)=0
init particle that does not need a mother vertex
virtual double chiSquare(const FitParams &) const
get chi2
virtual int posIndex() const
get vertex index (in statevector!)
virtual int momIndex() const
get momentum index
int index() const
get index
virtual int tauIndex() const
get tau index