Belle II Software light-2406-ragdoll
InternalParticle.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * External Contributor: Wouter Hulsbergen *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9#pragma once
10
11#include <analysis/VertexFitting/TreeFitter/ParticleBase.h>
12#include <analysis/VertexFitting/TreeFitter/RecoTrack.h>
13
14namespace TreeFitter {
15
18
19 public:
20
23 const ParticleBase* mother,
24 const ConstraintConfiguration& config,
25 bool forceFitAll
26 ) ;
27
29 virtual ~InternalParticle() {};
30
32 virtual ErrCode initCovariance(FitParams&) const override;
33
36
39
41 virtual void forceP4Sum(FitParams&) const override;
42
44 virtual ErrCode initParticleWithMother(FitParams& fitparams) override;
45
47 virtual ErrCode initMotherlessParticle(FitParams& fitparams) override;
48
50 ErrCode projectConstraint(const Constraint::Type type, const FitParams& fitparams, Projection& p) const override;
51
53 virtual int dim() const override;
54
56 virtual int type() const override { return kInternalParticle ; }
57
59 virtual int posIndex() const override;
60
62 virtual int tauIndex() const override;
63
65 virtual int momIndex() const override;
66
68 virtual bool hasEnergy() const override { return true ; }
69
71 virtual bool hasPosition() const override;
72
74 virtual std::string parname(int index) const override ;
75
77 virtual void addToConstraintList(constraintlist& list, int depth) const override ;
78
80 void setMassConstraint(bool b) { m_massconstraint = b ; }
81
82 protected:
83
85 ErrCode initMomentum(FitParams& fitparams) const ;
86
87 private:
88
90 bool static compTrkTransverseMomentum(const RecoTrack* lhs, const RecoTrack* rhs);
91
94
97
100
103
106
109
113 } ;
114
115}
Class to store reconstructed particles.
Definition: Particle.h:75
constraint configuration class
Type
type of constraints the order of these constraints is important: it is the order in which they are ap...
Definition: Constraint.h:27
abstract errorocode be aware that the default is success
Definition: ErrCode.h:14
Class to store and manage fitparams (statevector)
Definition: FitParams.h:20
another unnecessary layer of abstraction
virtual void forceP4Sum(FitParams &) const override
enforce conservation of momentum sum
virtual int tauIndex() const override
tau index in fit params only if it has a mother
bool m_isconversion
is conversion
virtual std::string parname(int index) const override
name
ErrCode projectKineConstraint(const FitParams &, Projection &) const
project kinematical constraint
virtual int dim() const override
space reserved in fit params, if has mother then it has tau
bool m_beamconstraint
has beam constraint
bool m_massconstraint
has mass constraint
ErrCode projectBeamConstraint(const FitParams &, Projection &) const
project beam four momentum constraint
virtual ErrCode initCovariance(FitParams &) const override
init covariance
virtual int type() const override
type
bool m_automatic_vertex_constraining
automatically figure out if mother and particle vertex should be the same and also add geometric cons...
virtual bool hasEnergy() const override
has energy in fitparams
virtual bool hasPosition() const override
has position index
virtual ~InternalParticle()
destructor
ErrCode projectConstraint(const Constraint::Type type, const FitParams &fitparams, Projection &p) const override
find out which constraint it is and project
void setMassConstraint(bool b)
set mass constraint flag
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle in case it has a mother
virtual int momIndex() const override
momentum index in fit params depending on whether it has a mother
ErrCode initMomentum(FitParams &fitparams) const
init momentum of *this and daughters
virtual void addToConstraintList(constraintlist &list, int depth) const override
add to constraint list
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle in case it has no mother
static bool compTrkTransverseMomentum(const RecoTrack *lhs, const RecoTrack *rhs)
compare transverse track momentum
virtual int posIndex() const override
position index in fit params
bool m_lifetimeconstraint
has lifetime constraint
bool m_geo_constraint
use a geo metric constraint
bool m_shares_vertex_with_mother
shares vertex with mother, that means decay vertex = productionvertex
base class for all particles
Definition: ParticleBase.h:25
Belle2::Particle * particle() const
get basf2 particle
Definition: ParticleBase.h:92
int index() const
get index
Definition: ParticleBase.h:95
const ParticleBase * mother() const
getMother() / hasMother()
Definition: ParticleBase.h:98
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:52
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:18
representation of all charged final states FIXME rename since this name is taken in tracking
Definition: RecoTrack.h:18