Belle II Software development
BKLMTrack.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/* Basf2 headers. */
12#include <framework/datastore/RelationsObject.h>
13
14/* ROOT headers. */
15#include <TVectorD.h>
16#include <Math/Vector3D.h>
17#include <TMatrixDSym.h>
18
19/* CLHEP headers. */
20#include <CLHEP/Matrix/Vector.h>
21#include <CLHEP/Matrix/SymMatrix.h>
22
23namespace CLHEP {
24 class HepVector;
25 class HepSymMatrix;
26}
27
28namespace Belle2 {
35 class BKLMTrack : public RelationsObject {
36
37 public:
38
40 BKLMTrack();
41
43 explicit BKLMTrack(const BKLMTrack&);
44
47
50 {
51 }
52
54 TVectorD getTrackParam();
55
57 TMatrixDSym getTrackParamErr();
58
60 TVectorD getLocalTrackParam();
61
63 TMatrixDSym getLocalTrackParamErr();
64
66 ROOT::Math::XYZVector getLocalIntercept(double x);
67
69 TMatrixD getLocalInterceptVariance(double x);
70
73 {
74 return m_Chi2;
75 }
76
79 {
80 return m_NumHit;
81 }
82
84 bool isValid()
85 {
86 return m_Valid;
87 }
88
90 bool isGood()
91 {
92 return m_Good;
93 }
94
96 void setTrackParam(const CLHEP::HepVector& trkPar);
97
99 void setTrackParamErr(const CLHEP::HepSymMatrix& trkParErr);
100
102 void setLocalTrackParam(const CLHEP::HepVector& trkPar);
103
105 void setLocalTrackParamErr(const CLHEP::HepSymMatrix& trkParErr);
106
108 void setTrackChi2(const float chi2)
109 {
110 m_Chi2 = chi2;
111 }
112
114 void setNumHitOnTrack(const int NumHit)
115 {
116 m_NumHit = NumHit;
117 }
118
120 void setIsValid(const bool valid)
121 {
122 m_Valid = valid;
123 }
124
126 void setIsGood(const bool good)
127 {
128 m_Good = good;
129 }
130
131 private:
132
135
137 bool m_Good;
138
140 float m_Chi2;
141
144
146 float m_TrackParam[4];
147
149 float m_TrackParamErr[4][4];
150
153
156
159
160 };
161
163} // end of namespace Belle2
Store one BKLM Track as a ROOT object.
Definition: BKLMTrack.h:35
float getTrackChi2()
Get the fitted chi2 of the track.
Definition: BKLMTrack.h:72
float m_Chi2
fitted chi2 of the track
Definition: BKLMTrack.h:140
BKLMTrack & operator=(const BKLMTrack &)
Assignment operator.
Definition: BKLMTrack.cc:52
bool isGood()
Is fit good.
Definition: BKLMTrack.h:90
void setIsValid(const bool valid)
set the fit valid status
Definition: BKLMTrack.h:120
void setTrackChi2(const float chi2)
Set the fitted chi2 of the track.
Definition: BKLMTrack.h:108
int getNumHitOnTrack()
Get the number of 2d hits on the track.
Definition: BKLMTrack.h:78
int m_NumHit
the number of 2d hits on the track
Definition: BKLMTrack.h:143
void setLocalTrackParam(const CLHEP::HepVector &trkPar)
Set track parameters in the sector local system, where the first layer of the sector is used as refer...
Definition: BKLMTrack.cc:140
void setTrackParamErr(const CLHEP::HepSymMatrix &trkParErr)
Set invariance matrix of track parameters in the global system.
Definition: BKLMTrack.cc:130
void setNumHitOnTrack(const int NumHit)
Set the number of 2d hits on the track.
Definition: BKLMTrack.h:114
TMatrixDSym getTrackParamErr()
Get invariance matrix of track parameters in the global system.
Definition: BKLMTrack.cc:96
float m_TrackParam[4]
track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x
Definition: BKLMTrack.h:146
TMatrixD getLocalInterceptVariance(double x)
Get the variance matrix of (y,z) coordinates of the track intercept in plane of constant x in sector ...
Definition: BKLMTrack.cc:174
TVectorD getTrackParam()
Get track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x.
Definition: BKLMTrack.cc:71
~BKLMTrack()
Destructor.
Definition: BKLMTrack.h:49
ROOT::Math::XYZVector getLocalIntercept(double x)
Get the position in local coordinate system of track intercept in plane of constant x.
Definition: BKLMTrack.cc:160
BKLMTrack()
Empty constructor for ROOT IO (needed to make the class storable)
Definition: BKLMTrack.cc:15
void setIsGood(const bool good)
set the fit good status
Definition: BKLMTrack.h:126
bool m_Valid
Is fit valid.
Definition: BKLMTrack.h:134
bool m_Good
Is fit good.
Definition: BKLMTrack.h:137
void setLocalTrackParamErr(const CLHEP::HepSymMatrix &trkParErr)
Set invariance matrix of track parameters in the sector local system, where the first layer of the se...
Definition: BKLMTrack.cc:150
float m_TrackParamErr[4][4]
track parameters variance in the global system.
Definition: BKLMTrack.h:149
float m_LocalTrackParamErr[4][4]
track parameters variance in the sector local system.
Definition: BKLMTrack.h:155
float m_LocalTrackParam[4]
track parameters in the sector local system.
Definition: BKLMTrack.h:152
void setTrackParam(const CLHEP::HepVector &trkPar)
Set track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x.
Definition: BKLMTrack.cc:120
TMatrixDSym getLocalTrackParamErr()
Get invariance matrix of track parameters in the sector local system, where the first layer of the se...
Definition: BKLMTrack.cc:108
TVectorD getLocalTrackParam()
Get track parameters in the sector locan system, where the first layer of the sector is used as refer...
Definition: BKLMTrack.cc:84
bool isValid()
Is fit valid.
Definition: BKLMTrack.h:84
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.