LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
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 56 of file MVAAlg.h.

Constructor & Destructor Documentation

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

Definition at line 60 of file MVAAlg.h.

60 : fGraph(g) {}

Member Function Documentation

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

Definition at line 63 of file MVAAlg.h.

References mvapid::MVAAlg::_Var_Shape(), mvapid::MVAAlg::CalcSegmentdEdxDist(), mvapid::MVAAlg::CalcSegmentdEdxDistAtEnd(), mvapid::MVAAlg::CalcSegmentdEdxFrac(), mvapid::MVAAlg::SortedObj::end, mvapid::MVAAlg::FitAndSortTrack(), mvapid::MVAAlg::GetDetectorEdges(), mvapid::MVAAlg::GetWireNormals(), hits(), mvapid::MVAAlg::IsInActiveVol(), mvapid::MVAAlg::LinFit(), mvapid::MVAAlg::LinFitShower(), mvapid::MVAAlg::MVAAlg(), mvapid::MVAAlg::PrepareEvent(), mvapid::MVAAlg::reconfigure(), mvapid::MVAAlg::RunPCA(), mvapid::MVAAlg::RunPID(), mvapid::MVAAlg::SortShower(), mvapid::MVAAlg::SortedObj::start, track, lar::dump::vector(), x, y, z, and mvapid::MVAAlg::~MVAAlg().

63  {
64 
65  ROOT::Math::XYZVector x0(p[0], p[2], p[4] );
66  ROOT::Math::XYZVector u(p[1],p[3], p[5] );
67 
68  u=u.Unit();
69  double * x = fGraph->GetX();
70  double * y = fGraph->GetY();
71  double * z = fGraph->GetZ();
72  int npoints = fGraph->GetN();
73  double sum = 0;
74  for (int i = 0; i < npoints; ++i) {
75  ROOT::Math::XYZVector xp(x[i],y[i],z[i]);
76  sum += ((xp-x0).Cross(u)) .Mag2();
77  }
78  return sum;
79  }
Float_t x
Definition: compare.C:6
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279

Member Data Documentation

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

Definition at line 58 of file MVAAlg.h.


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