LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::ThreeDVertexDistanceFeatureTool Class Referenceabstract

VertexDistanceFeatureTool class for the calculation of distance to neutrino vertex. More...

#include "TrackShowerIdFeatureTool.h"

Inheritance diagram for lar_content::ThreeDVertexDistanceFeatureTool:
lar_content::MvaFeatureTool< Ts >

Public Types

typedef std::vector< MvaFeatureTool< Ts... > * > FeatureToolVector
 

Public Member Functions

 ThreeDVertexDistanceFeatureTool ()
 Default constructor. More...
 
void Run (LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo)
 
virtual void Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0
 Run the algorithm tool. More...
 

Private Member Functions

pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Detailed Description

VertexDistanceFeatureTool class for the calculation of distance to neutrino vertex.

Definition at line 160 of file TrackShowerIdFeatureTool.h.

Member Typedef Documentation

template<typename... Ts>
typedef std::vector<MvaFeatureTool<Ts...> *> lar_content::MvaFeatureTool< Ts >::FeatureToolVector
inherited

Definition at line 30 of file LArMvaHelper.h.

Constructor & Destructor Documentation

lar_content::ThreeDVertexDistanceFeatureTool::ThreeDVertexDistanceFeatureTool ( )

Default constructor.

Definition at line 402 of file TrackShowerIdFeatureTool.cc.

403 {
404 }

Member Function Documentation

StatusCode lar_content::ThreeDVertexDistanceFeatureTool::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 432 of file TrackShowerIdFeatureTool.cc.

433 {
434 
435  return STATUS_CODE_SUCCESS;
436 }
template<typename... Ts>
virtual void lar_content::MvaFeatureTool< Ts >::Run ( MvaTypes::MvaFeatureVector featureVector,
Ts...  args 
)
pure virtualinherited

Run the algorithm tool.

Parameters
featureVectorthe vector of features to append
argsarguments to pass to the tool
void lar_content::ThreeDVertexDistanceFeatureTool::Run ( LArMvaHelper::MvaFeatureVector featureVector,
const pandora::Algorithm *const  pAlgorithm,
const pandora::ParticleFlowObject *const  pInputPfo 
)

Definition at line 408 of file TrackShowerIdFeatureTool.cc.

References lar_content::LArPfoHelper::GetVertex().

410 {
411  if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
412  std::cout << "----> Running Algorithm Tool: " << this->GetInstanceName() << ", " << this->GetType() << std::endl;
413 
414  LArMvaHelper::MvaFeature vertexDistance;
415  const VertexList *pVertexList(nullptr);
416  (void) PandoraContentApi::GetCurrentList(*pAlgorithm, pVertexList);
417 
418  if ((!pVertexList->empty()) && (pVertexList->size() == 1) && (VERTEX_3D == pVertexList->front()->GetVertexType()))
419  {
420  try
421  {
422  vertexDistance = (pVertexList->front()->GetPosition() - LArPfoHelper::GetVertex(pInputPfo)->GetPosition()).GetMagnitude();
423  }
424  catch (const StatusCodeException &) {}
425  }
426 
427  featureVector.push_back(vertexDistance);
428 }
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
MvaTypes::MvaFeature MvaFeature
Definition: LArMvaHelper.h:57
std::list< Vertex > VertexList
Definition: DCEL.h:178

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