Total Initial distance square = 8.65172e+07
Total final distance square 19988
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 19988
NDf = 0
Edm = 1.04087e-06
NCalls = 248
Par_0 = 10.3555 +/- 0.392118
Par_1 = 19.9602 +/- 0.0688151
Par_2 = 0.999233 +/- 0.0444791
Par_3 = 2.00379 +/- 0.00783849
(int) 0
#include <cassert>
void line(
double t,
const double *p,
double &
x,
double &
y,
double &z) {
z = t;
}
bool first = true;
struct SumDistance2 {
double distance2(
double x,
double y,
double z,
const double *p) {
double d2 = ((xp-x0).Cross(u)).Mag2();
return d2;
}
assert(fGraph != nullptr);
double *
x = fGraph->
GetX();
double *
y = fGraph->
GetY();
int npoints = fGraph->
GetN();
for (int i = 0; i < npoints; ++i) {
double d = distance2(
x[i],
y[i],z[i],par);
}
if (first) {
std::cout <<
"Total Initial distance square = " <<
sum << std::endl;
}
first = false;
}
};
int line3Dfit()
{
int nd = 10000;
double p0[4] = {10,20,1,2};
for (
int N=0;
N<nd;
N++) {
}
double pStart[4] = {1,1,1,1};
if (!ok) {
Error(
"line3Dfit",
"Line3D Fit failed");
return 1;
}
std::cout <<
"Total final distance square " << result.
MinFcnValue() << std::endl;
double t0 = 0;
double dt = 10;
for (
int i = 0; i <
n;++i) {
}
for (
int i = 0; i <
n;++i) {
}
return 0;
}
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
TRObject operator()(const T1 &t1) const
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
class containing the result of the fit and all the related information (fitted parameter values,...
const double * GetParams() const
parameter values (return const pointer)
void Print(std::ostream &os, bool covmat=false) const
print the result and optionally covariance matrix and correlations
double MinFcnValue() const
Return value of the objective function (chi2 or likelihood) used in the fit.
Fitter class, entry point for performing all type of fits.
const FitResult & Result() const
get fit result
bool FitFCN(unsigned int npar, Function &fcn, const double *params=nullptr, unsigned int dataSize=0, int fitType=0)
Fit using the a generic FCN function as a C++ callable object implementing double () (const double *)...
const FitConfig & Config() const
access to the fit configuration (const method)
bool SetFCN(unsigned int npar, Function &fcn, const double *params=nullptr, unsigned int dataSize=0, int fitType=0)
Set a generic FCN function as a C++ callable object implementing double () (const double *) Note that...
void SetStepSize(double err)
set the step size
Documentation for class Functor class.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
void Draw(Option_t *option="") override
Default Draw method for all objects.
SVector< T, D > Unit(const SVector< T, D > &rhs)
Unit.
DisplacementVector3D< Cartesian3D< double >, DefaultCoordinateSystemTag > XYZVector
3D Vector based on the cartesian coordinates x,y,z in double precision
static uint64_t sum(uint64_t i)