LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::ClusterPairAssociation Class Reference

ClusterPairAssociation class. More...

#include "ClusterAssociation.h"

Inheritance diagram for lar_content::ClusterPairAssociation:
lar_content::ClusterAssociation

Public Member Functions

 ClusterPairAssociation ()
 Default constructor. More...
 
 ClusterPairAssociation (const pandora::CartesianVector &upstreamMergePoint, const pandora::CartesianVector &upstreamMergeDirection, const pandora::CartesianVector &downstreamMergePoint, const pandora::CartesianVector &downstreamMergeDirection, const pandora::Cluster *pUpstreamCluster, const pandora::Cluster *pDownstreamCluster)
 Constructor. More...
 
const pandora::Cluster * GetUpstreamCluster () const
 Returns the address of the upstream cluster. More...
 
const pandora::Cluster * GetDownstreamCluster () const
 Returns the address of the downstream cluster. More...
 
const pandora::CartesianVector GetUpstreamMergePoint () const
 Returns the upstream cluster merge point. More...
 
const pandora::CartesianVector GetUpstreamMergeDirection () const
 Returns the cluster direction at the upstream merge point. More...
 
const pandora::CartesianVector GetDownstreamMergePoint () const
 Returns the downstream cluster merge point. More...
 
const pandora::CartesianVector GetDownstreamMergeDirection () const
 Returns the cluster direction at the downstream merge point. More...
 
const pandora::CartesianVector GetConnectingLineDirection () const
 Returns the unit vector of the line connecting the upstream and downstream merge points (upstream -> downstream) More...
 
void SetUpstreamMergePoint (const pandora::CartesianVector &upstreamMergePoint)
 Set the upstream merge point. More...
 
void SetDownstreamMergePoint (const pandora::CartesianVector &downstreamMergePoint)
 Set the downstream merge point. More...
 
bool operator== (const ClusterAssociation &clusterAssociation) const
 
bool operator< (const ClusterAssociation &clusterAssociation) const
 

Protected Member Functions

void UpdateConnectingLine ()
 Update the connecting line. More...
 

Protected Attributes

pandora::CartesianVector m_upstreamMergePoint
 The upstream cluster point to be used in the merging process. More...
 
pandora::CartesianVector m_upstreamMergeDirection
 The upstream cluster direction at the upstream merge point (points in the direction of the downstream cluster) More...
 
pandora::CartesianVector m_downstreamMergePoint
 The downstream cluster point to be used in the merging process. More...
 
pandora::CartesianVector m_downstreamMergeDirection
 The downstream cluster direction at the downstream merge point (points in the direction of the upstream cluster) More...
 
pandora::CartesianVector m_connectingLineDirection
 The unit vector of the line connecting the upstream and downstream merge points (upstream -> downstream) More...
 

Private Attributes

const pandora::Cluster * m_pUpstreamCluster
 The address of the upstream cluster. More...
 
const pandora::Cluster * m_pDownstreamCluster
 The address of the downstream cluster. More...
 

Detailed Description

ClusterPairAssociation class.

Definition at line 108 of file ClusterAssociation.h.

Constructor & Destructor Documentation

lar_content::ClusterPairAssociation::ClusterPairAssociation ( )
inline

Default constructor.

Definition at line 266 of file ClusterAssociation.h.

266  :
268  m_pUpstreamCluster(nullptr),
269  m_pDownstreamCluster(nullptr)
270 {
271 }
ClusterAssociation()
Default constructor.
const pandora::Cluster * m_pUpstreamCluster
The address of the upstream cluster.
const pandora::Cluster * m_pDownstreamCluster
The address of the downstream cluster.
lar_content::ClusterPairAssociation::ClusterPairAssociation ( const pandora::CartesianVector &  upstreamMergePoint,
const pandora::CartesianVector &  upstreamMergeDirection,
const pandora::CartesianVector &  downstreamMergePoint,
const pandora::CartesianVector &  downstreamMergeDirection,
const pandora::Cluster *  pUpstreamCluster,
const pandora::Cluster *  pDownstreamCluster 
)
inline

Constructor.

Parameters
upstreamMergePointthe upstream merge point
upstreamMergeDirectionthe cluster direction at the upstream merge point
downstreamMergePointthe downstream merge point
downstreamMergeDirectionthe cluster direction at the downstream merge point
pUpstreamClusterthe address of the upstream cluster
pDownstreamClusterthe address of the downstream cluster

Definition at line 255 of file ClusterAssociation.h.

257  :
258  ClusterAssociation(upstreamMergePoint, upstreamMergeDirection, downstreamMergePoint, downstreamMergeDirection),
259  m_pUpstreamCluster(pUpstreamCluster),
260  m_pDownstreamCluster(pDownstreamCluster)
261 {
262 }
ClusterAssociation()
Default constructor.
const pandora::Cluster * m_pUpstreamCluster
The address of the upstream cluster.
const pandora::Cluster * m_pDownstreamCluster
The address of the downstream cluster.

Member Function Documentation

const pandora::CartesianVector lar_content::ClusterAssociation::GetConnectingLineDirection ( ) const
inlineinherited

Returns the unit vector of the line connecting the upstream and downstream merge points (upstream -> downstream)

Returns
the unit displacement vector from the upstream merge point to the downstream merge point

Definition at line 222 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::m_connectingLineDirection.

Referenced by lar_content::TrackRefinementBaseAlgorithm::AddHitsToMainTrack(), lar_content::TrackRefinementBaseAlgorithm::AreExtrapolatedHitsGood(), lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries(), and lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous().

223 {
225 }
pandora::CartesianVector m_connectingLineDirection
The unit vector of the line connecting the upstream and downstream merge points (upstream -> downstre...
const pandora::Cluster * lar_content::ClusterPairAssociation::GetDownstreamCluster ( ) const
inline

Returns the address of the downstream cluster.

Returns
the address of the downstream cluster

Definition at line 282 of file ClusterAssociation.h.

References m_pDownstreamCluster.

Referenced by lar_content::TrackMergeRefinementAlgorithm::ConsiderClusterAssociation(), lar_content::TrackMergeRefinementAlgorithm::CreateMainTrack(), lar_content::TrackMergeRefinementAlgorithm::GetUnavailableProtectedClusters(), and lar_content::TrackMergeRefinementAlgorithm::Run().

283 {
284  return m_pDownstreamCluster;
285 }
const pandora::Cluster * m_pDownstreamCluster
The address of the downstream cluster.
const pandora::CartesianVector lar_content::ClusterAssociation::GetDownstreamMergeDirection ( ) const
inlineinherited

Returns the cluster direction at the downstream merge point.

Returns
the cluster direction at the downstream merge point

Definition at line 215 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::m_downstreamMergeDirection.

Referenced by lar_content::ClusterAssociation::operator==().

216 {
218 }
pandora::CartesianVector m_downstreamMergeDirection
The downstream cluster direction at the downstream merge point (points in the direction of the upstre...
const pandora::CartesianVector lar_content::ClusterAssociation::GetDownstreamMergePoint ( ) const
inlineinherited
const pandora::Cluster * lar_content::ClusterPairAssociation::GetUpstreamCluster ( ) const
inline

Returns the address of the upstream cluster.

Returns
the address of the upstream cluster

Definition at line 275 of file ClusterAssociation.h.

References m_pUpstreamCluster.

Referenced by lar_content::TrackMergeRefinementAlgorithm::ConsiderClusterAssociation(), lar_content::TrackMergeRefinementAlgorithm::CreateMainTrack(), lar_content::TrackMergeRefinementAlgorithm::GetUnavailableProtectedClusters(), and lar_content::TrackMergeRefinementAlgorithm::Run().

276 {
277  return m_pUpstreamCluster;
278 }
const pandora::Cluster * m_pUpstreamCluster
The address of the upstream cluster.
const pandora::CartesianVector lar_content::ClusterAssociation::GetUpstreamMergeDirection ( ) const
inlineinherited

Returns the cluster direction at the upstream merge point.

Returns
the cluster direction at the upstream merge point

Definition at line 201 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::m_upstreamMergeDirection.

Referenced by lar_content::ClusterAssociation::operator==().

202 {
204 }
pandora::CartesianVector m_upstreamMergeDirection
The upstream cluster direction at the upstream merge point (points in the direction of the downstream...
bool lar_content::ClusterAssociation::operator< ( const ClusterAssociation clusterAssociation) const
inlineinherited

Definition at line 187 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::ClusterAssociation::m_upstreamMergePoint, and lar_content::LArClusterHelper::SortCoordinatesByPosition().

188 {
189  return (LArClusterHelper::SortCoordinatesByPosition(m_upstreamMergePoint, clusterAssociation.GetUpstreamMergePoint()));
190 }
static bool SortCoordinatesByPosition(const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs)
Sort cartesian vectors by their position (use Z, followed by X, followed by Y)
pandora::CartesianVector m_upstreamMergePoint
The upstream cluster point to be used in the merging process.
bool lar_content::ClusterAssociation::operator== ( const ClusterAssociation clusterAssociation) const
inlineinherited

Definition at line 177 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::GetDownstreamMergeDirection(), lar_content::ClusterAssociation::GetDownstreamMergePoint(), lar_content::ClusterAssociation::GetUpstreamMergeDirection(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::ClusterAssociation::m_downstreamMergeDirection, lar_content::ClusterAssociation::m_downstreamMergePoint, lar_content::ClusterAssociation::m_upstreamMergeDirection, and lar_content::ClusterAssociation::m_upstreamMergePoint.

178 {
179  return (m_upstreamMergePoint == clusterAssociation.GetUpstreamMergePoint() &&
180  m_upstreamMergeDirection == clusterAssociation.GetUpstreamMergeDirection() &&
181  m_downstreamMergePoint == clusterAssociation.GetDownstreamMergePoint() &&
182  m_downstreamMergeDirection == clusterAssociation.GetDownstreamMergeDirection());
183 }
pandora::CartesianVector m_downstreamMergeDirection
The downstream cluster direction at the downstream merge point (points in the direction of the upstre...
pandora::CartesianVector m_downstreamMergePoint
The downstream cluster point to be used in the merging process.
pandora::CartesianVector m_upstreamMergeDirection
The upstream cluster direction at the upstream merge point (points in the direction of the downstream...
pandora::CartesianVector m_upstreamMergePoint
The upstream cluster point to be used in the merging process.
void lar_content::ClusterAssociation::SetDownstreamMergePoint ( const pandora::CartesianVector &  downstreamMergePoint)
inlineinherited

Set the downstream merge point.

Parameters
downstreamMergePointthe new downstream merge point

Definition at line 237 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::m_downstreamMergePoint, and lar_content::ClusterAssociation::UpdateConnectingLine().

238 {
239  m_downstreamMergePoint = downstreamMergePoint;
240  this->UpdateConnectingLine();
241 }
pandora::CartesianVector m_downstreamMergePoint
The downstream cluster point to be used in the merging process.
void UpdateConnectingLine()
Update the connecting line.
void lar_content::ClusterAssociation::SetUpstreamMergePoint ( const pandora::CartesianVector &  upstreamMergePoint)
inlineinherited

Set the upstream merge point.

Parameters
upstreamMergePointthe new upstream merge point

Definition at line 229 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::m_upstreamMergePoint, and lar_content::ClusterAssociation::UpdateConnectingLine().

230 {
231  m_upstreamMergePoint = upstreamMergePoint;
232  this->UpdateConnectingLine();
233 }
void UpdateConnectingLine()
Update the connecting line.
pandora::CartesianVector m_upstreamMergePoint
The upstream cluster point to be used in the merging process.
void lar_content::ClusterAssociation::UpdateConnectingLine ( )
inlineprotectedinherited

Update the connecting line.

Definition at line 245 of file ClusterAssociation.h.

References lar_content::ClusterAssociation::m_connectingLineDirection, lar_content::ClusterAssociation::m_downstreamMergePoint, and lar_content::ClusterAssociation::m_upstreamMergePoint.

Referenced by lar_content::ClusterAssociation::SetDownstreamMergePoint(), and lar_content::ClusterAssociation::SetUpstreamMergePoint().

246 {
247  const pandora::CartesianVector connectingLineDirection(
249  m_connectingLineDirection = connectingLineDirection.GetUnitVector();
250 }
pandora::CartesianVector m_downstreamMergePoint
The downstream cluster point to be used in the merging process.
pandora::CartesianVector m_connectingLineDirection
The unit vector of the line connecting the upstream and downstream merge points (upstream -> downstre...
pandora::CartesianVector m_upstreamMergePoint
The upstream cluster point to be used in the merging process.

Member Data Documentation

pandora::CartesianVector lar_content::ClusterAssociation::m_connectingLineDirection
protectedinherited

The unit vector of the line connecting the upstream and downstream merge points (upstream -> downstream)

Definition at line 99 of file ClusterAssociation.h.

Referenced by lar_content::ClusterAssociation::ClusterAssociation(), lar_content::ClusterAssociation::GetConnectingLineDirection(), and lar_content::ClusterAssociation::UpdateConnectingLine().

pandora::CartesianVector lar_content::ClusterAssociation::m_downstreamMergeDirection
protectedinherited

The downstream cluster direction at the downstream merge point (points in the direction of the upstream cluster)

Definition at line 98 of file ClusterAssociation.h.

Referenced by lar_content::ClusterAssociation::GetDownstreamMergeDirection(), and lar_content::ClusterAssociation::operator==().

pandora::CartesianVector lar_content::ClusterAssociation::m_downstreamMergePoint
protectedinherited
const pandora::Cluster* lar_content::ClusterPairAssociation::m_pDownstreamCluster
private

The address of the downstream cluster.

Definition at line 146 of file ClusterAssociation.h.

Referenced by GetDownstreamCluster().

const pandora::Cluster* lar_content::ClusterPairAssociation::m_pUpstreamCluster
private

The address of the upstream cluster.

Definition at line 145 of file ClusterAssociation.h.

Referenced by GetUpstreamCluster().

pandora::CartesianVector lar_content::ClusterAssociation::m_upstreamMergeDirection
protectedinherited

The upstream cluster direction at the upstream merge point (points in the direction of the downstream cluster)

Definition at line 96 of file ClusterAssociation.h.

Referenced by lar_content::ClusterAssociation::GetUpstreamMergeDirection(), and lar_content::ClusterAssociation::operator==().

pandora::CartesianVector lar_content::ClusterAssociation::m_upstreamMergePoint
protectedinherited

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