All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
lar_content::LArPcaHelper Class Reference

LArPcaHelper class. More...

#include <LArPcaHelper.h>

Public Types

typedef pandora::CartesianVector EigenValues
 
typedef std::vector
< pandora::CartesianVector > 
EigenVectors
 
typedef std::pair< const
pandora::CartesianVector,
double > 
WeightedPoint
 
typedef std::vector
< WeightedPoint
WeightedPointVector
 

Public Member Functions

template<typename T >
void RunPca (const T &t, CartesianVector &centroid, EigenValues &outputEigenValues, EigenVectors &outputEigenVectors)
 

Static Public Member Functions

template<typename T >
static void RunPca (const T &t, pandora::CartesianVector &centroid, EigenValues &outputEigenValues, EigenVectors &outputEigenVectors)
 Run principal component analysis using input calo hits (TPC_VIEW_U,V,W or TPC_3D; all treated as 3D points) More...
 
static void RunPca (const WeightedPointVector &pointVector, pandora::CartesianVector &centroid, EigenValues &outputEigenValues, EigenVectors &outputEigenVectors)
 Run principal component analysis using weighted input Cartesian vectors (TPC_VIEW_U,V,W or TPC_3D; all treated as 3D points) More...
 

Detailed Description

LArPcaHelper class.

Definition at line 21 of file LArPcaHelper.h.

Member Typedef Documentation

typedef pandora::CartesianVector lar_content::LArPcaHelper::EigenValues

Definition at line 24 of file LArPcaHelper.h.

typedef std::vector<pandora::CartesianVector> lar_content::LArPcaHelper::EigenVectors

Definition at line 25 of file LArPcaHelper.h.

typedef std::pair<const pandora::CartesianVector, double> lar_content::LArPcaHelper::WeightedPoint

Definition at line 26 of file LArPcaHelper.h.

Definition at line 27 of file LArPcaHelper.h.

Member Function Documentation

template<typename T >
void lar_content::LArPcaHelper::RunPca ( const T &  t,
CartesianVector &  centroid,
EigenValues outputEigenValues,
EigenVectors outputEigenVectors 
)

Definition at line 21 of file LArPcaHelper.cc.

22 {
23  WeightedPointVector weightedPointVector;
24 
25  for (const auto &point : t)
26  weightedPointVector.push_back(std::make_pair(LArObjectHelper::TypeAdaptor::GetPosition(point), 1.));
27 
28  return LArPcaHelper::RunPca(weightedPointVector, centroid, outputEigenValues, outputEigenVectors);
29 }
std::vector< WeightedPoint > WeightedPointVector
Definition: LArPcaHelper.h:27
static pandora::CartesianVector GetPosition(const T &t)
Get the associated position.
static void RunPca(const T &t, pandora::CartesianVector &centroid, EigenValues &outputEigenValues, EigenVectors &outputEigenVectors)
Run principal component analysis using input calo hits (TPC_VIEW_U,V,W or TPC_3D; all treated as 3D p...
template<typename T >
static void lar_content::LArPcaHelper::RunPca ( const T &  t,
pandora::CartesianVector &  centroid,
EigenValues outputEigenValues,
EigenVectors outputEigenVectors 
)
static

Run principal component analysis using input calo hits (TPC_VIEW_U,V,W or TPC_3D; all treated as 3D points)

Parameters
tthe input information
centroidto receive the centroid position
outputEigenValuesto receive the eigen values
outputEigenVectorsto receive the eigen vectors
static void lar_content::LArPcaHelper::RunPca ( const WeightedPointVector pointVector,
pandora::CartesianVector &  centroid,
EigenValues outputEigenValues,
EigenVectors outputEigenVectors 
)
static

Run principal component analysis using weighted input Cartesian vectors (TPC_VIEW_U,V,W or TPC_3D; all treated as 3D points)

Parameters
pointVectora vector of pairs of positions and weights
centroidto receive the centroid position
outputEigenValuesto receive the eigen values
outputEigenVectorsto receive the eigen vectors

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