Belle II Software development
KLMTrack.cc
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/* Own header. */
10#include "klm/dataobjects/KLMTrack.h"
11
12
13using namespace Belle2;
14
18 m_Valid(false),
19 m_Good(false),
20 m_Chi2(0.0),
21 m_NumHit(0)
22{
23 for (int ii = 0 ; ii < 4; ii ++) {
24 m_TrackParam[0] = 0.0;
25 for (int jj = 0 ; jj < 4; jj ++) {
26 m_TrackParamErr[ii][jj] = 0.0;
27 }
28 }
29}
30
33 RelationsObject(track),
34 m_Valid(track.m_Valid),
35 m_Good(track.m_Good),
36 m_Chi2(track.m_Chi2),
37 m_NumHit(track.m_NumHit)
38{
39
40 for (int ii = 0 ; ii < 4; ii ++) {
41 m_TrackParam[ii] = track.m_TrackParam[ii];
42 for (int jj = 0 ; jj < 4; jj ++) {
43 m_TrackParamErr[ii][jj] = track.m_TrackParamErr[ii][jj];
44 }
45 }
46}
47
50{
51 m_Valid = track.m_Valid;
52 m_Good = track.m_Good;
53 m_Chi2 = track.m_Chi2;
54 m_NumHit = track.m_NumHit;
55
56 for (int ii = 0 ; ii < 4; ii ++) {
57 m_TrackParam[ii] = track.m_TrackParam[ii];
58 for (int jj = 0 ; jj < 4; jj ++) {
59 m_TrackParamErr[ii][jj] = track.m_TrackParamErr[ii][jj];
60 }
61 }
62 return *this;
63}
64
67{
68 TVectorD trackParam(4);
69 trackParam[0] = m_TrackParam[0];
70 trackParam[1] = m_TrackParam[1];
71 trackParam[2] = m_TrackParam[2];
72 trackParam[3] = m_TrackParam[3];
73
74 return trackParam;
75}
76
77
80{
81 TMatrixDSym trkParamErr(4);
82 for (int ii = 0 ; ii < 4; ii ++) {
83 for (int jj = 0 ; jj < 4; jj ++) {
84 trkParamErr[ii][jj] = m_TrackParamErr[ii][jj];
85 }
86 }
87 return trkParamErr;
88}
89
90
92void KLMTrack::setTrackParam(const CLHEP::HepVector& trkPar)
93{
94 m_TrackParam[0] = trkPar[0];
95 m_TrackParam[1] = trkPar[1];
96 m_TrackParam[2] = trkPar[2];
97 m_TrackParam[3] = trkPar[3];
98
99}
100
102void KLMTrack::setTrackParamErr(const CLHEP::HepSymMatrix& trkParErr)
103{
104 for (int ii = 0 ; ii < 4; ii ++) {
105 for (int jj = 0 ; jj < 4; jj ++) {
106 m_TrackParamErr[ii][jj] = trkParErr[ii][jj];
107 }
108 }
109}
110
111
Store one KLM Track as a ROOT object.
Definition: KLMTrack.h:38
float m_Chi2
fitted chi2 of the track
Definition: KLMTrack.h:147
int m_NumHit
the number of 2d hits on the track
Definition: KLMTrack.h:150
void setTrackParamErr(const CLHEP::HepSymMatrix &trkParErr)
Set invariance matrix of track parameters in the global system.
Definition: KLMTrack.cc:102
TMatrixDSym getTrackParamErr()
Get invariance matrix of track parameters in the global system.
Definition: KLMTrack.cc:79
float m_TrackParam[4]
track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x
Definition: KLMTrack.h:153
TVectorD getTrackParam()
Get track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x.
Definition: KLMTrack.cc:66
bool m_Valid
Is fit valid.
Definition: KLMTrack.h:141
KLMTrack & operator=(const KLMTrack &)
Assignment operator.
Definition: KLMTrack.cc:49
bool m_Good
Is fit good.
Definition: KLMTrack.h:144
float m_TrackParamErr[4][4]
track parameters variance in the global system.
Definition: KLMTrack.h:156
void setTrackParam(const CLHEP::HepVector &trkPar)
Set track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x.
Definition: KLMTrack.cc:92
KLMTrack()
Empty constructor for ROOT IO (needed to make the class storable)
Definition: KLMTrack.cc:16
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.