Belle II Software  release-05-01-25
InternalTrack.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributor: Francesco Tenchini, Jo-Frederik Krohn, Fabian Krinner *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <analysis/dataobjects/Particle.h>
12 #include <framework/dataobjects/UncertainHelix.h>
13 #include <mdst/dataobjects/MCParticle.h>
14 
15 #include <analysis/VertexFitting/TreeFitter/InternalTrack.h>
16 #include <analysis/VertexFitting/TreeFitter/FitParams.h>
17 #include <analysis/VertexFitting/TreeFitter/HelixUtils.h>
18 #include <framework/logging/Logger.h>
19 #include <mdst/dataobjects/Track.h>
20 
21 using std::vector;
22 
23 namespace TreeFitter {
24  constexpr double pi = TMath::Pi();
25  constexpr double twoPi = TMath::TwoPi();
26 
28  const ParticleBase* mother,
29  const ConstraintConfiguration& config,
30  bool forceFitAll,
31  bool noEnergySum,
32  bool forceMassConstraint
33  ) :
34  ParticleBase(particle, mother, &config), // config pointer here to allow final states not to have it
35  m_massconstraint(false),
36  m_noEnergySum(noEnergySum),
37  m_isconversion(false),
38  m_bfield(0.)
39  {
40  m_bfield = Belle2::BFieldManager::getField(TVector3(0, 0, 0)).Z() / Belle2::Unit::T; //Bz in Tesla
41 
42  if (particle) {
43  for (Belle2::Particle* daughter : particle->getDaughters()) {
44  addDaughter(daughter, config, forceFitAll);
45  }
46  } else {
47  B2ERROR("Trying to create an InternalTrack from NULL. This should never happen.");
48  }
49  m_massconstraint = std::find(config.m_massConstraintListPDG.begin(), config.m_massConstraintListPDG.end(),
50  std::abs(m_particle->getPDGCode())) != config.m_massConstraintListPDG.end();
51  if (forceMassConstraint) {
52  m_massconstraint = true;
53  }
54  }
55 
57  {
58  return lhs->particle()->getMomentum().Perp() > rhs->particle()->getMomentum().Perp();
59  }
60 
62  {
63  ErrCode status;
64  for (ParticleBase* daughter : m_daughters)
65 
66  {
67  status |= daughter->initMotherlessParticle(fitparams);
68  }
69  int posindex = posIndex();
70  // FIXME update this and check if this position is already initialised
71  // lower stream vertices might be better
72 
73  if (hasPosition()) {
74  fitparams.getStateVector().segment(posindex, 3) = Eigen::Matrix<double, 3, 1>::Zero(3);
75  TVector3 vtx = particle()->getVertex();
76  if (vtx.Mag2()) {
77  // Checking Mag2() instead of Mag() avoids a Sqrt(...)
78  fitparams.getStateVector()(posindex) = vtx.X();
79  fitparams.getStateVector()(posindex + 1) = vtx.Y();
80  fitparams.getStateVector()(posindex + 2) = vtx.Z();
81  } else {
82  // Init containers
83  vector<ParticleBase*> alldaughters;
84  vector<ParticleBase*> vtxdaughters;
85  vector<RecoTrack*> trkdaughters;
86 
87  ParticleBase::collectVertexDaughters(alldaughters, posindex);
88 
89  for (ParticleBase* daughter : alldaughters) {
90  if (daughter->type() == ParticleBase::TFParticleType::kRecoTrack) {
91  trkdaughters.push_back(static_cast<RecoTrack*>(daughter));
92  } else if (daughter->hasPosition() && fitparams.getStateVector()(daughter->posIndex()) != 0) {
93  vtxdaughters.push_back(daughter);
94  }
95  }
96 
97  if (trkdaughters.size() >= 2) {
98  std::sort(trkdaughters.begin(), trkdaughters.end(), compTrkTransverseMomentum);
99 
100  RecoTrack* dau1 = trkdaughters[0];
101  RecoTrack* dau2 = trkdaughters[1];
102 
104  dau1->particle()->getPDGCode())))->getHelix();
106  dau2->particle()->getPDGCode())))->getHelix();
107 
108  double flt1(0), flt2(0);
109  TVector3 v;
110  HelixUtils::helixPoca(helix1, helix2, flt1, flt2, v, m_isconversion);
111 
112  fitparams.getStateVector()(posindex) = v.x();
113  fitparams.getStateVector()(posindex + 1) = v.y();
114  fitparams.getStateVector()(posindex + 2) = v.z();
115 
116  dau1->setFlightLength(flt1);
117  dau2->setFlightLength(flt2);
118 
119  } else if (mother() && mother()->posIndex() >= 0) {
120  const int posindexmother = mother()->posIndex();
121  const int dim = m_config->m_originDimension; //TODO access mother
122  fitparams.getStateVector().segment(posindex, dim) = fitparams.getStateVector().segment(posindexmother, dim);
123  } else {
125  fitparams.getStateVector().segment(posindex, 3) = Eigen::Matrix<double, 1, 3>::Zero(3);
126  }
127  }
128  }
129 
130  for (ParticleBase* daughter : m_daughters) {
131  daughter->initParticleWithMother(fitparams);
132  }
133 
134  initMomentum(fitparams);
135  return status;
136  }
137 
139  {
140  const int posindex = posIndex();
141  if (mother() &&
142  fitparams.getStateVector()(posindex) == 0 &&
143  fitparams.getStateVector()(posindex + 1) == 0 && \
144  fitparams.getStateVector()(posindex + 2) == 0) {
145  const int posIndexMother = mother()->posIndex();
146  const int dim = m_config->m_originDimension; // TODO access mother (copied from InternalParticle.cc)
147  fitparams.getStateVector().segment(posindex, dim) = fitparams.getStateVector().segment(posIndexMother, dim);
148  }
149  return initTau(fitparams); // This will never have Tau (copy anyway from InternalParticle.cc)
150  }
151 
153  {
154  int momindex = momIndex();
155  fitparams.getStateVector().segment(momindex, 4) = Eigen::Matrix<double, 4, 1>::Zero(4);
156 
157  for (ParticleBase* daughter : m_daughters) {
158  int daumomindex = daughter->momIndex();
159  int maxrow = daughter->hasEnergy() ? 4 : 3;
160 
161  fitparams.getStateVector().segment(momindex, maxrow) += fitparams.getStateVector().segment(daumomindex, maxrow);
162 
163  if (maxrow == 3) {
164  double mass = daughter->pdgMass();
165  double pSquared = fitparams.getStateVector().segment(daumomindex, maxrow).squaredNorm();
166  fitparams.getStateVector()(momindex + 3) += std::sqrt(pSquared + mass * mass);
167  }
168  }
169  return ErrCode(ErrCode::Status::success);
170  }
171 
173  {
174  ErrCode status;
175  const int posindex = posIndex();
176  if (posindex >= 0) {
177  for (int i = 0; i < 3; ++i) {
178  fitparams.getCovariance()(posindex + i, posindex + i) = 1;
179  }
180  }
181 
182  const int momindex = momIndex();
183  if (momindex >= 0) {
184  const int maxrow = hasEnergy() ? 4 : 3;
185  for (int i = 0; i < maxrow; ++i) {
186  fitparams.getCovariance()(momindex + i, momindex + i) = .1;
187  }
188  }
189  for (ParticleBase* daughter : m_daughters) {
190  status |= daughter->initCovariance(fitparams);
191  }
192  return status;
193  }
194 
196  int depth) const
197  {
198  list.push_back(Constraint(this, Constraint::helix, depth, 5, 5));
199 
200  if (m_massconstraint) {
201  list.push_back(Constraint(this, Constraint::mass, depth, 1, 3));
202  }
203 
204  for (ParticleBase* daughter : m_daughters) {
205  daughter->addToConstraintList(list, depth - 1);
206  }
207  }
208 
210  const FitParams& fitparams,
211  Projection& p) const
212  {
213  ErrCode status;
214  switch (type) {
215  case Constraint::helix:
216  status |= projectHelixConstraint(fitparams, p);
217  break;
218  case Constraint::mass:
219  status |= projectMassConstraint(fitparams, p);
220  break;
221  default:
222  status |= ParticleBase::projectConstraint(type, fitparams, p);
223  }
224  return status;
225  }
226 
228  // cppcheck-suppress constParameter ; projection p is in fact set in this function
229  Projection& p) const
230  {
231  ErrCode status;
232  const int posIndexMother = mother()->posIndex();
233  const int momindex = momIndex();
234  const int posindex = posIndex();
235  Eigen::Matrix<double, 1, 6> positionAndMomentumIn = Eigen::Matrix<double, 1, 6>::Zero(1, 6);
236  Eigen::Matrix<double, 1, 6> positionAndMomentumOut = Eigen::Matrix<double, 1, 6>::Zero(1, 6);
237 
238  positionAndMomentumIn.segment(0, 3) = fitparams.getStateVector().segment(posIndexMother, 3);
239  positionAndMomentumIn.segment(3, 3) = fitparams.getStateVector().segment(momindex, 3);
240  positionAndMomentumOut.segment(0, 3) = fitparams.getStateVector().segment(posindex, 3);
241  for (ParticleBase* daughter : m_daughters) {
242  const int momIndexDaughter = daughter->momIndex();
243  positionAndMomentumOut.segment(3, 3) += fitparams.getStateVector().segment(momIndexDaughter, 3);
244  }
245 
246  TVector3 vertexPosition(positionAndMomentumIn(0), positionAndMomentumIn(1), positionAndMomentumIn(2));
247  TVector3 momentum(positionAndMomentumIn(3), positionAndMomentumIn(4), positionAndMomentumIn(5));
248 
249  TMatrixDSym carthesianCovariance(6);
250  for (size_t i = 0 ; i < 3; ++i) {
251  for (size_t j = 0; j < 3; ++j) {
252  carthesianCovariance(i , j) = fitparams.getCovariance()(posindex + i, posindex + j);
253  carthesianCovariance(i , j + 3) = fitparams.getCovariance()(posindex + i, momindex + j);
254  carthesianCovariance(i + 3, j) = fitparams.getCovariance()(momindex + i, posindex + j);
255  carthesianCovariance(i + 3, j + 3) = fitparams.getCovariance()(momindex + i, momindex + j);
256  }
257  }
258 
259  Belle2::UncertainHelix helixIn(
260  vertexPosition,
261  momentum,
262  charge(),
263  m_bfield,
264  carthesianCovariance,
265  1.
266  );
267  // Set up covariance matrix
268  Eigen::Matrix<double, 5, 5> covarianceMatrix = Eigen::Matrix<double, 5, 5>::Zero(5, 5);
269  TMatrixDSym covarianceMatrixROOT = helixIn.getCovariance();
270  for (int i = 0; i < 5; ++i) {
271  for (int j = 0; j < 5; ++j) {
272  covarianceMatrix(i, j) = covarianceMatrixROOT(i, j);
273  }
274  }
275 
276  Belle2::Helix helixOut = Belle2::Helix(
277  TVector3(positionAndMomentumOut(0), positionAndMomentumOut(1), positionAndMomentumOut(2)),
278  TVector3(positionAndMomentumOut(3), positionAndMomentumOut(4), positionAndMomentumOut(5)),
279  charge(),
280  m_bfield
281  );
282 
283  Eigen::Matrix<double, 5, 6> jacobian = Eigen::Matrix<double, 5, 6>::Zero(5, 6);
285  jacobian,
286  positionAndMomentumIn(0),
287  positionAndMomentumIn(1),
288  positionAndMomentumIn(2),
289  positionAndMomentumIn(3),
290  positionAndMomentumIn(4),
291  positionAndMomentumIn(5),
292  m_bfield,
293  charge()
294  );
295 
296  p.getResiduals().segment(0, 5)(0) = helixIn.getD0() - helixOut.getD0();
297  p.getResiduals().segment(0, 5)(1) = helixIn.getPhi0() - helixOut.getPhi0();
298  p.getResiduals().segment(0, 5)(2) = helixIn.getOmega() - helixOut.getOmega();
299  p.getResiduals().segment(0, 5)(3) = helixIn.getZ0() - helixOut.getZ0();
300  p.getResiduals().segment(0, 5)(4) = helixIn.getTanLambda() - helixOut.getTanLambda();
301 
302  //account for periodic boundary in phi residual
303  double phiResidual = p.getResiduals().segment(0, 5)(1);
304  phiResidual = std::fmod(phiResidual + pi, twoPi);
305  if (phiResidual < 0) {
306  phiResidual += twoPi;
307  }
308  phiResidual -= pi;
309  p.getResiduals().segment(0, 5)(1) = phiResidual;
310 
311  p.getV().triangularView<Eigen::Lower>() = covarianceMatrix.triangularView<Eigen::Lower>();
312  p.getH().block<5, 3>(0, posIndexMother) = -1.0 * jacobian.block<5, 3>(0, 0);
313  p.getH().block<5, 3>(0, momindex) = -1.0 * jacobian.block<5, 3>(0, 3);
314  return status;
315  }
316 
318  {
319  // does this particle have a position index (decayvertex)
320  // true in any case
321  return true;
322  }
323 
325  {
326  return !m_massconstraint && !m_noEnergySum;
327  }
328 
330  {
331  return index();
332  }
333 
335  {
336  return index() + 3;
337  }
338 
339  int InternalTrack::dim() const
340  {
341  return hasEnergy() ? 7 : 6;
342  }
343 
345  {
346  return -1;
347  }
348 
349  void InternalTrack::forceP4Sum(FitParams& fitparams) const
350  {
351  for (ParticleBase* daughter : m_daughters) {
352  daughter->forceP4Sum(fitparams);
353  }
354  const int posindex = posIndex();
355  Eigen::Matrix<double, 1, 6> positionAndMomentumOut = Eigen::Matrix<double, 1, 6>::Zero(1, 6);
356  positionAndMomentumOut.segment(0, 3) = fitparams.getStateVector().segment(posindex, 3);
357  double Energy = 0.;
358  for (ParticleBase* daughter : m_daughters) {
359  const int momIndexDaughter = daughter->momIndex();
360  positionAndMomentumOut.segment(3, 3) += fitparams.getStateVector().segment(momIndexDaughter, 3);
361  Energy += fitparams.getStateVector()(momIndexDaughter + 3);
362  }
363  Belle2::Helix helixOut = Belle2::Helix(
364  TVector3(positionAndMomentumOut(0), positionAndMomentumOut(1), positionAndMomentumOut(2)),
365  TVector3(positionAndMomentumOut(3), positionAndMomentumOut(4), positionAndMomentumOut(5)),
366  charge(),
367  m_bfield
368  );
369  const int posIndexMother = mother()->posIndex();
370  double x = fitparams.getStateVector()(posIndexMother);
371  double y = fitparams.getStateVector()(posIndexMother + 1);
372  double arcLength2D = helixOut.getArcLength2DAtXY(x, y);
373  TVector3 pAtProduction = helixOut.getMomentumAtArcLength2D(arcLength2D, m_bfield);
374 
375  const int momindex = momIndex();
376  fitparams.getStateVector()(momindex) = pAtProduction.X();
377  fitparams.getStateVector()(momindex + 1) = pAtProduction.Y();
378  fitparams.getStateVector()(momindex + 2) = pAtProduction.Z();
379  if (m_noEnergySum) {
380  double newEnergy = sqrt(pdgMass() * pdgMass() + pAtProduction.Mag2());
381  Energy = newEnergy;
382  }
383  fitparams.getStateVector()(momindex + 3) = Energy;
384  }
385 
386 };
TreeFitter::InternalTrack::initParticleWithMother
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle in case it has a mother
Definition: InternalTrack.cc:138
TreeFitter::HelixUtils::getJacobianToCartesianFrameworkHelix
static void getJacobianToCartesianFrameworkHelix(Eigen::Matrix< double, 5, 6 > &jacobian, const double x, const double y, const double z, const double px, const double py, const double pz, const double bfield, const double charge)
get the jacobian dh={helix pars}/dx={x,y,z,px,py,pz} for the implementation of the framework helix.
Definition: HelixUtils.cc:390
Belle2::Particle::getPDGCode
int getPDGCode(void) const
Returns PDG code.
Definition: Particle.h:380
TreeFitter::ParticleBase::projectConstraint
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const
project constraint.
Definition: ParticleBase.cc:537
TreeFitter::ParticleBase::projectMassConstraint
virtual ErrCode projectMassConstraint(const FitParams &, Projection &) const
project mass constraint abstract
Definition: ParticleBase.cc:526
Belle2::UncertainHelix
This class represents an ideal helix in perigee parameterization including the covariance matrix of t...
Definition: UncertainHelix.h:40
TreeFitter::InternalTrack::tauIndex
virtual int tauIndex() const override
tau index in fit params only if it has a mother
Definition: InternalTrack.cc:344
Belle2::BFieldManager::getField
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:110
Belle2::Particle::getVertex
TVector3 getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
Definition: Particle.h:529
TreeFitter::ConstraintConfiguration
constainer
Definition: ConstraintConfiguration.h:25
TreeFitter::InternalTrack::initMomentum
ErrCode initMomentum(FitParams &fitparams) const
init momentum of *this and daughters
Definition: InternalTrack.cc:152
TreeFitter::FitParams::getCovariance
Eigen::Matrix< double, -1, -1, 0, MAX_MATRIX_SIZE, MAX_MATRIX_SIZE > & getCovariance()
getter for the states covariance
Definition: FitParams.h:62
TreeFitter::ConstraintConfiguration::m_massConstraintListPDG
const std::vector< int > m_massConstraintListPDG
list of pdg codes to mass constrain
Definition: ConstraintConfiguration.h:86
TreeFitter::InternalTrack::type
virtual int type() const override
type
Definition: InternalTrack.h:69
TreeFitter::ErrCode
abstract errorocode be aware that the default is succes
Definition: ErrCode.h:23
TreeFitter::ParticleBase::pdgMass
double pdgMass() const
get pdg mass
Definition: ParticleBase.h:164
TreeFitter::ParticleBase
base class for all particles
Definition: ParticleBase.h:36
TreeFitter::FitParams
Class to store and manage fitparams (statevector)
Definition: FitParams.h:29
TreeFitter::InternalTrack::InternalTrack
InternalTrack(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration &config, bool forceFitAll, bool noEnergySum, bool forceMassConstraint)
constructor
Definition: InternalTrack.cc:27
TreeFitter::InternalTrack::initMotherlessParticle
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle in case it has no mother
Definition: InternalTrack.cc:61
TreeFitter::InternalTrack::dim
virtual int dim() const override
space reserved in fit params
Definition: InternalTrack.cc:339
TreeFitter::FitParams::getStateVector
Eigen::Matrix< double, -1, 1, 0, MAX_MATRIX_SIZE, 1 > & getStateVector()
getter for the fit parameters/statevector
Definition: FitParams.h:74
TreeFitter::InternalTrack::m_isconversion
bool m_isconversion
is conversion
Definition: InternalTrack.h:112
TreeFitter::ParticleBase::initTau
ErrCode initTau(FitParams &par) const
initialises tau as a length
Definition: ParticleBase.cc:553
TreeFitter::RecoTrack
reprasentation of all charged final states FIXME rename since this name is taken in tracking
Definition: RecoTrack.h:27
TreeFitter::InternalTrack::addToConstraintList
virtual void addToConstraintList(constraintlist &list, int depth) const override
add to constraint list
Definition: InternalTrack.cc:195
Belle2::Unit::T
static const double T
[tesla]
Definition: Unit.h:130
TreeFitter::Constraint::Type
Type
type of constraints the order of these constraints is important: it is the order in which they are ap...
Definition: Constraint.h:36
TreeFitter::ParticleBase::index
int index() const
get index
Definition: ParticleBase.h:112
Belle2::Particle::getDaughters
std::vector< Belle2::Particle * > getDaughters() const
Returns a vector of pointers to daughter particles.
Definition: Particle.cc:601
TreeFitter::HelixUtils::helixPoca
static double helixPoca(const Belle2::Helix &helix1, const Belle2::Helix &helix2, double &flt1, double &flt2, TVector3 &vertex, bool parallel=false)
POCA between two tracks.
Definition: HelixUtils.cc:238
Belle2::Track::getTrackFitResultWithClosestMass
const TrackFitResult * getTrackFitResultWithClosestMass(const Const::ChargedStable &requestedType) const
Return the track fit for a fit hypothesis with the closest mass.
Definition: Track.cc:70
TreeFitter::InternalTrack::momIndex
virtual int momIndex() const override
momentum index in fit params depending on whether it has a mother
Definition: InternalTrack.cc:334
TreeFitter::Constraint
class to manage the order of contraints and their filtering
Definition: Constraint.h:29
TreeFitter::ParticleBase::charge
int charge() const
get charge
Definition: ParticleBase.h:176
TreeFitter::ConstraintConfiguration::m_originDimension
const int m_originDimension
dimension of the origin constraint and ALL geometric gcosntraints
Definition: ConstraintConfiguration.h:113
TreeFitter::InternalTrack::hasPosition
virtual bool hasPosition() const override
has position index
Definition: InternalTrack.cc:317
Belle2::UncertainHelix::getCovariance
const TMatrixDSym & getCovariance() const
Getter for covariance matrix of perigee parameters in matrix form.
Definition: UncertainHelix.h:104
TreeFitter::ParticleBase::posIndex
virtual int posIndex() const
get vertex index (in statevector!)
Definition: ParticleBase.h:142
TreeFitter::InternalTrack::projectHelixConstraint
ErrCode projectHelixConstraint(const FitParams &, Projection &) const
project helix constraint
Definition: InternalTrack.cc:227
TreeFitter::ParticleBase::constraintlist
std::vector< Constraint > constraintlist
alias
Definition: ParticleBase.h:69
TreeFitter::InternalTrack::m_noEnergySum
bool m_noEnergySum
Energy is not conserved at the decay (happens in Bremsstrahlung)
Definition: InternalTrack.h:109
Belle2::Particle::getMomentum
TVector3 getMomentum() const
Returns momentum vector.
Definition: Particle.h:475
Belle2::CDC::Helix
Helix parameter class.
Definition: Helix.h:51
TreeFitter::InternalTrack::compTrkTransverseMomentum
static bool compTrkTransverseMomentum(const RecoTrack *lhs, const RecoTrack *rhs)
compare transverse track momentum
Definition: InternalTrack.cc:56
TreeFitter::RecoTrack::setFlightLength
void setFlightLength(double flt)
setter for the flight length
Definition: RecoTrack.h:81
TreeFitter::InternalTrack::m_massconstraint
bool m_massconstraint
has mass cosntraint
Definition: InternalTrack.h:106
Belle2::Particle::getTrack
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
Definition: Particle.cc:770
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
TreeFitter::ParticleBase::m_particle
Belle2::Particle * m_particle
pointer to framework type
Definition: ParticleBase.h:225
TreeFitter::ParticleBase::mother
const ParticleBase * mother() const
getMother() / hasMother()
Definition: ParticleBase.cc:295
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
TreeFitter::InternalTrack::projectConstraint
ErrCode projectConstraint(const Constraint::Type type, const FitParams &fitparams, Projection &p) const override
find out which constraint it is and project
Definition: InternalTrack.cc:209
TreeFitter::ParticleBase::collectVertexDaughters
void collectVertexDaughters(std::vector< ParticleBase * > &particles, int posindex)
get vertex daughters
Definition: ParticleBase.cc:257
TreeFitter::InternalTrack::hasEnergy
virtual bool hasEnergy() const override
has energy in fitparams
Definition: InternalTrack.cc:324
Belle2::TrackFitResult::getHelix
Helix getHelix() const
Conversion to framework Helix (without covariance).
Definition: TrackFitResult.h:230
TreeFitter::ParticleBase::m_config
const ConstraintConfiguration * m_config
has all the constraint config
Definition: ParticleBase.h:237
TreeFitter::InternalTrack::posIndex
virtual int posIndex() const override
position index in fit params
Definition: InternalTrack.cc:329
TreeFitter::ParticleBase::particle
Belle2::Particle * particle() const
get basf2 particle
Definition: ParticleBase.h:109
TreeFitter::InternalTrack::forceP4Sum
void forceP4Sum(FitParams &fitparams) const override
Forces the four-momentum sum.
Definition: InternalTrack.cc:349
TreeFitter::Projection
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:27
TreeFitter::InternalTrack::m_bfield
double m_bfield
B field value.
Definition: InternalTrack.h:115
TreeFitter::ParticleBase::m_daughters
std::vector< ParticleBase * > m_daughters
daughter container
Definition: ParticleBase.h:231
TreeFitter::InternalTrack::initCovariance
virtual ErrCode initCovariance(FitParams &) const override
init covariance
Definition: InternalTrack.cc:172
TreeFitter::ParticleBase::addDaughter
virtual ParticleBase * addDaughter(Belle2::Particle *, const ConstraintConfiguration &config, bool forceFitAll=false)
add daughter
Definition: ParticleBase.cc:119