GENFIT  Rev:NoNumberAvailable
Public Member Functions | Private Attributes | List of all members
gbl::GblData Class Reference

Data (block) for independent scalar measurement. More...

#include <GblData.h>

Collaboration diagram for gbl::GblData:
Collaboration graph

Public Member Functions

 GblData (unsigned int aLabel, double aMeas, double aPrec)
 Create data block. More...
 
virtual ~GblData ()
 
void addDerivatives (unsigned int iRow, const std::vector< unsigned int > &labDer, const SMatrix55 &matDer, unsigned int iOff, const TMatrixD &derLocal, const std::vector< int > &labGlobal, const TMatrixD &derGlobal, unsigned int nLocal, const TMatrixD &derTrans)
 Add derivatives from measurement. More...
 
void addDerivatives (unsigned int iRow, const std::vector< unsigned int > &labDer, const SMatrix27 &matDer, unsigned int nLocal, const TMatrixD &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...
 
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...
 
void getLocalData (double &aValue, double &aWeight, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal)
 Get Data for local fit. More...
 
void getAllData (double &aValue, double &aErr, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal, std::vector< int > *&labGlobal, std::vector< double > *&derGlobal)
 Get all Data for MP-II binary record. More...
 
void getResidual (double &aResidual, double &aVariance, double &aDownWeight, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal)
 Get data for residual (and errors). More...
 

Private Attributes

unsigned int theLabel
 Label (of measurements point) More...
 
double theValue
 Value (residual) More...
 
double thePrecision
 Precision (1/sigma**2) More...
 
double theDownWeight
 Down-weighting factor (0-1) More...
 
double thePrediction
 Prediction from fit. More...
 
std::vector< unsigned int > theParameters
 List of fit parameters (with non zero derivatives) More...
 
std::vector< double > theDerivatives
 List of derivatives for fit. More...
 
std::vector< int > globalLabels
 Labels for global derivatives. More...
 
std::vector< double > globalDerivatives
 Global derivatives. More...
 

Detailed Description

Data (block) for independent scalar measurement.

Data (block) containing value, precision and derivatives for measurements and kinks. Created from attributes of GblPoints, used to construct linear equation system for track fit.

Definition at line 33 of file GblData.h.

Constructor & Destructor Documentation

◆ GblData()

gbl::GblData::GblData ( unsigned int  aLabel,
double  aValue,
double  aPrec 
)

Create data block.

Parameters
[in]aLabelLabel of corresponding point
[in]aValueValue of (scalar) measurement
[in]aPrecPrecision of (scalar) measurement

Definition at line 19 of file GblData.cc.

◆ ~GblData()

gbl::GblData::~GblData ( )
virtual

Definition at line 25 of file GblData.cc.

Member Function Documentation

◆ addDerivatives() [1/3]

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.

Parameters
[in]indexLabels for derivatives
[in]derivativesDerivatives (vector)

Definition at line 120 of file GblData.cc.

References theDerivatives, and theParameters.

◆ addDerivatives() [2/3]

void gbl::GblData::addDerivatives ( unsigned int  iRow,
const std::vector< unsigned int > &  labDer,
const SMatrix27 matDer,
unsigned int  extOff,
const TMatrixD &  extDer 
)

Add derivatives from kink.

Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.

Parameters
[in]iRowRow index (0-1) in 2D kink
[in]labDerLabels for derivatives
[in]matDerDerivatives (matrix) 'kink vs track fit parameters'
[in]extOffOffset for external parameters
[in]extDerDerivatives for external Parameters

Definition at line 89 of file GblData.cc.

References theDerivatives, and theParameters.

◆ addDerivatives() [3/3]

void gbl::GblData::addDerivatives ( unsigned int  iRow,
const std::vector< unsigned int > &  labDer,
const SMatrix55 matDer,
unsigned int  iOff,
const TMatrixD &  derLocal,
const std::vector< int > &  labGlobal,
const TMatrixD &  derGlobal,
unsigned int  extOff,
const TMatrixD &  extDer 
)

Add derivatives from measurement.

Add (non-zero) derivatives to data block. Fill list of labels of used fit parameters.

Parameters
[in]iRowRow index (0-4) in up to 5D measurement
[in]labDerLabels for derivatives
[in]matDerDerivatives (matrix) 'measurement vs track fit parameters'
[in]iOffOffset for row index for additional parameters
[in]derLocalDerivatives (matrix) for additional local parameters
[in]labGlobalLabels for additional global (MP-II) parameters
[in]derGlobalDerivatives (matrix) for additional global (MP-II) parameters
[in]extOffOffset for external parameters
[in]extDerDerivatives for external Parameters

Definition at line 41 of file GblData.cc.

References globalDerivatives, globalLabels, theDerivatives, and theParameters.

Referenced by gbl::GblTrajectory::prepare().

◆ getAllData()

void gbl::GblData::getAllData ( double &  aValue,
double &  aErr,
std::vector< unsigned int > *&  indLocal,
std::vector< double > *&  derLocal,
std::vector< int > *&  labGlobal,
std::vector< double > *&  derGlobal 
)

Get all Data for MP-II binary record.

Parameters
[out]aValueValue
[out]aErrError
[out]indLocalList of labels of local parameters
[out]derLocalList of derivatives for local parameters
[out]labGlobalList of labels of global parameters
[out]derGlobalList of derivatives for global parameters

Definition at line 220 of file GblData.cc.

References globalDerivatives, globalLabels, theDerivatives, theParameters, thePrecision, and theValue.

◆ getChi2()

double gbl::GblData::getChi2 ( ) const

Calculate Chi2 contribution.

Returns
(down-weighted) Chi2

Definition at line 173 of file GblData.cc.

References theDownWeight, thePrecision, thePrediction, and theValue.

◆ getLocalData()

void gbl::GblData::getLocalData ( double &  aValue,
double &  aWeight,
std::vector< unsigned int > *&  indLocal,
std::vector< double > *&  derLocal 
)

Get Data for local fit.

Parameters
[out]aValueValue
[out]aWeightWeight
[out]indLocalList of labels of used (local) fit parameters
[out]derLocalList of derivatives for used (local) fit parameters

Definition at line 202 of file GblData.cc.

References theDerivatives, theDownWeight, theParameters, thePrecision, and theValue.

◆ getResidual()

void gbl::GblData::getResidual ( double &  aResidual,
double &  aVariance,
double &  aDownWeight,
std::vector< unsigned int > *&  indLocal,
std::vector< double > *&  derLocal 
)

Get data for residual (and errors).

Parameters
[out]aResidualMeasurement-Prediction
[out]aVarianceVariance (of measurement)
[out]aDownWeightDown-weighting factor
[out]indLocalList of labels of used (local) fit parameters
[out]derLocalList of derivatives for used (local) fit parameters

Definition at line 239 of file GblData.cc.

References theDerivatives, theDownWeight, theParameters, thePrecision, thePrediction, and theValue.

◆ printData()

void gbl::GblData::printData ( ) const

Print data block.

Definition at line 179 of file GblData.cc.

References theDerivatives, theLabel, theParameters, thePrecision, and theValue.

◆ setDownWeighting()

double gbl::GblData::setDownWeighting ( unsigned int  aMethod)

Outlier down weighting with M-estimators (by GblTrajectory::fit).

Parameters
[in]aMethodM-estimator (1: Tukey, 2:Huber, 3:Cauchy)

Definition at line 144 of file GblData.cc.

References theDownWeight, thePrecision, thePrediction, and theValue.

◆ setPrediction()

void gbl::GblData::setPrediction ( const VVector aVector)

Calculate prediction for data from fit (by GblTrajectory::fit).

Definition at line 132 of file GblData.cc.

References theDerivatives, theParameters, and thePrediction.

Member Data Documentation

◆ globalDerivatives

std::vector<double> gbl::GblData::globalDerivatives
private

Global derivatives.

Definition at line 72 of file GblData.h.

Referenced by addDerivatives(), and getAllData().

◆ globalLabels

std::vector<int> gbl::GblData::globalLabels
private

Labels for global derivatives.

Definition at line 71 of file GblData.h.

Referenced by addDerivatives(), and getAllData().

◆ theDerivatives

std::vector<double> gbl::GblData::theDerivatives
private

List of derivatives for fit.

Definition at line 70 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

◆ theDownWeight

double gbl::GblData::theDownWeight
private

Down-weighting factor (0-1)

Definition at line 67 of file GblData.h.

Referenced by getChi2(), getLocalData(), getResidual(), and setDownWeighting().

◆ theLabel

unsigned int gbl::GblData::theLabel
private

Label (of measurements point)

Definition at line 64 of file GblData.h.

Referenced by printData().

◆ theParameters

std::vector<unsigned int> gbl::GblData::theParameters
private

List of fit parameters (with non zero derivatives)

Definition at line 69 of file GblData.h.

Referenced by addDerivatives(), getAllData(), getLocalData(), getResidual(), printData(), and setPrediction().

◆ thePrecision

double gbl::GblData::thePrecision
private

Precision (1/sigma**2)

Definition at line 66 of file GblData.h.

Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().

◆ thePrediction

double gbl::GblData::thePrediction
private

Prediction from fit.

Definition at line 68 of file GblData.h.

Referenced by getChi2(), getResidual(), setDownWeighting(), and setPrediction().

◆ theValue

double gbl::GblData::theValue
private

Value (residual)

Definition at line 65 of file GblData.h.

Referenced by getAllData(), getChi2(), getLocalData(), getResidual(), printData(), and setDownWeighting().


The documentation for this class was generated from the following files: