Public Member Functions | Public Attributes | List of all members
mvapid::MVAAlg::SumDistance2 Struct Reference

#include <MVAAlg.h>

Public Member Functions

 SumDistance2 (TGraph2D *g)
 
double operator() (const double *p)
 

Public Attributes

TGraph2D * fGraph
 

Detailed Description

Definition at line 47 of file MVAAlg.h.

Constructor & Destructor Documentation

mvapid::MVAAlg::SumDistance2::SumDistance2 ( TGraph2D *  g)
inline

Definition at line 51 of file MVAAlg.h.

51 : fGraph(g) {}
static constexpr double g
Definition: Units.h:144

Member Function Documentation

double mvapid::MVAAlg::SumDistance2::operator() ( const double *  p)
inline

Definition at line 55 of file MVAAlg.h.

56  {
57 
58  ROOT::Math::XYZVector x0(p[0], p[2], p[4]);
59  ROOT::Math::XYZVector u(p[1], p[3], p[5]);
60 
61  u = u.Unit();
62  double* x = fGraph->GetX();
63  double* y = fGraph->GetY();
64  double* z = fGraph->GetZ();
65  int npoints = fGraph->GetN();
66  double sum = 0;
67  for (int i = 0; i < npoints; ++i) {
68  ROOT::Math::XYZVector xp(x[i], y[i], z[i]);
69  sum += ((xp - x0).Cross(u)).Mag2();
70  }
71  return sum;
72  }
p
Definition: test.py:223
list x
Definition: train.py:276

Member Data Documentation

TGraph2D* mvapid::MVAAlg::SumDistance2::fGraph

Definition at line 49 of file MVAAlg.h.


The documentation for this struct was generated from the following file: