EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexFitFunc.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VertexFitFunc.h
1 #ifndef HELIXHOUGH_VERTEXFITFUNC_H
2 #define HELIXHOUGH_VERTEXFITFUNC_H
3 
4 #include "FunctionGradHessian.h"
5 
6 #include <Eigen/Core>
7 
8 #include <vector>
9 
10 class SimpleTrack3D;
11 
13 {
14  public:
15  HelixDCAFunc();
16  ~HelixDCAFunc();
17 
18  bool calcValGradHessian(const Eigen::VectorXd& x, double& val, Eigen::VectorXd& grad, Eigen::MatrixXd& hessian);
19 
21 
22  double getTangent(unsigned int coor){return tangent[coor];}
23  double getPoint(unsigned int coor){return point[coor];}
24  Eigen::Matrix<float,3,3> getPointCovariance(){return point_covariance;}
25  void setCovariance(Eigen::Matrix<float,5,5> const& cov){covariance = cov;}
26 
27  private:
28  Eigen::Matrix<float,5,5> covariance;
29  std::vector<double> tangent;
30  std::vector<double> point;
31  Eigen::Matrix<float,3,3> point_covariance;
32 };
33 
35 {
36  public:
37  VertexFitFunc();
39 
40  bool calcValGradHessian(const Eigen::VectorXd& x, double& val, Eigen::VectorXd& grad, Eigen::MatrixXd& hessian);
41 
43 
44  void setTracks(std::vector<SimpleTrack3D>* trks){tracks = trks;}
45  void setCovariances(std::vector<Eigen::Matrix<float,5,5> >* covs){covariances = covs;}
46 
47  private:
48  std::vector<Eigen::Matrix<float,5,5> >* covariances;
49  std::vector<SimpleTrack3D> *tracks;
50 };
51 
52 
53 #endif