Pandora
Pandora source code navigator
|
ThreeViewTrackFragmentsAlgorithm class. More...
#include "ThreeViewTrackFragmentsAlgorithm.h"
Public Types | |
typedef NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< FragmentOverlapResult > > | BaseAlgorithm |
typedef T | MatchingType |
Public Member Functions | |
ThreeViewTrackFragmentsAlgorithm () | |
Default constructor. | |
void | UpdateForNewCluster (const pandora::Cluster *const pNewCluster) |
Update to reflect addition of a new cluster to the problem space. | |
void | RebuildClusters (const pandora::ClusterList &rebuildList, pandora::ClusterList &newClusters) const |
Rebuild clusters after fragmentation. | |
const TwoDSlidingFitResult & | GetCachedSlidingFitResult (const pandora::Cluster *const pCluster) const |
Get a sliding fit result from the algorithm cache. | |
unsigned int | GetSlidingFitWindow () const |
Get the layer window for the sliding linear fits. | |
virtual bool | MakeClusterSplits (const SplitPositionMap &splitPositionMap) |
Make cluster splits. | |
virtual bool | MakeClusterSplit (const pandora::CartesianVector &splitPosition, const pandora::Cluster *&pCurrentCluster, const pandora::Cluster *&pLowXCluster, const pandora::Cluster *&pHighXCluster) const |
Make a cluster split. | |
virtual void | UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster) |
Update to reflect cluster deletion. | |
virtual void | SelectInputClusters (const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const |
Select a subset of input clusters for processing in this algorithm. | |
virtual void | PrepareInputClusters (pandora::ClusterList &preparedClusterList) |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results. | |
virtual void | SetPfoParticleId (PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set pfo particle id. | |
const std::string & | GetClusterListName (const pandora::HitType hitType) const |
Get the cluster list name corresponding to a specified hit type. | |
const pandora::ClusterList & | GetInputClusterList (const pandora::HitType hitType) const |
Get the input cluster list corresponding to a specified hit type. | |
const pandora::ClusterList & | GetSelectedClusterList (const pandora::HitType hitType) const |
Get the selected cluster list corresponding to a specified hit type. | |
virtual bool | MakeClusterMerges (const ClusterMergeMap &clusterMergeMap) |
Merge clusters together. | |
virtual bool | CreateThreeDParticles (const ProtoParticleVector &protoParticleVector) |
Create particles using findings from recent algorithm processing. | |
virtual void | SetPfoParameters (const ProtoParticle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set Pfo properties. | |
const std::string & | GetType () const |
Get the type. | |
const std::string & | GetInstanceName () const |
Get the instance name. | |
const Pandora & | GetPandora () const |
Get the associated pandora instance. | |
Static Public Member Functions | |
static bool | SortSplitPositions (const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs) |
Sort split position cartesian vectors by increasing x coordinate. | |
Protected Types | |
typedef std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > | HitToClusterMap |
typedef std::unordered_map< const pandora::Cluster *, unsigned int > | ClusterToMatchedHitsMap |
typedef std::vector< FragmentTensorTool * > | TensorToolVector |
Protected Member Functions | |
void | PerformMainLoop () |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult. | |
void | CalculateOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW) |
Calculate cluster overlap result and store in container. | |
pandora::StatusCode | CalculateOverlapResult (const TwoDSlidingFitResult &fitResult1, const TwoDSlidingFitResult &fitResult2, const pandora::ClusterList &inputClusterList, const pandora::Cluster *&pBestMatchedCluster, FragmentOverlapResult &fragmentOverlapResult) const |
Calculate overlap result for track fragment candidate consisting of two sliding fit results and a list of available clusters. | |
pandora::StatusCode | GetProjectedPositions (const TwoDSlidingFitResult &fitResult1, const TwoDSlidingFitResult &fitResult2, pandora::CartesianPointVector &projectedPositions) const |
Get the list of projected positions, in the third view, corresponding to a pair of sliding fit results. | |
pandora::StatusCode | GetMatchedHits (const pandora::ClusterList &inputClusterList, const pandora::CartesianPointVector &projectedPositions, HitToClusterMap &hitToClusterMap, pandora::CaloHitList &matchedCaloHits) const |
Get the list of hits associated with the projected positions and a useful hit to cluster map. | |
pandora::StatusCode | GetMatchedClusters (const pandora::CaloHitList &matchedHits, const HitToClusterMap &hitToClusterMap, pandora::ClusterList &matchedClusters, const pandora::Cluster *&pBestMatchedCluster) const |
Get the list of the relevant clusters and the address of the single best matched cluster. | |
void | GetFragmentOverlapResult (const pandora::CartesianPointVector &projectedPositions, const pandora::CaloHitList &matchedHits, const pandora::ClusterList &matchedClusters, FragmentOverlapResult &fragmentOverlapResult) const |
Get the populated fragment overlap result. | |
bool | CheckMatchedClusters (const pandora::CartesianPointVector &projectedPositions, const pandora::ClusterList &matchedClusters) const |
Whether the matched clusters are consistent with the projected positions. | |
bool | CheckOverlapResult (const FragmentOverlapResult &overlapResult) const |
Whether the matched clusters and hits pass the algorithm quality cuts. | |
void | ExamineOverlapContainer () |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required. | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read the algorithm settings. | |
void | AddToSlidingFitCache (const pandora::Cluster *const pCluster) |
Add a new sliding fit result, for the specified cluster, to the algorithm cache. | |
void | RemoveFromSlidingFitCache (const pandora::Cluster *const pCluster) |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache. | |
virtual void | TidyUp () |
Tidy member variables in derived class. | |
MatchingType & | GetMatchingControl () |
Get the matching control. | |
virtual void | SelectAllInputClusters () |
Select a subset of input clusters for processing in this algorithm. | |
virtual void | PrepareAllInputClusters () |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters. | |
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_reclusteringAlgorithmName |
Name of daughter algorithm to use for cluster re-building. | |
TensorToolVector | m_algorithmToolVector |
The algorithm tool list. | |
unsigned int | m_nMaxTensorToolRepeats |
The maximum number of repeat loops over tensor tools. | |
float | m_minXOverlap |
requirement on minimum X overlap for associated clusters | |
float | m_minXOverlapFraction |
requirement on minimum X overlap fraction for associated clusters | |
float | m_maxPointDisplacementSquared |
maximum allowed distance (squared) between projected points and associated hits | |
float | m_minMatchedSamplingPointFraction |
minimum fraction of matched sampling points | |
unsigned int | m_minMatchedHits |
minimum number of matched calo hits | |
MatchingType | m_matchingControl |
The matching control. | |
const Pandora * | m_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 | |
pandora::StatusCode | Run () |
Run the algorithm. | |
Private Attributes | |
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. | |
std::string | m_outputPfoListName |
The output pfo list name. | |
ThreeViewTrackFragmentsAlgorithm class.
Definition at line 31 of file ThreeViewTrackFragmentsAlgorithm.h.
typedef NViewTrackMatchingAlgorithm<ThreeViewMatchingControl<FragmentOverlapResult> > lar_content::ThreeViewTrackFragmentsAlgorithm::BaseAlgorithm |
Definition at line 34 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protected |
Definition at line 142 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protected |
Definition at line 69 of file ThreeViewTrackFragmentsAlgorithm.h.
|
inherited |
Definition at line 23 of file NViewMatchingAlgorithm.h.
|
protected |
Definition at line 146 of file ThreeViewTrackFragmentsAlgorithm.h.
lar_content::ThreeViewTrackFragmentsAlgorithm::ThreeViewTrackFragmentsAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
protectedinherited |
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 95 of file NViewTrackMatchingAlgorithm.cc.
|
protectedvirtual |
Calculate cluster overlap result and store in container.
pCluster1 | address of cluster1 |
pCluster2 | address of cluster2 |
pCluster3 | address of cluster3 |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 147 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
protected |
Calculate overlap result for track fragment candidate consisting of two sliding fit results and a list of available clusters.
fitResult1 | the first sliding fit result |
fitResult2 | the second sliding fit result |
inputClusterList | the input cluster list |
pBestMatchedCluster | to receive the address of the best matched cluster |
fragmentOverlapResult | to receive the populated fragment overlap result |
Definition at line 224 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
protected |
Whether the matched clusters are consistent with the projected positions.
projectedPositions | the list of projected positions |
matchedClusters | the list of matched clusters |
Definition at line 554 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
protected |
Whether the matched clusters and hits pass the algorithm quality cuts.
fragmentOverlapResult | the fragment overlap result |
Definition at line 609 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
virtualinherited |
Create particles using findings from recent algorithm processing.
protoParticleVector | the proto particle vector |
whether | particles were created |
Definition at line 88 of file MatchingBaseAlgorithm.cc.
|
protectedvirtual |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 623 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
inherited |
Get a sliding fit result from the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 44 of file NViewTrackMatchingAlgorithm.cc.
|
virtualinherited |
Get the cluster list name corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 57 of file NViewMatchingAlgorithm.cc.
|
protected |
Get the populated fragment overlap result.
projectedPositions | the list of projected positions |
matchedHits | the list of matched hits |
matchedClusters | the list of matched clusters |
fragmentOverlapResult | to receive the populated fragment overlap result |
Definition at line 521 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
virtualinherited |
Get the input cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 65 of file NViewMatchingAlgorithm.cc.
|
inlineinherited |
|
protected |
Get the list of the relevant clusters and the address of the single best matched cluster.
matchedHits | the list of matched calo hits |
hitToClusterMap | the hit to cluster map |
matchedClusters | to receive the list of matched clusters |
pBestMatchedCluster | to receive the address of the single best matched cluster |
Definition at line 470 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
protected |
Get the list of hits associated with the projected positions and a useful hit to cluster map.
inputClusterList | the input cluster list |
projectedPositions | the list of projected positions |
hitToClusterMap | to receive the hit to cluster map |
matchedCaloHits | to receive the list of associated calo hits |
Definition at line 416 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
inlineprotectedinherited |
Get the matching control.
Definition at line 59 of file NViewMatchingAlgorithm.h.
|
inlineinherited |
|
protected |
Get the list of projected positions, in the third view, corresponding to a pair of sliding fit results.
fitResult1 | the first sliding fit result |
fitResult2 | the second sliding fit result |
projectedPositions | to receive the list of projected positions |
Definition at line 273 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
virtualinherited |
Get the selected cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 73 of file NViewMatchingAlgorithm.cc.
|
inlineinherited |
Get the layer window for the sliding linear fits.
Definition at line 51 of file NViewTrackMatchingAlgorithm.h.
|
inlineinherited |
|
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.
|
virtualinherited |
Merge clusters together.
clusterMergeMap | the cluster merge map |
Definition at line 48 of file MatchingBaseAlgorithm.cc.
|
virtualinherited |
Make a cluster split.
splitPosition | the split position |
pCurrentCluster | the cluster to split |
pLowXCluster | to receive the low x cluster |
pHighXCluster | to receive the high x cluster |
Definition at line 72 of file NViewTrackMatchingAlgorithm.cc.
|
virtualinherited |
Make cluster splits.
splitPositionMap | the split position map |
Definition at line 60 of file NViewTrackMatchingAlgorithm.cc.
|
protectedvirtual |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Definition at line 117 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
protectedvirtualinherited |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 89 of file NViewMatchingAlgorithm.cc.
|
virtualinherited |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
preparedClusterList | to receive the prepared cluster list, non const so as to be able to modify input selected list |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 86 of file NViewTrackMatchingAlgorithm.cc.
|
protectedvirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Reimplemented from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< FragmentOverlapResult > >.
Definition at line 645 of file ThreeViewTrackFragmentsAlgorithm.cc.
void lar_content::ThreeViewTrackFragmentsAlgorithm::RebuildClusters | ( | const pandora::ClusterList & | rebuildList, |
pandora::ClusterList & | newClusters | ||
) | const |
Rebuild clusters after fragmentation.
rebuildList | the list of clusters containing hits to be rebuilt |
newClusters | the output list of clusters |
Definition at line 102 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
inlineprotectedinherited |
Register i) the pandora instance that will run the process and ii) the process type.
pPandora | address of the pandora object that will run the process |
type | the process type |
instanceName | the process instance name |
Definition at line 146 of file Process.h.
|
protectedinherited |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 102 of file NViewTrackMatchingAlgorithm.cc.
|
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.
|
privatevirtualinherited |
Run the algorithm.
Implements pandora::Algorithm.
Definition at line 135 of file MatchingBaseAlgorithm.cc.
|
protectedvirtualinherited |
Select a subset of input clusters for processing in this algorithm.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 81 of file NViewMatchingAlgorithm.cc.
|
virtualinherited |
Select a subset of input clusters for processing in this algorithm.
pInputClusterList | address of an input cluster list |
selectedClusterList | to receive the selected cluster list |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 85 of file NViewTrackMatchingAlgorithm.cc.
|
virtualinherited |
Set Pfo properties.
protoParticle | the input proto particle |
pfoParameters | the output pfo parameters |
Definition at line 116 of file MatchingBaseAlgorithm.cc.
|
virtualinherited |
Set pfo particle id.
pfoParameters | the output pfo parameters |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 87 of file NViewTrackMatchingAlgorithm.cc.
|
staticinherited |
Sort split position cartesian vectors by increasing x coordinate.
lhs | the first cartesian vector |
rhs | the second cartesian vector |
Definition at line 81 of file NViewTrackMatchingAlgorithm.cc.
|
protectedvirtualinherited |
Tidy member variables in derived class.
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Definition at line 104 of file NViewTrackMatchingAlgorithm.cc.
|
virtual |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Reimplemented from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< FragmentOverlapResult > >.
Definition at line 33 of file ThreeViewTrackFragmentsAlgorithm.cc.
|
virtualinherited |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Definition at line 84 of file NViewTrackMatchingAlgorithm.cc.
|
protected |
The algorithm tool list.
Definition at line 147 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protectedinherited |
|
protectedinherited |
The matching control.
Definition at line 53 of file NViewMatchingAlgorithm.h.
|
protected |
maximum allowed distance (squared) between projected points and associated hits
Definition at line 153 of file ThreeViewTrackFragmentsAlgorithm.h.
|
privateinherited |
The min number of hits in base cluster selection method.
Definition at line 111 of file NViewTrackMatchingAlgorithm.h.
|
privateinherited |
The min length (squared) in base cluster selection method.
Definition at line 112 of file NViewTrackMatchingAlgorithm.h.
|
protected |
minimum number of matched calo hits
Definition at line 155 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protected |
minimum fraction of matched sampling points
Definition at line 154 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protected |
requirement on minimum X overlap for associated clusters
Definition at line 151 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protected |
requirement on minimum X overlap fraction for associated clusters
Definition at line 152 of file ThreeViewTrackFragmentsAlgorithm.h.
|
protected |
The maximum number of repeat loops over tensor tools.
Definition at line 149 of file ThreeViewTrackFragmentsAlgorithm.h.
|
privateinherited |
The output pfo list name.
Definition at line 181 of file MatchingBaseAlgorithm.h.
|
protectedinherited |
|
protected |
Name of daughter algorithm to use for cluster re-building.
Definition at line 144 of file ThreeViewTrackFragmentsAlgorithm.h.
|
privateinherited |
The sliding fit result map.
Definition at line 109 of file NViewTrackMatchingAlgorithm.h.
|
privateinherited |
The layer window for the sliding linear fits.
Definition at line 108 of file NViewTrackMatchingAlgorithm.h.
|
protectedinherited |