LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation Class Reference

PfoAssociation class. More...

#include "VertexBasedPfoMopUpAlgorithm.h"

Public Member Functions

 PfoAssociation (const pandora::Pfo *const pVertexPfo, const pandora::Pfo *const pDaughterPfo, const ClusterAssociation &clusterAssociationU, const ClusterAssociation &clusterAssociationV, const ClusterAssociation &clusterAssociationW)
 Constructor. More...
 
const pandora::Pfo * GetVertexPfo () const
 Get the address of the vertex-associated pfo. More...
 
const pandora::Pfo * GetDaughterPfo () const
 Get the address of the non-vertex-associated candidate daughter pfo. More...
 
float GetMeanBoundedFraction () const
 Get the mean bounded fraction, averaging over the u, v and w views. More...
 
float GetMaxBoundedFraction () const
 Get the maximum bounded fraction from the u, v and w views. More...
 
float GetMinBoundedFraction () const
 Get the minimum bounded fraction from the u, v and w views. More...
 
unsigned int GetNConsistentDirections () const
 Get the number of views for which the vertex and daughter cluster directions are consistent. More...
 
const ClusterAssociationGetClusterAssociationU () const
 Get the cluster association in the u view. More...
 
const ClusterAssociationGetClusterAssociationV () const
 Get the cluster association in the v view. More...
 
const ClusterAssociationGetClusterAssociationW () const
 Get the cluster association in the w view. More...
 
bool operator< (const PfoAssociation &rhs) const
 operator< More...
 

Private Attributes

const pandora::Pfo * m_pVertexPfo
 The address of the vertex-associated pfo. More...
 
const pandora::Pfo * m_pDaughterPfo
 The address of the non-vertex-associated candidate daughter pfo. More...
 
ClusterAssociation m_clusterAssociationU
 The cluster association in the u view. More...
 
ClusterAssociation m_clusterAssociationV
 The cluster association in the v view. More...
 
ClusterAssociation m_clusterAssociationW
 The cluster association in the w view. More...
 

Detailed Description

PfoAssociation class.

Definition at line 90 of file VertexBasedPfoMopUpAlgorithm.h.

Constructor & Destructor Documentation

lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::PfoAssociation ( const pandora::Pfo *const  pVertexPfo,
const pandora::Pfo *const  pDaughterPfo,
const ClusterAssociation clusterAssociationU,
const ClusterAssociation clusterAssociationV,
const ClusterAssociation clusterAssociationW 
)

Constructor.

Parameters
pVertexPfothe address of the vertex pfo
pDaughterPfothe address of the daughter candidate pfo
clusterAssociationUthe cluster association in the u view
clusterAssociationVthe cluster association in the v view
clusterAssociationWthe cluster association in the w view

Definition at line 320 of file VertexBasedPfoMopUpAlgorithm.cc.

321  :
322  m_pVertexPfo(pVertexPfo),
323  m_pDaughterPfo(pDaughterPfo),
324  m_clusterAssociationU(clusterAssociationU),
325  m_clusterAssociationV(clusterAssociationV),
326  m_clusterAssociationW(clusterAssociationW)
327 {
328 }
const pandora::Pfo * m_pDaughterPfo
The address of the non-vertex-associated candidate daughter pfo.
ClusterAssociation m_clusterAssociationV
The cluster association in the v view.
ClusterAssociation m_clusterAssociationW
The cluster association in the w view.
ClusterAssociation m_clusterAssociationU
The cluster association in the u view.
const pandora::Pfo * m_pVertexPfo
The address of the vertex-associated pfo.

Member Function Documentation

const VertexBasedPfoMopUpAlgorithm::ClusterAssociation & lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetClusterAssociationU ( ) const
inline

Get the cluster association in the u view.

Returns
the cluster association in the u view

Definition at line 414 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by GetMaxBoundedFraction(), GetMeanBoundedFraction(), GetMinBoundedFraction(), and GetNConsistentDirections().

415 {
416  return m_clusterAssociationU;
417 }
ClusterAssociation m_clusterAssociationU
The cluster association in the u view.
const VertexBasedPfoMopUpAlgorithm::ClusterAssociation & lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetClusterAssociationV ( ) const
inline

Get the cluster association in the v view.

Returns
the cluster association in the v view

Definition at line 421 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by GetMaxBoundedFraction(), GetMeanBoundedFraction(), GetMinBoundedFraction(), and GetNConsistentDirections().

422 {
423  return m_clusterAssociationV;
424 }
ClusterAssociation m_clusterAssociationV
The cluster association in the v view.
const VertexBasedPfoMopUpAlgorithm::ClusterAssociation & lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetClusterAssociationW ( ) const
inline

Get the cluster association in the w view.

Returns
the cluster association in the w view

Definition at line 428 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by GetMaxBoundedFraction(), GetMeanBoundedFraction(), GetMinBoundedFraction(), and GetNConsistentDirections().

429 {
430  return m_clusterAssociationW;
431 }
ClusterAssociation m_clusterAssociationW
The cluster association in the w view.
const pandora::Pfo * lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetDaughterPfo ( ) const
inline

Get the address of the non-vertex-associated candidate daughter pfo.

Returns
the address of the non-vertex-associated candidate daughter pfo

Definition at line 407 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by lar_content::VertexBasedPfoMopUpAlgorithm::MergePfos().

408 {
409  return m_pDaughterPfo;
410 }
const pandora::Pfo * m_pDaughterPfo
The address of the non-vertex-associated candidate daughter pfo.
float lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetMaxBoundedFraction ( ) const

Get the maximum bounded fraction from the u, v and w views.

Returns
the maximum bounded fraction from the u, v and w views

Definition at line 341 of file VertexBasedPfoMopUpAlgorithm.cc.

References GetClusterAssociationU(), GetClusterAssociationV(), and GetClusterAssociationW().

342 {
343  return std::max(this->GetClusterAssociationU().GetBoundedFraction(),
344  std::max(this->GetClusterAssociationV().GetBoundedFraction(), this->GetClusterAssociationW().GetBoundedFraction()));
345 }
const ClusterAssociation & GetClusterAssociationW() const
Get the cluster association in the w view.
const ClusterAssociation & GetClusterAssociationU() const
Get the cluster association in the u view.
const ClusterAssociation & GetClusterAssociationV() const
Get the cluster association in the v view.
float lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetMeanBoundedFraction ( ) const

Get the mean bounded fraction, averaging over the u, v and w views.

Returns
the mean bounded fraction, averaging over the u, v and w views

Definition at line 332 of file VertexBasedPfoMopUpAlgorithm.cc.

References f, GetClusterAssociationU(), GetClusterAssociationV(), and GetClusterAssociationW().

Referenced by operator<().

333 {
334  return ((this->GetClusterAssociationU().GetBoundedFraction() + this->GetClusterAssociationV().GetBoundedFraction() +
335  this->GetClusterAssociationW().GetBoundedFraction()) /
336  3.f);
337 }
TFile f
Definition: plotHisto.C:6
const ClusterAssociation & GetClusterAssociationW() const
Get the cluster association in the w view.
const ClusterAssociation & GetClusterAssociationU() const
Get the cluster association in the u view.
const ClusterAssociation & GetClusterAssociationV() const
Get the cluster association in the v view.
float lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetMinBoundedFraction ( ) const

Get the minimum bounded fraction from the u, v and w views.

Returns
the minimum bounded fraction from the u, v and w views

Definition at line 349 of file VertexBasedPfoMopUpAlgorithm.cc.

References GetClusterAssociationU(), GetClusterAssociationV(), and GetClusterAssociationW().

350 {
351  return std::min(this->GetClusterAssociationU().GetBoundedFraction(),
352  std::min(this->GetClusterAssociationV().GetBoundedFraction(), this->GetClusterAssociationW().GetBoundedFraction()));
353 }
const ClusterAssociation & GetClusterAssociationW() const
Get the cluster association in the w view.
const ClusterAssociation & GetClusterAssociationU() const
Get the cluster association in the u view.
const ClusterAssociation & GetClusterAssociationV() const
Get the cluster association in the v view.
unsigned int lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetNConsistentDirections ( ) const

Get the number of views for which the vertex and daughter cluster directions are consistent.

Returns
the number of views for which the cluster directions are consistent

Definition at line 357 of file VertexBasedPfoMopUpAlgorithm.cc.

References GetClusterAssociationU(), GetClusterAssociationV(), and GetClusterAssociationW().

358 {
359  unsigned int nConsistentDirections(0);
360 
361  if (this->GetClusterAssociationU().IsConsistentDirection())
362  ++nConsistentDirections;
363 
364  if (this->GetClusterAssociationV().IsConsistentDirection())
365  ++nConsistentDirections;
366 
367  if (this->GetClusterAssociationW().IsConsistentDirection())
368  ++nConsistentDirections;
369 
370  return nConsistentDirections;
371 }
const ClusterAssociation & GetClusterAssociationW() const
Get the cluster association in the w view.
const ClusterAssociation & GetClusterAssociationU() const
Get the cluster association in the u view.
const ClusterAssociation & GetClusterAssociationV() const
Get the cluster association in the v view.
const pandora::Pfo * lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::GetVertexPfo ( ) const
inline

Get the address of the vertex-associated pfo.

Returns
the address of the vertex-associated pfo

Definition at line 400 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by lar_content::VertexBasedPfoMopUpAlgorithm::MergePfos().

401 {
402  return m_pVertexPfo;
403 }
const pandora::Pfo * m_pVertexPfo
The address of the vertex-associated pfo.
bool lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::operator< ( const PfoAssociation rhs) const

operator<

Parameters
rhsthe pfo association object for comparison
Returns
boolean

Definition at line 375 of file VertexBasedPfoMopUpAlgorithm.cc.

References GetMeanBoundedFraction(), m_pDaughterPfo, m_pVertexPfo, and lar_content::LArPfoHelper::SortByNHits().

376 {
377  if (std::fabs(this->GetMeanBoundedFraction() - rhs.GetMeanBoundedFraction()) > std::numeric_limits<float>::epsilon())
378  return (this->GetMeanBoundedFraction() > rhs.GetMeanBoundedFraction());
379 
380  if (m_pVertexPfo != rhs.m_pVertexPfo)
381  return LArPfoHelper::SortByNHits(m_pVertexPfo, rhs.m_pVertexPfo);
382 
383  return LArPfoHelper::SortByNHits(m_pDaughterPfo, rhs.m_pDaughterPfo);
384 }
static bool SortByNHits(const pandora::ParticleFlowObject *const pLhs, const pandora::ParticleFlowObject *const pRhs)
Sort pfos by number of constituent hits.
const pandora::Pfo * m_pDaughterPfo
The address of the non-vertex-associated candidate daughter pfo.
const pandora::Pfo * m_pVertexPfo
The address of the vertex-associated pfo.
float GetMeanBoundedFraction() const
Get the mean bounded fraction, averaging over the u, v and w views.

Member Data Documentation

ClusterAssociation lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::m_clusterAssociationU
private

The cluster association in the u view.

Definition at line 181 of file VertexBasedPfoMopUpAlgorithm.h.

ClusterAssociation lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::m_clusterAssociationV
private

The cluster association in the v view.

Definition at line 182 of file VertexBasedPfoMopUpAlgorithm.h.

ClusterAssociation lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::m_clusterAssociationW
private

The cluster association in the w view.

Definition at line 183 of file VertexBasedPfoMopUpAlgorithm.h.

const pandora::Pfo* lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::m_pDaughterPfo
private

The address of the non-vertex-associated candidate daughter pfo.

Definition at line 179 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by operator<().

const pandora::Pfo* lar_content::VertexBasedPfoMopUpAlgorithm::PfoAssociation::m_pVertexPfo
private

The address of the vertex-associated pfo.

Definition at line 178 of file VertexBasedPfoMopUpAlgorithm.h.

Referenced by operator<().


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