LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
SlidingConePfoMopUpAlgorithm class. More...
#include "SlidingConePfoMopUpAlgorithm.h"
Classes | |
class | ClusterMerge |
ClusterMerge class. More... | |
Public Member Functions | |
SlidingConePfoMopUpAlgorithm () | |
Default constructor. More... | |
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. More... | |
template<typename T > | |
const std::string | GetListName (const T *const pT) const |
Find the name of the list hosting a specific object. More... | |
Static Public Member Functions | |
static const pandora::Cluster * | GetParentCluster (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. More... | |
Protected Attributes | |
pandora::StringVector | m_daughterListNames |
The list of potential daughter object list names. More... | |
Private Types | |
typedef std::vector< ClusterMerge > | ClusterMergeList |
typedef std::unordered_map< const pandora::Cluster *, const pandora::ParticleFlowObject * > | ClusterToPfoMap |
typedef std::unordered_map< const pandora::Cluster *, ClusterMergeList > | ClusterMergeMap |
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 () |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | MakePfoMerges (const ClusterToPfoMap &clusterToPfoMap, const ClusterMergeMap &clusterMergeMap) const |
Make pfo merges based on the provided cluster merge map. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
pandora::StringVector | m_inputPfoListNames |
The input pfo list names. More... | |
bool | m_useVertex |
Whether to use the interaction vertex to select useful cone directions. More... | |
unsigned int | m_maxIterations |
The maximum allowed number of algorithm iterations. More... | |
unsigned int | m_maxHitsToConsider3DTrack |
The maximum number of hits in a 3d track cluster to warrant inclusion in algorithm. More... | |
unsigned int | m_minHitsToConsider3DShower |
The minimum number of hits in a 3d shower cluster to attempt cone fits. More... | |
unsigned int | m_halfWindowLayers |
The number of layers to use for half-window of sliding fit. More... | |
unsigned int | m_nConeFitLayers |
The number of layers over which to sum fitted direction to obtain cone fit. More... | |
unsigned int | m_nConeFits |
The number of cone fits to perform, spread roughly uniformly along the shower length. More... | |
float | m_coneLengthMultiplier |
The cone length multiplier to use when calculating bounded cluster fractions. More... | |
float | m_maxConeLength |
The maximum allowed cone length to use when calculating bounded cluster fractions. More... | |
float | m_coneTanHalfAngle1 |
The cone tan half angle to use when calculating bounded cluster fractions 1. More... | |
float | m_coneBoundedFraction1 |
The minimum cluster bounded fraction for association 1. More... | |
float | m_coneTanHalfAngle2 |
The cone tan half angle to use when calculating bounded cluster fractions 2. More... | |
float | m_coneBoundedFraction2 |
The minimum cluster bounded fraction for association 2. More... | |
float | m_minVertexLongitudinalDistance |
Vertex association check: min longitudinal distance cut. More... | |
float | m_maxVertexTransverseDistance |
Vertex association check: max transverse distance cut. More... | |
SlidingConePfoMopUpAlgorithm class.
Definition at line 21 of file SlidingConePfoMopUpAlgorithm.h.
|
private |
Definition at line 81 of file SlidingConePfoMopUpAlgorithm.h.
|
private |
Definition at line 102 of file SlidingConePfoMopUpAlgorithm.h.
|
private |
Definition at line 154 of file SlidingConePfoMopUpAlgorithm.h.
|
private |
Definition at line 92 of file SlidingConePfoMopUpAlgorithm.h.
|
private |
Definition at line 115 of file SlidingConePfoMopUpAlgorithm.h.
lar_content::SlidingConePfoMopUpAlgorithm::SlidingConePfoMopUpAlgorithm | ( | ) |
Default constructor.
Definition at line 25 of file SlidingConePfoMopUpAlgorithm.cc.
|
private |
Get the cluster merge map describing all potential 3d cluster merges.
pVertex | the neutrino interaction vertex, if available |
clusters3D | the sorted list of 3d clusters |
clusterToPfoMap | the mapping from 3d cluster to pfo |
clusterMergeMap | to receive the populated cluster merge map |
Definition at line 124 of file SlidingConePfoMopUpAlgorithm.cc.
References lar_content::CONE_BACKWARD_ONLY, lar_content::CONE_BOTH_DIRECTIONS, lar_content::CONE_FORWARD_ONLY, f, lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::GetBoundedFraction1(), lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::GetBoundedFraction2(), lar_content::LArClusterHelper::GetClusterHitType(), lar_content::ThreeDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::ThreeDSlidingFitResult::GetGlobalMinLayerPosition(), lar_content::LArPointingCluster::GetInnerVertex(), lar_content::LArPointingCluster::GetOuterVertex(), lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::GetParentCluster(), lar_content::LArPointingCluster::Vertex::GetPosition(), lar_content::ThreeDSlidingConeFitResult::GetSimpleConeList(), lar_content::ThreeDSlidingConeFitResult::GetSlidingFitResult(), lar_content::LArGeometryHelper::GetWirePitch(), lar_content::LArPointingClusterHelper::IsNode(), lar_content::LArPfoHelper::IsShower(), IsVertexAssociated(), m_coneBoundedFraction1, m_coneBoundedFraction2, m_coneLengthMultiplier, m_coneTanHalfAngle1, m_coneTanHalfAngle2, m_halfWindowLayers, m_maxConeLength, m_maxVertexTransverseDistance, m_minHitsToConsider3DShower, m_minVertexLongitudinalDistance, m_nConeFitLayers, and m_nConeFits.
Referenced by Run().
|
private |
Get the neutrino interaction vertex if it is available and if the algorithm is configured to do so.
pVertex | to receive the neutrino interaction vertex |
Definition at line 78 of file SlidingConePfoMopUpAlgorithm.cc.
References m_useVertex.
Referenced by Run().
|
inherited |
Find the name of the list hosting a specific object.
pT | the address of the object |
Definition at line 19 of file MopUpBaseAlgorithm.cc.
Referenced by lar_content::IsolatedClusterMopUpAlgorithm::DissolveClustersToHits(), lar_content::ClusterMopUpBaseAlgorithm::MakeClusterMerges(), and lar_content::SlidingConeClusterMopUpAlgorithm::MakeClusterMerges().
|
staticinherited |
Select the parent cluster (same hit type and most hits) using a provided cluster list and hit type.
clusterList | the cluster list |
hitType | the hit type |
Definition at line 61 of file PfoMopUpBaseAlgorithm.cc.
Referenced by lar_content::SlidingConeClusterMopUpAlgorithm::MakeClusterMerges(), lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::operator<(), lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::operator<(), and lar_content::MasterAlgorithm::StitchPfos().
|
private |
Get all 3d clusters contained in the input pfo lists and a mapping from clusters to pfos.
clusters3D | to receive the sorted list of 3d clusters |
clusterToPfoMap | to receive the mapping from 3d cluster to pfo |
Definition at line 92 of file SlidingConePfoMopUpAlgorithm.cc.
References lar_content::LArPfoHelper::GetThreeDClusterList(), lar_content::LArPfoHelper::IsTrack(), m_inputPfoListNames, m_maxHitsToConsider3DTrack, and lar_content::LArClusterHelper::SortByNHits().
Referenced by Run().
|
private |
Whether a 3D cluster is nodally associated with a provided vertex.
pCluster | the address of the cluster |
pVertex | the address of the vertex |
vertexAssociationMap | the vertex association map, which caches the results for efficiency |
pSlidingFitResult | the address of a 3D sliding linear fit, if available, which aids pointing cluster construction efficiency |
Referenced by GetClusterMergeMap().
|
private |
Whether a 3D cluster is nodally associated with a provided vertex.
pCluster | the address of the cluster |
vertexPosition | the vertex position |
pSlidingFitResult | the address of a 3D sliding linear fit, if available, which aids pointing cluster construction efficiency |
|
private |
Make pfo merges based on the provided cluster merge map.
clusterToPfoMap | the mapping from 3d cluster to pfo |
clusterMergeMap | the populated cluster merge map |
Definition at line 258 of file SlidingConePfoMopUpAlgorithm.cc.
References lar_content::PfoMopUpBaseAlgorithm::MergeAndDeletePfos(), and lar_content::LArClusterHelper::SortByNHits().
Referenced by Run().
|
virtualinherited |
Merge and delete a pair of pfos, with a specific set of conventions for cluster merging, vertex use, etc.
pPfoToEnlarge | the address of the pfo to enlarge |
pPfoToDelete | the address of the pfo to delete (will become a dangling pointer) |
Definition at line 20 of file PfoMopUpBaseAlgorithm.cc.
Referenced by MakePfoMerges(), and lar_content::VertexBasedPfoMopUpAlgorithm::MergePfos().
|
privatevirtual |
Reimplemented from lar_content::PfoMopUpBaseAlgorithm.
Definition at line 329 of file SlidingConePfoMopUpAlgorithm.cc.
References m_coneBoundedFraction1, m_coneBoundedFraction2, m_coneLengthMultiplier, m_coneTanHalfAngle1, m_coneTanHalfAngle2, lar_content::MopUpBaseAlgorithm::m_daughterListNames, m_halfWindowLayers, m_inputPfoListNames, m_maxConeLength, m_maxHitsToConsider3DTrack, m_maxIterations, m_maxVertexTransverseDistance, m_minHitsToConsider3DShower, m_minVertexLongitudinalDistance, m_nConeFitLayers, m_nConeFits, m_useVertex, and lar_content::PfoMopUpBaseAlgorithm::ReadSettings().
|
private |
Definition at line 46 of file SlidingConePfoMopUpAlgorithm.cc.
References GetClusterMergeMap(), GetInteractionVertex(), GetThreeDClusters(), m_maxIterations, m_useVertex, and MakePfoMerges().
|
private |
The minimum cluster bounded fraction for association 1.
Definition at line 167 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The minimum cluster bounded fraction for association 2.
Definition at line 169 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The cone length multiplier to use when calculating bounded cluster fractions.
Definition at line 164 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The cone tan half angle to use when calculating bounded cluster fractions 1.
Definition at line 166 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The cone tan half angle to use when calculating bounded cluster fractions 2.
Definition at line 168 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
protectedinherited |
The list of potential daughter object list names.
Definition at line 35 of file MopUpBaseAlgorithm.h.
Referenced by lar_content::SlidingConeClusterMopUpAlgorithm::GetAvailableTwoDClusters(), lar_content::ClusterMopUpBaseAlgorithm::GetDaughterClusterLists(), ReadSettings(), and lar_content::VertexBasedPfoMopUpAlgorithm::ReadSettings().
|
private |
The number of layers to use for half-window of sliding fit.
Definition at line 161 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The input pfo list names.
Definition at line 156 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetThreeDClusters(), and ReadSettings().
|
private |
The maximum allowed cone length to use when calculating bounded cluster fractions.
Definition at line 165 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The maximum number of hits in a 3d track cluster to warrant inclusion in algorithm.
Definition at line 159 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetThreeDClusters(), and ReadSettings().
|
private |
The maximum allowed number of algorithm iterations.
Definition at line 158 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Vertex association check: max transverse distance cut.
Definition at line 171 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The minimum number of hits in a 3d shower cluster to attempt cone fits.
Definition at line 160 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
Vertex association check: min longitudinal distance cut.
Definition at line 170 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The number of layers over which to sum fitted direction to obtain cone fit.
Definition at line 162 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
The number of cone fits to perform, spread roughly uniformly along the shower length.
Definition at line 163 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetClusterMergeMap(), and ReadSettings().
|
private |
Whether to use the interaction vertex to select useful cone directions.
Definition at line 157 of file SlidingConePfoMopUpAlgorithm.h.
Referenced by GetInteractionVertex(), ReadSettings(), and Run().