GENFIT
Rev:NoNumberAvailable
|
Go to the documentation of this file.
19 theLabel(0), theOffset(0), measDim(0), transFlag(false), measTransformation(), scatFlag(
20 false), localDerivatives(), globalLabels(), globalDerivatives() {
22 for (
unsigned int i = 0; i < 5; ++i) {
23 for (
unsigned int j = 0; j < 5; ++j) {
30 theLabel(0), theOffset(0), p2pJacobian(aJacobian), measDim(0), transFlag(
31 false), measTransformation(), scatFlag(false), localDerivatives(), globalLabels(), globalDerivatives() {
48 const TVectorD &aResiduals,
const TVectorD &aPrecision,
49 double minPrecision) {
50 measDim = aResiduals.GetNrows();
51 unsigned int iOff = 5 -
measDim;
52 for (
unsigned int i = 0; i <
measDim; ++i) {
55 aPrecision[i] >= minPrecision ? aPrecision[i] : 0.);
56 for (
unsigned int j = 0; j <
measDim; ++j) {
73 const TVectorD &aResiduals,
const TMatrixDSym &aPrecision,
74 double minPrecision) {
75 measDim = aResiduals.GetNrows();
76 TMatrixDSymEigen measEigen(aPrecision);
82 TVectorD transPrecision = measEigen.GetEigenValues();
84 unsigned int iOff = 5 -
measDim;
85 for (
unsigned int i = 0; i <
measDim; ++i) {
88 transPrecision[i] >= minPrecision ? transPrecision[i] : 0.);
89 for (
unsigned int j = 0; j <
measDim; ++j) {
104 const TVectorD &aPrecision,
double minPrecision) {
105 measDim = aResiduals.GetNrows();
106 unsigned int iOff = 5 -
measDim;
107 for (
unsigned int i = 0; i <
measDim; ++i) {
110 aPrecision[i] >= minPrecision ? aPrecision[i] : 0.);
125 const TMatrixDSym &aPrecision,
double minPrecision) {
126 measDim = aResiduals.GetNrows();
127 TMatrixDSymEigen measEigen(aPrecision);
133 TVectorD transPrecision = measEigen.GetEigenValues();
134 unsigned int iOff = 5 -
measDim;
135 for (
unsigned int i = 0; i <
measDim; ++i) {
138 transPrecision[i] >= minPrecision ? transPrecision[i] : 0.);
139 for (
unsigned int j = 0; j <
measDim; ++j) {
176 aTransformation.UnitMatrix();
189 const TVectorD &aPrecision) {
215 const TMatrixDSym &aPrecision) {
217 TMatrixDSymEigen scatEigen(aPrecision);
218 TMatrixD aTransformation = scatEigen.GetEigenVectors();
220 TVectorD transResiduals = aTransformation * aResiduals;
221 TVectorD transPrecision = scatEigen.GetEigenValues();
222 for (
unsigned int i = 0; i < 2; ++i) {
225 for (
unsigned int j = 0; j < 2; ++j) {
254 aTransformation.ResizeTo(2, 2);
256 for (
unsigned int i = 0; i < 2; ++i) {
257 for (
unsigned int j = 0; j < 2; ++j) {
262 aTransformation.UnitMatrix();
299 const TMatrixD &aDerivatives) {
368 * aJac.Sub<
SMatrix33>(0, 0).InverseFast(ifail);
398 if (aDirection < 1) {
408 if (!matW.InvertFast()) {
409 std::cout <<
" GblPoint::getDerivatives failed to invert matrix: "
410 << matW << std::endl;
412 <<
" Possible reason for singular matrix: multiple GblPoints at same arc-length"
414 throw std::overflow_error(
"Singular matrix inversion exception");
426 std::cout <<
" GblPoint";
428 std::cout <<
", label " <<
theLabel;
434 std::cout <<
", " <<
measDim <<
" measurements";
437 std::cout <<
", scatterer";
440 std::cout <<
", diagonalized";
444 <<
" local derivatives";
448 <<
" global derivatives";
450 std::cout << std::endl;
453 std::cout <<
" Measurement" << std::endl;
460 std::cout <<
" Scatterer" << std::endl;
465 std::cout <<
" Local Derivatives:" << std::endl;
469 std::cout <<
" Global Labels:";
470 for (
unsigned int i = 0; i <
globalLabels.size(); ++i) {
473 std::cout << std::endl;
474 std::cout <<
" Global Derivatives:" << std::endl;
477 std::cout <<
" Jacobian " << std::endl;
478 std::cout <<
" Point-to-point " << std::endl <<
p2pJacobian
481 std::cout <<
" To previous offset " << std::endl <<
prevJacobian
483 std::cout <<
" To next offset " << std::endl <<
nextJacobian
void addNextJacobian(const SMatrix55 &aJac)
Define jacobian to next scatterer (by GBLTrajectory constructor)
SMatrix55 nextJacobian
Jacobian to next scatterer (or last measurement)
unsigned int getNumLocals() const
Retrieve number of local derivatives from a point.
void getMeasurement(SMatrix55 &aProjection, SVector5 &aResiduals, SVector5 &aPrecision) const
Retrieve measurement of a point.
ROOT::Math::SVector< double, 5 > SVector5
void addLocals(const TMatrixD &aDerivatives)
Add local derivatives to a point.
SVector5 measResiduals
Measurement residuals.
std::vector< int > globalLabels
Labels of global (MP-II) derivatives.
unsigned int hasMeasurement() const
Check for measurement at a point.
int theOffset
Offset number at point if not negative (else interpolation needed)
SVector2 scatResiduals
Scattering residuals (initial kinks if iterating)
ROOT::Math::SMatrix< double, 3, 2 > SMatrix32
int getOffset() const
Retrieve offset for point.
std::vector< int > getGlobalLabels() const
Retrieve global derivatives labels from a point.
ROOT::Math::SVector< double, 2 > SVector2
bool transFlag
Transformation exists?
void setLabel(unsigned int aLabel)
Define label of point (by GBLTrajectory constructor)
ROOT::Math::SMatrix< double, 2 > SMatrix22
TMatrixD localDerivatives
Derivatives of measurement vs additional local (fit) parameters.
void addGlobals(const std::vector< int > &aLabels, const TMatrixD &aDerivatives)
Add global derivatives to a point.
void addMeasurement(const TMatrixD &aProjection, const TVectorD &aResiduals, const TVectorD &aPrecision, double minPrecision=0.)
Add a measurement to a point.
unsigned int theLabel
Label identifying point.
SMatrix22 scatTransformation
Transformation of diagonalization (of scat. precision matrix)
SMatrix55 measProjection
Projection from measurement to local system.
void getScatTransformation(TMatrixD &aTransformation) const
Get scatterer transformation (from diagonalization).
Namespace for the general broken lines package.
SMatrix55 p2pJacobian
Point-to-point jacobian from previous point.
TMatrixD globalDerivatives
Derivatives of measurement vs additional global (MP-II) parameters.
SMatrix55 prevJacobian
Jacobian to previous scatterer (or first measurement)
ROOT::Math::SMatrix< double, 2, 3 > SMatrix23
const TMatrixD & getLocalDerivatives() const
Retrieve local derivatives from a point.
ROOT::Math::SMatrix< double, 3 > SMatrix33
void printPoint(unsigned int level=0) const
Print GblPoint.
TMatrixD measTransformation
Transformation of diagonalization (of meas. precision matrix)
unsigned int getLabel() const
Retrieve label of point.
GblPoint(const TMatrixD &aJacobian)
Create a point.
unsigned int getNumGlobals() const
Retrieve number of global derivatives from a point.
const SMatrix55 & getP2pJacobian() const
Retrieve point-to-(previous)point jacobian.
ROOT::Math::SMatrix< double, 5, 5 > SMatrix55
void addPrevJacobian(const SMatrix55 &aJac)
Define jacobian to previous scatterer (by GBLTrajectory constructor)
SVector2 scatPrecision
Scattering precision (diagonal of inverse covariance matrix)
void setOffset(int anOffset)
Define offset for point (by GBLTrajectory constructor)
void addScatterer(const TVectorD &aResiduals, const TVectorD &aPrecision)
Add a (thin) scatterer to a point.
void getDerivatives(int aDirection, SMatrix22 &matW, SMatrix22 &matWJ, SVector2 &vecWd) const
Retrieve derivatives of local track model.
void getScatterer(SMatrix22 &aTransformation, SVector2 &aResiduals, SVector2 &aPrecision) const
Retrieve scatterer of a point.
void getMeasTransformation(TMatrixD &aTransformation) const
Get measurement transformation (from diagonalization).
const TMatrixD & getGlobalDerivatives() const
Retrieve global derivatives from a point.
unsigned int measDim
Dimension of measurement (1-5), 0 indicates absence of measurement.
bool scatFlag
Scatterer present?
SVector5 measPrecision
Measurement precision (diagonal of inverse covariance matrix)
bool hasScatterer() const
Check for scatterer at a point.