#include <SaturationFit.h>
Definition at line 9 of file SaturationFit.h.
SaturationFit::SaturationFit |
( |
int |
N, |
|
|
float * |
charge_ptr, |
|
|
float * |
adc_ptr, |
|
|
float * |
u0_ptr, |
|
|
float * |
u1_ptr, |
|
|
float * |
u2_ptr, |
|
|
float * |
u3_ptr |
|
) |
| |
|
inline |
Definition at line 13 of file SaturationFit.h.
References gather_cfg::cout, SaturationFcn::set_data(), ctppsDiamondLocalTracks_cfi::sigma, SaturationFcn::x0start, SaturationFcn::x1start, SaturationFcn::x2start, and SaturationFcn::x3start.
14 double u[3],
sigma[3],chisq;
15 VariableMetricMinimizer* pMinimizer=
new VariableMetricMinimizer() ;
18 std::vector<double> par(4,0);
19 std::vector<double> err(4,0);
30 FunctionMinimum fmin = pMinimizer->Minimize(*pFcn, par, err, 1, 5000, 0.01);
32 printf(
" minuit did not converge \n");
34 std::cout<<
"fit succeeded... results: "<<fmin<<std::endl;
36 u[0] = fmin.UserParameters().Value( static_cast<unsigned int>(0) );
38 sigma[0] = fmin.UserParameters().Error( static_cast<unsigned int>(0) );
39 u[1] = fmin.UserParameters().Value( static_cast<unsigned int>(1) );
41 sigma[1] = fmin.UserParameters().Error( static_cast<unsigned int>(1) );
42 u[2] = fmin.UserParameters().Value( static_cast<unsigned int>(2) );
44 sigma[2] = fmin.UserParameters().Error( static_cast<unsigned int>(2) );
45 u[3] = fmin.UserParameters().Value( static_cast<unsigned int>(3) );
47 sigma[3] = fmin.UserParameters().Error( static_cast<unsigned int>(3) );
void set_data(int N, float *charge_ptr, float *adc_ptr)
SaturationFit::~SaturationFit |
( |
| ) |
|
|
inline |