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

CandidateVertexCreationAlgorithm::Algorithm class. More...

#include "CandidateVertexCreationAlgorithm.h"

Inheritance diagram for lar_content::CandidateVertexCreationAlgorithm:
Collaboration diagram for lar_content::CandidateVertexCreationAlgorithm:

Public Member Functions

 CandidateVertexCreationAlgorithm ()
 Default constructor.
 
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.
 

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

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::unordered_map< const pandora::Cluster *, pandora::CartesianPointVectorClusterToSpacepointsMap
 

Private Member Functions

pandora::StatusCode Run ()
 Run the algorithm.
 
void SelectClusters (pandora::ClusterVector &clusterVectorU, pandora::ClusterVector &clusterVectorV, pandora::ClusterVector &clusterVectorW)
 Select a subset of input clusters (contained in the input list names) for processing in this algorithm.
 
void CreateEndpointCandidates (const pandora::ClusterVector &clusterVector1, const pandora::ClusterVector &clusterVector2) const
 Create candidate vertex positions by comparing pairs of cluster end positions.
 
void CreateEndpointVertex (const pandora::CartesianVector &position1, const pandora::HitType hitType1, const TwoDSlidingFitResult &fitResult2) const
 Create a candidate vertex position, using an end-point position from one cluster and sliding fit to a second cluster.
 
void CreateCrossingCandidates (const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV, const pandora::ClusterVector &clusterVectorW) const
 Extrapolate 2D clusters, find where they cross, and match crossing points between views to create vertex candidates.
 
void FindCrossingPoints (const pandora::ClusterVector &clusterVector, pandora::CartesianPointVector &crossingPoints) const
 Identify where (extrapolated) clusters plausibly cross in 2D.
 
void GetSpacepoints (const pandora::Cluster *const pCluster, pandora::CartesianPointVector &spacePoints) const
 Get a list of spacepoints representing cluster 2D hit positions and extrapolated positions.
 
void FindCrossingPoints (const pandora::CartesianPointVector &spacepoints1, const pandora::CartesianPointVector &spacepoints2, pandora::CartesianPointVector &crossingPoints) const
 Identify where (extrapolated) clusters plausibly cross in 2D.
 
void CreateCrossingVertices (const pandora::CartesianPointVector &crossingPoints1, const pandora::CartesianPointVector &crossingPoints2, const pandora::HitType hitType1, const pandora::HitType hitType2, unsigned int &nCrossingCandidates) const
 Attempt to create candidate vertex positions, using 2D crossing points in 2 views.
 
void AddInputVertices () const
 Add candidate vertices from any input vertices.
 
void AddToSlidingFitCache (const pandora::Cluster *const pCluster)
 Creates a 2D sliding fit of a cluster and stores it for later use.
 
const TwoDSlidingFitResultGetCachedSlidingFitResult (const pandora::Cluster *const pCluster) const
 Get a sliding fit result from the algorithm cache.
 
void TidyUp ()
 Clear relevant algorithm member variables between events.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

pandora::StringVector m_inputClusterListNames
 The list of cluster list names.
 
std::string m_inputVertexListName
 The list name for existing candidate vertices.
 
std::string m_outputVertexListName
 The name under which to save the output vertex list.
 
bool m_replaceCurrentVertexList
 Whether to replace the current vertex list with the output list.
 
unsigned int m_slidingFitWindow
 The layer window for the sliding linear fits.
 
TwoDSlidingFitResultMap m_slidingFitResultMap
 The sliding fit result map.
 
unsigned int m_minClusterCaloHits
 The min number of hits in base cluster selection method.
 
float m_minClusterLengthSquared
 The min length (squared) in base cluster selection method.
 
float m_chiSquaredCut
 The chi squared cut (accept only 3D vertex positions with values below cut)
 
bool m_enableEndpointCandidates
 Whether to create endpoint-based candidates.
 
float m_maxEndpointXDiscrepancy
 The max cluster endpoint discrepancy.
 
bool m_enableCrossingCandidates
 Whether to create crossing vertex candidates.
 
unsigned int m_nMaxCrossingCandidates
 The max number of crossing candidates to create.
 
float m_maxCrossingXDiscrepancy
 The max cluster endpoint discrepancy.
 
unsigned int m_extrapolationNSteps
 Number of extrapolation steps, at each end of cluster, of specified size.
 
float m_extrapolationStepSize
 The extrapolation step size in cm.
 
float m_maxCrossingSeparationSquared
 The separation (squared) between spacepoints below which a crossing can be identified.
 
float m_minNearbyCrossingDistanceSquared
 The minimum allowed distance between identified crossing positions.
 
bool m_reducedCandidates
 Whether to reduce the number of candidates.
 
float m_selectionCutFactorMax
 Maximum factor to multiply the base cluster selection cuts.
 
float m_nClustersPassingMaxCutsPar
 Parameter for number of clusters passing the max base cluster selection cuts.
 

Detailed Description

CandidateVertexCreationAlgorithm::Algorithm class.

Definition at line 23 of file CandidateVertexCreationAlgorithm.h.

Member Typedef Documentation

◆ ClusterToSpacepointsMap

Constructor & Destructor Documentation

◆ CandidateVertexCreationAlgorithm()

lar_content::CandidateVertexCreationAlgorithm::CandidateVertexCreationAlgorithm ( )

Default constructor.

Definition at line 23 of file CandidateVertexCreationAlgorithm.cc.

Member Function Documentation

◆ AddInputVertices()

void lar_content::CandidateVertexCreationAlgorithm::AddInputVertices ( ) const
private

Add candidate vertices from any input vertices.

Definition at line 386 of file CandidateVertexCreationAlgorithm.cc.

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

◆ AddToSlidingFitCache()

void lar_content::CandidateVertexCreationAlgorithm::AddToSlidingFitCache ( const pandora::Cluster *const  pCluster)
private

Creates a 2D sliding fit of a cluster and stores it for later use.

Parameters
pClusteraddress of the relevant cluster

Definition at line 414 of file CandidateVertexCreationAlgorithm.cc.

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

◆ CreateCrossingCandidates()

void lar_content::CandidateVertexCreationAlgorithm::CreateCrossingCandidates ( const pandora::ClusterVector clusterVectorU,
const pandora::ClusterVector clusterVectorV,
const pandora::ClusterVector clusterVectorW 
) const
private

Extrapolate 2D clusters, find where they cross, and match crossing points between views to create vertex candidates.

Parameters
clusterVectorUthe clusters in the u view
clusterVectorVthe clusters in the v view
clusterVectorWthe clusters in the w view

Definition at line 239 of file CandidateVertexCreationAlgorithm.cc.

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

◆ CreateCrossingVertices()

void lar_content::CandidateVertexCreationAlgorithm::CreateCrossingVertices ( const pandora::CartesianPointVector crossingPoints1,
const pandora::CartesianPointVector crossingPoints2,
const pandora::HitType  hitType1,
const pandora::HitType  hitType2,
unsigned int &  nCrossingCandidates 
) const
private

Attempt to create candidate vertex positions, using 2D crossing points in 2 views.

Parameters
crossingPoints1the crossing points in view 1
crossingPoints2the crossing points in view 2
hitType1the hit type of crossing points 1
hitType2the hit type of crossing points 2
nCrossingCandidatesto count the number of crossing candidates created

Definition at line 351 of file CandidateVertexCreationAlgorithm.cc.

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

◆ CreateEndpointCandidates()

void lar_content::CandidateVertexCreationAlgorithm::CreateEndpointCandidates ( const pandora::ClusterVector clusterVector1,
const pandora::ClusterVector clusterVector2 
) const
private

Create candidate vertex positions by comparing pairs of cluster end positions.

Parameters
clusterVector1the clusters in view 1
clusterVector1the clusters in view 2

Definition at line 173 of file CandidateVertexCreationAlgorithm.cc.

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

◆ CreateEndpointVertex()

void lar_content::CandidateVertexCreationAlgorithm::CreateEndpointVertex ( const pandora::CartesianVector position1,
const pandora::HitType  hitType1,
const TwoDSlidingFitResult fitResult2 
) const
private

Create a candidate vertex position, using an end-point position from one cluster and sliding fit to a second cluster.

Parameters
position1an end-point position for the first cluster
hitType1the hit type of the first cluster
fitResult2the two dimensional sliding fit result for the second cluster

Definition at line 201 of file CandidateVertexCreationAlgorithm.cc.

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

◆ FindCrossingPoints() [1/2]

void lar_content::CandidateVertexCreationAlgorithm::FindCrossingPoints ( const pandora::CartesianPointVector spacepoints1,
const pandora::CartesianPointVector spacepoints2,
pandora::CartesianPointVector crossingPoints 
) const
private

Identify where (extrapolated) clusters plausibly cross in 2D.

Parameters
spacepoints1space points for cluster 1
spacepoints2space points for cluster 2
crossingPointsto receive the list of plausible 2D crossing points

Definition at line 304 of file CandidateVertexCreationAlgorithm.cc.

◆ FindCrossingPoints() [2/2]

void lar_content::CandidateVertexCreationAlgorithm::FindCrossingPoints ( const pandora::ClusterVector clusterVector,
pandora::CartesianPointVector crossingPoints 
) const
private

Identify where (extrapolated) clusters plausibly cross in 2D.

Parameters
clusterVectorthe input clusters
crossingPointsto receive the 2D crossing points

Definition at line 255 of file CandidateVertexCreationAlgorithm.cc.

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

◆ GetCachedSlidingFitResult()

const TwoDSlidingFitResult & lar_content::CandidateVertexCreationAlgorithm::GetCachedSlidingFitResult ( const pandora::Cluster *const  pCluster) const
private

Get a sliding fit result from the algorithm cache.

Parameters
pClusteraddress of the relevant cluster

Definition at line 425 of file CandidateVertexCreationAlgorithm.cc.

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.

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

◆ GetSpacepoints()

void lar_content::CandidateVertexCreationAlgorithm::GetSpacepoints ( const pandora::Cluster *const  pCluster,
pandora::CartesianPointVector spacePoints 
) const
private

Get a list of spacepoints representing cluster 2D hit positions and extrapolated positions.

Parameters
pClusteraddress of the cluster
spacePointsto receive the list of spacepoints

Definition at line 279 of file CandidateVertexCreationAlgorithm.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:

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

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

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 46 of file CandidateVertexCreationAlgorithm.cc.

Here is the call graph for this function:

◆ SelectClusters()

void lar_content::CandidateVertexCreationAlgorithm::SelectClusters ( pandora::ClusterVector clusterVectorU,
pandora::ClusterVector clusterVectorV,
pandora::ClusterVector clusterVectorW 
)
private

Select a subset of input clusters (contained in the input list names) for processing in this algorithm.

Parameters
clusterVectorUto receive the selected clusters in the u view
clusterVectorVto receive the selected clusters in the v view
clusterVectorWto receive the selected clusters in the w view

Definition at line 91 of file CandidateVertexCreationAlgorithm.cc.

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

◆ TidyUp()

void lar_content::CandidateVertexCreationAlgorithm::TidyUp ( )
private

Clear relevant algorithm member variables between events.

Definition at line 437 of file CandidateVertexCreationAlgorithm.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ m_chiSquaredCut

float lar_content::CandidateVertexCreationAlgorithm::m_chiSquaredCut
private

The chi squared cut (accept only 3D vertex positions with values below cut)

Definition at line 146 of file CandidateVertexCreationAlgorithm.h.

◆ m_enableCrossingCandidates

bool lar_content::CandidateVertexCreationAlgorithm::m_enableCrossingCandidates
private

Whether to create crossing vertex candidates.

Definition at line 151 of file CandidateVertexCreationAlgorithm.h.

◆ m_enableEndpointCandidates

bool lar_content::CandidateVertexCreationAlgorithm::m_enableEndpointCandidates
private

Whether to create endpoint-based candidates.

Definition at line 148 of file CandidateVertexCreationAlgorithm.h.

◆ m_extrapolationNSteps

unsigned int lar_content::CandidateVertexCreationAlgorithm::m_extrapolationNSteps
private

Number of extrapolation steps, at each end of cluster, of specified size.

Definition at line 154 of file CandidateVertexCreationAlgorithm.h.

◆ m_extrapolationStepSize

float lar_content::CandidateVertexCreationAlgorithm::m_extrapolationStepSize
private

The extrapolation step size in cm.

Definition at line 155 of file CandidateVertexCreationAlgorithm.h.

◆ m_inputClusterListNames

pandora::StringVector lar_content::CandidateVertexCreationAlgorithm::m_inputClusterListNames
private

The list of cluster list names.

Definition at line 136 of file CandidateVertexCreationAlgorithm.h.

◆ m_inputVertexListName

std::string lar_content::CandidateVertexCreationAlgorithm::m_inputVertexListName
private

The list name for existing candidate vertices.

Definition at line 137 of file CandidateVertexCreationAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxCrossingSeparationSquared

float lar_content::CandidateVertexCreationAlgorithm::m_maxCrossingSeparationSquared
private

The separation (squared) between spacepoints below which a crossing can be identified.

Definition at line 156 of file CandidateVertexCreationAlgorithm.h.

◆ m_maxCrossingXDiscrepancy

float lar_content::CandidateVertexCreationAlgorithm::m_maxCrossingXDiscrepancy
private

The max cluster endpoint discrepancy.

Definition at line 153 of file CandidateVertexCreationAlgorithm.h.

◆ m_maxEndpointXDiscrepancy

float lar_content::CandidateVertexCreationAlgorithm::m_maxEndpointXDiscrepancy
private

The max cluster endpoint discrepancy.

Definition at line 149 of file CandidateVertexCreationAlgorithm.h.

◆ m_minClusterCaloHits

unsigned int lar_content::CandidateVertexCreationAlgorithm::m_minClusterCaloHits
private

The min number of hits in base cluster selection method.

Definition at line 144 of file CandidateVertexCreationAlgorithm.h.

◆ m_minClusterLengthSquared

float lar_content::CandidateVertexCreationAlgorithm::m_minClusterLengthSquared
private

The min length (squared) in base cluster selection method.

Definition at line 145 of file CandidateVertexCreationAlgorithm.h.

◆ m_minNearbyCrossingDistanceSquared

float lar_content::CandidateVertexCreationAlgorithm::m_minNearbyCrossingDistanceSquared
private

The minimum allowed distance between identified crossing positions.

Definition at line 157 of file CandidateVertexCreationAlgorithm.h.

◆ m_nClustersPassingMaxCutsPar

float lar_content::CandidateVertexCreationAlgorithm::m_nClustersPassingMaxCutsPar
private

Parameter for number of clusters passing the max base cluster selection cuts.

Definition at line 161 of file CandidateVertexCreationAlgorithm.h.

◆ m_nMaxCrossingCandidates

unsigned int lar_content::CandidateVertexCreationAlgorithm::m_nMaxCrossingCandidates
private

The max number of crossing candidates to create.

Definition at line 152 of file CandidateVertexCreationAlgorithm.h.

◆ m_outputVertexListName

std::string lar_content::CandidateVertexCreationAlgorithm::m_outputVertexListName
private

The name under which to save the output vertex list.

Definition at line 138 of file CandidateVertexCreationAlgorithm.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_reducedCandidates

bool lar_content::CandidateVertexCreationAlgorithm::m_reducedCandidates
private

Whether to reduce the number of candidates.

Definition at line 159 of file CandidateVertexCreationAlgorithm.h.

◆ m_replaceCurrentVertexList

bool lar_content::CandidateVertexCreationAlgorithm::m_replaceCurrentVertexList
private

Whether to replace the current vertex list with the output list.

Definition at line 139 of file CandidateVertexCreationAlgorithm.h.

◆ m_selectionCutFactorMax

float lar_content::CandidateVertexCreationAlgorithm::m_selectionCutFactorMax
private

Maximum factor to multiply the base cluster selection cuts.

Definition at line 160 of file CandidateVertexCreationAlgorithm.h.

◆ m_slidingFitResultMap

TwoDSlidingFitResultMap lar_content::CandidateVertexCreationAlgorithm::m_slidingFitResultMap
private

The sliding fit result map.

Definition at line 142 of file CandidateVertexCreationAlgorithm.h.

◆ m_slidingFitWindow

unsigned int lar_content::CandidateVertexCreationAlgorithm::m_slidingFitWindow
private

The layer window for the sliding linear fits.

Definition at line 141 of file CandidateVertexCreationAlgorithm.h.

◆ m_type

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

The process type.

Definition at line 88 of file Process.h.


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