EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FitNewton::ChiSquareGradHessian Class Reference

#include <fun4all_coresoftware/blob/master/offline/packages/HelixHough/FitNewton/ChiSquareGradHessian.h>

+ Inheritance diagram for FitNewton::ChiSquareGradHessian:
+ Collaboration diagram for FitNewton::ChiSquareGradHessian:

Public Member Functions

 ChiSquareGradHessian (FunctionGradHessian *func_instance, unsigned long int numthreads=1)
 
 ~ChiSquareGradHessian ()
 
void setPoints (const std::vector< std::vector< double > > &POINTS)
 
void setData (const std::vector< double > &DATA)
 
void setErrors (const std::vector< double > &ERROR)
 
void setFunction (FunctionGradHessian *f)
 
void resetPointsDataErrors ()
 
bool calcValGradHessian (const Eigen::VectorXd &x, double &val, Eigen::VectorXd &grad, Eigen::MatrixXd &hessian)
 
void calcValGradHessianThread1 (void *arg)
 
bool calcValGrad (const Eigen::VectorXd &x, double &val, Eigen::VectorXd &grad)
 
void calcValGradThread1 (void *arg)
 
void getCovariance (Eigen::MatrixXd &cov)
 
FunctionGradHessianClone () const
 
void setErrorsAreWeights (bool e_a_w)
 
void computeCovariance (const double &val, const Eigen::MatrixXd &hessian)
 
- Public Member Functions inherited from FitNewton::FunctionGradHessian
 FunctionGradHessian (unsigned int nparams=1, unsigned int nfixedparams=1)
 
virtual ~FunctionGradHessian ()
 
unsigned int nPars ()
 
unsigned int nFixedPars ()
 
std::vector< double > getFixedPars ()
 
void setFixedPar (unsigned int coor, double val)
 
virtual void rescaleMove (const Eigen::VectorXd &, Eigen::VectorXd &)
 

Private Attributes

FunctionGradHessianfunc
 
const std::vector< std::vector
< double > > * 
points
 
const std::vector< double > * data
 
const std::vector< double > * data_errors
 
const Eigen::VectorXd * current_eval
 
double * val_output
 
Eigen::VectorXd * grad_output
 
Eigen::MatrixXd * hessian_output
 
Eigen::MatrixXd covariance
 
bool data_has_errors
 
bool errors_are_weights
 
std::vector
< SeamStress::Seamstress * > * 
vssp
 
std::vector
< SeamStress::Seamstress
vss
 
SeamStress::Pincushion
< ChiSquareGradHessian > * 
pins
 
unsigned long int nthreads
 
unsigned long int thread_tot
 
unsigned long int niter
 
pthread_mutex_t mutex
 
pthread_mutexattr_t mattr
 

Additional Inherited Members

- Protected Attributes inherited from FitNewton::FunctionGradHessian
unsigned int npars
 
unsigned int nfixedpars
 
std::vector< double > fixedpars
 

Detailed Description

Definition at line 17 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 17 of file ChiSquareGradHessian.h

Constructor & Destructor Documentation

FitNewton::ChiSquareGradHessian::ChiSquareGradHessian ( FunctionGradHessian func_instance,
unsigned long int  numthreads = 1 
)

Definition at line 15 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 15 of file ChiSquareGradHessian.cpp

References mattr, mutex, nthreads, pins, vss, and vssp.

Referenced by Clone().

+ Here is the caller graph for this function:

FitNewton::ChiSquareGradHessian::~ChiSquareGradHessian ( )

Definition at line 32 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 32 of file ChiSquareGradHessian.cpp

References nthreads, pins, vss, and vssp.

Member Function Documentation

bool FitNewton::ChiSquareGradHessian::calcValGrad ( const Eigen::VectorXd &  x,
double &  val,
Eigen::VectorXd &  grad 
)
virtual

Reimplemented from FitNewton::FunctionGradHessian.

Definition at line 180 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 180 of file ChiSquareGradHessian.cpp

References FitNewton::FunctionGradHessian::calcValGrad(), calcValGradThread1(), FitNewton::FunctionGradHessian::Clone(), current_eval, func, grad_output, niter, FitNewton::FunctionGradHessian::npars, nthreads, pins, points, FitNewton::FunctionGradHessian::setFixedPar(), SeamStress::Pincushion< TClass >::sewStraight(), thread_tot, val_output, and x.

+ Here is the call graph for this function:

bool FitNewton::ChiSquareGradHessian::calcValGradHessian ( const Eigen::VectorXd &  x,
double &  val,
Eigen::VectorXd &  grad,
Eigen::MatrixXd &  hessian 
)
virtual

Implements FitNewton::FunctionGradHessian.

Definition at line 77 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 77 of file ChiSquareGradHessian.cpp

References FitNewton::FunctionGradHessian::calcValGrad(), calcValGradHessianThread1(), FitNewton::FunctionGradHessian::Clone(), covariance, current_eval, func, grad_output, hessian_output, niter, FitNewton::FunctionGradHessian::npars, nthreads, pins, points, FitNewton::FunctionGradHessian::setFixedPar(), SeamStress::Pincushion< TClass >::sewStraight(), thread_tot, val_output, and x.

+ Here is the call graph for this function:

void FitNewton::ChiSquareGradHessian::calcValGradHessianThread1 ( void *  arg)

Definition at line 105 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 105 of file ChiSquareGradHessian.cpp

References FitNewton::FunctionGradHessian::calcValGradHessian(), FitNewton::FunctionGradHessian::Clone(), current_eval, data_has_errors, func, k, mutex, niter, FitNewton::FunctionGradHessian::npars, part, points, FitNewton::FunctionGradHessian::setFixedPar(), start(), temp1, and thread_tot.

Referenced by calcValGradHessian().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::ChiSquareGradHessian::calcValGradThread1 ( void *  arg)

Definition at line 203 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 203 of file ChiSquareGradHessian.cpp

References FitNewton::FunctionGradHessian::calcValGrad(), FitNewton::FunctionGradHessian::Clone(), current_eval, data_has_errors, func, mutex, niter, FitNewton::FunctionGradHessian::npars, part, points, FitNewton::FunctionGradHessian::setFixedPar(), start(), temp1, and thread_tot.

Referenced by calcValGrad().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FunctionGradHessian * FitNewton::ChiSquareGradHessian::Clone ( ) const
virtual

Implements FitNewton::FunctionGradHessian.

Definition at line 43 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 43 of file ChiSquareGradHessian.cpp

References ChiSquareGradHessian(), data, data_errors, data_has_errors, func, nthreads, points, setData(), setErrors(), and setPoints().

+ Here is the call graph for this function:

void FitNewton::ChiSquareGradHessian::computeCovariance ( const double &  val,
const Eigen::MatrixXd &  hessian 
)
virtual

Reimplemented from FitNewton::FunctionGradHessian.

Definition at line 53 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 53 of file ChiSquareGradHessian.cpp

References covariance, data_errors, data_has_errors, errors_are_weights, FitNewton::FunctionGradHessian::npars, and points.

void FitNewton::ChiSquareGradHessian::getCovariance ( Eigen::MatrixXd &  cov)

Definition at line 71 of file ChiSquareGradHessian.cpp.

View newest version in sPHENIX GitHub at line 71 of file ChiSquareGradHessian.cpp

References covariance.

void FitNewton::ChiSquareGradHessian::resetPointsDataErrors ( )
inline

Definition at line 31 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 31 of file ChiSquareGradHessian.h

References data, data_errors, data_has_errors, and points.

void FitNewton::ChiSquareGradHessian::setData ( const std::vector< double > &  DATA)
inline

Definition at line 26 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 26 of file ChiSquareGradHessian.h

References data.

Referenced by Clone().

+ Here is the caller graph for this function:

void FitNewton::ChiSquareGradHessian::setErrors ( const std::vector< double > &  ERROR)
inline

Definition at line 27 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 27 of file ChiSquareGradHessian.h

References data_errors, data_has_errors, and ERROR.

Referenced by Clone().

+ Here is the caller graph for this function:

void FitNewton::ChiSquareGradHessian::setErrorsAreWeights ( bool  e_a_w)
inline

Definition at line 44 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 44 of file ChiSquareGradHessian.h

References errors_are_weights.

void FitNewton::ChiSquareGradHessian::setFunction ( FunctionGradHessian f)
inline

Definition at line 29 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 29 of file ChiSquareGradHessian.h

References func.

void FitNewton::ChiSquareGradHessian::setPoints ( const std::vector< std::vector< double > > &  POINTS)
inline

Definition at line 25 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 25 of file ChiSquareGradHessian.h

References points.

Referenced by Clone().

+ Here is the caller graph for this function:

Member Data Documentation

Eigen::MatrixXd FitNewton::ChiSquareGradHessian::covariance
private

Definition at line 61 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 61 of file ChiSquareGradHessian.h

Referenced by calcValGradHessian(), computeCovariance(), and getCovariance().

const Eigen::VectorXd* FitNewton::ChiSquareGradHessian::current_eval
private

Definition at line 55 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 55 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), calcValGradHessian(), calcValGradHessianThread1(), and calcValGradThread1().

const std::vector<double>* FitNewton::ChiSquareGradHessian::data
private

Definition at line 52 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 52 of file ChiSquareGradHessian.h

Referenced by Clone(), resetPointsDataErrors(), and setData().

const std::vector<double>* FitNewton::ChiSquareGradHessian::data_errors
private

Definition at line 53 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 53 of file ChiSquareGradHessian.h

Referenced by Clone(), computeCovariance(), resetPointsDataErrors(), and setErrors().

bool FitNewton::ChiSquareGradHessian::data_has_errors
private

Definition at line 63 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 63 of file ChiSquareGradHessian.h

Referenced by calcValGradHessianThread1(), calcValGradThread1(), Clone(), computeCovariance(), resetPointsDataErrors(), and setErrors().

bool FitNewton::ChiSquareGradHessian::errors_are_weights
private

Definition at line 64 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 64 of file ChiSquareGradHessian.h

Referenced by computeCovariance(), and setErrorsAreWeights().

FunctionGradHessian* FitNewton::ChiSquareGradHessian::func
private

Definition at line 50 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 50 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), calcValGradHessian(), calcValGradHessianThread1(), calcValGradThread1(), Clone(), and setFunction().

Eigen::VectorXd* FitNewton::ChiSquareGradHessian::grad_output
private

Definition at line 58 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 58 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), and calcValGradHessian().

Eigen::MatrixXd* FitNewton::ChiSquareGradHessian::hessian_output
private

Definition at line 59 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 59 of file ChiSquareGradHessian.h

Referenced by calcValGradHessian().

pthread_mutexattr_t FitNewton::ChiSquareGradHessian::mattr
private

Definition at line 74 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 74 of file ChiSquareGradHessian.h

Referenced by ChiSquareGradHessian().

pthread_mutex_t FitNewton::ChiSquareGradHessian::mutex
private

Definition at line 73 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 73 of file ChiSquareGradHessian.h

Referenced by calcValGradHessianThread1(), calcValGradThread1(), and ChiSquareGradHessian().

unsigned long int FitNewton::ChiSquareGradHessian::niter
private

Definition at line 72 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 72 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), calcValGradHessian(), calcValGradHessianThread1(), and calcValGradThread1().

unsigned long int FitNewton::ChiSquareGradHessian::nthreads
private

Definition at line 69 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 69 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), calcValGradHessian(), ChiSquareGradHessian(), Clone(), and ~ChiSquareGradHessian().

SeamStress::Pincushion<ChiSquareGradHessian>* FitNewton::ChiSquareGradHessian::pins
private

Definition at line 68 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 68 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), calcValGradHessian(), ChiSquareGradHessian(), and ~ChiSquareGradHessian().

const std::vector<std::vector<double> >* FitNewton::ChiSquareGradHessian::points
private
unsigned long int FitNewton::ChiSquareGradHessian::thread_tot
private

Definition at line 71 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 71 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), calcValGradHessian(), calcValGradHessianThread1(), and calcValGradThread1().

double* FitNewton::ChiSquareGradHessian::val_output
private

Definition at line 57 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 57 of file ChiSquareGradHessian.h

Referenced by calcValGrad(), and calcValGradHessian().

std::vector<SeamStress::Seamstress> FitNewton::ChiSquareGradHessian::vss
private

Definition at line 67 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 67 of file ChiSquareGradHessian.h

Referenced by ChiSquareGradHessian(), and ~ChiSquareGradHessian().

std::vector<SeamStress::Seamstress*>* FitNewton::ChiSquareGradHessian::vssp
private

Definition at line 66 of file ChiSquareGradHessian.h.

View newest version in sPHENIX GitHub at line 66 of file ChiSquareGradHessian.h

Referenced by ChiSquareGradHessian(), and ~ChiSquareGradHessian().


The documentation for this class was generated from the following files: