58 double aPrec,
unsigned int aTraj = 0,
unsigned int aPoint = 0);
64 template <
typename LocalDerivative,
typename TrafoDerivative>
66 const std::array<unsigned int, 5>& labDer,
const Matrix5d &matDer,
68 const Eigen::MatrixBase<LocalDerivative>& derLocal,
70 const Eigen::MatrixBase<TrafoDerivative>& derTrans);
71 template <
typename TrafoDerivative>
73 const std::array<unsigned int, 7>& labDer,
const Matrix27d &matDer,
75 const Eigen::MatrixBase<TrafoDerivative>& derTrans);
77 const std::vector<double> &derivatives);
86 void getLocalData(
double &aValue,
double &aWeight,
unsigned int &numLocal,
87 unsigned int* &indLocal,
double* &derLocal);
88 void getAllData(
double &aValue,
double &aErr,
unsigned int &numLocal,
89 unsigned int* &indLocal,
double* &derLocal,
unsigned int &aTraj,
90 unsigned int &aPoint,
unsigned int &aRow);
91 void getResidual(
double &aResidual,
double &aVariance,
double &aDownWeight,
92 unsigned int &numLocal,
unsigned int* &indLocal,
double* &derLocal);
125 template <
typename LocalDerivative,
typename TrafoDerivative>
127 const std::array<unsigned int, 5>& labDer,
128 const Matrix5d &matDer,
130 const Eigen::MatrixBase<LocalDerivative>& derLocal,
132 const Eigen::MatrixBase<TrafoDerivative>& extDer)
135 unsigned int nParMax = 5 + derLocal.cols() + extDer.cols();
142 for (
int i = 0;
i < derLocal.cols(); ++
i)
144 if (derLocal(iRow - iOff,
i)) {
150 for (
int i = 0;
i < extDer.cols(); ++
i)
152 if (extDer(iRow - iOff,
i)) {
158 for (
size_t i = 0;
i < labDer.size(); ++
i)
160 if (labDer[
i] and matDer(iRow,
i)) {
167 for (
int i = 0;
i < derLocal.cols(); ++
i)
169 if (derLocal(iRow - iOff,
i)) {
176 for (
int i = 0;
i < extDer.cols(); ++
i)
178 if (extDer(iRow - iOff,
i)) {
184 for (
size_t i = 0;
i < labDer.size(); ++
i)
186 if (labDer[
i] and matDer(iRow,
i)) {
204 template <
typename TrafoDerivative>
206 const std::array<unsigned int, 7>& labDer,
207 const Matrix27d &matDer,
209 const Eigen::MatrixBase<TrafoDerivative>& extDer)
212 unsigned int nParMax = 7 + extDer.cols();
219 for (
int i = 0;
i < extDer.cols(); ++
i)
221 if (extDer(iRow,
i)) {
227 for (
size_t i = 0;
i < labDer.size(); ++
i)
229 if (labDer[
i] and matDer(iRow,
i)) {
236 for (
size_t i = 0;
i < labDer.size(); ++
i)
238 if (labDer[
i] and matDer(iRow,
i)) {
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.
Data (block) for independent scalar measurement.
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.
GblData & operator=(const GblData &)=default
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.
unsigned int getNumSimple() const
double thePrediction
Prediction from fit.
std::vector< unsigned int > moreParameters
List of fit parameters (with non zero derivatives)
double thePrecision
Precision (1/sigma**2)
Eigen::Matrix< double, 2, 7 > Matrix27d
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)
GblData(unsigned int aLabel, dataBlockType aType, double aMeas, double aPrec, unsigned int aTraj=0, unsigned int aPoint=0)
Create data block.
unsigned int getLabel() const
Get label.
unsigned int theTrajectory
Trajectory number.
Eigen::Matrix< double, 5, 5 > Matrix5d