Belle II Software development
RecoTrack.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/RecoParticle.h>
12
13#include <analysis/dataobjects/Particle.h>
14
15namespace TreeFitter {
16
18 class RecoTrack : public RecoParticle {
19
20 public:
23
25 virtual ~RecoTrack() {};
26
28 virtual ErrCode initParticleWithMother(FitParams& fitparams) override;
29
31 virtual ErrCode initMotherlessParticle(FitParams& fitparams) override;
32
34 ErrCode initCovariance(FitParams& fitparams) const override;
35
38
40 virtual ErrCode projectRecoConstraint(const FitParams&, Projection&) const override;
41
43 ErrCode updateParams(double flt);
44
46 virtual int dimM() const override { return 5 ; }
47
49 virtual int type() const override { return kRecoTrack ; }
50
52 virtual int nFinalChargedCandidates() const override { return 1 ; }
53
55 virtual void addToConstraintList(constraintlist& alist, int depth) const override
56 {
57 alist.push_back(Constraint(this, Constraint::track, depth, dimM(), 1)) ;
58 }
59
61 ErrCode updFltToMother(const FitParams& fitparams) ;
62
64 void setFlightLength(double flt) { m_flt = flt ; }
65
66 private:
67
69 double m_bfield; //Bfield along Z
70
73
75 bool m_cached ;
76
78 double m_flt ;
79
81 Eigen::Matrix<double, 1, 5> m_params;
82
84 Eigen::Matrix<double, 5, 5>m_covariance;
85
88 };
89}
Class to store reconstructed particles.
Definition: Particle.h:75
Values of the result of a track fit with a given particle hypothesis.
class to manage the order of constraints and their filtering
Definition: Constraint.h:20
abstract errorocode be aware that the default is success
Definition: ErrCode.h:14
Class to store and manage fitparams (statevector)
Definition: FitParams.h:20
base class for all particles
Definition: ParticleBase.h:25
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
base for RecoPhoton RecoTrack
Definition: RecoParticle.h:16
representation of all charged final states FIXME rename since this name is taken in tracking
Definition: RecoTrack.h:18
virtual int nFinalChargedCandidates() const override
number of final charged candidates
Definition: RecoTrack.h:52
virtual ~RecoTrack()
destructor
Definition: RecoTrack.h:25
ErrCode initCovariance(FitParams &fitparams) const override
init covariance matrix of this particle constraint
Definition: RecoTrack.cc:56
const Belle2::TrackFitResult * m_trackfit
trackfit result from reconstruction
Definition: RecoTrack.h:72
Eigen::Matrix< double, 1, 5 > m_params
column vector to store the measurement
Definition: RecoTrack.h:81
const float m_momentumScalingFactor
scale the momenta by this correction factor
Definition: RecoTrack.h:87
virtual int type() const override
type of the constraint
Definition: RecoTrack.h:49
virtual void addToConstraintList(constraintlist &alist, int depth) const override
add to the list of constraints
Definition: RecoTrack.h:55
virtual int dimM() const override
dimension (5)
Definition: RecoTrack.h:46
virtual ErrCode projectRecoConstraint(const FitParams &, Projection &) const override
project the constraint (calculate residuals)
Definition: RecoTrack.cc:98
ErrCode updateParams(double flt)
updated the cached parameters
Definition: RecoTrack.cc:79
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init with mother particle (replacing initPar2)
Definition: RecoTrack.cc:37
double m_bfield
B field along z
Definition: RecoTrack.h:69
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init without mother particle
Definition: RecoTrack.cc:51
ErrCode updFltToMother(const FitParams &fitparams)
update flight length to mother
Definition: RecoTrack.cc:70
double m_flt
helix arc length at vertex
Definition: RecoTrack.h:78
void setFlightLength(double flt)
setter for the flight length
Definition: RecoTrack.h:64
Eigen::Matrix< double, 5, 5 > m_covariance
only lower triangle filled!
Definition: RecoTrack.h:84
ErrCode updFltToMotherCopy(const FitParams *fitparams)
update m_flt
bool m_cached
flag to mark the particle as initialised
Definition: RecoTrack.h:75