BmnRoot
26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmKFTrackInterface.h
Go to the documentation of this file.
1
2
/** Abstract base class for track is being used by the CbmKF Kalman Filter
3
*
4
* @author S.Gorbunov
5
* @version 0.0
6
* @since 02.12.05
7
*
8
* The class members describes to the CbmKF Kalman Filter routines
9
* how to get acces to data in a derived (or user) class.
10
*
11
* To be used by high-level utilites like StsTrackFitter
12
*
13
* IMPORTANT : you should keep your hits sorted downstream
14
*
15
* See how-to-use-it below.
16
*/
17
#ifndef CBMKFTRACKINTERFACE_H
18
#define CBMKFTRACKINTERFACE_H
19
20
#include "
TObject.h
"
21
22
class
CbmKFHit
;
23
class
CbmKFVertexInterface
;
24
25
class
CbmKFTrackInterface
26
{
27
28
public
:
29
CbmKFTrackInterface
()
30
:
fId
()
31
{}
32
virtual
~CbmKFTrackInterface
() {}
33
34
/** Information not to be changed
35
*/
36
37
virtual
Double_t
GetMass
() {
return
0.1396; }
/// Mass hypothesis
38
virtual
Bool_t
IsElectron
() {
return
0; }
/// Is it electron
39
40
/** I/O parameters for extrapolation routines
41
*/
42
43
virtual
Double_t
*
GetTrack
();
/// array[6] of track parameters(x,y,tx,ty,qp,z)
44
virtual
Double_t
*
GetCovMatrix
();
/// array[15] of covariance matrix
45
46
/** Parameters during and after the track fit
47
*/
48
49
virtual
Double_t
&
GetRefChi2
();
/// Chi^2 after fit
50
virtual
Int_t
&
GetRefNDF
();
/// Number of Degrees of Freedom after fit
51
52
/** Accessors to the track hits during track fit
53
*/
54
55
virtual
Int_t
GetNOfHits
() {
return
0; }
/// Number of hits
56
virtual
CbmKFHit
*
GetHit
(
Int_t
i
) {
return
0; }
/// Access to i-th hit
57
58
/** Methods
59
*/
60
Int_t
Extrapolate
(
Double_t
z,
Double_t
* QP0 = 0,
Bool_t
line =
false
);
61
Int_t
Fit
(
Bool_t
downstream = 1,
Bool_t
line =
false
);
62
void
Smooth
(
Double_t
Z);
63
void
Fit2Vertex
(
CbmKFVertexInterface
& vtx);
64
65
Int_t
Propagate
(
Double_t
z_out,
Double_t
QP0,
Bool_t
line =
false
);
66
Int_t
Propagate
(
Double_t
z_out,
Bool_t
line =
false
);
67
68
int
Id
()
const
{
return
fId
; };
69
void
SetId
(
int
id
) {
fId
= id; };
70
void
SetTrkID
(
int
id
) {
ststrk
= id; };
71
int
GetTrkID
() {
return
ststrk
; };
72
73
protected
:
74
int
fId
;
75
76
private
:
77
int
ststrk
;
78
79
ClassDef
(
CbmKFTrackInterface
, 1)
80
};
81
82
/******************************************************************
83
*
84
* There are few ways to let the Kalman Filter treat your track.
85
*
86
******************************************************************
87
*
88
* // The first way: inherit the CbmKFTrackInterface, like :
89
*
90
* class CbmMyTrack :public CbmKFTrackInterface{
91
* public:
92
* // here overwrite CbmKF virtual methods
93
* Double_t *GetTrack(){ return fT; }
94
* ...
95
* // Here is my methods
96
* ...
97
* private:
98
* Double_t fT[6];
99
* Double_t fVariablesForMyNeeds;
100
* };
101
*
102
* // Then use your track directly:
103
*
104
* CbmMyTrack my_track;
105
* ...
106
* CbmKF::Instance()->FitTrack( my_track );
107
*
108
*
109
******************************************************************
110
*
111
*
112
* // The second way: make interface class to your track, like:
113
*
114
* class CbmMyTrack{
115
* public:
116
* Double_t *GetFittedTrackParametersAtThePrimaryVertex();
117
* ...
118
* };
119
*
120
* class CbmMyTrackInterface : public CbmKFTrackInterface{
121
* public:
122
* CbmMyTrackInterface( CbmMyTrack *track ):fTrack(track){}
123
* Double_t *GetTrack(){
124
* return ((CbmMyTrack*)fTrack)->GetFittedTrackParametersAtThePrimaryVertex();
125
* }
126
* ...
127
* private:
128
* CbmMyTrackTrack *fTrack;
129
* };
130
*
131
* // Then call the KF routines through the interface, like:
132
*
133
* CbmMyTrack my_track;
134
* ...
135
* CbmMyTrackInterface I(my_track);
136
* CbmKF::Instance()->FitTrack( I );
137
*
138
******************************************************************
139
*
140
*
141
* // Other ways...
142
*
143
*
144
*/
145
146
#endif
/* !CBMKFTRACKINTERFACE_H */
i
int i
Definition
P4_F32vec4.h:22
Bool_t
bool Bool_t
Int_t
int Int_t
Double_t
double Double_t
ClassDef
#define ClassDef(name, id)
TObject.h
CbmKFHit
Abstract base class for hit is being used by the CbmKF Kalman Filter.
Definition
CbmKFHit.h:17
CbmKFTrackInterface::fId
int fId
Definition
CbmKFTrackInterface.h:74
CbmKFTrackInterface::Propagate
Int_t Propagate(Double_t z_out, Double_t QP0, Bool_t line=false)
Definition
CbmKFTrackInterface.cxx:463
CbmKFTrackInterface::Id
int Id() const
Definition
CbmKFTrackInterface.h:68
CbmKFTrackInterface::GetTrack
virtual Double_t * GetTrack()
Is it electron.
Definition
CbmKFTrackInterface.cxx:31
CbmKFTrackInterface::CbmKFTrackInterface
CbmKFTrackInterface()
Definition
CbmKFTrackInterface.h:29
CbmKFTrackInterface::~CbmKFTrackInterface
virtual ~CbmKFTrackInterface()
Definition
CbmKFTrackInterface.h:32
CbmKFTrackInterface::GetTrkID
int GetTrkID()
Definition
CbmKFTrackInterface.h:71
CbmKFTrackInterface::SetId
void SetId(int id)
Definition
CbmKFTrackInterface.h:69
CbmKFTrackInterface::GetRefNDF
virtual Int_t & GetRefNDF()
Chi^2 after fit.
Definition
CbmKFTrackInterface.cxx:43
CbmKFTrackInterface::Extrapolate
Int_t Extrapolate(Double_t z, Double_t *QP0=0, Bool_t line=false)
Access to i-th hit.
Definition
CbmKFTrackInterface.cxx:48
CbmKFTrackInterface::GetCovMatrix
virtual Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
Definition
CbmKFTrackInterface.cxx:35
CbmKFTrackInterface::GetNOfHits
virtual Int_t GetNOfHits()
Number of Degrees of Freedom after fit.
Definition
CbmKFTrackInterface.h:55
CbmKFTrackInterface::Fit
Int_t Fit(Bool_t downstream=1, Bool_t line=false)
Definition
CbmKFTrackInterface.cxx:107
CbmKFTrackInterface::SetTrkID
void SetTrkID(int id)
Definition
CbmKFTrackInterface.h:70
CbmKFTrackInterface::Fit2Vertex
void Fit2Vertex(CbmKFVertexInterface &vtx)
Definition
CbmKFTrackInterface.cxx:365
CbmKFTrackInterface::GetMass
virtual Double_t GetMass()
Information not to be changed.
Definition
CbmKFTrackInterface.h:37
CbmKFTrackInterface::GetHit
virtual CbmKFHit * GetHit(Int_t i)
Number of hits.
Definition
CbmKFTrackInterface.h:56
CbmKFTrackInterface::GetRefChi2
virtual Double_t & GetRefChi2()
array[15] of covariance matrix
Definition
CbmKFTrackInterface.cxx:39
CbmKFTrackInterface::ststrk
int ststrk
Definition
CbmKFTrackInterface.h:77
CbmKFTrackInterface::IsElectron
virtual Bool_t IsElectron()
Mass hypothesis.
Definition
CbmKFTrackInterface.h:38
CbmKFTrackInterface::Smooth
void Smooth(Double_t Z)
Definition
CbmKFTrackInterface.cxx:224
CbmKFVertexInterface
Definition
CbmKFVertexInterface.h:25
reconstruction
KF
CbmKFTrackInterface.h
Generated on
for BmnRoot by
1.17.0