Data (block) for independent scalar measurement. More...
#include <GblData.h>
Public Member Functions | |
template<typename LocalDerivative , typename TrafoDerivative > | |
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 nLocal, const Eigen::MatrixBase< TrafoDerivative > &derTrans) |
Add derivatives from measurement. More... | |
template<typename TrafoDerivative > | |
void | addDerivatives (unsigned int iRow, const std::array< unsigned int, 7 > &labDer, const Matrix27d &matDer, unsigned int nLocal, const Eigen::MatrixBase< TrafoDerivative > &derTrans) |
Add derivatives from kink. More... | |
void | addDerivatives (const std::vector< unsigned int > &index, const std::vector< double > &derivatives) |
Add derivatives from external seed. More... | |
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 (GblData &&)=default | |
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... | |
double | getChi2 () const |
Calculate Chi2 contribution. More... | |
unsigned int | getLabel () const |
Get label. More... | |
void | getLocalData (double &aValue, double &aWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal) |
Get Data for local fit. More... | |
unsigned int | getNumSimple () const |
void | getResidual (double &aResidual, double &aVariance, double &aDownWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal) |
Get data for residual (and errors). More... | |
dataBlockType | getType () const |
Get type. More... | |
GblData & | operator= (const GblData &)=default |
GblData & | operator= (GblData &&)=default |
void | printData () const |
Print data block. More... | |
double | setDownWeighting (unsigned int aMethod) |
Outlier down weighting with M-estimators (by GblTrajectory::fit). More... | |
void | setPrediction (const VVector &aVector) |
Calculate prediction for data from fit (by GblTrajectory::fit). More... | |
virtual | ~GblData () |
Private Attributes | |
std::vector< double > | moreDerivatives |
List of derivatives for fit. More... | |
std::vector< unsigned int > | moreParameters |
List of fit parameters (with non zero derivatives) More... | |
double | theDerivatives [7] |
List of derivatives for fit. More... | |
double | theDownWeight |
Down-weighting factor (0-1) More... | |
unsigned int | theLabel |
Label (of corresponding point) 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... | |
unsigned int | thePoint |
Point number (on trajectory) More... | |
double | thePrecision |
Precision (1/sigma**2) More... | |
double | thePrediction |
Prediction from fit. More... | |
unsigned int | theRow |
Row number (of measurement) More... | |
unsigned int | theTrajectory |
Trajectory number. More... | |
dataBlockType | theType |
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) More... | |
double | theValue |
Value (residual) 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.cc.
|
default |
|
default |
|
virtual |
Definition at line 54 of file GblData.cc.
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< TrafoDerivative > & | extDer | ||
) |
Add derivatives from measurement.
Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.
[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 126 of file GblData.h.
References mps_fire::i, 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< TrafoDerivative > & | extDer | ||
) |
Add derivatives from kink.
Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.
[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 205 of file GblData.h.
References mps_fire::i, moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and theRow.
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 63 of file GblData.cc.
References mps_fire::i, moreDerivatives, and moreParameters.
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 203 of file GblData.cc.
References moreDerivatives, moreParameters, mathSSE::sqrt(), theDerivatives, theNumLocal, theParameters, thePoint, thePrecision, theRow, theTrajectory, and theValue.
double gbl::GblData::getChi2 | ( | ) | const |
Definition at line 123 of file GblData.cc.
References theDownWeight, thePrecision, thePrediction, and theValue.
unsigned int gbl::GblData::getLabel | ( | ) | const |
Get label.
Definition at line 156 of file GblData.cc.
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 176 of file GblData.cc.
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 231 of file GblData.cc.
References moreDerivatives, moreParameters, theDerivatives, theDownWeight, theNumLocal, theParameters, thePrecision, thePrediction, and theValue.
dataBlockType gbl::GblData::getType | ( | ) | const |
Get type.
Definition at line 164 of file GblData.cc.
References theType.
Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::getDaughterObjects(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::getObjectRef(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::getShortType(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::properties().
void gbl::GblData::printData | ( | ) | const |
Print data block.
Definition at line 129 of file GblData.cc.
References gather_cfg::cout, mps_fire::i, 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 94 of file GblData.cc.
References mathSSE::sqrt(), theDownWeight, thePrecision, thePrediction, and theValue.
void gbl::GblData::setPrediction | ( | const VVector & | aVector | ) |
Calculate prediction for data from fit (by GblTrajectory::fit).
Definition at line 75 of file GblData.cc.
References mps_fire::i, moreDerivatives, moreParameters, theDerivatives, theNumLocal, theParameters, and thePrediction.
|
private |
List of derivatives for fit.
Definition at line 110 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 109 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
List of derivatives for fit.
Definition at line 107 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
Down-weighting factor (0-1)
Definition at line 102 of file GblData.h.
Referenced by getChi2(), getLocalData(), getResidual(), and setDownWeighting().
|
private |
Label (of corresponding point)
Definition at line 95 of file GblData.h.
Referenced by getLabel(), and printData().
|
private |
Number of (non zero) local derivatives (max 7 for kinks)
Definition at line 105 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
List of parameters (with non zero derivatives)
Definition at line 106 of file GblData.h.
Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().
|
private |
|
private |
Precision (1/sigma**2)
Definition at line 99 of file GblData.h.
Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().
|
private |
Prediction from fit.
Definition at line 103 of file GblData.h.
Referenced by getChi2(), getResidual(), setDownWeighting(), and setPrediction().
|
private |
Row number (of measurement)
Definition at line 96 of file GblData.h.
Referenced by addDerivatives(), getAllData(), and printData().
|
private |
|
private |
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement)
Definition at line 97 of file GblData.h.
Referenced by twikiExport.Constituent::__str__(), getType(), and printData().
|
private |
Value (residual)
Definition at line 98 of file GblData.h.
Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().