ThreeDVertexDistanceFeatureTool class for the calculation of 3d distance to neutrino vertex.
More...
#include <TrackShowerIdFeatureTool.h>
|
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
|
ThreeDVertexDistanceFeatureTool class for the calculation of 3d distance to neutrino vertex.
Definition at line 177 of file TrackShowerIdFeatureTool.h.
lar_content::ThreeDVertexDistanceFeatureTool::ThreeDVertexDistanceFeatureTool |
( |
| ) |
|
StatusCode lar_content::ThreeDVertexDistanceFeatureTool::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
void lar_content::ThreeDVertexDistanceFeatureTool::Run |
( |
LArMvaHelper::MvaFeatureVector & |
featureVector, |
|
|
const pandora::Algorithm *const |
pAlgorithm, |
|
|
const pandora::ParticleFlowObject *const |
pInputPfo |
|
) |
| |
Definition at line 458 of file TrackShowerIdFeatureTool.cc.
461 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
462 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() <<
std::endl;
467 (void)PandoraContentApi::GetCurrentList(*pAlgorithm, pVertexList);
469 if (!pVertexList || pVertexList->empty())
471 featureVector.push_back(vertexDistance);
475 unsigned int nInteractionVertices(0);
476 const Vertex *pInteractionVertex(
nullptr);
478 for (
const Vertex *pVertex : *pVertexList)
480 if ((pVertex->GetVertexLabel() == VERTEX_INTERACTION) && (pVertex->GetVertexType() == VERTEX_3D))
482 ++nInteractionVertices;
483 pInteractionVertex = pVertex;
487 if (pInteractionVertex && (1 == nInteractionVertices))
491 vertexDistance = (pInteractionVertex->GetPosition() -
LArPfoHelper::GetVertex(pInputPfo)->GetPosition()).GetMagnitude();
493 catch (
const StatusCodeException &)
495 CaloHitList threeDCaloHitList;
498 if (!threeDCaloHitList.empty())
499 vertexDistance = (pInteractionVertex->GetPosition() - (threeDCaloHitList.front())->GetPositionVector()).GetMagnitude();
503 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
QTextStream & endl(QTextStream &s)
The documentation for this class was generated from the following files: