9 #include "Pandora/AlgorithmHeaders.h" 27 VertexAssociatedPfosTool::VertexAssociatedPfosTool() :
28 m_minVertexLongitudinalDistance(-2.5
f),
29 m_maxVertexLongitudinalDistance(20.
f),
30 m_maxVertexTransverseDistance(3.5
f),
31 m_vertexAngularAllowance(3.
f)
39 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
40 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() <<
std::endl;
42 const CartesianVector &neutrinoVertex(pNeutrinoVertex->GetPosition());
45 for (
const auto &mapEntry : pfoInfoMap)
46 sortedPfos.push_back(mapEntry.first);
49 for (
const Pfo *
const pPfo : sortedPfos)
51 PfoInfo *
const pPfoInfo(pfoInfoMap.at(pPfo));
53 if (pPfoInfo->IsNeutrinoVertexAssociated() || pPfoInfo->GetParentPfo())
66 pPfoInfo->SetNeutrinoVertexAssociation(
true);
67 pPfoInfo->SetInnerLayerAssociation(useInner);
76 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
79 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
82 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
85 PANDORA_RETURN_RESULT_IF_AND_IF(
86 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"VertexAngularAllowance",
m_vertexAngularAllowance));
88 return STATUS_CODE_SUCCESS;
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
static bool SortByNHits(const pandora::ParticleFlowObject *const pLhs, const pandora::ParticleFlowObject *const pRhs)
Sort pfos by number of constituent hits.
Header file for the pfo helper class.
Header file for the lar pointing cluster class.
NeutrinoHierarchyAlgorithm::PfoInfoMap PfoInfoMap
static bool IsEmission(const pandora::CartesianVector &parentVertex, const LArPointingCluster::Vertex &daughterVertex, const float minLongitudinalDistance, const float maxLongitudinalDistance, const float maxTransverseDistance, const float angularAllowance)
Whether pointing vertex is emitted from a given position.
float m_vertexAngularAllowance
Vertex association check: pointing angular allowance in degrees.
float m_maxVertexTransverseDistance
Vertex association check: max transverse distance cut.
LArPointingCluster class.
float m_minVertexLongitudinalDistance
Vertex association check: min longitudinal distance cut.
NeutrinoHierarchyAlgorithm class.
float m_maxVertexLongitudinalDistance
Vertex association check: max longitudinal distance cut.
const Vertex & GetOuterVertex() const
Get the outer vertex.
const Vertex & GetInnerVertex() const
Get the inner vertex.
void Run(const NeutrinoHierarchyAlgorithm *const pAlgorithm, const pandora::Vertex *const pNeutrinoVertex, NeutrinoHierarchyAlgorithm::PfoInfoMap &pfoInfoMap)
Run the algorithm tool.
Header file for the lar three dimensional sliding fit result class.
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
NeutrinoHierarchyAlgorithm::PfoInfo PfoInfo
const pandora::CartesianVector & GetPosition() const
Get the vertex position.
QTextStream & endl(QTextStream &s)
static bool IsNode(const pandora::CartesianVector &parentVertex, const LArPointingCluster::Vertex &daughterVertex, const float minLongitudinalDistance, const float maxTransverseDistance)
Whether pointing vertex is adjacent to a given position.