31 using namespace Eigen;
45 GblData::GblData(
unsigned int aLabel,
dataBlockType aType,
double aValue,
46 double aPrec,
unsigned int aTraj,
unsigned int aPoint) :
47 theLabel(aLabel), theRow(0), theType(aType), theValue(aValue),
48 thePrecision(aPrec), theTrajectory(aTraj), thePoint(aPoint),
49 theDownWeight(1.), thePrediction(0.), theNumLocal(0), moreParameters(),
64 const std::vector<double> &derivatives) {
65 for (
unsigned int i = 0;
i < derivatives.size(); ++
i)
100 if (scaledResidual < 4.6851) {
101 aWeight = (1.0 - 0.045558 * scaledResidual * scaledResidual);
106 }
else if (aMethod == 2)
108 if (scaledResidual >= 1.345) {
109 aWeight = 1.345 / scaledResidual;
111 }
else if (aMethod == 3)
113 aWeight = 1.0 / (1.0 + (scaledResidual * scaledResidual / 5.6877));
177 unsigned int &numLocal,
unsigned int* &indLocal,
double* &derLocal) {
204 unsigned int* &indLocal,
double* &derLocal,
unsigned int &aTraj,
205 unsigned int &aPoint,
unsigned int &aRow) {
232 double &aDownWeight,
unsigned int &numLocal,
unsigned int* &indLocal,
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
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.
unsigned int thePoint
Point number (on trajectory)
dataBlockType theType
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement) ...
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.
dataBlockType getType() const
Get type.
double getChi2() const
Calculate Chi2 contribution.
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
unsigned int theLabel
Label (of corresponding point)
void getResidual(double &aResidual, double &aVariance, double &aDownWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal)
Get data for residual (and errors).
std::vector< double > moreDerivatives
List of derivatives for fit.
void getLocalData(double &aValue, double &aWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal)
Get Data for local fit.
Namespace for the general broken lines package.
double theDownWeight
Down-weighting factor (0-1)
void setPrediction(const VVector &aVector)
Calculate prediction for data from fit (by GblTrajectory::fit).
double theDerivatives[7]
List of derivatives for fit.
double thePrediction
Prediction from fit.
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
double thePrecision
Precision (1/sigma**2)
void printData() const
Print data block.
double setDownWeighting(unsigned int aMethod)
Outlier down weighting with M-estimators (by GblTrajectory::fit).
unsigned int theRow
Row number (of measurement)
Simple Vector based on std::vector<double>
double theValue
Value (residual)
unsigned int getLabel() const
Get label.
unsigned int theTrajectory
Trajectory number.