Belle II Software  release-05-01-25
BKLMTrack.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Yinghui GUAN *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 /* Belle 2 headers. */
14 #include <framework/datastore/RelationsObject.h>
15 
16 /* ROOT headers. */
17 #include <TVectorD.h>
18 #include <TVector3.h>
19 #include <TMatrixDSym.h>
20 
21 /* CLHEP headers. */
22 #include <CLHEP/Matrix/Vector.h>
23 #include <CLHEP/Matrix/SymMatrix.h>
24 
25 namespace CLHEP {
26  class HepVector;
27  class HepSymMatrix;
28 }
29 
30 namespace Belle2 {
36  class BKLMTrack : public RelationsObject {
38 
39  public:
40 
42  BKLMTrack();
43 
45  explicit BKLMTrack(const BKLMTrack&);
46 
48  BKLMTrack& operator=(const BKLMTrack&);
49 
51  virtual ~BKLMTrack()
52  {
53  }
54 
56  TVectorD getTrackParam();
57 
59  TMatrixDSym getTrackParamErr();
60 
62  TVectorD getLocalTrackParam();
63 
65  TMatrixDSym getLocalTrackParamErr();
66 
68  TVector3 getLocalIntercept(double x);
69 
71  TMatrixD getLocalInterceptVariance(double x);
72 
74  float getTrackChi2()
75  {
76  return m_Chi2;
77  }
78 
81  {
82  return m_NumHit;
83  }
84 
86  bool isValid()
87  {
88  return m_Valid;
89  }
90 
92  bool isGood()
93  {
94  return m_Good;
95  }
96 
98  void setTrackParam(const CLHEP::HepVector& trkPar);
99 
101  void setTrackParamErr(const CLHEP::HepSymMatrix& trkParErr);
102 
104  void setLocalTrackParam(const CLHEP::HepVector& trkPar);
105 
107  void setLocalTrackParamErr(const CLHEP::HepSymMatrix& trkParErr);
108 
110  void setTrackChi2(const float chi2)
111  {
112  m_Chi2 = chi2;
113  }
114 
116  void setNumHitOnTrack(const int NumHit)
117  {
118  m_NumHit = NumHit;
119  }
120 
122  void setIsValid(const bool valid)
123  {
124  m_Valid = valid;
125  }
126 
128  void setIsGood(const bool good)
129  {
130  m_Good = good;
131  }
132 
133  private:
134 
136  bool m_Valid;
137 
139  bool m_Good;
140 
142  float m_Chi2;
143 
145  int m_NumHit;
146 
148  float m_TrackParam[4];
149 
151  float m_TrackParamErr[4][4];
152 
155 
157  float m_LocalTrackParamErr[4][4];
158 
160  ClassDef(BKLMTrack, 1)
161 
162  };
163 
165 } // end of namespace Belle2
Belle2::BKLMTrack::setIsValid
void setIsValid(const bool valid)
set the fit valid status
Definition: BKLMTrack.h:122
Belle2::BKLMTrack::m_TrackParam
float m_TrackParam[4]
track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x
Definition: BKLMTrack.h:148
Belle2::BKLMTrack::m_TrackParamErr
float m_TrackParamErr[4][4]
track parameters variance in the global system.
Definition: BKLMTrack.h:151
Belle2::BKLMTrack::setIsGood
void setIsGood(const bool good)
set the fit good status
Definition: BKLMTrack.h:128
Belle2::BKLMTrack::m_Valid
bool m_Valid
Is fit valid.
Definition: BKLMTrack.h:136
Belle2::BKLMTrack::getTrackChi2
float getTrackChi2()
Get the fitted chi2 of the track.
Definition: BKLMTrack.h:74
Belle2::BKLMTrack::m_Chi2
float m_Chi2
fitted chi2 of the track
Definition: BKLMTrack.h:142
Belle2::BKLMTrack::~BKLMTrack
virtual ~BKLMTrack()
Destructor.
Definition: BKLMTrack.h:51
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::BKLMTrack::setTrackParam
void setTrackParam(const CLHEP::HepVector &trkPar)
Set track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x.
Definition: BKLMTrack.cc:122
Belle2::BKLMTrack::isValid
bool isValid()
Is fit valid.
Definition: BKLMTrack.h:86
Belle2::BKLMTrack::m_Good
bool m_Good
Is fit good.
Definition: BKLMTrack.h:139
Belle2::BKLMTrack::getLocalInterceptVariance
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:176
Belle2::BKLMTrack::m_NumHit
int m_NumHit
the number of 2d hits on the track
Definition: BKLMTrack.h:145
Belle2::BKLMTrack::operator=
BKLMTrack & operator=(const BKLMTrack &)
Assignment operator.
Definition: BKLMTrack.cc:54
Belle2::BKLMTrack::setLocalTrackParamErr
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:152
Belle2::BKLMTrack::getTrackParam
TVectorD getTrackParam()
Get track parameters in the global system. y = p0 + p1 * x; z = p2 + p3 * x.
Definition: BKLMTrack.cc:73
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BKLMTrack::setNumHitOnTrack
void setNumHitOnTrack(const int NumHit)
Set the number of 2d hits on the track.
Definition: BKLMTrack.h:116
Belle2::BKLMTrack::getNumHitOnTrack
int getNumHitOnTrack()
Get the number of 2d hits on the track.
Definition: BKLMTrack.h:80
Belle2::BKLMTrack::m_LocalTrackParam
float m_LocalTrackParam[4]
track parameters in the sector local system.
Definition: BKLMTrack.h:154
Belle2::BKLMTrack
Store one BKLM Track as a ROOT object.
Definition: BKLMTrack.h:37
Belle2::BKLMTrack::m_LocalTrackParamErr
float m_LocalTrackParamErr[4][4]
track parameters variance in the sector local system.
Definition: BKLMTrack.h:157
Belle2::BKLMTrack::getTrackParamErr
TMatrixDSym getTrackParamErr()
Get invariance matrix of track parameters in the global system.
Definition: BKLMTrack.cc:98
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::BKLMTrack::getLocalTrackParam
TVectorD getLocalTrackParam()
Get track parameters in the sector locan system, where the first layer of the sector is used as refer...
Definition: BKLMTrack.cc:86
Belle2::BKLMTrack::setTrackChi2
void setTrackChi2(const float chi2)
Set the fitted chi2 of the track.
Definition: BKLMTrack.h:110
Belle2::BKLMTrack::isGood
bool isGood()
Is fit good.
Definition: BKLMTrack.h:92
Belle2::BKLMTrack::getLocalTrackParamErr
TMatrixDSym getLocalTrackParamErr()
Get invariance matrix of track parameters in the sector local system, where the first layer of the se...
Definition: BKLMTrack.cc:110
Belle2::BKLMTrack::getLocalIntercept
TVector3 getLocalIntercept(double x)
Get the positon in local coordinate system of track intercept in plane of constant x.
Definition: BKLMTrack.cc:162
Belle2::BKLMTrack::setTrackParamErr
void setTrackParamErr(const CLHEP::HepSymMatrix &trkParErr)
Set invariance matrix of track parameters in the global system.
Definition: BKLMTrack.cc:132
Belle2::BKLMTrack::BKLMTrack
BKLMTrack()
Empty constructor for ROOT IO (needed to make the class storable)
Definition: BKLMTrack.cc:17
Belle2::BKLMTrack::setLocalTrackParam
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:142