Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::ShowerPfoMopUpAlgorithm Class Reference

ShowerPfoMopUpAlgorithm::Algorithm class. More...

#include "ShowerPfoMopUpAlgorithm.h"

Inheritance diagram for lar_content::ShowerPfoMopUpAlgorithm:
Collaboration diagram for lar_content::ShowerPfoMopUpAlgorithm:

Public Member Functions

 ShowerPfoMopUpAlgorithm ()
 Default constructor.
 
virtual void MergeAndDeletePfos (const pandora::ParticleFlowObject *const pPfoToEnlarge, const pandora::ParticleFlowObject *const pPfoToDelete) const
 Merge and delete a pair of pfos, with a specific set of conventions for cluster merging, vertex use, etc.
 
template<typename T >
const std::string GetListName (const T *const pT) const
 Find the name of the list hosting a specific object.
 
const std::string & GetType () const
 Get the type.
 
const std::string & GetInstanceName () const
 Get the instance name.
 
const PandoraGetPandora () const
 Get the associated pandora instance.
 

Static Public Member Functions

static const pandora::ClusterGetParentCluster (const pandora::ClusterList &clusterList, const pandora::HitType hitType)
 Select the parent cluster (same hit type and most hits) using a provided cluster list and hit type.
 

Protected Types

typedef std::vector< PfoAssociationPfoAssociationList
 
typedef std::map< pandora::HitType, ClusterAssociationHitTypeToAssociationMap
 
typedef std::set< pandora::HitTypeHitTypeSet
 
typedef std::map< pandora::HitType, const pandora::Cluster * > HitTypeToClusterMap
 

Protected Member Functions

pandora::StatusCode Run ()
 Run the algorithm.
 
bool IsVertexAssociated (const pandora::Pfo *const pPfo, const pandora::Vertex *const pVertex) const
 Whether a specified pfo is associated with a specified vertex.
 
PfoAssociation GetPfoAssociation (const pandora::Vertex *const pVertex, const pandora::Pfo *const pVertexPfo, const pandora::Pfo *const pDaughterPfo) const
 Get pfo association details between a vertex-associated pfo and a non-vertex associated daughter candidate pfo.
 
void GetInputPfos (const pandora::Vertex *const pVertex, pandora::PfoList &vertexPfos, pandora::PfoList &nonVertexPfos) const
 Get the list of input pfos and divide them into vertex-associated and non-vertex-associated lists.
 
void GetPfoAssociations (const pandora::Vertex *const pVertex, const pandora::PfoList &vertexPfos, const pandora::PfoList &nonVertexPfos, PfoAssociationList &pfoAssociationList) const
 Get the list of associations between vertex-associated pfos and non-vertex-associated pfos.
 
ClusterAssociation GetClusterAssociation (const pandora::Vertex *const pVertex, const pandora::Cluster *const pVertexCluster, const pandora::Cluster *const pDaughterCluster) const
 Get cluster association details between a vertex-associated cluster and a non-vertex associated daughter candidate cluster.
 
bool ProcessPfoAssociations (const PfoAssociationList &pfoAssociationList) const
 Process the list of pfo associations, merging the best-matching pfo.
 
void MergePfos (const PfoAssociation &pfoAssociation) const
 Merge the vertex and daughter pfos (deleting daughter pfo, merging clusters, etc.) described in the specified pfoAssociation.
 
virtual StatusCode Initialize ()
 Perform any operations that must occur after reading settings, but before running the process.
 
virtual StatusCode Reset ()
 Perform any operations when pandora is reset, typically at the end of each event.
 
StatusCode RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName)
 Register i) the pandora instance that will run the process and ii) the process type.
 

Protected Attributes

std::string m_trackPfoListName
 The input track pfo list name.
 
std::string m_showerPfoListName
 The input shower pfo list name.
 
float m_minVertexLongitudinalDistance
 Vertex association check: min longitudinal distance cut.
 
float m_maxVertexTransverseDistance
 Vertex association check: max transverse distance cut.
 
unsigned int m_minVertexAssociatedHitTypes
 The min number of vertex associated hit types for a vertex associated pfo.
 
float m_coneAngleCentile
 Cluster cone angle is defined using specified centile of distribution of hit half angles.
 
float m_maxConeCosHalfAngle
 Maximum value for cosine of cone half angle.
 
float m_maxConeLengthMultiplier
 Consider hits as bound if inside cone, with projected distance less than N times cone length.
 
float m_directionTanAngle
 Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
 
float m_directionApexShift
 Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
 
float m_meanBoundedFractionCut
 Cut on association info (mean bounded fraction) for determining pfo merges.
 
float m_maxBoundedFractionCut
 Cut on association info (max bounded fraction) for determining pfo merges.
 
float m_minBoundedFractionCut
 Cut on association info (min bounded fraction) for determining pfo merges.
 
unsigned int m_minConsistentDirections
 The minimum number of consistent cluster directions to allow a pfo merge.
 
unsigned int m_minConsistentDirectionsTrack
 The minimum number of consistent cluster directions to allow a merge involving a track pfo.
 
pandora::StringVector m_daughterListNames
 The list of potential daughter object list names.
 
const Pandoram_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Private Member Functions

bool IsVertexAssociated (const pandora::CartesianVector &vertex2D, const LArPointingCluster &pointingCluster) const
 Whether a specified pfo is associated with a specified vertex.
 
PfoAssociation GetPfoAssociation (const pandora::Pfo *const pVertexPfo, const pandora::Pfo *const pDaughterPfo, HitTypeToAssociationMap &hitTypeToAssociationMap) const
 Get pfo association details between a vertex-associated pfo and a non-vertex associated daughter candidate pfo.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

float m_maxVertexLongitudinalDistance
 Vertex association check: max longitudinal distance cut.
 
float m_vertexAngularAllowance
 Vertex association check: pointing angular allowance in degrees.
 

Detailed Description

ShowerPfoMopUpAlgorithm::Algorithm class.

Definition at line 19 of file ShowerPfoMopUpAlgorithm.h.

Member Typedef Documentation

◆ HitTypeSet

Definition at line 344 of file VertexBasedPfoMopUpAlgorithm.h.

◆ HitTypeToAssociationMap

◆ HitTypeToClusterMap

◆ PfoAssociationList

Definition at line 186 of file VertexBasedPfoMopUpAlgorithm.h.

Constructor & Destructor Documentation

◆ ShowerPfoMopUpAlgorithm()

lar_content::ShowerPfoMopUpAlgorithm::ShowerPfoMopUpAlgorithm ( )

Default constructor.

Definition at line 24 of file ShowerPfoMopUpAlgorithm.cc.

Member Function Documentation

◆ GetClusterAssociation()

VertexBasedPfoMopUpAlgorithm::ClusterAssociation lar_content::VertexBasedPfoMopUpAlgorithm::GetClusterAssociation ( const pandora::Vertex *const  pVertex,
const pandora::Cluster *const  pVertexCluster,
const pandora::Cluster *const  pDaughterCluster 
) const
protectedinherited

Get cluster association details between a vertex-associated cluster and a non-vertex associated daughter candidate cluster.

Parameters
pVertexthe address of the vertex
pVertexClusterthe address of the vertex-associated cluster
pDaughterClusterthe address of the non-vertex-associated cluster
Returns
the cluster association details

Definition at line 208 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInputPfos()

void lar_content::VertexBasedPfoMopUpAlgorithm::GetInputPfos ( const pandora::Vertex *const  pVertex,
pandora::PfoList vertexPfos,
pandora::PfoList nonVertexPfos 
) const
protectedinherited

Get the list of input pfos and divide them into vertex-associated and non-vertex-associated lists.

Parameters
pVertexthe address of the 3d vertex
vertexPfosto receive the list of vertex-associated pfos
nonVertexPfosto receive the list of nonvertex-associated pfos

Definition at line 101 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetListName()

template<typename T >
template const std::string lar_content::MopUpBaseAlgorithm::GetListName ( const T *const  pT) const
inherited

Find the name of the list hosting a specific object.

Parameters
pTthe address of the object
Returns
the name of the list

Definition at line 19 of file MopUpBaseAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetParentCluster()

const Cluster * lar_content::PfoMopUpBaseAlgorithm::GetParentCluster ( const pandora::ClusterList clusterList,
const pandora::HitType  hitType 
)
staticinherited

Select the parent cluster (same hit type and most hits) using a provided cluster list and hit type.

Parameters
clusterListthe cluster list
hitTypethe hit type
Returns
the address of the parent cluster

Definition at line 61 of file PfoMopUpBaseAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPfoAssociation() [1/2]

ShowerPfoMopUpAlgorithm::PfoAssociation lar_content::ShowerPfoMopUpAlgorithm::GetPfoAssociation ( const pandora::Pfo *const  pVertexPfo,
const pandora::Pfo *const  pDaughterPfo,
HitTypeToAssociationMap hitTypeToAssociationMap 
) const
privatevirtual

Get pfo association details between a vertex-associated pfo and a non-vertex associated daughter candidate pfo.

Parameters
pVertexPfothe address of the vertex-associated pfo
pDaughterPfothe address of the non-vertex-associated pfo
hitTypeToAssociationMapthe hit type to association map
Returns
the pfo association details

Reimplemented from lar_content::VertexBasedPfoMopUpAlgorithm.

Definition at line 52 of file ShowerPfoMopUpAlgorithm.cc.

◆ GetPfoAssociation() [2/2]

VertexBasedPfoMopUpAlgorithm::PfoAssociation lar_content::VertexBasedPfoMopUpAlgorithm::GetPfoAssociation ( const pandora::Vertex *const  pVertex,
const pandora::Pfo *const  pVertexPfo,
const pandora::Pfo *const  pDaughterPfo 
) const
protectedinherited

Get pfo association details between a vertex-associated pfo and a non-vertex associated daughter candidate pfo.

Parameters
pVertexthe address of the 3d vertex
pVertexPfothe address of the vertex-associated pfo
pDaughterPfothe address of the non-vertex-associated pfo
Returns
the pfo association details

Definition at line 179 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:

◆ GetPfoAssociations()

void lar_content::VertexBasedPfoMopUpAlgorithm::GetPfoAssociations ( const pandora::Vertex *const  pVertex,
const pandora::PfoList vertexPfos,
const pandora::PfoList nonVertexPfos,
PfoAssociationList pfoAssociationList 
) const
protectedinherited

Get the list of associations between vertex-associated pfos and non-vertex-associated pfos.

Parameters
pVertexthe address of the 3d vertex
vertexPfosthe list of vertex-associated pfos
nonVertexPfosthe list of nonvertex-associated pfos
pfoAssociationListto receive the pfo association list

Definition at line 158 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode pandora::Process::Initialize ( )
inlineprotectedvirtualinherited

Perform any operations that must occur after reading settings, but before running the process.

Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.

Definition at line 126 of file Process.h.

Here is the caller graph for this function:

◆ IsVertexAssociated() [1/2]

bool lar_content::ShowerPfoMopUpAlgorithm::IsVertexAssociated ( const pandora::CartesianVector vertex2D,
const LArPointingCluster pointingCluster 
) const
privatevirtual

Whether a specified pfo is associated with a specified vertex.

Parameters
vertex2Dthe 2d vertex position
pointingClusterthe pointing cluster
Returns
boolean

Reimplemented from lar_content::VertexBasedPfoMopUpAlgorithm.

Definition at line 40 of file ShowerPfoMopUpAlgorithm.cc.

Here is the call graph for this function:

◆ IsVertexAssociated() [2/2]

bool lar_content::VertexBasedPfoMopUpAlgorithm::IsVertexAssociated ( const pandora::Pfo *const  pPfo,
const pandora::Vertex *const  pVertex 
) const
protectedinherited

Whether a specified pfo is associated with a specified vertex.

Parameters
pPfothe address of the pfo
pVertexthe address of the 3d vertex
Returns
boolean

Definition at line 124 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:

◆ MergeAndDeletePfos()

void lar_content::PfoMopUpBaseAlgorithm::MergeAndDeletePfos ( const pandora::ParticleFlowObject *const  pPfoToEnlarge,
const pandora::ParticleFlowObject *const  pPfoToDelete 
) const
virtualinherited

Merge and delete a pair of pfos, with a specific set of conventions for cluster merging, vertex use, etc.

Parameters
pPfoToEnlargethe address of the pfo to enlarge
pPfoToDeletethe address of the pfo to delete (will become a dangling pointer)

Definition at line 20 of file PfoMopUpBaseAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MergePfos()

void lar_content::VertexBasedPfoMopUpAlgorithm::MergePfos ( const PfoAssociation pfoAssociation) const
protectedinherited

Merge the vertex and daughter pfos (deleting daughter pfo, merging clusters, etc.) described in the specified pfoAssociation.

Parameters
pfoAssociationthe pfo association details

Definition at line 267 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessPfoAssociations()

bool lar_content::VertexBasedPfoMopUpAlgorithm::ProcessPfoAssociations ( const PfoAssociationList pfoAssociationList) const
protectedinherited

Process the list of pfo associations, merging the best-matching pfo.

Parameters
pfoAssociationListthe pfo association list
Returns
whether a pfo merge was made

Definition at line 228 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSettings()

StatusCode lar_content::ShowerPfoMopUpAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::PfoMopUpBaseAlgorithm.

Definition at line 61 of file ShowerPfoMopUpAlgorithm.cc.

Here is the call graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
inlineprotectedvirtualinherited

Perform any operations when pandora is reset, typically at the end of each event.

Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.

Definition at line 133 of file Process.h.

Here is the caller graph for this function:

◆ Run()

StatusCode lar_content::VertexBasedPfoMopUpAlgorithm::Run ( )
protectedvirtualinherited

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 45 of file VertexBasedPfoMopUpAlgorithm.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_coneAngleCentile

float lar_content::VertexBasedPfoMopUpAlgorithm::m_coneAngleCentile
protectedinherited

Cluster cone angle is defined using specified centile of distribution of hit half angles.

Definition at line 354 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_daughterListNames

pandora::StringVector lar_content::MopUpBaseAlgorithm::m_daughterListNames
protectedinherited

The list of potential daughter object list names.

Definition at line 35 of file MopUpBaseAlgorithm.h.

◆ m_directionApexShift

float lar_content::VertexBasedPfoMopUpAlgorithm::m_directionApexShift
protectedinherited

Direction determination, look for vertex inside triangle with apex shifted along the cluster length.

Definition at line 359 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_directionTanAngle

float lar_content::VertexBasedPfoMopUpAlgorithm::m_directionTanAngle
protectedinherited

Direction determination, look for vertex inside triangle with apex shifted along the cluster length.

Definition at line 358 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxBoundedFractionCut

float lar_content::VertexBasedPfoMopUpAlgorithm::m_maxBoundedFractionCut
protectedinherited

Cut on association info (max bounded fraction) for determining pfo merges.

Definition at line 362 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_maxConeCosHalfAngle

float lar_content::VertexBasedPfoMopUpAlgorithm::m_maxConeCosHalfAngle
protectedinherited

Maximum value for cosine of cone half angle.

Definition at line 355 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_maxConeLengthMultiplier

float lar_content::VertexBasedPfoMopUpAlgorithm::m_maxConeLengthMultiplier
protectedinherited

Consider hits as bound if inside cone, with projected distance less than N times cone length.

Definition at line 356 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_maxVertexLongitudinalDistance

float lar_content::ShowerPfoMopUpAlgorithm::m_maxVertexLongitudinalDistance
private

Vertex association check: max longitudinal distance cut.

Definition at line 33 of file ShowerPfoMopUpAlgorithm.h.

◆ m_maxVertexTransverseDistance

float lar_content::VertexBasedPfoMopUpAlgorithm::m_maxVertexTransverseDistance
protectedinherited

Vertex association check: max transverse distance cut.

Definition at line 351 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_meanBoundedFractionCut

float lar_content::VertexBasedPfoMopUpAlgorithm::m_meanBoundedFractionCut
protectedinherited

Cut on association info (mean bounded fraction) for determining pfo merges.

Definition at line 361 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_minBoundedFractionCut

float lar_content::VertexBasedPfoMopUpAlgorithm::m_minBoundedFractionCut
protectedinherited

Cut on association info (min bounded fraction) for determining pfo merges.

Definition at line 363 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_minConsistentDirections

unsigned int lar_content::VertexBasedPfoMopUpAlgorithm::m_minConsistentDirections
protectedinherited

The minimum number of consistent cluster directions to allow a pfo merge.

Definition at line 365 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_minConsistentDirectionsTrack

unsigned int lar_content::VertexBasedPfoMopUpAlgorithm::m_minConsistentDirectionsTrack
protectedinherited

The minimum number of consistent cluster directions to allow a merge involving a track pfo.

Definition at line 366 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_minVertexAssociatedHitTypes

unsigned int lar_content::VertexBasedPfoMopUpAlgorithm::m_minVertexAssociatedHitTypes
protectedinherited

The min number of vertex associated hit types for a vertex associated pfo.

Definition at line 352 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_minVertexLongitudinalDistance

float lar_content::VertexBasedPfoMopUpAlgorithm::m_minVertexLongitudinalDistance
protectedinherited

Vertex association check: min longitudinal distance cut.

Definition at line 350 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_showerPfoListName

std::string lar_content::VertexBasedPfoMopUpAlgorithm::m_showerPfoListName
protectedinherited

The input shower pfo list name.

Definition at line 348 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_trackPfoListName

std::string lar_content::VertexBasedPfoMopUpAlgorithm::m_trackPfoListName
protectedinherited

The input track pfo list name.

Definition at line 347 of file VertexBasedPfoMopUpAlgorithm.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.

◆ m_vertexAngularAllowance

float lar_content::ShowerPfoMopUpAlgorithm::m_vertexAngularAllowance
private

Vertex association check: pointing angular allowance in degrees.

Definition at line 34 of file ShowerPfoMopUpAlgorithm.h.


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