LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 315 of file VertexBasedPfoMopUpAlgorithm.cc.

316  :
317  m_pVertexPfo(pVertexPfo),
318  m_pDaughterPfo(pDaughterPfo),
319  m_clusterAssociationU(clusterAssociationU),
320  m_clusterAssociationV(clusterAssociationV),
321  m_clusterAssociationW(clusterAssociationW)
322 {
323 }
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 413 of file VertexBasedPfoMopUpAlgorithm.h.

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

414 {
415  return m_clusterAssociationU;
416 }
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 420 of file VertexBasedPfoMopUpAlgorithm.h.

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

421 {
422  return m_clusterAssociationV;
423 }
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 427 of file VertexBasedPfoMopUpAlgorithm.h.

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

428 {
429  return m_clusterAssociationW;
430 }
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 406 of file VertexBasedPfoMopUpAlgorithm.h.

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

407 {
408  return m_pDaughterPfo;
409 }
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 334 of file VertexBasedPfoMopUpAlgorithm.cc.

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

335 {
336  return std::max(this->GetClusterAssociationU().GetBoundedFraction(), std::max(this->GetClusterAssociationV().GetBoundedFraction(), this->GetClusterAssociationW().GetBoundedFraction()));
337 }
Int_t max
Definition: plot.C:27
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 327 of file VertexBasedPfoMopUpAlgorithm.cc.

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

Referenced by operator<().

328 {
329  return ((this->GetClusterAssociationU().GetBoundedFraction() + this->GetClusterAssociationV().GetBoundedFraction() + this->GetClusterAssociationW().GetBoundedFraction()) / 3.f);
330 }
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 341 of file VertexBasedPfoMopUpAlgorithm.cc.

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

342 {
343  return std::min(this->GetClusterAssociationU().GetBoundedFraction(), std::min(this->GetClusterAssociationV().GetBoundedFraction(), this->GetClusterAssociationW().GetBoundedFraction()));
344 }
const ClusterAssociation & GetClusterAssociationW() const
Get the cluster association in the w view.
Int_t min
Definition: plot.C:26
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 348 of file VertexBasedPfoMopUpAlgorithm.cc.

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

349 {
350  unsigned int nConsistentDirections(0);
351 
352  if (this->GetClusterAssociationU().IsConsistentDirection())
353  ++nConsistentDirections;
354 
355  if (this->GetClusterAssociationV().IsConsistentDirection())
356  ++nConsistentDirections;
357 
358  if (this->GetClusterAssociationW().IsConsistentDirection())
359  ++nConsistentDirections;
360 
361  return nConsistentDirections;
362 }
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 399 of file VertexBasedPfoMopUpAlgorithm.h.

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

400 {
401  return m_pVertexPfo;
402 }
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 366 of file VertexBasedPfoMopUpAlgorithm.cc.

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

367 {
368  if (std::fabs(this->GetMeanBoundedFraction() - rhs.GetMeanBoundedFraction()) > std::numeric_limits<float>::epsilon())
369  return (this->GetMeanBoundedFraction() > rhs.GetMeanBoundedFraction());
370 
371  if (m_pVertexPfo != rhs.m_pVertexPfo)
372  return LArPfoHelper::SortByNHits(m_pVertexPfo, rhs.m_pVertexPfo);
373 
374  return LArPfoHelper::SortByNHits(m_pDaughterPfo, rhs.m_pDaughterPfo);
375 }
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: