11 #include <analysis/VertexFitting/TreeFitter/Constraint.h>
12 #include <analysis/VertexFitting/TreeFitter/Projection.h>
13 #include <analysis/VertexFitting/TreeFitter/ErrCode.h>
14 #include <analysis/VertexFitting/TreeFitter/ConstraintConfiguration.h>
17 #include <analysis/dataobjects/Particle.h>
19 namespace TreeFitter {
22 class ConstraintConfiguration;
55 typedef std::vector< std::pair<const ParticleBase*, int> >
indexmap;
61 bool forceFitAll =
false
80 virtual int dim()
const = 0 ;
148 return fltcharge < 0 ? int(fltcharge - 0.5) : int(fltcharge + 0.5);
Class to store reconstructed particles.
int getPDGCode(void) const
Returns PDG code.
double getCharge(void) const
Returns particle charge.
Type
type of constraints the order of these constraints is important: it is the order in which they are ap...
abstract errorocode be aware that the default is success
Class to store and manage fitparams (statevector)
base class for all particles
Belle2::Particle * particle() const
get basf2 particle
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.
virtual ErrCode projectMassConstraintParticle(const FitParams &, Projection &) const
project mass constraint using the particles parameters
ErrCode initTau(FitParams &par) const
initialises tau as a length
virtual ParticleBase * addDaughter(Belle2::Particle *, const ConstraintConfiguration &config, bool forceFitAll=false)
add daughter
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
virtual int dim() const =0
get dimension of constraint
void setMother(const ParticleBase *m)
set mother
virtual int nFinalChargedCandidates() const
number of charged candidates
virtual void retrieveIndexMap(indexmap &anindexmap) const
get index map
virtual void forceP4Sum(FitParams &) const
force p4 sum conservation all along the tree
virtual ErrCode projectMassConstraint(const FitParams &, Projection &) const
project mass constraint abstract
const ConstraintConfiguration * m_config
has all the constraint config
virtual ErrCode initParticleWithMother(FitParams &)=0
init particle that does need a mother vertex
virtual std::string parname(int index) const
get name of parameter i
static bool isAResonance(Belle2::Particle *particle)
controls if a particle is treated as a resonance(lifetime=0) or a particle that has a finite lifetime...
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const
project constraint.
virtual ErrCode projectMassConstraintDaughters(const FitParams &, Projection &) const
project mass constraint using the parameters of the daughters
int eneIndex() const
get energy index
const ParticleBase * locate(Belle2::Particle *particle) const
get particle base from basf2 particle
void setIndex(int i)
set Index (in statevector)
std::vector< ParticleBase * > ParticleContainer
just an alias
virtual void removeDaughter(const ParticleBase *pb)
remove daughter
const ParticleBase * m_mother
motherparticle
bool m_isStronglyDecayingResonance
decay length less than 1 micron
virtual ErrCode initCovariance(FitParams &) const
init covariance matrix
virtual int type() const =0
get particle type
Belle2::Particle * m_particle
pointer to framework type
ParticleBase(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration *config=nullptr)
default constructor
virtual ErrCode initMotherlessParticle(FitParams &)=0
init particle that does not need a mother vertex
virtual ErrCode projectGeoConstraint(const FitParams &, Projection &) const
project geometrical constraint
virtual double chiSquare(const FitParams &) const
get chi2
virtual int posIndex() const
get vertex index (in statevector!)
std::vector< std::pair< const ParticleBase *, int > > indexmap
alias
virtual int momIndex() const
get momentum index
int index() const
get index
virtual bool hasEnergy() const
get momentum dimension
std::vector< ParticleBase * > m_daughters
daughter container
TFParticleType
particle types
virtual ~ParticleBase()
destructor, actually does something
void collectVertexDaughters(std::vector< ParticleBase * > &particles, int posindex)
get vertex daughters
virtual int tauIndex() const
get tau index
int charge() const
get charge
virtual bool hasPosition() const
get false
std::vector< Constraint > constraintlist
alias
const ParticleBase * mother() const
getMother() / hasMother()
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...