BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmKFUMeasurement.cxx
Go to the documentation of this file.
1#include "CbmKFUMeasurement.h"
2
3#include <cmath>
4
6{
7 this->z = z_;
8 this->u = u_;
9 this->phi = phi_;
10 this->sigma2 = sigma2_;
11 phi_s = sin(phi_);
12 phi_c = cos(phi_);
13 phi_ss = phi_s * phi_s;
14 phi_cc = phi_c * phi_c;
15 phi_2sc = 2. * phi_s * phi_c;
16}
17
19{
20
21 Double_t* T = track.GetTrack();
22 Double_t* C = track.GetCovMatrix();
23
24 Double_t W = sigma2 + phi_cc * C[0] + phi_2sc * C[1] + phi_ss * C[2];
25 if (!finite(W) || W < 1.e-10)
26 return 1;
27 W = 1. / W;
28 if (!finite(W))
29 return 1;
30
31 Double_t zeta = phi_c * T[0] + phi_s * T[1] - u;
32
33 track.GetRefChi2() += zeta * zeta * W;
34 track.GetRefNDF() += 1;
35 Double_t K[5] = {phi_c * C[0] + phi_s * C[1], phi_c * C[1] + phi_s * C[2], phi_c * C[3] + phi_s * C[4],
36 phi_c * C[6] + phi_s * C[7], phi_c * C[10] + phi_s * C[11]};
37
38 Double_t KW[5] = {K[0] * W, K[1] * W, K[2] * W, K[3] * W, K[4] * W};
39
40 T[0] -= KW[0] * zeta;
41 T[1] -= KW[1] * zeta;
42 T[2] -= KW[2] * zeta;
43 T[3] -= KW[3] * zeta;
44 T[4] -= KW[4] * zeta;
45
46 C[0] -= K[0] * KW[0];
47 C[1] -= K[1] * KW[0];
48 C[2] -= K[1] * KW[1];
49 C[3] -= K[2] * KW[0];
50 C[4] -= K[2] * KW[1];
51 C[5] -= K[2] * KW[2];
52 C[6] -= K[3] * KW[0];
53 C[7] -= K[3] * KW[1];
54 C[8] -= K[3] * KW[2];
55 C[9] -= K[3] * KW[3];
56 C[10] -= K[4] * KW[0];
57 C[11] -= K[4] * KW[1];
58 C[12] -= K[4] * KW[2];
59 C[13] -= K[4] * KW[3];
60 C[14] -= K[4] * KW[4];
61 return 0;
62}
vector< Double_t > W(vector< Double_t > dist, Double_t sig)
Definition BmnMath.cxx:878
int Int_t
double Double_t
virtual Double_t * GetTrack()
Is it electron.
virtual Int_t & GetRefNDF()
Chi^2 after fit.
virtual Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
virtual Double_t & GetRefChi2()
array[15] of covariance matrix
void Set(Double_t z, Double_t u, Double_t phi, Double_t sigma2)
Int_t Filter(CbmKFTrackInterface &track)
RVec< PromoteType< T > > cos(const RVec< T > &v)
RVec< PromoteType< T > > sin(const RVec< T > &v)