All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 48 of file MVAAlg.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file MVAAlg.h.

52 : fGraph(g) {}
BEGIN_PROLOG g

Member Function Documentation

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

Definition at line 56 of file MVAAlg.h.

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

Member Data Documentation

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

Definition at line 50 of file MVAAlg.h.


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