Belle II Software development
KLMTrack.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/dataobjects/KLMElementNumbers.h>
13
14/* Basf2 headers. */
15#include <framework/datastore/RelationsObject.h>
16
17/* ROOT headers. */
18#include <TVectorD.h>
19#include <Math/Vector3D.h>
20#include <TMatrixDSym.h>
21
22/* CLHEP headers. */
23#include <CLHEP/Matrix/Vector.h>
24#include <CLHEP/Matrix/SymMatrix.h>
25
26namespace CLHEP {
27 class HepVector;
28 class HepSymMatrix;
29}
30
31namespace Belle2 {
38 class KLMTrack : public RelationsObject {
39
40 public:
41
43 KLMTrack();
44
46 explicit KLMTrack(const KLMTrack&);
47
50
53 {
54 }
55
57 TVectorD getTrackParam();
58
60 TMatrixDSym getTrackParamErr();
61
64 {
65 return m_Chi2;
66 }
67
70 {
71 return m_NumHit;
72 }
73
75 bool isValid()
76 {
77 return m_Valid;
78 }
79
81 bool isGood()
82 {
83 return m_Good;
84 }
85
87 void setTrackParam(const CLHEP::HepVector& trkPar);
88
90 void setTrackParamErr(const CLHEP::HepSymMatrix& trkParErr);
91
93 void setTrackChi2(const float chi2)
94 {
95 m_Chi2 = chi2;
96 }
97
99 void setNumHitOnTrack(const int NumHit)
100 {
101 m_NumHit = NumHit;
102 }
103
105 void setInSubdetector(int nBKLM, int nEKLM)
106 {
107 m_inBKLM = (nBKLM > 0) ? true : false;
108 m_inEKLM = (nEKLM > 0) ? true : false;
109 }
110
112 void setIsValid(const bool valid)
113 {
114 m_Valid = valid;
115 }
116
118 void setIsGood(const bool good)
119 {
120 m_Good = good;
121 }
122
124 bool inBKLM() const
125 {
126 return (m_inBKLM);
127 }
128
130 bool inEKLM() const
131 {
132 return (m_inEKLM);
133 }
134
135
136
137
138 private:
139
142
144 bool m_Good;
145
147 float m_Chi2;
148
151
153 float m_TrackParam[4];
154
156 float m_TrackParamErr[4][4];
157
160
163
166
167 };
168
170} // end of namespace Belle2
Store one KLM Track as a ROOT object.
Definition: KLMTrack.h:38
float getTrackChi2()
Get the fitted chi2 of the track.
Definition: KLMTrack.h:63
float m_Chi2
fitted chi2 of the track
Definition: KLMTrack.h:147
bool isGood()
Is fit good.
Definition: KLMTrack.h:81
void setIsValid(const bool valid)
set the fit valid status
Definition: KLMTrack.h:112
void setTrackChi2(const float chi2)
Set the fitted chi2 of the track.
Definition: KLMTrack.h:93
int getNumHitOnTrack()
Get the number of 2d hits on the track.
Definition: KLMTrack.h:69
bool m_inBKLM
in BKLM Flag
Definition: KLMTrack.h:159
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
~KLMTrack()
Destructor.
Definition: KLMTrack.h:52
void setNumHitOnTrack(const int NumHit)
Set the number of 2d hits on the track.
Definition: KLMTrack.h:99
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 inBKLM() const
does track have hits in BKLM
Definition: KLMTrack.h:124
void setIsGood(const bool good)
set the fit good status
Definition: KLMTrack.h:118
bool m_Valid
Is fit valid.
Definition: KLMTrack.h:141
void setInSubdetector(int nBKLM, int nEKLM)
setting whether track passes through E/B-KLM
Definition: KLMTrack.h:105
bool inEKLM() const
does track have hits in EKLM
Definition: KLMTrack.h:130
bool m_inEKLM
in EKLM Flag
Definition: KLMTrack.h:162
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
bool isValid()
Is fit valid.
Definition: KLMTrack.h:75
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.