Belle II Software development
BKLMTrackFitter.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* KLM headers. */
12#include <klm/bklm/geometry/GeometryPar.h>
13#include <klm/dataobjects/KLMHit2d.h>
14
15/* CLHEP headers. */
16#include <CLHEP/Matrix/SymMatrix.h>
17#include <CLHEP/Matrix/Vector.h>
18
19/* C++ headers. */
20#include <list>
21
22namespace Belle2 {
30
31 public:
32
35
38
40 double fit(std::list<KLMHit2d*>& listTrackPoint);
41
43 double distanceToHit(KLMHit2d* hit,
44 double& error,
45 double& sigma);
46
48 double globalDistanceToHit(KLMHit2d* hit,
49 double& error,
50 double& sigma);
51
53 double fit1dSectorTrack(std::list< KLMHit2d* > hitList,
54 CLHEP::HepVector& eta,
55 CLHEP::HepSymMatrix& error,
56 int depDir, int indDir);
57
59 double fit1dTrack(std::list< KLMHit2d* > hitList,
60 CLHEP::HepVector& eta,
61 CLHEP::HepSymMatrix& error,
62 int depDir, int indDir);
63
65 CLHEP::HepVector getTrackParam()
66 {
67 return m_GlobalPar;
68 }
69
71 CLHEP::HepSymMatrix getTrackParamErr()
72 {
73 return m_GlobalErr;
74 }
75
77 CLHEP::HepVector getTrackParamSector()
78 {
79 return m_SectorPar;
80 }
81
83 CLHEP::HepSymMatrix getTrackParamSectorErr()
84 {
85 return m_SectorErr;
86 }
87
89 bool isValid()
90 {
91 return m_Valid;
92 }
93
95 bool isGood()
96 {
97 return m_Good;
98 }
99
101 float getChi2()
102 {
103 return m_Chi2;
104 }
105
108 {
109 return m_NumHit;
110 }
111
114 {
115 m_Valid = false;
116 }
117
119 void setGlobalFit(bool localOrGlobal)
120 {
121 m_globalFit = localOrGlobal;
122 }
123
124 private:
125
128
130 bool m_Good;
131
133 float m_Chi2;
134
137
140
142 CLHEP::HepVector m_SectorPar;
143
145 CLHEP::HepSymMatrix m_SectorErr;
146
148 CLHEP::HepVector m_GlobalPar;
149
151 CLHEP::HepSymMatrix m_GlobalErr;
152
155
156 };
158} // end of namespace Belle2
track fitting procedure
double fit(std::list< KLMHit2d * > &listTrackPoint)
do fit and returns chi square of the fit.
float m_Chi2
Chi square of fit.
CLHEP::HepVector getTrackParamSector()
Get track parameters in the sector locan system, y = p0 + p1 * x, z = p2 + p3 *x, where the first lay...
float getChi2()
Chi square of the fit.
bool isGood()
Is fit good.
double fit1dTrack(std::list< KLMHit2d * > hitList, CLHEP::HepVector &eta, CLHEP::HepSymMatrix &error, int depDir, int indDir)
do fit in the global system
int m_NumHit
the number of hits on this track
double globalDistanceToHit(KLMHit2d *hit, double &error, double &sigma)
Distance from track to a hit in the global system.
BKLMTrackFitter()
Default constructor.
CLHEP::HepSymMatrix getTrackParamSectorErr()
Get invariance matrix of track parameters in the sector local system, where the first layer of the se...
double distanceToHit(KLMHit2d *hit, double &error, double &sigma)
Distance from track to a hit in the plane of the module.
CLHEP::HepSymMatrix m_GlobalErr
track params errors in global system
int getNumHit()
number of the hits on this track
void setGlobalFit(bool localOrGlobal)
set the fitting mode, local system or global system
CLHEP::HepSymMatrix getTrackParamErr()
Get invariance matrix of track parameters in the global system.
CLHEP::HepVector m_GlobalPar
track params in global system
bklm::GeometryPar * m_GeoPar
pointer to GeometryPar singleton
double fit1dSectorTrack(std::list< KLMHit2d * > hitList, CLHEP::HepVector &eta, CLHEP::HepSymMatrix &error, int depDir, int indDir)
do fit in the y-x plane or z-x plane
CLHEP::HepVector m_SectorPar
track params in the sector local system
CLHEP::HepSymMatrix m_SectorErr
track params errors in the sector local system
CLHEP::HepVector getTrackParam()
Get track parameters in the global system. y = p0 + p1 * x; y = p2 + p3 * z, if in local sector fit m...
bool m_Valid
Is fit valid.
bool m_globalFit
do fit in the local system or global system false: local sys; true: global sys.
void inValidate()
Invalidate track.
bool m_Good
Is fit good.
bool isValid()
Is fit valid.
KLM 2d hit.
Definition: KLMHit2d.h:33
Provides BKLM geometry parameters for simulation, reconstruction etc (from Gearbox or DataBase)
Definition: GeometryPar.h:37
Abstract base class for different kinds of events.