BmnRoot
Loading...
Searching...
No Matches
CbmKFTrackInterface.h
Go to the documentation of this file.
1
17#ifndef CBMKFTRACKINTERFACE_H
18#define CBMKFTRACKINTERFACE_H
19
20#include "TObject.h"
21
22class CbmKFHit;
24
26
27 public:
28
31
35 virtual Double_t GetMass() { return 0.1396; }
36 virtual Bool_t IsElectron(){ return 0; }
37
41 virtual Double_t *GetTrack() ;
42 virtual Double_t *GetCovMatrix();
43
47 virtual Double_t &GetRefChi2();
48 virtual Int_t &GetRefNDF() ;
49
53 virtual Int_t GetNOfHits() { return 0; }
54 virtual CbmKFHit *GetHit( Int_t i ){ return 0; }
55
58 Int_t Extrapolate( Double_t z, Double_t *QP0=0, Bool_t line=false );
59 Int_t Fit( Bool_t downstream = 1 , Bool_t line=false);
60 void Smooth( Double_t Z );
62
63 Int_t Propagate( Double_t z_out, Double_t QP0, Bool_t line=false );
64 Int_t Propagate( Double_t z_out, Bool_t line=false );
65
66 int Id() const { return fId; };
67 void SetId( int id ){ fId = id; };
68 void SetTrkID( int id ){ ststrk = id; };
69 int GetTrkID(){ return ststrk; };
70
71 protected:
72
73 int fId;
74
75 private:
76 int ststrk;
77
78 ClassDef( CbmKFTrackInterface, 1 )
79};
80
81
82
83/******************************************************************
84 *
85 * There are few ways to let the Kalman Filter treat your track.
86 *
87 ******************************************************************
88 *
89 * // The first way: inherit the CbmKFTrackInterface, like :
90 *
91 * class CbmMyTrack :public CbmKFTrackInterface{
92 * public:
93 * // here overwrite CbmKF virtual methods
94 * Double_t *GetTrack(){ return fT; }
95 * ...
96 * // Here is my methods
97 * ...
98 * private:
99 * Double_t fT[6];
100 * Double_t fVariablesForMyNeeds;
101 * };
102 *
103 * // Then use your track directly:
104 *
105 * CbmMyTrack my_track;
106 * ...
107 * CbmKF::Instance()->FitTrack( my_track );
108 *
109 *
110 ******************************************************************
111 *
112 *
113 * // The second way: make interface class to your track, like:
114 *
115 * class CbmMyTrack{
116 * public:
117 * Double_t *GetFittedTrackParametersAtThePrimaryVertex();
118 * ...
119 * };
120 *
121 * class CbmMyTrackInterface : public CbmKFTrackInterface{
122 * public:
123 * CbmMyTrackInterface( CbmMyTrack *track ):fTrack(track){}
124 * Double_t *GetTrack(){
125 * return ((CbmMyTrack*)fTrack)->GetFittedTrackParametersAtThePrimaryVertex();
126 * }
127 * ...
128 * private:
129 * CbmMyTrackTrack *fTrack;
130 * };
131 *
132 * // Then call the KF routines through the interface, like:
133 *
134 * CbmMyTrack my_track;
135 * ...
136 * CbmMyTrackInterface I(my_track);
137 * CbmKF::Instance()->FitTrack( I );
138 *
139 ******************************************************************
140 *
141 *
142 * // Other ways...
143 *
144 *
145 */
146
147#endif /* !CBMKFTRACKINTERFACE_H */
int i
Definition P4_F32vec4.h:22
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()
virtual CbmKFHit * GetHit(Int_t i)
Number of hits.
virtual Double_t & GetRefChi2()
array[15] of covariance matrix
virtual Bool_t IsElectron()
Mass hypothesis.