61 double aPrec,
unsigned int aTraj = 0,
unsigned int aPoint = 0);
81 template<
typename LocalDerivative,
typename ExtDerivative>
83 const std::array<unsigned int, 5>& labDer,
const Matrix5d &matDer,
85 const Eigen::MatrixBase<LocalDerivative>& derLocal,
87 const Eigen::MatrixBase<ExtDerivative>& extDer);
99 template<
typename ExtDerivative>
101 const std::array<unsigned int, 7>& labDer,
const Matrix27d &matDer,
103 const Eigen::MatrixBase<ExtDerivative>& extDer);
106 const std::vector<double> &derivatives);
115 void getLocalData(
double &aValue,
double &aWeight,
unsigned int &numLocal,
116 unsigned int* &indLocal,
double* &derLocal);
117 void getAllData(
double &aValue,
double &aErr,
unsigned int &numLocal,
118 unsigned int* &indLocal,
double* &derLocal,
unsigned int &aTraj,
119 unsigned int &aPoint,
unsigned int &aRow);
120 void getResidual(
double &aResidual,
double &aVariance,
double &aDownWeight,
121 unsigned int &numLocal,
unsigned int* &indLocal,
double* &derLocal);
143 template<
typename LocalDerivative,
typename ExtDerivative>
145 const std::array<unsigned int, 5>& labDer,
const Matrix5d &matDer,
146 unsigned int iOff,
const Eigen::MatrixBase<LocalDerivative>& derLocal,
147 unsigned int extOff,
const Eigen::MatrixBase<ExtDerivative>& extDer) {
149 unsigned int nParMax = 5 + derLocal.cols() + extDer.cols();
156 for (
int i = 0; i < derLocal.cols(); ++i)
158 if (derLocal(iRow - iOff, i)) {
164 for (
int i = 0; i < extDer.cols(); ++i)
166 if (extDer(iRow - iOff, i)) {
172 for (
size_t i = 0; i < labDer.size(); ++i)
174 if (labDer[i] and matDer(iRow, i)) {
181 for (
int i = 0; i < derLocal.cols(); ++i)
183 if (derLocal(iRow - iOff, i)) {
190 for (
int i = 0; i < extDer.cols(); ++i)
192 if (extDer(iRow - iOff, i)) {
198 for (
size_t i = 0; i < labDer.size(); ++i)
200 if (labDer[i] and matDer(iRow, i)) {
209 template<
typename ExtDerivative>
211 const std::array<unsigned int, 7>& labDer,
const Matrix27d &matDer,
212 unsigned int extOff,
const Eigen::MatrixBase<ExtDerivative>& extDer) {
214 unsigned int nParMax = 7 + extDer.cols();
221 for (
int i = 0; i < extDer.cols(); ++i)
223 if (extDer(iRow, i)) {
229 for (
size_t i = 0; i < labDer.size(); ++i)
231 if (labDer[i] and matDer(iRow, i)) {
238 for (
size_t i = 0; i < labDer.size(); ++i)
240 if (labDer[i] and matDer(iRow, i)) {
Data (block) for independent scalar measurement.
double thePrecision
Precision (1/sigma**2)
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
unsigned int getNumSimple() const
double theDownWeight
Down-weighting factor (0-1)
double theDerivatives[7]
List of derivatives for fit.
double thePrediction
Prediction from fit.
GblData(unsigned int aLabel, dataBlockType aType, double aMeas, double aPrec, unsigned int aTraj=0, unsigned int aPoint=0)
Create data block.
unsigned int theTrajectory
Trajectory number.
unsigned int theNumLocal
Number of (non zero) local derivatives (max 7 for kinks)
unsigned int theLabel
Label (of corresponding point)
dataBlockType theType
Type (None, InternalMeasurement, InternalKink, ExternalSeed, ExternalMeasurement)
unsigned int theDWMethod
Down-weighting method (0: None, 1: Tukey, 2: Huber, 3: Cauchy)
GblData & operator=(GblData &&)=default
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.
dataBlockType getType() const
Get type.
unsigned int theParameters[7]
List of parameters (with non zero derivatives)
GblData(GblData &&)=default
unsigned int getLabel() const
Get label.
unsigned int theRow
Row number (of measurement)
GblData & operator=(const GblData &)=default
double getChi2() const
Calculate Chi2 contribution.
void printData() const
Print data block.
void getResidual(double &aResidual, double &aVariance, double &aDownWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal)
Get data for residual (and errors).
unsigned int thePoint
Point number (on trajectory)
GblData(const GblData &)=default
void getLocalData(double &aValue, double &aWeight, unsigned int &numLocal, unsigned int *&indLocal, double *&derLocal)
Get Data for local fit.
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.
double theValue
Value (residual)
double setDownWeighting(unsigned int aMethod)
Outlier down weighting with M-estimators (by GblTrajectory::fit).
std::vector< double > moreDerivatives
List of derivatives for fit.
void setPrediction(const VVector &aVector)
Calculate prediction for data from fit (by GblTrajectory::fit).
Simple Vector based on std::vector<double>
Namespace for the general broken lines package.
Eigen::Matrix< double, 2, 7 > Matrix27d
Eigen::Matrix< double, 5, 5 > Matrix5d