BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
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
22class CbmKFHit;
24
26{
27
28 public:
30 : fId()
31 {}
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);
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
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 */
int i
Definition P4_F32vec4.h:22
bool Bool_t
int Int_t
double Double_t
#define ClassDef(name, id)
Abstract base class for hit is being used by the CbmKF Kalman Filter.
Definition CbmKFHit.h:17
Int_t Propagate(Double_t z_out, Double_t QP0, Bool_t line=false)
virtual Double_t * GetTrack()
Is it electron.
virtual Int_t & GetRefNDF()
Chi^2 after fit.
Int_t Extrapolate(Double_t z, Double_t *QP0=0, Bool_t line=false)
Access to i-th hit.
virtual Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
virtual Int_t GetNOfHits()
Number of Degrees of Freedom after fit.
Int_t Fit(Bool_t downstream=1, Bool_t line=false)
void Fit2Vertex(CbmKFVertexInterface &vtx)
virtual Double_t GetMass()
Information not to be changed.
virtual CbmKFHit * GetHit(Int_t i)
Number of hits.
virtual Double_t & GetRefChi2()
array[15] of covariance matrix
virtual Bool_t IsElectron()
Mass hypothesis.