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

SlidingConePfoMopUpAlgorithm class. More...

#include "SlidingConePfoMopUpAlgorithm.h"

Inheritance diagram for lar_content::SlidingConePfoMopUpAlgorithm:
Collaboration diagram for lar_content::SlidingConePfoMopUpAlgorithm:

Classes

class  ClusterMerge
 ClusterMerge class. More...
 

Public Member Functions

 SlidingConePfoMopUpAlgorithm ()
 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 Member Functions

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

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 Types

typedef std::vector< ClusterMergeClusterMergeList
 
typedef std::unordered_map< const pandora::Cluster *, const pandora::ParticleFlowObject * > ClusterToPfoMap
 
typedef std::unordered_map< const pandora::Cluster *, ClusterMergeListClusterMergeMap
 
typedef std::unordered_map< const pandora::Cluster *, bool > VertexAssociationMap
 
typedef std::unordered_map< const pandora::Cluster *, const pandora::Cluster * > ClusterReplacementMap
 

Private Member Functions

pandora::StatusCode Run ()
 Run the algorithm.
 
void GetInteractionVertex (const pandora::Vertex *&pVertex) const
 Get the neutrino interaction vertex if it is available and if the algorithm is configured to do so.
 
void GetThreeDClusters (pandora::ClusterVector &clusters3D, ClusterToPfoMap &clusterToPfoMap) const
 Get all 3d clusters contained in the input pfo lists and a mapping from clusters to pfos.
 
void GetClusterMergeMap (const pandora::Vertex *const pVertex, const pandora::ClusterVector &clusters3D, const ClusterToPfoMap &clusterToPfoMap, ClusterMergeMap &clusterMergeMap) const
 Get the cluster merge map describing all potential 3d cluster merges.
 
bool IsVertexAssociated (const pandora::Cluster *const pCluster, const pandora::Vertex *const pVertex, VertexAssociationMap &vertexAssociationMap, const ThreeDSlidingFitResult *const pSlidingFitResult=nullptr) const
 Whether a 3D cluster is nodally associated with a provided vertex.
 
bool IsVertexAssociated (const pandora::Cluster *const pCluster, const pandora::CartesianVector &vertexPosition, const ThreeDSlidingFitResult *const pSlidingFitResult=nullptr) const
 Whether a 3D cluster is nodally associated with a provided vertex.
 
bool MakePfoMerges (const ClusterToPfoMap &clusterToPfoMap, const ClusterMergeMap &clusterMergeMap) const
 Make pfo merges based on the provided cluster merge map.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

pandora::StringVector m_inputPfoListNames
 The input pfo list names.
 
bool m_useVertex
 Whether to use the interaction vertex to select useful cone directions.
 
unsigned int m_maxIterations
 The maximum allowed number of algorithm iterations.
 
unsigned int m_maxHitsToConsider3DTrack
 The maximum number of hits in a 3d track cluster to warrant inclusion in algorithm.
 
unsigned int m_minHitsToConsider3DShower
 The minimum number of hits in a 3d shower cluster to attempt cone fits.
 
unsigned int m_halfWindowLayers
 The number of layers to use for half-window of sliding fit.
 
unsigned int m_nConeFitLayers
 The number of layers over which to sum fitted direction to obtain cone fit.
 
unsigned int m_nConeFits
 The number of cone fits to perform, spread roughly uniformly along the shower length.
 
float m_coneLengthMultiplier
 The cone length multiplier to use when calculating bounded cluster fractions.
 
float m_maxConeLength
 The maximum allowed cone length to use when calculating bounded cluster fractions.
 
float m_coneTanHalfAngle1
 The cone tan half angle to use when calculating bounded cluster fractions 1.
 
float m_coneBoundedFraction1
 The minimum cluster bounded fraction for association 1.
 
float m_coneTanHalfAngle2
 The cone tan half angle to use when calculating bounded cluster fractions 2.
 
float m_coneBoundedFraction2
 The minimum cluster bounded fraction for association 2.
 
float m_minVertexLongitudinalDistance
 Vertex association check: min longitudinal distance cut.
 
float m_maxVertexTransverseDistance
 Vertex association check: max transverse distance cut.
 

Detailed Description

Member Typedef Documentation

◆ ClusterMergeList

◆ ClusterMergeMap

◆ ClusterReplacementMap

Definition at line 154 of file SlidingConePfoMopUpAlgorithm.h.

◆ ClusterToPfoMap

◆ VertexAssociationMap

typedef std::unordered_map<const pandora::Cluster *, bool> lar_content::SlidingConePfoMopUpAlgorithm::VertexAssociationMap
private

Definition at line 115 of file SlidingConePfoMopUpAlgorithm.h.

Constructor & Destructor Documentation

◆ SlidingConePfoMopUpAlgorithm()

lar_content::SlidingConePfoMopUpAlgorithm::SlidingConePfoMopUpAlgorithm ( )

Default constructor.

Definition at line 25 of file SlidingConePfoMopUpAlgorithm.cc.

Member Function Documentation

◆ GetClusterMergeMap()

void lar_content::SlidingConePfoMopUpAlgorithm::GetClusterMergeMap ( const pandora::Vertex *const  pVertex,
const pandora::ClusterVector clusters3D,
const ClusterToPfoMap clusterToPfoMap,
ClusterMergeMap clusterMergeMap 
) const
private

Get the cluster merge map describing all potential 3d cluster merges.

Parameters
pVertexthe neutrino interaction vertex, if available
clusters3Dthe sorted list of 3d clusters
clusterToPfoMapthe mapping from 3d cluster to pfo
clusterMergeMapto receive the populated cluster merge map

Definition at line 124 of file SlidingConePfoMopUpAlgorithm.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.

◆ GetInteractionVertex()

void lar_content::SlidingConePfoMopUpAlgorithm::GetInteractionVertex ( const pandora::Vertex *&  pVertex) const
private

Get the neutrino interaction vertex if it is available and if the algorithm is configured to do so.

Parameters
pVertexto receive the neutrino interaction vertex

Definition at line 78 of file SlidingConePfoMopUpAlgorithm.cc.

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

◆ 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:

◆ GetThreeDClusters()

void lar_content::SlidingConePfoMopUpAlgorithm::GetThreeDClusters ( pandora::ClusterVector clusters3D,
ClusterToPfoMap clusterToPfoMap 
) const
private

Get all 3d clusters contained in the input pfo lists and a mapping from clusters to pfos.

Parameters
clusters3Dto receive the sorted list of 3d clusters
clusterToPfoMapto receive the mapping from 3d cluster to pfo

Definition at line 92 of file SlidingConePfoMopUpAlgorithm.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::SlidingConePfoMopUpAlgorithm::IsVertexAssociated ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector vertexPosition,
const ThreeDSlidingFitResult *const  pSlidingFitResult = nullptr 
) const
private

Whether a 3D cluster is nodally associated with a provided vertex.

Parameters
pClusterthe address of the cluster
vertexPositionthe vertex position
pSlidingFitResultthe address of a 3D sliding linear fit, if available, which aids pointing cluster construction efficiency
Returns
boolean

Definition at line 212 of file SlidingConePfoMopUpAlgorithm.cc.

Here is the call graph for this function:

◆ IsVertexAssociated() [2/2]

bool lar_content::SlidingConePfoMopUpAlgorithm::IsVertexAssociated ( const pandora::Cluster *const  pCluster,
const pandora::Vertex *const  pVertex,
VertexAssociationMap vertexAssociationMap,
const ThreeDSlidingFitResult *const  pSlidingFitResult = nullptr 
) const
private

Whether a 3D cluster is nodally associated with a provided vertex.

Parameters
pClusterthe address of the cluster
pVertexthe address of the vertex
vertexAssociationMapthe vertex association map, which caches the results for efficiency
pSlidingFitResultthe address of a 3D sliding linear fit, if available, which aids pointing cluster construction efficiency
Returns
boolean

Definition at line 193 of file SlidingConePfoMopUpAlgorithm.cc.

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

◆ MakePfoMerges()

bool lar_content::SlidingConePfoMopUpAlgorithm::MakePfoMerges ( const ClusterToPfoMap clusterToPfoMap,
const ClusterMergeMap clusterMergeMap 
) const
private

Make pfo merges based on the provided cluster merge map.

Parameters
clusterToPfoMapthe mapping from 3d cluster to pfo
clusterMergeMapthe populated cluster merge map
Returns
whether a pfo merge has been made

Definition at line 236 of file SlidingConePfoMopUpAlgorithm.cc.

Here is the call graph for this function:
Here is the caller 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:

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::PfoMopUpBaseAlgorithm.

Definition at line 307 of file SlidingConePfoMopUpAlgorithm.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::SlidingConePfoMopUpAlgorithm::Run ( )
privatevirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 46 of file SlidingConePfoMopUpAlgorithm.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_coneBoundedFraction1

float lar_content::SlidingConePfoMopUpAlgorithm::m_coneBoundedFraction1
private

The minimum cluster bounded fraction for association 1.

Definition at line 167 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_coneBoundedFraction2

float lar_content::SlidingConePfoMopUpAlgorithm::m_coneBoundedFraction2
private

The minimum cluster bounded fraction for association 2.

Definition at line 169 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_coneLengthMultiplier

float lar_content::SlidingConePfoMopUpAlgorithm::m_coneLengthMultiplier
private

The cone length multiplier to use when calculating bounded cluster fractions.

Definition at line 164 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_coneTanHalfAngle1

float lar_content::SlidingConePfoMopUpAlgorithm::m_coneTanHalfAngle1
private

The cone tan half angle to use when calculating bounded cluster fractions 1.

Definition at line 166 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_coneTanHalfAngle2

float lar_content::SlidingConePfoMopUpAlgorithm::m_coneTanHalfAngle2
private

The cone tan half angle to use when calculating bounded cluster fractions 2.

Definition at line 168 of file SlidingConePfoMopUpAlgorithm.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_halfWindowLayers

unsigned int lar_content::SlidingConePfoMopUpAlgorithm::m_halfWindowLayers
private

The number of layers to use for half-window of sliding fit.

Definition at line 161 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_inputPfoListNames

pandora::StringVector lar_content::SlidingConePfoMopUpAlgorithm::m_inputPfoListNames
private

The input pfo list names.

Definition at line 156 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxConeLength

float lar_content::SlidingConePfoMopUpAlgorithm::m_maxConeLength
private

The maximum allowed cone length to use when calculating bounded cluster fractions.

Definition at line 165 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_maxHitsToConsider3DTrack

unsigned int lar_content::SlidingConePfoMopUpAlgorithm::m_maxHitsToConsider3DTrack
private

The maximum number of hits in a 3d track cluster to warrant inclusion in algorithm.

Definition at line 159 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_maxIterations

unsigned int lar_content::SlidingConePfoMopUpAlgorithm::m_maxIterations
private

The maximum allowed number of algorithm iterations.

Definition at line 158 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_maxVertexTransverseDistance

float lar_content::SlidingConePfoMopUpAlgorithm::m_maxVertexTransverseDistance
private

Vertex association check: max transverse distance cut.

Definition at line 171 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_minHitsToConsider3DShower

unsigned int lar_content::SlidingConePfoMopUpAlgorithm::m_minHitsToConsider3DShower
private

The minimum number of hits in a 3d shower cluster to attempt cone fits.

Definition at line 160 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_minVertexLongitudinalDistance

float lar_content::SlidingConePfoMopUpAlgorithm::m_minVertexLongitudinalDistance
private

Vertex association check: min longitudinal distance cut.

Definition at line 170 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_nConeFitLayers

unsigned int lar_content::SlidingConePfoMopUpAlgorithm::m_nConeFitLayers
private

The number of layers over which to sum fitted direction to obtain cone fit.

Definition at line 162 of file SlidingConePfoMopUpAlgorithm.h.

◆ m_nConeFits

unsigned int lar_content::SlidingConePfoMopUpAlgorithm::m_nConeFits
private

The number of cone fits to perform, spread roughly uniformly along the shower length.

Definition at line 163 of file SlidingConePfoMopUpAlgorithm.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_type

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

The process type.

Definition at line 88 of file Process.h.

◆ m_useVertex

bool lar_content::SlidingConePfoMopUpAlgorithm::m_useVertex
private

Whether to use the interaction vertex to select useful cone directions.

Definition at line 157 of file SlidingConePfoMopUpAlgorithm.h.


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