LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
ShowerGrowingAlgorithm class. More...
#include "ShowerGrowingAlgorithm.h"
Public Member Functions | |
ShowerGrowingAlgorithm () | |
Default constructor. More... | |
Protected Types | |
typedef std::unordered_map< const pandora::Cluster *, LArVertexHelper::ClusterDirection > | ClusterDirectionMap |
enum | AssociationType { NONE = 0, SINGLE_ORDER = 1, STANDARD = 2, STRONG = 3 } |
AssociationType enum. More... | |
typedef std::unordered_map< const pandora::Cluster *, Association > | ClusterAssociationMap |
typedef std::unordered_map< const pandora::Cluster *, ClusterAssociationMap > | ClusterUsageMap |
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterVector > | SeedAssociationList |
Protected Member Functions | |
bool | IsVertexAssociated (const LArPointingCluster &pointingCluster, const pandora::CartesianVector &vertexPosition2D) const |
Whether a pointing cluster is assciated with a provided 2D vertex projection. More... | |
void | FindAssociatedClusters (const pandora::Cluster *const pParticleSeed, pandora::ClusterVector &candidateClusters, ClusterUsageMap &forwardUsageMap, ClusterUsageMap &backwardUsageMap) const |
Find clusters associated with a particle seed. More... | |
void | IdentifyClusterMerges (const pandora::ClusterVector &particleSeedVector, const ClusterUsageMap &backwardUsageMap, SeedAssociationList &seedAssociationList) const |
Identify cluster merges. More... | |
Static Protected Member Functions | |
static bool | SortClusters (const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs) |
Sorting for clusters to determine order in which seeds are considered. More... | |
Protected Attributes | |
ClusterDirectionMap | m_clusterDirectionMap |
The cluster direction map. More... | |
Private Member Functions | |
pandora::StatusCode | Run () |
void | SimpleModeShowerGrowing (const pandora::ClusterList *const pClusterList, const std::string &clusterListName) const |
Simple single-pass shower growing mode. More... | |
bool | GetNextSeedCandidate (const pandora::ClusterList *const pClusterList, const pandora::ClusterSet &usedClusters, const pandora::Cluster *&pSeedCluster) const |
Get the next seed candidate, using a list of available candidates and a list of those already used. More... | |
void | GetAllVertexSeedCandidates (const pandora::ClusterList *const pClusterList, const pandora::Vertex *const pVertex, pandora::ClusterVector &seedClusters) const |
Get all seed candidates associated with a provided vertex. More... | |
void | GetSeedAssociationList (const pandora::ClusterVector &particleSeedVector, const pandora::ClusterList *const pClusterList, SeedAssociationList &seedAssociationList) const |
Get the seed association list for a given vector of particle seed candidates. More... | |
void | ProcessSeedAssociationDetails (const SeedAssociationList &seedAssociationList, const std::string &clusterListName, pandora::ClusterSet &usedClusters) const |
Process the details stored in a specified seed association list. More... | |
void | ProcessBranchClusters (const pandora::Cluster *const pParentCluster, const pandora::ClusterVector &branchClusters, const std::string &listName) const |
Process the list of branch clusters, merging with specified parent cluster, dealing with any existing pfos as required. More... | |
AssociationType | AreClustersAssociated (const pandora::Cluster *const pClusterSeed, const pandora::Cluster *const pCluster) const |
Determine whether two clusters are associated. More... | |
float | GetFigureOfMerit (const SeedAssociationList &seedAssociationList) const |
Get a figure of merit representing the consistency of the provided seed associated list. More... | |
unsigned int | GetNVertexConnections (const pandora::CartesianVector &vertexPosition2D, const LArPointingClusterList &pointingClusterList) const |
Get the number of clusters associated with the vertex. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
pandora::StringVector | m_inputClusterListNames |
The names of the input cluster lists. More... | |
unsigned int | m_minCaloHitsPerCluster |
The minimum number of calo hits per (seed or branch) cluster. More... | |
float | m_nearbyClusterDistance |
The nearby cluster distance, used for determining cluster associations. More... | |
float | m_remoteClusterDistance |
The remote cluster distance, used for determining cluster associations. More... | |
float | m_directionTanAngle |
Direction determination, look for vertex inside triangle with apex shifted along the cluster length. More... | |
float | m_directionApexShift |
Direction determination, look for vertex inside triangle with apex shifted along the cluster length. More... | |
float | m_minVertexLongitudinalDistance |
Vertex association check: min longitudinal distance cut. More... | |
float | m_maxVertexLongitudinalDistance |
Vertex association check: max longitudinal distance cut. More... | |
float | m_maxVertexTransverseDistance |
Vertex association check: max transverse distance cut. More... | |
float | m_vertexAngularAllowance |
Vertex association check: pointing angular allowance in degrees. More... | |
ShowerGrowingAlgorithm class.
Definition at line 27 of file ShowerGrowingAlgorithm.h.
|
protectedinherited |
Definition at line 87 of file BranchGrowingAlgorithm.h.
|
protected |
Definition at line 54 of file ShowerGrowingAlgorithm.h.
|
protectedinherited |
Definition at line 88 of file BranchGrowingAlgorithm.h.
|
protectedinherited |
Definition at line 111 of file BranchGrowingAlgorithm.h.
|
protectedinherited |
AssociationType enum.
Enumerator | |
---|---|
NONE | |
SINGLE_ORDER | |
STANDARD | |
STRONG |
Definition at line 27 of file BranchGrowingAlgorithm.h.
lar_content::ShowerGrowingAlgorithm::ShowerGrowingAlgorithm | ( | ) |
Default constructor.
Definition at line 25 of file ShowerGrowingAlgorithm.cc.
|
privatevirtual |
Determine whether two clusters are associated.
pClusterSeed | address of cluster seed (may be daughter of primary seed) |
pCluster | address of cluster |
Implements lar_content::BranchGrowingAlgorithm.
Definition at line 272 of file ShowerGrowingAlgorithm.cc.
References lar_content::LArVertexHelper::DIRECTION_BACKWARD_IN_Z, lar_content::LArVertexHelper::DIRECTION_FORWARD_IN_Z, lar_content::LArVertexHelper::DIRECTION_UNKNOWN, lar_content::LArClusterHelper::GetClosestDistance(), lar_content::LArVertexHelper::GetClusterDirectionInZ(), m_clusterDirectionMap, m_directionApexShift, m_directionTanAngle, m_nearbyClusterDistance, m_remoteClusterDistance, lar_content::BranchGrowingAlgorithm::NONE, lar_content::BranchGrowingAlgorithm::SINGLE_ORDER, lar_content::BranchGrowingAlgorithm::STANDARD, and lar_content::BranchGrowingAlgorithm::STRONG.
|
protectedinherited |
Find clusters associated with a particle seed.
pParticleSeed | address of the particle seed |
candidateClusters | list of clusters which may be associated with seed |
forwardUsageMap | the particle seed usage map |
backwardUsageMap | the cluster usage map |
Definition at line 20 of file BranchGrowingAlgorithm.cc.
References lar_content::BranchGrowingAlgorithm::Association::GetType(), min, and lar_content::BranchGrowingAlgorithm::Association::SetType().
Referenced by GetSeedAssociationList().
|
private |
Get all seed candidates associated with a provided vertex.
pClusterList | the list of available seed candidates |
pVertex | the address of the vertex |
seedClusters | to receive the list of vertex seed candidates |
Definition at line 161 of file ShowerGrowingAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), IsVertexAssociated(), m_minCaloHitsPerCluster, lar_content::LArGeometryHelper::ProjectPosition(), and SortClusters().
Referenced by SimpleModeShowerGrowing().
|
private |
Get a figure of merit representing the consistency of the provided seed associated list.
seedAssociationList | the seed association list |
Definition at line 355 of file ShowerGrowingAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), GetNVertexConnections(), lar_content::LArGeometryHelper::ProjectPosition(), and lar_content::LArClusterHelper::SortByNHits().
|
private |
Get the next seed candidate, using a list of available candidates and a list of those already used.
pClusterList | the list of available seed candidates |
usedClusters | the list of candidates already considered |
pSeedCluster | to receive the address of the next seed candidate |
Definition at line 129 of file ShowerGrowingAlgorithm.cc.
References m_minCaloHitsPerCluster, and SortClusters().
Referenced by SimpleModeShowerGrowing().
|
private |
Get the number of clusters associated with the vertex.
vertexPosition2D | the projected vertex position |
pointingClusterList | the list of relevant pointing clusters |
Definition at line 396 of file ShowerGrowingAlgorithm.cc.
References IsVertexAssociated().
Referenced by GetFigureOfMerit().
|
private |
Get the seed association list for a given vector of particle seed candidates.
particleSeedVector | the particle seed vector |
pClusterList | the address of the input cluster list |
seedAssociationList | to receive the populated seed association list |
Definition at line 199 of file ShowerGrowingAlgorithm.cc.
References lar_content::BranchGrowingAlgorithm::FindAssociatedClusters(), lar_content::BranchGrowingAlgorithm::IdentifyClusterMerges(), m_minCaloHitsPerCluster, and SortClusters().
Referenced by SimpleModeShowerGrowing().
|
protectedinherited |
Identify cluster merges.
particleSeedVector | the list of all particle seeds |
backwardUsageMap | the map from cluster to particle seed associations |
seedAssociationList | to receive the populated seed association list |
Definition at line 73 of file BranchGrowingAlgorithm.cc.
References lar_content::BranchGrowingAlgorithm::Association::GetType(), and max.
Referenced by GetSeedAssociationList().
|
protected |
Whether a pointing cluster is assciated with a provided 2D vertex projection.
pointingCluster | the pointing cluster |
vertexPosition2D | the projected vertex position |
Definition at line 40 of file ShowerGrowingAlgorithm.cc.
References lar_content::LArPointingCluster::GetInnerVertex(), lar_content::LArPointingCluster::GetOuterVertex(), lar_content::LArPointingClusterHelper::IsEmission(), lar_content::LArPointingClusterHelper::IsNode(), m_maxVertexLongitudinalDistance, m_maxVertexTransverseDistance, m_minVertexLongitudinalDistance, and m_vertexAngularAllowance.
Referenced by GetAllVertexSeedCandidates(), and GetNVertexConnections().
|
private |
Process the list of branch clusters, merging with specified parent cluster, dealing with any existing pfos as required.
pParentCluster | the address of the parent cluster |
branchClusters | the list of branch clusters for the specified seed cluster |
listName | the cluster list name |
pfoList | the input pfo list |
Definition at line 255 of file ShowerGrowingAlgorithm.cc.
References m_clusterDirectionMap.
Referenced by ProcessSeedAssociationDetails().
|
private |
Process the details stored in a specified seed association list.
seedAssociationList | the seed association list |
clusterListName | the cluster list name |
pfoList | the pfo list |
usedClusters | the list of candidates already considered |
Definition at line 236 of file ShowerGrowingAlgorithm.cc.
References ProcessBranchClusters(), and lar_content::LArClusterHelper::SortByNHits().
Referenced by SimpleModeShowerGrowing().
|
privatevirtual |
Reimplemented from lar_content::BranchGrowingAlgorithm.
Definition at line 411 of file ShowerGrowingAlgorithm.cc.
References m_directionApexShift, m_directionTanAngle, m_inputClusterListNames, m_maxVertexLongitudinalDistance, m_maxVertexTransverseDistance, m_minCaloHitsPerCluster, m_minVertexLongitudinalDistance, m_nearbyClusterDistance, m_remoteClusterDistance, m_vertexAngularAllowance, and lar_content::BranchGrowingAlgorithm::ReadSettings().
|
private |
Definition at line 65 of file ShowerGrowingAlgorithm.cc.
References m_clusterDirectionMap, m_inputClusterListNames, and SimpleModeShowerGrowing().
|
private |
Simple single-pass shower growing mode.
pClusterList | the list of clusters |
clusterListName | the cluster list name |
Definition at line 97 of file ShowerGrowingAlgorithm.cc.
References GetAllVertexSeedCandidates(), GetNextSeedCandidate(), GetSeedAssociationList(), and ProcessSeedAssociationDetails().
Referenced by Run().
|
staticprotected |
Sorting for clusters to determine order in which seeds are considered.
pLhs | address of first cluster |
pRhs | address of second cluster |
Definition at line 50 of file ShowerGrowingAlgorithm.cc.
References f, and lar_content::LArClusterHelper::GetExtremalCoordinates().
Referenced by GetAllVertexSeedCandidates(), GetNextSeedCandidate(), and GetSeedAssociationList().
|
mutableprotected |
The cluster direction map.
Definition at line 55 of file ShowerGrowingAlgorithm.h.
Referenced by AreClustersAssociated(), ProcessBranchClusters(), and Run().
|
private |
Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
Definition at line 152 of file ShowerGrowingAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
private |
Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
Definition at line 151 of file ShowerGrowingAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
private |
The names of the input cluster lists.
Definition at line 145 of file ShowerGrowingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Vertex association check: max longitudinal distance cut.
Definition at line 155 of file ShowerGrowingAlgorithm.h.
Referenced by IsVertexAssociated(), and ReadSettings().
|
private |
Vertex association check: max transverse distance cut.
Definition at line 156 of file ShowerGrowingAlgorithm.h.
Referenced by IsVertexAssociated(), and ReadSettings().
|
private |
The minimum number of calo hits per (seed or branch) cluster.
Definition at line 147 of file ShowerGrowingAlgorithm.h.
Referenced by GetAllVertexSeedCandidates(), GetNextSeedCandidate(), GetSeedAssociationList(), and ReadSettings().
|
private |
Vertex association check: min longitudinal distance cut.
Definition at line 154 of file ShowerGrowingAlgorithm.h.
Referenced by IsVertexAssociated(), and ReadSettings().
|
private |
The nearby cluster distance, used for determining cluster associations.
Definition at line 148 of file ShowerGrowingAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
private |
The remote cluster distance, used for determining cluster associations.
Definition at line 149 of file ShowerGrowingAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
private |
Vertex association check: pointing angular allowance in degrees.
Definition at line 157 of file ShowerGrowingAlgorithm.h.
Referenced by IsVertexAssociated(), and ReadSettings().