ATLAS Offline Software
FitMatrices.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // class FitMatrices
7 // Storage and manipulation of matrices during track fitting
8 // (note the actual matrices are structs (FitMatrix.h) to give faster
9 // execution)
10 //
11 // Given matrix of measurement derivatives wrt fit parameters (DerivativeMatrix
12 // DM) and vector of differences between measurements and fitted trajectory,
13 // solve for:
14 // parameter weight matrix = (covariance)-1 = DMtranspose.DM
15 // parameter change = (DMtranspose.DM)-1 * (DMtranspose.differences)
16 //
17 // NOTE:
18 // covariances, derivatives etc, use d0, z0, phi, cot(theta), qOverPt as first
19 // 5 parameters distinguish: full covariance with all parameters:
20 // includes misalignments, scattering and energy loss
21 // 5*5 final covariance with possible external contribution
22 // representing leading material and field gradient effects
23 //
25 
27 
28 #include <iomanip>
29 #include <iostream>
30 
32 #include "GaudiKernel/SystemOfUnits.h"
36 
37 #include "CxxUtils/inline_hints.h"
38 
39 namespace Trk {
40 
41 FitMatrices::FitMatrices(bool constrainedAlignmentEffects)
42  : m_fitMatrix{},
43  m_columnsDM(0),
44  m_constrainedAlignmentEffects(constrainedAlignmentEffects),
45  m_largePhiWeight(10000.), // arbitrary - equiv to 10um
46  m_matrixFromCLHEP(false),
47  m_measurements(nullptr),
48  m_numberDoF(0),
49  m_numberDriftCircles(0),
50  m_numberPerigee(5),
51  m_parameters(nullptr),
52  m_perigee(nullptr),
53  m_perigeeDifference(Amg::MatrixX(1, m_numberPerigee)),
54  m_perigeeWeight(nullptr),
55  m_rowsDM(0),
56  m_usePerigee(false){}
57 
58 void FitMatrices::checkPointers(MsgStream& log) const {
59  // debugging: check smart pointers
60  for (int col = 0; col < m_columnsDM; ++col) {
61  // firstRow
62  for (int i = 0; i < m_firstRowForParameter[col]; ++i) {
63  if (m_fitMatrix.derivative[i][col] != 0.)
64  log << " col " << col << " unexpected first nonzero DM element " << i
65  << " / " << m_firstRowForParameter[col] << endmsg;
66  }
67  int j = m_firstRowForParameter[col];
68  if (m_fitMatrix.derivative[j][col] == 0.)
69  log << " col " << col << " first nonzero DM element is zero! " << j
70  << " / " << m_firstRowForParameter[col] << endmsg;
71 
72  // lastRow
73  for (int i = m_lastRowForParameter[col]; i < m_rowsDM; ++i) {
74  if (m_fitMatrix.derivative[i][col] != 0.)
75  log << " col " << col << " unexpected last nonzero DM element " << i
76  << " / " << m_lastRowForParameter[col] << endmsg;
77  }
78  }
79 }
80 
83  std::cout << " unexpected :chiSquaredChange " << std::endl;
84  return 0.;
86 }
87 
89  // return result if matrix already inverted
90  if (m_covariance.size()!=0) {
91  return &m_covariance;
92  }
94 
95  // fix weighting ???? shouldn't we just remove large phi weight?
98  }
99 
100  // invert weight matrix
101  Amg::MatrixX& covariance = m_covariance;
102  // avoid singularity through ill-defined momentum ???? again
104 
105  // neater - but gives small rounding-like diffs wrt matrix copy version
106  // keep matrix copy for release 21 to avoid rounding changes at Tier0
107  // covariance = (*m_weight).inverse();
108 
109  // matrix copy version (legacy of older library which needed copy between
110  // matrix packages)
112  weight.selfadjointView<0x2>();
113 
114  // check if m_weights makes sense before inverting
116  m_covariance.resize(0, 0);
117  return nullptr;
118  }
119 
120  weight = (m_weight).inverse();
121  for (int row = 0; row != m_columnsDM; ++row) {
122  for (int col = 0; col != m_columnsDM; ++col)
123  covariance(row, col) = weight(col, row);
124  }
125 
126  // back convert curved fits to Tracking units (MeV)
127  if (m_parameters->fitMomentum()) {
128  // transform to MeV
129  double d4 = 1. / Gaudi::Units::TeV;
130  for (int row = 0; row < m_columnsDM; ++row) {
131  covariance(4, row) *= d4;
132  covariance(row, 4) = covariance(4, row);
133  }
134  covariance(4, 4) *= d4;
135 
136  // transform units for fitted energy deposit (for now fit qOverP at calo
137  // exit)
139  double d5 = 1. / Gaudi::Units::TeV;
140  for (int row = 0; row < m_columnsDM; ++row) {
141  covariance(5, row) *= d5;
142  covariance(row, 5) = covariance(5, row);
143  }
144  covariance(5, 5) *= d5;
145  }
146  }
147 
148  // FIXME: errors underestimated on d0,z0 when large scatterer precedes precise
149  // measurements final covariance starts with 5*5 representing perigee from
150  // full covariance
152  for (int i = 0; i != 5; ++i) {
153  for (int j = 0; j != 5; ++j) {
154  (m_finalCovariance)(i, j) = covariance(i, j);
155  }
156  }
157 
158  // return pointer to full covariance
159  return &m_covariance;
160 }
161 
164  return (m_perigeeDifference * (*m_perigeeWeight) *
165  m_perigeeDifference.transpose())(0, 0);
166 }
167 
169  std::cout << "DerivativeMatrix: rows * columns " << m_rowsDM << " * "
170  << m_columnsDM << " numberDoF " << m_numberDoF << std::endl;
171 
172  int firstCol = 0;
173  int lastCol = 0;
174  if (!m_measurements)
175  return;
177  std::vector<FitMeasurement*> alignmentfm;
178  FitMeasurement* fm = *m;
179  bool singleRow = true;
180 
181  for (int row = 0; row < m_rowsDM; ++row) {
182  // get corresponding FitMeasurement
183  if (singleRow) {
184  while (m != m_measurements->end() &&
185  (!(**m).numberDoF() || (**m).isAlignment())) {
186  if ((**m).isAlignment())
187  alignmentfm.push_back(*m);
188  ++m;
189  }
190  if (m != m_measurements->end()) {
191  fm = *m;
192  } else {
193  fm = alignmentfm.back();
194  alignmentfm.pop_back();
195  }
196 
197  firstCol = fm->firstParameter();
198  lastCol = fm->lastParameter() - 1;
199  std::cout << std::endl << std::setiosflags(std::ios::fixed);
200  if (fm->isPositionMeasurement()) {
201  std::cout << "measurement";
202  } else if (fm->isScatterer()) {
203  std::cout << "scatterer ";
204  } else if (fm->isEnergyDeposit()) {
205  std::cout << "energyDepos";
206  } else if (fm->isAlignment()) {
207  std::cout << "alignment ";
208  } else {
209  std::cout << " ?? ";
210  }
211  if (fm->is2Dimensional()) {
212  singleRow = false;
213  } else {
214  if (m != m_measurements->end())
215  ++m;
216  }
217  std::cout << " row " << std::setw(3) << row << " col 0 ";
218  } else {
219  if (m != m_measurements->end())
220  ++m;
221  singleRow = true;
222  std::cout << std::endl
223  << std::setiosflags(std::ios::fixed) << " row "
224  << std::setw(3) << row << " col 0 ";
225  }
226  for (int col = 0; col < m_columnsDM; ++col) {
227  if (col < firstCol || col > lastCol) // m_firstRowForParameter[row])
228  {
229  if (m_fitMatrix.derivative[row][col] == 0.) {
230  std::cout << " ";
231  } else {
232  // flag out-of-order
233  std::cout << std::setiosflags(std::ios::scientific)
234  << std::setbase(10) << "<" << std::setw(10)
235  << m_fitMatrix.derivative[row][col] << ">";
236  }
237  } else {
238  std::cout << std::setiosflags(std::ios::scientific) << std::setbase(10)
239  << std::setw(10) << m_fitMatrix.derivative[row][col] << " ";
240  }
241 
242  if ((col + 1) % 12 == 0 && col + 1 < m_columnsDM)
243  std::cout << std::endl
244  << std::setiosflags(std::ios::fixed)
245  << " col " << std::setw(3) << col + 1
246  << " ";
247  }
248  }
249  std::cout << std::endl;
250 }
251 
253  std::cout << std::endl
254  << "WeightMatrix: symmetric with rank " << m_columnsDM;
255 
256  for (int row = 0; row < m_columnsDM; ++row) {
257  std::cout << std::endl
258  << std::setiosflags(std::ios::fixed) << " row " << std::setw(3)
259  << row << " col 0 ";
260  for (int col = 0; col <= row; ++col) {
261  std::cout << std::setiosflags(std::ios::scientific) << std::setbase(10)
262  << std::setw(10) << (m_weight)(row, col) << " ";
263 
264  if ((col + 1) % 13 == 0 && col < row)
265  std::cout << std::endl
266  << std::setiosflags(std::ios::fixed) << " col "
267  << std::setw(3) << col + 1 << " ";
268  }
269  }
270  std::cout << std::endl;
271 }
272 
274  // remove leading and trailing zeroes from smart pointers
275  for (int col = 0; col < m_columnsDM; ++col) {
277  int j = m_lastRowForParameter[col];
278  if (i < --j && m_fitMatrix.derivative[i][col] == 0. ) {
279  while (i != j && m_fitMatrix.derivative[i][col] == 0.)
280  ++i;
282  }
283  if (m_fitMatrix.derivative[j][col] == 0. && j > i) {
284  while (j != i && m_fitMatrix.derivative[j][col] == 0.)
285  --j;
286  m_lastRowForParameter[col] = ++j;
287  }
288  }
289 }
290 
292  m_derivativeMatrix.resize(0,0);
293  m_weight.resize(0,0);
294  m_weightedDifference.resize(0,0);
295 }
296 
297 int FitMatrices::setDimensions(std::vector<FitMeasurement*>& measurements,
299  // keep pointer for debug purposes
300  m_measurements = &measurements;
301 
302  // only use perigee on request (from special fit types)
303  m_usePerigee = false;
304 
305  // count rows, misalignments and scatterers from loop over FitMeasurements
306  m_firstRowForParameter.clear();
307  m_firstRowForParameter.reserve(128);
308  m_lastRowForParameter.clear();
309  m_lastRowForParameter.reserve(128);
311  m_residuals = std::vector<double>(2 * measurements.size(), 0.);
313  bool haveMeasurement = false;
314  bool haveVertex = false;
315  int numberAlignments = 0;
316  int numberEnergyDeposits = 0;
317  int numberParameters = 5;
318  int numberScatterers = 0;
319  int row = 0;
320 
321  // keep first row with measurements up to each number of parameters
322  m_firstRowForParameter = std::vector<int>(numberParameters, -1);
323  std::vector<FitMeasurement*>::iterator m = measurements.begin();
324  if ((**m).isVertex()) {
325  haveVertex = true;
327 
328  // set pointers into big matrix
329  (**m).derivative(&m_fitMatrix.derivative[row][0]);
330  (**m).residual(row + m_residuals.begin());
331  ++row;
332  if ((**m).is2Dimensional()) {
334  (**m).derivative2(&m_fitMatrix.derivative[row][0]);
335  ++row;
336  }
337  ++m;
338  }
339 
340  // allocate rows to fitted measurements (DoF > 0)
341  for (; m != measurements.end(); ++m) {
342  if (!(**m).numberDoF())
343  continue;
344 
345  // alignment rows come after scattering
346  if ((**m).isAlignment())
347  continue;
348 
349  // identify leading material
350  if (!haveMeasurement) {
351  if ((**m).isPositionMeasurement()) {
352  haveMeasurement = true;
353  for (int i = 0; i < numberParameters; ++i)
354  if (m_firstRowForParameter[i] < 0)
356  } else if (!haveVertex && (**m).isScatterer()) {
357  (**m).numberDoF(0);
358  continue;
359  } else {
360  // row += (**m).numberDoF();
361  }
362  }
363 
364  // only allocate rows to fitted measurements (DoF > 0)
365  // if (! (**m).numberDoF()) continue;
366  if ((**m).isDrift())
368 
369  // fit energyDeposit unless momentum fixed or near infinite
370  if ((**m).isEnergyDeposit()) {
371  // if (! m_parameters->fitMomentum() ||
372  // m_parameters->extremeMomentum())
373  if (!m_parameters->fitMomentum()) {
374  (**m).numberDoF(0);
375  continue;
376  } else {
377  if (m_firstRowForParameter.back() < 0)
378  m_firstRowForParameter.back() = row;
379 
380  // m_firstRowForParameter[numberParameters-1] = row;
381  m_firstRowForParameter.push_back(row);
382  m_parameters->fitEnergyDeposit((**m).minEnergyDeposit());
383  ++numberEnergyDeposits;
384  ++numberParameters;
385  }
386  }
387  if ((**m).isScatterer())
388  ++numberScatterers;
389 
390  // set pointers into big matrix
391  (**m).derivative(&m_fitMatrix.derivative[row][0]);
392  (**m).residual(row + m_residuals.begin());
393  ++row;
394  if ((**m).is2Dimensional()) {
395  (**m).derivative2(&m_fitMatrix.derivative[row][0]);
396  ++row;
397  }
398  }
399 
400  // second loop puts alignment rows at bottom of matrix
401  for (m = measurements.begin(); m != measurements.end(); ++m) {
402  if (!(**m).isAlignment())
403  continue;
404  ++numberAlignments;
405 
406  // set pointers into big matrix
407  (**m).derivative(&m_fitMatrix.derivative[row][0]);
408  (**m).residual(row + m_residuals.begin());
409  ++row;
410  if ((**m).is2Dimensional()) {
411  (**m).derivative2(&m_fitMatrix.derivative[row][0]);
412  ++row;
413  }
414  }
415 
416  // keep first row with measurements up to each number of parameters
417  parameters->numberAlignments(numberAlignments);
418  parameters->numberScatterers(numberScatterers);
419  bool afterCalo = false;
420  int lastRow = 0;
421  m_rowsDM = 0;
422  for (m = measurements.begin(); m != measurements.end(); ++m) {
423  if ((**m).numberDoF()) {
424  if ((**m).isEnergyDeposit()) {
425  afterCalo = true;
426  // m_lastRowForParameter[4] = m_firstRowForParameter[5] + 1;
427  } else if ((**m).isScatterer()) {
428  m_firstRowForParameter.push_back(m_rowsDM);
429  m_firstRowForParameter.push_back(++m_rowsDM);
430  (**m).lastParameter(m_firstRowForParameter.size(), afterCalo);
431  parameters->addScatterer((**m).scattererPhi(), (**m).scattererTheta());
432  lastRow = ++m_rowsDM;
433  continue;
434  } else if ((**m).isAlignment()) {
435  // defer alignment
436  continue;
437  }
438  m_rowsDM += (**m).numberDoF();
439  lastRow = m_rowsDM;
440  }
441  (**m).lastParameter(m_firstRowForParameter.size(), afterCalo);
442  }
443 
444  numberParameters = m_firstRowForParameter.size();
445  m_lastRowForParameter = std::vector<int>(numberParameters, lastRow);
446  if (afterCalo)
448 
449  // following loop puts any alignment info into the final rows
450  if (numberAlignments) {
451  row = 0;
452  unsigned alignmentParameter = 0;
453  int firstAlignmentRow = 0;
454  int firstAlignment2Row = 0;
455  for (m = measurements.begin(); m != measurements.end(); ++m) {
456  if ((**m).alignmentParameter()) {
457  if ((**m).alignmentParameter() > alignmentParameter) {
458  if (!firstAlignmentRow)
459  firstAlignmentRow = row;
460  }
461  if ((**m).alignmentParameter2()) {
462  if (!firstAlignment2Row)
463  firstAlignment2Row = row;
464  }
465  }
466  if (!(**m).numberDoF())
467  continue;
468  if (!(**m).isAlignment()) {
469  row += (**m).numberDoF();
470  continue;
471  }
472 
474  (**m).alignmentAngle(), (**m).alignmentOffset());
475  m_firstRowForParameter.push_back(firstAlignmentRow);
476  m_firstRowForParameter.push_back(firstAlignmentRow);
477  m_lastRowForParameter.push_back(++m_rowsDM);
478  m_lastRowForParameter.push_back(++m_rowsDM);
479  (**m).firstParameter(numberParameters);
480  numberParameters += 2;
481  alignmentParameter = parameters->numberAlignments();
482  (**m).alignmentParameter(alignmentParameter);
483  (**m).lastParameter(numberParameters, afterCalo);
484  // m_rowsDM += (**m).numberDoF();
485 
486  // some bug to fix here...
487  // firstAlignmentRow = firstAlignment2Row;
488  // firstAlignment2Row = 0;
489  }
490  }
491 
492  // initialize number of parameters (including alignments and scatterers)
493  numberParameters = m_firstRowForParameter.size();
494  parameters->numberParameters(numberParameters);
495 
496  // and degrees of freedom
497  m_numberDoF = m_rowsDM - numberParameters;
498 
499  // make some checks: return fitCode in case of problem
500  int fitCode = 0;
501  // if (row > mxmeas) fitCode = 2; // too many measurements for
502  // fit matrix size
503  if (2 * measurements.size() > mxmeas)
504  fitCode = 2; // too many measurements for fit matrix size
505  if (numberParameters > mxparam)
506  fitCode = 3; // too many parameters for fit matrix size
507  if (m_numberDoF < 0)
508  fitCode = 4; // unconstrained fit: negative numberDoF
509  if (numberEnergyDeposits > 1)
510  fitCode = 12; // too many EnergyDeposit parameters
511  if (fitCode)
512  return fitCode;
513 
514  // reserve derivatives for jacobian propagation to 'non-measurements'
515  row = m_rowsDM;
516  for (m = measurements.begin(); m != measurements.end(); ++m) {
517  if (!(**m).isPositionMeasurement() || (**m).numberDoF() > 1)
518  continue;
519  if (!(**m).numberDoF()) {
520  for (int i = 0; i != numberParameters; ++i)
521  m_fitMatrix.derivative[row][i] = 0.;
522  (**m).derivative(&m_fitMatrix.derivative[row][0]);
523  (**m).residual(row + m_residuals.begin());
524  ++row;
525  }
526  for (int i = 0; i != numberParameters; ++i)
527  m_fitMatrix.derivative[row][i] = 0.;
528  (**m).derivative2(&m_fitMatrix.derivative[row][0]);
529  ++row;
530  }
531 
532  // update partitioning of fit matrices
533  for (int row = 0; row < m_rowsDM; ++row) {
534  for (int param = 0; param < numberParameters; ++param) {
535  m_fitMatrix.derivative[row][param] = 0.;
536  }
537  }
538 
539  // fix degrees of freedom for external customers
540  if (!m_parameters->fitMomentum())
541  ++m_numberDoF;
542 
543  // we don't have any fit results yet
544  m_covariance.resize(0,0);
545  m_finalCovariance.resize(0,0);
546 
547  // reallocate to get correct matrix sizes
548  if (m_derivativeMatrix.size() == 0 || m_weight.size() == 0 ||
549  numberParameters != m_columnsDM) {
550  m_columnsDM = numberParameters;
553  // isn't this faster? indicating that we have a symmetric matrix <0x2> =
554  // <Upper> any gain seems to be negated by additional for loop copies to
555  // recover full cov matrix introduces some rounding differences - keep for
556  // release 21 to respect strict Tier0 policy
557  (m_weight).selfadjointView<0x2>();
559  }
560 
561  // this should never happen
562  if (m_derivativeMatrix.size()==0)
563  fitCode = 13;
564 
565  return fitCode;
566 }
567 
568 // We compile this package with optimization, even in debug builds; otherwise,
569 // the heavy use of Eigen makes it too slow. However, from here we may call
570 // to out-of-line Eigen code that is linked from other DSOs; in that case,
571 // it would not be optimized. Avoid this by forcing all Eigen code
572 // to be inlined here if possible.
574  bool
576  // use Eigen Matrix multiplication ATR-15723
577  // note: fitMatrix (struct) is row-major whereas Eigen prefers column-major
578  // storage
579  // hence the loops are nested to optimise row-major and to form the
580  // Eigen transpose
582  Amg::VectorX& weightedDifference = m_weightedDifference;
583  Amg::MatrixX fitMatrixDerivativeT(m_columnsDM, m_rowsDM);
584  Amg::MatrixX residuals(m_rowsDM, 1);
585  for (int row = 0; row < m_rowsDM; ++row) {
586  residuals(row, 0) = (m_residuals)[row];
587  for (int col = 0; col < m_columnsDM; ++col) {
588  fitMatrixDerivativeT(col, row) = m_fitMatrix.derivative[row][col];
589  }
590  }
591  weight = fitMatrixDerivativeT * fitMatrixDerivativeT.transpose();
592  weightedDifference = fitMatrixDerivativeT * residuals;
593 
594  // stabilize fits with badly determined phi
596  weight(0, 0) += m_largePhiWeight;
597 
598  // avoid some possible singularities in matrix inversion
600 
601  // solve is faster than inverse: wait for explicit request for covariance
602  // before inversion
604  weight.colPivHouseholderQr().solve(weightedDifference);
605 
607  return true;
608 }
609 
610 void FitMatrices::usePerigee(const FitMeasurement& measurement) {
611  m_perigee = &(measurement.perigee());
612  m_perigeeWeight = &(measurement.perigeeWeight());
613  // TODO: needs eigen equiv !!
614  if (m_matrixFromCLHEP) {
615  m_usePerigee = true;
616  }
617 }
618 
620  // TODO: needs eigen equiv !!
621  // const Amg::MatrixX& perigeeWeight = *m_perigeeWeight;
622  // Amg::MatrixX& weight = *m_weightCLHEP;
623  // AmgVectorX& weightedDifference = *m_weightedDifferenceCLHEP;
624  // AmgVectorX diff_vector =
625  // perigeeWeight*m_perigeeDifference.T(); for (int row = 0; row <
626  // m_numberPerigee; ++row)
627  // {
628  // weightedDifference[row] += diff_vector[row];
629  // for (int col = 0; col <= row; ++col) weight[row][col] +=
630  // perigeeWeight[row][col];
631  // }
632 }
633 
635  // fix momentum if line-fit or fit attempted with negligible field integral
638  weight(5, 5) < 1. / Gaudi::Units::TeV) {
639  for (int i = 0; i != m_columnsDM; ++i) {
640  weight(i, 5) = 0.;
641  weight(5, i) = 0.;
642  }
643  weight(5, 5) += 1. / Gaudi::Units::TeV;
644  }
645  if (!m_parameters->fitMomentum() || weight(4, 4) < 1. / Gaudi::Units::TeV) {
646  m_parameters->fitMomentum(false);
647  for (int i = 0; i != m_columnsDM; ++i) {
648  weight(i, 4) = 0.;
649  weight(4, i) = 0.;
650  }
651  weight(4, 4) += 1. / Gaudi::Units::TeV;
652  }
653 }
654 
655 } // namespace Trk
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::FitMeasurement::is2Dimensional
bool is2Dimensional(void) const
Definition: FitMeasurement.h:423
query_example.row
row
Definition: query_example.py:24
Trk::FitMatrices::m_weightedDifference
Amg::VectorX m_weightedDifference
Definition: FitMatrices.h:137
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:32
Amg::hasPositiveDiagElems
bool hasPositiveDiagElems(const AmgSymMatrix(N) &mat)
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above defin...
Definition: EventPrimitivesCovarianceHelpers.h:96
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
inline_hints.h
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
Trk::FitParameters::fitMomentum
bool fitMomentum(void) const
Definition: FitParameters.h:225
Trk::FitMatrices::m_perigeeDifference
Amg::MatrixX m_perigeeDifference
Definition: FitMatrices.h:131
Trk::FitMatrices::avoidMomentumSingularity
void avoidMomentumSingularity(void)
Definition: FitMatrices.cxx:634
Trk::FitMatrices::m_weight
Amg::MatrixX m_weight
Definition: FitMatrices.h:136
Trk::FitParameters::fitEnergyDeposit
bool fitEnergyDeposit(void) const
Definition: FitParameters.h:221
Trk::FitMatrices::perigeeChiSquared
double perigeeChiSquared(void)
Definition: FitMatrices.cxx:162
Trk::FitMatrices::usePerigee
void usePerigee(const FitMeasurement &measurement)
Definition: FitMatrices.cxx:610
Trk::FitMatrices::m_derivativeMatrix
Amg::MatrixX m_derivativeMatrix
Definition: FitMatrices.h:119
Trk::FitMatrices::m_rowsDM
int m_rowsDM
Definition: FitMatrices.h:134
python.SystemOfUnits.TeV
int TeV
Definition: SystemOfUnits.py:158
Trk::FitMatrices::m_perigee
const Amg::VectorX * m_perigee
Definition: FitMatrices.h:130
Trk::FitMatrices::m_fitMatrix
fitMatrix m_fitMatrix
Definition: FitMatrices.h:115
Trk::FitMatrices::refinePointers
void refinePointers(void)
Definition: FitMatrices.cxx:273
FitParameters.h
Trk::FitMatrices::m_numberDriftCircles
int m_numberDriftCircles
Definition: FitMatrices.h:127
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
Trk::FitMeasurement::perigeeWeight
const Amg::MatrixX & perigeeWeight(void) const
Definition: FitMeasurement.h:478
Trk::fitMatrix::derivative
double derivative[mxmeas][mxparam]
Definition: FitMatrix.h:14
Trk::FitMatrices::printWeightMatrix
void printWeightMatrix(void)
Definition: FitMatrices.cxx:252
Trk::FitMatrices::chiSquaredChange
static double chiSquaredChange(void)
Definition: FitMatrices.cxx:81
Trk::FitMatrices::m_lastRowForParameter
std::vector< int > m_lastRowForParameter
Definition: FitMatrices.h:123
mxparam
#define mxparam
Definition: FitMatrix.h:9
lumiFormat.i
int i
Definition: lumiFormat.py:92
ATH_FLATTEN
#define ATH_FLATTEN
Definition: inline_hints.h:52
Trk::FitMeasurement
Definition: FitMeasurement.h:40
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::FitMatrices::FitMatrices
FitMatrices(bool constrainedAlignmentEffects)
Definition: FitMatrices.cxx:41
Trk::FitMatrices::m_usePerigee
bool m_usePerigee
Definition: FitMatrices.h:135
FitMatrices.h
Trk::FitMatrices::printDerivativeMatrix
void printDerivativeMatrix(void)
Definition: FitMatrices.cxx:168
Trk::FitParameters::update
void update(const Amg::VectorX &differences)
Definition: FitParameters.cxx:603
Trk::FitMatrices::m_finalCovariance
Amg::MatrixX m_finalCovariance
Definition: FitMatrices.h:120
Trk::FitMatrices::m_matrixFromCLHEP
bool m_matrixFromCLHEP
Definition: FitMatrices.h:124
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::FitMeasurement::isEnergyDeposit
bool isEnergyDeposit(void) const
Definition: FitMeasurement.h:377
Trk::FitMatrices::m_residuals
std::vector< double > m_residuals
Definition: FitMatrices.h:133
Trk::FitMeasurement::isAlignment
bool isAlignment(void) const
Definition: FitMeasurement.h:364
Trk::FitParameters::parameterDifference
const Amg::MatrixX parameterDifference(const Amg::VectorX &parameters) const
Definition: FitParameters.cxx:186
Trk::FitMatrices::m_largePhiWeight
double m_largePhiWeight
Definition: FitMatrices.h:122
Trk::FitMatrices::m_covariance
Amg::MatrixX m_covariance
Definition: FitMatrices.h:118
query_example.col
col
Definition: query_example.py:7
Trk::FitMatrices::m_parameters
FitParameters * m_parameters
Definition: FitMatrices.h:129
FitMeasurement.h
Trk::FitMatrices::checkPointers
void checkPointers(MsgStream &log) const
Definition: FitMatrices.cxx:58
EventPrimitivesCovarianceHelpers.h
Trk::FitMeasurement::firstParameter
unsigned firstParameter(void) const
Definition: FitMeasurement.h:328
Trk::FitMatrices::addPerigeeMeasurement
void addPerigeeMeasurement(void)
Definition: FitMatrices.cxx:619
Trk::FitMeasurement::lastParameter
unsigned lastParameter(void) const
Definition: FitMeasurement.h:427
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::FitMatrices::fullCovariance
const Amg::MatrixX * fullCovariance(void)
Definition: FitMatrices.cxx:88
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Trk::FitMatrices::m_columnsDM
int m_columnsDM
Definition: FitMatrices.h:116
Trk::FitMeasurement::isPositionMeasurement
bool isPositionMeasurement(void) const
Definition: FitMeasurement.h:401
Trk::FitParameters
Definition: FitParameters.h:29
Trk::FitMatrices::m_constrainedAlignmentEffects
bool m_constrainedAlignmentEffects
Definition: FitMatrices.h:117
TrackSurfaceIntersection.h
Trk::FitMatrices::m_measurements
std::vector< FitMeasurement * > * m_measurements
Definition: FitMatrices.h:125
Trk::FitMeasurement::isScatterer
bool isScatterer(void) const
Definition: FitMeasurement.h:409
Trk::FitMatrices::m_numberDoF
int m_numberDoF
Definition: FitMatrices.h:126
Trk::FitParameters::phiInstability
bool phiInstability(void) const
Definition: FitParameters.cxx:244
Trk::FitMatrices::setDimensions
int setDimensions(std::vector< FitMeasurement * > &measurements, FitParameters *parameters)
Definition: FitMatrices.cxx:297
Trk::FitMatrices::releaseMemory
void releaseMemory(void)
Definition: FitMatrices.cxx:291
Trk::FitMatrices::m_firstRowForParameter
std::vector< int > m_firstRowForParameter
Definition: FitMatrices.h:121
Trk::FitMatrices::solveEquations
bool solveEquations(void)
Definition: FitMatrices.cxx:575
Trk::FitMeasurement::perigee
const Amg::VectorX & perigee(void) const
Definition: FitMeasurement.h:474
mxmeas
#define mxmeas
Definition: FitMatrix.h:8
Trk::FitMatrices::m_perigeeWeight
const Amg::MatrixX * m_perigeeWeight
Definition: FitMatrices.h:132