18 const std::vector<KinematicState>& lStates,
25 int vSize = lStates.size();
34 for (std::vector<KinematicState>::const_iterator
i = lStates.begin();
i != lStates.end();
i++) {
36 for (
int j = 1;
j < lst_par.num_row() + 1;
j++) {
37 d_a(3 + 7 * cst +
j) = lst_par(
j);
56 g.sub(1, 1, e_matrix);
57 g.sub(1, 4, d_matrix);
63 int n_eq =
cs->numberOfEquations();
76 g.sub(n_eq + 1, 1, e_matrix);
77 g.sub(n_eq + 1, 4, d_matrix);
80 for (
int i = 1;
i < n_eq + 1;
i++) {
83 for (
int i = 1;
i < (2 * vSize + 1);
i++) {
84 val(
i + n_eq) = val_s(
i);
89 for (
int i = 1;
i <=
val.num_row(); ++
i) {
91 LogDebug(
"KinematicConstrainedVertexUpdator") <<
"catched NaN.\n";
101 for (
int i = 1;
i < 7 * vSize + 4; ++
i) {
102 for (
int j = 1;
j < 7 * vSize + 4; ++
j) {
104 in_cov_sym(
i,
j) = inCov(
i,
j);
112 v_g_sym.invert(ifl1);
114 LogDebug(
"KinematicConstrainedVertexFitter") <<
"Fit failed: unable to invert SYM gain matrix\n";
128 AlgebraicMatrix mFactor = in_cov_sym * (v_g_sym.similarityT(
g)) * in_cov_sym;
135 for (
int i = 1;
i < 7 * vSize + 4; ++
i) {
136 for (
int j = 1;
j < 7 * vSize + 4; ++
j) {
138 r_cov_sym(
i,
j) = rCov(
i,
j);
149 float ndf = 2 * vSize - 3;
151 ndf +=
cs->numberOfEquations();
161 std::vector<KinematicState> ns;
162 for (std::vector<KinematicState>::const_iterator i_st = lStates.begin(); i_st != lStates.end(); i_st++) {
164 for (
int i = 0;
i < 7;
i++) {
165 newPar(
i) = finPar(4 + i_int * 7 +
i);
173 ns.push_back(newState);
176 std::pair<std::vector<KinematicState>,
AlgebraicMatrix> ns_m(ns, rCov);