![]() |
GeneralBrokenLines
Rev: 2.2.0
|
Data (block) for independent scalar measurement. More...
#include <GblData.h>
Public Member Functions | |
| GblData (unsigned int aLabel, dataBlockType aType, double aMeas, double aPrec, unsigned int aTraj=0, unsigned int aPoint=0) | |
| Create data block. More... | |
| GblData (const GblData &)=default | |
| GblData & | operator= (const GblData &)=default |
| GblData (GblData &&)=default | |
| GblData & | operator= (GblData &&)=default |
| virtual | ~GblData () |
| template<typename LocalDerivative , typename ExtDerivative > | |
| void | addDerivatives (unsigned int iRow, const std::array< unsigned int, 5 > &labDer, const Matrix5d &matDer, unsigned int iOff, const Eigen::MatrixBase< LocalDerivative > &derLocal, unsigned int extOff, const Eigen::MatrixBase< ExtDerivative > &extDer) |
| Add derivatives from measurement. More... | |
| template<typename ExtDerivative > | |
| void | addDerivatives (unsigned int iRow, const std::array< unsigned int, 7 > &labDer, const Matrix27d &matDer, unsigned int extOff, const Eigen::MatrixBase< ExtDerivative > &extDer) |
| Add derivatives from kink. More... | |
| void | addDerivatives (const std::vector< unsigned int > &index, const std::vector< double > &derivatives) |
| Add derivatives from external seed. More... | |
| void | setPrediction (const VVector &aVector) |
| Calculate prediction for data from fit (by GblTrajectory::fit). More... | |
| double | setDownWeighting (unsigned int aMethod) |
| Outlier down weighting with M-estimators (by GblTrajectory::fit). More... | |
| double | getChi2 () const |
| Calculate Chi2 contribution. More... | |
| void | printData () const |
| Print data block. More... | |
| unsigned int | getLabel () const |
| Get label. More... | |
| dataBlockType | getType () const |
| Get type. More... | |
| unsigned int | getNumSimple () const |
| void | getLocalData (double &aValue, double &aWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal) |
| Get Data for local fit. More... | |
| void | getAllData (double &aValue, double &aErr, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal, unsigned int &aTraj, unsigned int &aPoint, unsigned int &aRow) |
| Get all Data for MP-II binary record. More... | |
| void | getResidual (double &aResidual, double &aVariance, double &aDownWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal) |
| Get data for residual (and errors). More... | |
Private Attributes | |
| unsigned int | theLabel |
| Label (of corresponding point) More... | |
| unsigned int | theRow |
| Row number (of measurement) More... | |
| dataBlockType | theType |
| Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) More... | |
| double | theValue |
| Value (residual) More... | |
| double | thePrecision |
| Precision (1/sigma**2) More... | |
| unsigned int | theTrajectory |
| Trajectory number. More... | |
| unsigned int | thePoint |
| Point number (on trajectory) More... | |
| unsigned int | theDWMethod |
| Down-weighting method (0: None, 1: Tukey, 2: Huber, 3: Cauchy) More... | |
| double | theDownWeight |
| Down-weighting factor (0-1) More... | |
| double | thePrediction |
| Prediction from fit. More... | |
| unsigned int | theNumLocal |
| Number of (non zero) local derivatives (max 7 for kinks) More... | |
| unsigned int | theParameters [7] |
| List of parameters (with non zero derivatives) More... | |
| double | theDerivatives [7] |
| List of derivatives for fit. More... | |
| std::vector< unsigned int > | moreParameters |
| List of fit parameters (with non zero derivatives) More... | |
| std::vector< double > | moreDerivatives |
| List of derivatives for fit. More... | |
Data (block) for independent scalar measurement.
Data (block) containing value, precision and derivatives for measurements, kinks and seeds. Created from attributes of GblPoints, used to construct linear equation system for track fit.
| gbl::GblData::GblData | ( | unsigned int | aLabel, |
| dataBlockType | aType, | ||
| double | aValue, | ||
| double | aPrec, | ||
| unsigned int | aTraj = 0, |
||
| unsigned int | aPoint = 0 |
||
| ) |
Create data block.
| [in] | aLabel | Label of corresponding point |
| [in] | aType | Type of (scalar) measurement |
| [in] | aValue | Value of (scalar) measurement |
| [in] | aPrec | Precision of (scalar) measurement |
| [in] | aTraj | Trajectory number |
| [in] | aPoint | Point number |
Definition at line 45 of file GblData.cpp.
|
default |
|
default |
|
virtual |
Definition at line 53 of file GblData.cpp.
| void gbl::GblData::addDerivatives | ( | const std::vector< unsigned int > & | index, |
| const std::vector< double > & | derivatives | ||
| ) |
Add derivatives from external seed.
Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.
| [in] | index | Labels for derivatives |
| [in] | derivatives | Derivatives (vector) |
Definition at line 62 of file GblData.cpp.
References moreDerivatives, and moreParameters.
| void gbl::GblData::addDerivatives | ( | unsigned int | iRow, |
| const std::array< unsigned int, 5 > & | labDer, | ||
| const Matrix5d & | matDer, | ||
| unsigned int | iOff, | ||
| const Eigen::MatrixBase< LocalDerivative > & | derLocal, | ||
| unsigned int | extOff, | ||
| const Eigen::MatrixBase< ExtDerivative > & | extDer | ||
| ) |
Add derivatives from measurement.
Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.
| LocalDerivative | Local derivatives matrix |
| ExtDerivative | External derivatives matrix |
| [in] | iRow | Row index (0-4) in up to 5D measurement |
| [in] | labDer | Labels for derivatives |
| [in] | matDer | Derivatives (matrix) 'measurement vs track fit parameters' |
| [in] | iOff | Offset for row index for additional parameters |
| [in] | derLocal | Derivatives (matrix) for additional local parameters |
| [in] | extOff | Offset for external parameters |
| [in] | extDer | Derivatives for external Parameters |
Definition at line 144 of file GblData.h.
References moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and theRow.
Referenced by gbl::GblTrajectory::prepare().
| void gbl::GblData::addDerivatives | ( | unsigned int | iRow, |
| const std::array< unsigned int, 7 > & | labDer, | ||
| const Matrix27d & | matDer, | ||
| unsigned int | extOff, | ||
| const Eigen::MatrixBase< ExtDerivative > & | extDer | ||
| ) |
Add derivatives from kink.
Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.
| ExtDerivative | External derivatives matrix |
| [in] | iRow | Row index (0-1) in 2D kink |
| [in] | labDer | Labels for derivatives |
| [in] | matDer | Derivatives (matrix) 'kink vs track fit parameters' |
| [in] | extOff | Offset for external parameters |
| [in] | extDer | Derivatives for external Parameters |
Definition at line 210 of file GblData.h.
References moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and theRow.
| void gbl::GblData::getAllData | ( | double & | aValue, |
| double & | aErr, | ||
| unsigned int & | numLocal, | ||
| unsigned int *& | indLocal, | ||
| double *& | derLocal, | ||
| unsigned int & | aTraj, | ||
| unsigned int & | aPoint, | ||
| unsigned int & | aRow | ||
| ) |
Get all Data for MP-II binary record.
| [out] | aValue | Value |
| [out] | aErr | Error |
| [out] | numLocal | Number of local labels/derivatives |
| [out] | indLocal | Array of labels of used (local) fit parameters |
| [out] | derLocal | Array of derivatives for used (local) fit parameters |
| [out] | aTraj | Trajectory number |
| [out] | aPoint | Point number |
| [out] | aRow | Row number |
Definition at line 224 of file GblData.cpp.
References moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, thePoint, thePrecision, theRow, theTrajectory, and theValue.
| double gbl::GblData::getChi2 | ( | ) | const |
Calculate Chi2 contribution.
For down-weighting with M-estimators the corresponding objective function is used.
Definition at line 125 of file GblData.cpp.
References theDWMethod, thePrecision, thePrediction, and theValue.
| unsigned int gbl::GblData::getLabel | ( | ) | const |
Get label.
Definition at line 177 of file GblData.cpp.
References theLabel.
| void gbl::GblData::getLocalData | ( | double & | aValue, |
| double & | aWeight, | ||
| unsigned int & | numLocal, | ||
| unsigned int *& | indLocal, | ||
| double *& | derLocal | ||
| ) |
Get Data for local fit.
| [out] | aValue | Value |
| [out] | aWeight | Weight |
| [out] | numLocal | Number of local labels/derivatives |
| [out] | indLocal | Array of labels of used (local) fit parameters |
| [out] | derLocal | Array of derivatives for used (local) fit parameters |
Definition at line 197 of file GblData.cpp.
References moreDerivatives, moreParameters, theDerivatives, theDownWeight, theNumLocal, theParameters, thePrecision, and theValue.
| unsigned int gbl::GblData::getNumSimple | ( | ) | const |
| void gbl::GblData::getResidual | ( | double & | aResidual, |
| double & | aVariance, | ||
| double & | aDownWeight, | ||
| unsigned int & | numLocal, | ||
| unsigned int *& | indLocal, | ||
| double *& | derLocal | ||
| ) |
Get data for residual (and errors).
| [out] | aResidual | Measurement-Prediction |
| [out] | aVariance | Variance (of measurement) |
| [out] | aDownWeight | Down-weighting factor |
| [out] | numLocal | Number of local labels/derivatives |
| [out] | indLocal | Array of labels of used (local) fit parameters |
| [out] | derLocal | Array of derivatives for used (local) fit parameters |
Definition at line 252 of file GblData.cpp.
References moreDerivatives, moreParameters, theDerivatives, theDownWeight, theNumLocal, theParameters, thePrecision, thePrediction, and theValue.
| dataBlockType gbl::GblData::getType | ( | ) | const |
| void gbl::GblData::printData | ( | ) | const |
Print data block.
Definition at line 150 of file GblData.cpp.
References moreDerivatives, moreParameters, theDerivatives, theLabel, theNumLocal, theParameters, thePrecision, theRow, theType, and theValue.
| double gbl::GblData::setDownWeighting | ( | unsigned int | aMethod | ) |
Outlier down weighting with M-estimators (by GblTrajectory::fit).
| [in] | aMethod | M-estimator (1: Tukey, 2:Huber, 3:Cauchy) |
Definition at line 93 of file GblData.cpp.
References theDownWeight, theDWMethod, thePrecision, thePrediction, and theValue.
| void gbl::GblData::setPrediction | ( | const VVector & | aVector | ) |
Calculate prediction for data from fit (by GblTrajectory::fit).
Definition at line 74 of file GblData.cpp.
References moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and thePrediction.
|
private |
List of derivatives for fit.
Definition at line 140 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
List of fit parameters (with non zero derivatives)
Definition at line 139 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
List of derivatives for fit.
Definition at line 137 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
Down-weighting factor (0-1)
Definition at line 132 of file GblData.h.
Referenced by getLocalData(), getResidual(), and setDownWeighting().
|
private |
Down-weighting method (0: None, 1: Tukey, 2: Huber, 3: Cauchy)
Definition at line 131 of file GblData.h.
Referenced by getChi2(), and setDownWeighting().
|
private |
Label (of corresponding point)
Definition at line 124 of file GblData.h.
Referenced by getLabel(), and printData().
|
private |
Number of (non zero) local derivatives (max 7 for kinks)
Definition at line 135 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
List of parameters (with non zero derivatives)
Definition at line 136 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
|
private |
Precision (1/sigma**2)
Definition at line 128 of file GblData.h.
Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().
|
private |
Prediction from fit.
Definition at line 133 of file GblData.h.
Referenced by getChi2(), getResidual(), setDownWeighting(), and setPrediction().
|
private |
Row number (of measurement)
Definition at line 125 of file GblData.h.
Referenced by addDerivatives(), getAllData(), and printData().
|
private |
|
private |
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement)
Definition at line 126 of file GblData.h.
Referenced by getType(), and printData().
|
private |
Value (residual)
Definition at line 127 of file GblData.h.
Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().