TwoViewDeltaRayMatchingAlgorithm class. More...
#include <TwoViewDeltaRayMatchingAlgorithm.h>
Public Member Functions | |
TwoViewDeltaRayMatchingAlgorithm () | |
Default constructor. More... | |
const std::string & | GetThirdViewClusterListName () const |
Get the name of the third view clusters. More... | |
const std::string & | GetClusteringAlgName () const |
Get the name of the clustering algorithm to be used to recluster created delta ray remnants. More... | |
HitTypeVector | GetHitTypeVector () |
Obtain the HitTypeVector of input views. More... | |
const pandora::Cluster * | GetCluster (const MatrixType::Element &element, const pandora::HitType hitType) |
Get the address of the given hit type cluster. More... | |
bool | CreatePfo (const MatrixType::Element &element) |
Create delta ray pfos out of a given element, merging the third view clusters together and adding in any stray clusters. More... | |
void | UpdateForThirdViewClusterModification (const pandora::Cluster *const pModifiedCluster, const bool isMuon) |
Update the matrix after a third view cluster modification - remove delta ray clusters and reassess the matching of cosmic ray clusters. More... | |
![]() | |
NViewDeltaRayMatchingAlgorithm () | |
Default constructor. More... | |
pandora::StatusCode | GetMuonCluster (const pandora::PfoList &commonMuonPfoList, const pandora::HitType hitType, const pandora::Cluster *&pMuonCluster) const |
Return the cluster of the common cosmic ray pfo in a given view (function demands there to be only one common CR pfo) More... | |
pandora::StatusCode | PerformThreeViewMatching (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3, float &reducedChiSquared) const |
To determine how well three clusters (one in each view) map onto one another expressing this in terms of a chi-squared like parameter. More... | |
pandora::StatusCode | PerformThreeViewMatching (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, float &chiSquaredSum, unsigned int &nSamplingPoints, unsigned int &nMatchedSamplingPoints, XOverlap &XOverlap) const |
To determine how well three clusters (one in each view) map onto one another expressing this in terms of a chi-squared like parameter. More... | |
pandora::StatusCode | PerformThreeViewMatching (const pandora::CaloHitList &pCluster1, const pandora::CaloHitList &pCluster2, const pandora::CaloHitList &pCluster3, float &reducedChiSquared) const |
To determine how well three CaloHitLists (one in each view) map onto one another expressing this in terms of a chi-squared like parameter. More... | |
pandora::StatusCode | PerformThreeViewMatching (const pandora::CaloHitList &clusterU, const pandora::CaloHitList &clusterV, const pandora::CaloHitList &clusterW, float &chiSquaredSum, unsigned int &nSamplingPoints, unsigned int &nMatchedSamplingPoints, XOverlap &XOverlap) const |
To determine how well three CaloHitLists (one for each view) map onto one another expressing this in terms of a chi-squared like parameter. More... | |
pandora::StatusCode | ProjectMuonPositions (const pandora::HitType &thirdViewHitType, const pandora::ParticleFlowObject *const pParentMuon, pandora::CartesianPointVector &projectedPositions) const |
Use two views of a cosmic ray pfo to calculate projected positions in a given the third view. More... | |
pandora::StatusCode | GetProjectedPositions (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, pandora::CartesianPointVector &projectedPositions) const |
Use two clusters from different views to calculate projected positions in the remaining third view. More... | |
pandora::StatusCode | CollectHitsFromMuon (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pThirdViewCluster, const pandora::ParticleFlowObject *const pParentMuon, const float minDistanceFromMuon, const float maxDistanceToCollected, pandora::CaloHitList &collectedHits) const |
In one view, pull out any hits from a cosmic ray cluster that belong to the child delta ray cluster. More... | |
void | CollectHitsFromMuon (const pandora::CartesianVector &positionOnMuon, const pandora::CartesianVector &muonDirection, const pandora::Cluster *const pMuonCluster, const pandora::CartesianPointVector &deltaRayProjectedPositions, const float &minDistanceFromMuon, const float maxDistanceToCollected, pandora::CaloHitList &collectedHits) const |
In one view, pull out any hits from a cosmic ray cluster that belong to the child delta ray cluster. More... | |
pandora::StatusCode | ParameteriseMuon (const pandora::ParticleFlowObject *const pParentMuon, const pandora::Cluster *const pDeltaRayCluster, pandora::CartesianVector &positionOnMuon, pandora::CartesianVector &muonDirection) const |
Parameterise the projection of a cosmic ray track in order to avoid poor/sparse projections. More... | |
pandora::StatusCode | ParameteriseMuon (const pandora::ParticleFlowObject *const pParentMuon, const pandora::CartesianPointVector &deltaRayProjectedPositions, const pandora::HitType hitType, pandora::CartesianVector &positionOnMuon, pandora::CartesianVector &muonDirection) const |
Parameterise the projection of a cosmic ray track in order to avoid poor/sparse projections. More... | |
void | SplitMuonCluster (const std::string &clusterListName, const pandora::Cluster *const pMuonCluster, const pandora::CaloHitList &collectedHits, const pandora::Cluster *&pDeltaRayCluster) const |
Move a list of hits from a cosmic ray cluster into the given child delta ray cluster. More... | |
bool | CreatePfos (ProtoParticleVector &protoParticleVector) |
Create delta ray pfos maxmising completeness by searching for and merging in any stray clusters. More... | |
void | UpdateForNewClusters (const pandora::ClusterVector &newClusterVector, const pandora::PfoVector &pfoVector) |
Add a new cluster to algorithm ownership maps and, if it a delta ray cluster, to the underlying matches container (tensor/matrix) More... | |
void | UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster) |
Update to reflect cluster deletion. More... | |
void | SelectInputClusters (const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const |
Select a subset of input clusters for processing in this algorithm. More... | |
void | PrepareInputClusters (pandora::ClusterList &preparedClusterList) |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results. More... | |
![]() | |
NViewMatchingAlgorithm () | |
Default constructor. More... | |
virtual | ~NViewMatchingAlgorithm () |
Destructor. More... | |
void | UpdateForNewCluster (const pandora::Cluster *const pNewCluster) |
Update to reflect addition of a new cluster to the problem space. More... | |
void | UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster) |
Update to reflect cluster deletion. More... | |
const std::string & | GetClusterListName (const pandora::HitType hitType) const |
Get the cluster list name corresponding to a specified hit type. More... | |
const pandora::ClusterList & | GetInputClusterList (const pandora::HitType hitType) const |
Get the input cluster list corresponding to a specified hit type. More... | |
const pandora::ClusterList & | GetSelectedClusterList (const pandora::HitType hitType) const |
Get the selected cluster list corresponding to a specified hit type. More... | |
![]() | |
MatchingBaseAlgorithm () | |
Default constructor. More... | |
virtual | ~MatchingBaseAlgorithm () |
Destructor. More... | |
virtual bool | MakeClusterMerges (const ClusterMergeMap &clusterMergeMap) |
Merge clusters together. More... | |
virtual bool | CreateThreeDParticles (const ProtoParticleVector &protoParticleVector) |
Create particles using findings from recent algorithm processing. More... | |
virtual void | SetPfoParameters (const ProtoParticle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set Pfo properties. More... | |
virtual void | SetPfoParticleId (PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set pfo particle id. More... | |
Private Types | |
typedef std::vector< DeltaRayMatrixTool * > | MatrixToolVector |
Private Member Functions | |
void | CalculateOverlapResult (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3) |
Calculate cluster overlap result and store in container. More... | |
virtual bool | DoesClusterPassTensorThreshold (const pandora::Cluster *const pCluster) const |
To check whether a given cluster meets the requirements to be added into the matching container (tensor/matrix) More... | |
pandora::StatusCode | CalculateOverlapResult (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, TwoViewDeltaRayOverlapResult &overlapResult) const |
Calculate the overlap result for given pair of clusters. More... | |
void | FindCommonMuonParents (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, pandora::PfoList &commonMuonPfoList) const |
Find the cosmic ray pfos that, in each view, lie close to the clusters of the matrix element. More... | |
void | CollectThirdViewClusters (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::CartesianPointVector &projectedPositions, pandora::ClusterList &matchedClusters) const |
Collect the available and unavailable third view clusters that lie close to the projected delta ray hits. More... | |
const pandora::Cluster * | GetBestMatchedCluster (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::PfoList &commonMuonPfoList, const pandora::ClusterList &matchedClusters, float &reducedChiSquared) const |
Determine the best matched third view cluster and calculate the reduced chi-squared value of the three cluster match. More... | |
void | FormThirdViewCluster (const MatrixType::Element &element, ProtoParticle &protoParticle) |
Form the third view cluster by removing hits from cosmic ray clusters and merging the matched clusters where appropriate. More... | |
void | MergeThirdView (const MatrixType::Element &element, const pandora::Cluster *const pSeedCluster) |
Starting with an input seed cluster, sequentially merge in matched clusters that retain a good reduced chi-squared. More... | |
void | ExamineOverlapContainer () |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
std::string | m_inputClusterListName |
The name of the cluster list in the view in which to project into. More... | |
std::string | m_reclusteringAlgorithmName |
The name of the clustering algorithm to be used to recluster created delta ray remnants. More... | |
MatrixToolVector | m_algorithmToolVector |
The algorithm tool vector. More... | |
unsigned int | m_nMaxMatrixToolRepeats |
The maximum number of repeat loops over matrix tools. More... | |
unsigned int | m_minClusterCaloHits |
The threshold number of hits for a cluster to be considered. More... | |
float | m_maxDistanceFromPrediction |
The maximum distance of a matched cluster from the third view projection points. More... | |
float | m_maxGoodMatchReducedChiSquared |
The maximum reduced chi squared value of a good 1:1:1 match. More... | |
float | m_minDistanceFromMuon |
The minimum distance of a hit from the cosmic ray track required for removal. More... | |
float | m_maxDistanceToCollected |
The maximim distance of a hit from the projected delta ray hits required for removal. More... | |
Additional Inherited Members | |
![]() | |
void | FillStrayClusterList (const pandora::HitType hitType) |
Fill the stray cluster list with clusters that do not pass the tensor threshold requirement. More... | |
void | GetNearbyMuonPfos (const pandora::Cluster *const pCluster, pandora::ClusterList &consideredClusters, pandora::PfoList &nearbyMuonPfos) const |
Use the cluster proximity map to travel along paths of nearby clusters finding the cosmic ray clusters on which they terminate. More... | |
void | GetClusterSpanX (const pandora::CaloHitList &caloHitList, float &xMin, float &xMax) const |
Calculate the xSpan of a list of CaloHits. More... | |
pandora::StatusCode | GetClusterSpanZ (const pandora::CaloHitList &caloHitList, const float xMin, const float xMax, float &zMin, float &zMax) const |
Calculate the zSpan of a list of CaloHits in a specified x range. More... | |
void | CollectStrayClusters (const pandora::Cluster *const pClusterToEnlarge, const float rangeMinX, const float rangeMaxX, pandora::ClusterList &collectedClusters) |
Collect the stray clusters that are close to a specified cluster and that lie within a given x range. More... | |
void | AddInStrayClusters (const pandora::Cluster *const pClusterToEnlarge, const pandora::ClusterList &collectedClusters) |
Merge in the collected stray clusters of a given delta ray cluster. More... | |
void | TidyUp () |
Tidy member variables in derived class. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
![]() | |
MatchingType & | GetMatchingControl () |
Get the matching control. More... | |
virtual void | SelectAllInputClusters () |
Select a subset of input clusters for processing in this algorithm. More... | |
virtual void | PrepareAllInputClusters () |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters. More... | |
virtual void | PerformMainLoop () |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult. More... | |
![]() | |
std::string | m_muonPfoListName |
The list of reconstructed cosmic ray pfos. More... | |
pandora::ClusterList | m_strayClusterListU |
The list of U clusters that do not pass the tensor threshold requirement. More... | |
pandora::ClusterList | m_strayClusterListV |
The list of V clusters that do not pass the tensor threshold requirement. More... | |
pandora::ClusterList | m_strayClusterListW |
The list of W clusters that do not pass the tensor threshold requirement. More... | |
DeltaRayMatchingContainers | m_deltaRayMatchingContainers |
The class of hit, cluster and pfo ownership and proximity maps. More... | |
float | m_pseudoChi2Cut |
Pseudo chi2 cut for three view matching. More... | |
float | m_xOverlapWindow |
The maximum allowed displacement in x position. More... | |
float | m_minMatchedFraction |
The threshold matched fraction of sampling points for a good match. More... | |
unsigned int | m_minMatchedPoints |
The threshold number of matched sampling points for a good match. More... | |
unsigned int | m_minProjectedPositions |
The threshold number of projected points for a good projection. More... | |
float | m_maxCosmicRayHitFraction |
The maximum allowed fraction of hits to be removed from the cosmic ray track. More... | |
float | m_maxDistanceToCluster |
the maximum distance of a projected point to the cosmic ray cluster used when parameterising the cosmic ray cluster More... | |
float | m_maxDistanceToReferencePoint |
the maximum distance of a projected point to the cosmic ray vertex used when parameterising the cosmic ray cluster More... | |
float | m_strayClusterSeparation |
The maximum allowed separation of a stray cluster and a delta ray cluster for merge. More... | |
![]() | |
MatchingType | m_matchingControl |
The matching control. More... | |
TwoViewDeltaRayMatchingAlgorithm class.
Definition at line 31 of file TwoViewDeltaRayMatchingAlgorithm.h.
typedef NViewDeltaRayMatchingAlgorithm<TwoViewMatchingControl<TwoViewDeltaRayOverlapResult> > lar_content::TwoViewDeltaRayMatchingAlgorithm::BaseAlgorithm |
Definition at line 34 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
Definition at line 166 of file TwoViewDeltaRayMatchingAlgorithm.h.
typedef TwoViewDeltaRayMatchingAlgorithm::MatchingType::MatrixType lar_content::TwoViewDeltaRayMatchingAlgorithm::MatrixType |
Definition at line 35 of file TwoViewDeltaRayMatchingAlgorithm.h.
lar_content::TwoViewDeltaRayMatchingAlgorithm::TwoViewDeltaRayMatchingAlgorithm | ( | ) |
Default constructor.
Definition at line 24 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
privatevirtual |
Calculate cluster overlap result and store in container.
pCluster1 | address of cluster1 |
pCluster2 | address of cluster2 |
pCluster3 | address of cluster3 |
Implements lar_content::MatchingBaseAlgorithm.
|
private |
Calculate the overlap result for given pair of clusters.
pCluster1 | the cluster from the first input view |
pCluster2 | the cluster from the second input view |
overlapResult | to receive the overlap result |
|
private |
Collect the available and unavailable third view clusters that lie close to the projected delta ray hits.
pCluster1 | the cluster from the first input view |
pCluster2 | the cluster from the second input view |
projectedPositions | the projected positions of the matched cluster pair |
matchedClusters | the output list of collected clusters |
Definition at line 170 of file TwoViewDeltaRayMatchingAlgorithm.cc.
bool lar_content::TwoViewDeltaRayMatchingAlgorithm::CreatePfo | ( | const MatrixType::Element & | element | ) |
Create delta ray pfos out of a given element, merging the third view clusters together and adding in any stray clusters.
element | the matrix element |
Definition at line 241 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
privatevirtual |
To check whether a given cluster meets the requirements to be added into the matching container (tensor/matrix)
pCluster | the address of the input cluster |
Implements lar_content::NViewDeltaRayMatchingAlgorithm< TwoViewMatchingControl< TwoViewDeltaRayOverlapResult > >.
Definition at line 67 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
privatevirtual |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 403 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
private |
Find the cosmic ray pfos that, in each view, lie close to the clusters of the matrix element.
pCluster1 | the cluster from the first input view |
pCluster2 | the cluster from the second input view |
commonMuonPfoList | the output list of common cosmic ray pfos |
Definition at line 143 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
private |
Form the third view cluster by removing hits from cosmic ray clusters and merging the matched clusters where appropriate.
element | the matrix element |
protoParticle | the output proto particle |
Definition at line 260 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
private |
Determine the best matched third view cluster and calculate the reduced chi-squared value of the three cluster match.
pCluster1 | the cluster from the first input view |
pCluster2 | the cluster from the second input view |
commonMuonPfoList | the list of common cosmic ray pfos |
matchedClusters | the list of third view matched clusters |
reducedChiSquared | to receive the calculated reduced chi-squared value |
Definition at line 199 of file TwoViewDeltaRayMatchingAlgorithm.cc.
const Cluster * lar_content::TwoViewDeltaRayMatchingAlgorithm::GetCluster | ( | const MatrixType::Element & | element, |
const pandora::HitType | hitType | ||
) |
Get the address of the given hit type cluster.
hitType | hit type of the required cluster |
Definition at line 55 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
inline |
Get the name of the clustering algorithm to be used to recluster created delta ray remnants.
Definition at line 188 of file TwoViewDeltaRayMatchingAlgorithm.h.
TwoViewDeltaRayMatchingAlgorithm::HitTypeVector lar_content::TwoViewDeltaRayMatchingAlgorithm::GetHitTypeVector | ( | ) |
Obtain the HitTypeVector of input views.
Definition at line 36 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
inline |
Get the name of the third view clusters.
Definition at line 181 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
Starting with an input seed cluster, sequentially merge in matched clusters that retain a good reduced chi-squared.
element | the matrix element |
pSeedCluster | the address of the input seed cluster |
Definition at line 305 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
privatevirtual |
Reimplemented from lar_content::NViewMatchingAlgorithm< TwoViewMatchingControl< TwoViewDeltaRayOverlapResult > >.
Definition at line 423 of file TwoViewDeltaRayMatchingAlgorithm.cc.
void lar_content::TwoViewDeltaRayMatchingAlgorithm::UpdateForThirdViewClusterModification | ( | const pandora::Cluster *const | pModifiedCluster, |
const bool | isMuon | ||
) |
Update the matrix after a third view cluster modification - remove delta ray clusters and reassess the matching of cosmic ray clusters.
pModifiedCluster | the address of the modified cluster |
isMuon | whether the modified cluster belongs to a cosmic ray pfo |
Definition at line 367 of file TwoViewDeltaRayMatchingAlgorithm.cc.
|
private |
The algorithm tool vector.
Definition at line 170 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The name of the cluster list in the view in which to project into.
Definition at line 168 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The maximum distance of a matched cluster from the third view projection points.
Definition at line 173 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The maximim distance of a hit from the projected delta ray hits required for removal.
Definition at line 176 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The maximum reduced chi squared value of a good 1:1:1 match.
Definition at line 174 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The threshold number of hits for a cluster to be considered.
Definition at line 172 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The minimum distance of a hit from the cosmic ray track required for removal.
Definition at line 175 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The maximum number of repeat loops over matrix tools.
Definition at line 171 of file TwoViewDeltaRayMatchingAlgorithm.h.
|
private |
The name of the clustering algorithm to be used to recluster created delta ray remnants.
Definition at line 169 of file TwoViewDeltaRayMatchingAlgorithm.h.