20 theLabel(aLabel), theValue(aValue), thePrecision(aPrec), theDownWeight(
21 1.), thePrediction(0.), theParameters(), theDerivatives(), globalLabels(), globalDerivatives() {
42 const std::vector<unsigned int> &labDer,
const SMatrix55 &matDer,
43 unsigned int iOff,
const TMatrixD &derLocal,
44 const std::vector<int> &labGlobal,
const TMatrixD &derGlobal,
45 unsigned int extOff,
const TMatrixD &extDer) {
47 unsigned int nParMax = 5 + derLocal.GetNcols() + extDer.GetNcols();
51 for (
int i = 0;
i < derLocal.GetNcols(); ++
i)
53 if (derLocal(iRow - iOff,
i)) {
59 for (
int i = 0;
i < extDer.GetNcols(); ++
i)
61 if (extDer(iRow - iOff,
i)) {
67 for (
unsigned int i = 0;
i < 5; ++
i)
69 if (labDer[
i] and matDer(iRow,
i)) {
76 for (
int i = 0;
i < derGlobal.GetNcols(); ++
i)
90 const std::vector<unsigned int> &labDer,
const SMatrix27 &matDer,
91 unsigned int extOff,
const TMatrixD &extDer) {
93 unsigned int nParMax = 7 + extDer.GetNcols();
97 for (
int i = 0;
i < extDer.GetNcols(); ++
i)
99 if (extDer(iRow,
i)) {
105 for (
unsigned int i = 0;
i < 7; ++
i)
107 if (labDer[
i] and matDer(iRow,
i)) {
121 const std::vector<double> &derivatives) {
122 for (
unsigned int i = 0;
i < derivatives.size(); ++
i)
124 if (derivatives[
i]) {
150 if (scaledResidual < 4.6851) {
151 aWeight = (1.0 - 0.045558 * scaledResidual * scaledResidual);
156 }
else if (aMethod == 2)
158 if (scaledResidual >= 1.345) {
159 aWeight = 1.345 / scaledResidual;
161 }
else if (aMethod == 3)
163 aWeight = 1.0 / (1.0 + (scaledResidual * scaledResidual / 5.6877));
203 std::vector<unsigned int>* &indLocal, std::vector<double>* &derLocal) {
221 std::vector<unsigned int>* &indLocal, std::vector<double>* &derLocal,
222 std::vector<int>* &labGlobal, std::vector<double>* &derGlobal) {
240 double &aDownWeight, std::vector<unsigned int>* &indLocal,
241 std::vector<double>* &derLocal) {
std::vector< unsigned int > theParameters
List of fit parameters (with non zero derivatives)
std::vector< double > theDerivatives
List of derivatives for fit.
ROOT::Math::SMatrix< double, 2, 7 > SMatrix27
GblData(unsigned int aLabel, double aMeas, double aPrec)
Create data block.
void getLocalData(double &aValue, double &aWeight, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal)
Get Data for local fit.
double getChi2() const
Calculate Chi2 contribution.
void getResidual(double &aResidual, double &aVariance, double &aDownWeight, std::vector< unsigned int > *&indLocal, std::vector< double > *&derLocal)
Get data for residual (and errors).
unsigned int theLabel
Label (of measurements point)
ROOT::Math::SMatrix< double, 5, 5 > SMatrix55
double theDownWeight
Down-weighting factor (0-1)
void setPrediction(const VVector &aVector)
Calculate prediction for data from fit (by GblTrajectory::fit).
double thePrediction
Prediction from fit.
std::vector< int > globalLabels
Labels for global derivatives.
std::vector< double > globalDerivatives
Global 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).
Simple Vector based on std::vector<double>
double theValue
Value (residual)
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.
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.