8 #ifndef LAR_N_VIEW_DELTA_RAY_MATCHING_ALGORITHM_H 9 #define LAR_N_VIEW_DELTA_RAY_MATCHING_ALGORITHM_H 1 26 typedef std::map<const pandora::CaloHit *, const pandora::Cluster *>
HitToClusterMap;
27 typedef std::map<const pandora::Cluster *, const pandora::ParticleFlowObject *>
ClusterToPfoMap;
51 const pandora::PfoList &commonMuonPfoList,
const pandora::HitType hitType,
const pandora::Cluster *&pMuonCluster)
const;
63 pandora::StatusCode
PerformThreeViewMatching(
const pandora::Cluster *
const pCluster1,
const pandora::Cluster *
const pCluster2,
64 const pandora::Cluster *
const pCluster3,
float &reducedChiSquared)
const;
79 pandora::StatusCode
PerformThreeViewMatching(
const pandora::Cluster *
const pClusterU,
const pandora::Cluster *
const pClusterV,
80 const pandora::Cluster *
const pClusterW,
float &chiSquaredSum,
unsigned int &nSamplingPoints,
unsigned int &nMatchedSamplingPoints,
93 pandora::StatusCode
PerformThreeViewMatching(
const pandora::CaloHitList &pCluster1,
const pandora::CaloHitList &pCluster2,
94 const pandora::CaloHitList &pCluster3,
float &reducedChiSquared)
const;
109 pandora::StatusCode
PerformThreeViewMatching(
const pandora::CaloHitList &clusterU,
const pandora::CaloHitList &clusterV,
110 const pandora::CaloHitList &clusterW,
float &chiSquaredSum,
unsigned int &nSamplingPoints,
unsigned int &nMatchedSamplingPoints,
123 pandora::CartesianPointVector &projectedPositions)
const;
134 pandora::StatusCode
GetProjectedPositions(
const pandora::Cluster *
const pCluster1,
const pandora::Cluster *
const pCluster2,
135 pandora::CartesianPointVector &projectedPositions)
const;
150 pandora::StatusCode
CollectHitsFromMuon(
const pandora::Cluster *
const pCluster1,
const pandora::Cluster *
const pCluster2,
151 const pandora::Cluster *
const pThirdViewCluster,
const pandora::ParticleFlowObject *
const pParentMuon,
152 const float minDistanceFromMuon,
const float maxDistanceToCollected, pandora::CaloHitList &collectedHits)
const;
165 void CollectHitsFromMuon(
const pandora::CartesianVector &positionOnMuon,
const pandora::CartesianVector &muonDirection,
166 const pandora::Cluster *
const pMuonCluster,
const pandora::CartesianPointVector &deltaRayProjectedPositions,
167 const float &minDistanceFromMuon,
const float maxDistanceToCollected, pandora::CaloHitList &collectedHits)
const;
179 pandora::StatusCode
ParameteriseMuon(
const pandora::ParticleFlowObject *
const pParentMuon,
const pandora::Cluster *
const pDeltaRayCluster,
180 pandora::CartesianVector &positionOnMuon, pandora::CartesianVector &muonDirection)
const;
193 pandora::StatusCode
ParameteriseMuon(
const pandora::ParticleFlowObject *
const pParentMuon,
const pandora::CartesianPointVector &deltaRayProjectedPositions,
194 const pandora::HitType hitType, pandora::CartesianVector &positionOnMuon, pandora::CartesianVector &muonDirection)
const;
204 void SplitMuonCluster(
const std::string &clusterListName,
const pandora::Cluster *
const pMuonCluster,
205 const pandora::CaloHitList &collectedHits,
const pandora::Cluster *&pDeltaRayCluster)
const;
225 void SelectInputClusters(
const pandora::ClusterList *
const pInputClusterList, pandora::ClusterList &selectedClusterList)
const;
252 void GetNearbyMuonPfos(
const pandora::Cluster *
const pCluster, pandora::ClusterList &consideredClusters, pandora::PfoList &nearbyMuonPfos)
const;
261 void GetClusterSpanX(
const pandora::CaloHitList &caloHitList,
float &xMin,
float &xMax)
const;
272 pandora::StatusCode
GetClusterSpanZ(
const pandora::CaloHitList &caloHitList,
const float xMin,
const float xMax,
float &zMin,
float &zMax)
const;
282 void CollectStrayClusters(
const pandora::Cluster *
const pClusterToEnlarge,
const float rangeMinX,
const float rangeMaxX,
283 pandora::ClusterList &collectedClusters);
291 void AddInStrayClusters(
const pandora::Cluster *
const pClusterToEnlarge,
const pandora::ClusterList &collectedClusters);
294 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
314 #endif // #ifndef LAR_N_VIEW_DELTA_RAY_MATCHING_ALGORITHM_H std::vector< pandora::HitType > HitTypeVector
void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.
std::vector< ProtoParticle > ProtoParticleVector
Header file for the kd tree linker algo template class.
std::map< const pandora::Cluster *, pandora::ClusterList > ClusterProximityMap
NViewMatchingAlgorithm class.
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...
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.
unsigned int m_minProjectedPositions
The threshold number of projected points for a good projection.
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...
pandora::ClusterList m_strayClusterListU
The list of U clusters that do not pass the tensor threshold requirement.
Header file for the delta ray matching containers class.
NViewDeltaRayMatchingAlgorithm()
Default constructor.
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 match...
void TidyUp()
Tidy member variables in derived class.
float m_pseudoChi2Cut
Pseudo chi2 cut for three view matching.
KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > HitKDTree2D
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster)
Update to reflect cluster deletion.
void PrepareInputClusters(pandora::ClusterList &preparedClusterList)
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results...
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...
Header file for the n view matching algorithm class.
void GetClusterSpanX(const pandora::CaloHitList &caloHitList, float &xMin, float &xMax) const
Calculate the xSpan of a list of CaloHits.
Data stored in each KDTree node. The dim1/dim2 fields are usually the duplication of some PFRecHit va...
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...
float m_xOverlapWindow
The maximum allowed displacement in x position.
std::string m_muonPfoListName
The list of reconstructed cosmic ray pfos.
virtual bool DoesClusterPassTensorThreshold(const pandora::Cluster *const pCluster) const =0
To check whether a given cluster meets the requirements to be added into the matching container (tens...
DeltaRayMatchingContainers class.
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.
void FillStrayClusterList(const pandora::HitType hitType)
Fill the stray cluster list with clusters that do not pass the tensor threshold requirement.
pandora::ClusterList m_strayClusterListV
The list of V clusters that do not pass the tensor threshold requirement.
pandora::ClusterList m_strayClusterListW
The list of W clusters that do not pass the tensor threshold requirement.
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.
void AddInStrayClusters(const pandora::Cluster *const pClusterToEnlarge, const pandora::ClusterList &collectedClusters)
Merge in the collected stray clusters of a given delta ray cluster.
KDTreeNodeInfoT< const pandora::CaloHit *, 2 > HitKDNode2D
float m_strayClusterSeparation
The maximum allowed separation of a stray cluster and a delta ray cluster for merge.
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 cluster...
std::vector< HitKDNode2D > HitKDNode2DList
float m_maxDistanceToReferencePoint
the maximum distance of a projected point to the cosmic ray vertex used when parameterising the cosmi...
std::map< const pandora::Cluster *, const pandora::ParticleFlowObject * > ClusterToPfoMap
std::vector< art::Ptr< recob::Cluster > > ClusterVector
float m_maxCosmicRayHitFraction
The maximum allowed fraction of hits to be removed from the cosmic ray track.
bool CreatePfos(ProtoParticleVector &protoParticleVector)
Create delta ray pfos maxmising completeness by searching for and merging in any stray clusters...
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...
DeltaRayMatchingContainers m_deltaRayMatchingContainers
The class of hit, cluster and pfo ownership and proximity maps.
std::map< const pandora::CaloHit *, const pandora::Cluster * > HitToClusterMap
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 on...
NViewDeltaRayMatchingAlgorithm class.
float m_minMatchedFraction
The threshold matched fraction of sampling points for a good match.
unsigned int m_minMatchedPoints
The threshold number of matched sampling points for a good match.
float m_maxDistanceToCluster
the maximum distance of a projected point to the cosmic ray cluster used when parameterising the cosm...