ThreeDVertexDistanceFeatureTool class for the calculation of 3d distance to neutrino vertex.
More...
#include "TrackShowerIdFeatureTool.h"
|
| ThreeDVertexDistanceFeatureTool () |
| Default constructor. More...
|
|
void | Run (LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo) |
|
void | Run (LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo) |
|
virtual void | Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0 |
| Run the algorithm tool. More...
|
|
virtual void | Run (MvaTypes::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, Ts...) |
|
|
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
|
ThreeDVertexDistanceFeatureTool class for the calculation of 3d distance to neutrino vertex.
Definition at line 189 of file TrackShowerIdFeatureTool.h.
lar_content::ThreeDVertexDistanceFeatureTool::ThreeDVertexDistanceFeatureTool |
( |
| ) |
|
StatusCode lar_content::ThreeDVertexDistanceFeatureTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Run the algorithm tool.
- Parameters
-
featureVector | the vector of features to append |
args | arguments 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 734 of file TrackShowerIdFeatureTool.cc.
References lar_content::LArPfoHelper::GetCaloHits(), lar_content::LArPfoHelper::GetVertex(), and lar_content::ThreeDLinearFitFeatureTool::Run().
737 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
738 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
743 (void)PandoraContentApi::GetCurrentList(*pAlgorithm, pVertexList);
745 if (!pVertexList || pVertexList->empty())
747 featureVector.push_back(vertexDistance);
751 unsigned int nInteractionVertices(0);
752 const Vertex *pInteractionVertex(
nullptr);
754 for (
const Vertex *pVertex : *pVertexList)
756 if ((pVertex->GetVertexLabel() == VERTEX_INTERACTION) && (pVertex->GetVertexType() == VERTEX_3D))
758 ++nInteractionVertices;
759 pInteractionVertex = pVertex;
763 if (pInteractionVertex && (1 == nInteractionVertices))
767 vertexDistance = (pInteractionVertex->GetPosition() -
LArPfoHelper::GetVertex(pInputPfo)->GetPosition()).GetMagnitude();
769 catch (
const StatusCodeException &)
771 CaloHitList threeDCaloHitList;
774 if (!threeDCaloHitList.empty())
775 vertexDistance = (pInteractionVertex->GetPosition() - (threeDCaloHitList.front())->GetPositionVector()).GetMagnitude();
779 featureVector.push_back(vertexDistance);
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
MvaTypes::MvaFeature MvaFeature
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
static void GetCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of calo hits of a particular hit type from a list of pfos.
std::list< Vertex > VertexList
void lar_content::ThreeDVertexDistanceFeatureTool::Run |
( |
LArMvaHelper::MvaFeatureMap & |
featureMap, |
|
|
pandora::StringVector & |
featureOrder, |
|
|
const std::string & |
featureToolName, |
|
|
const pandora::Algorithm *const |
pAlgorithm, |
|
|
const pandora::ParticleFlowObject *const |
pInputPfo |
|
) |
| |
The documentation for this class was generated from the following files: