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

ClusterAssociation class. More...

#include "ClusterAssociation.h"

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

Public Member Functions

 ClusterAssociation ()
 Default constructor. More...
 
 ClusterAssociation (const pandora::CartesianVector &upstreamMergePoint, const pandora::CartesianVector &upstreamMergeDirection, const pandora::CartesianVector &downstreamMergePoint, const pandora::CartesianVector &downstreamMergeDirection)
 Constructor. 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...
 

Detailed Description

ClusterAssociation class.

Definition at line 18 of file ClusterAssociation.h.

Constructor & Destructor Documentation

lar_content::ClusterAssociation::ClusterAssociation ( )
inline

Default constructor.

Definition at line 151 of file ClusterAssociation.h.

151  :
152  m_upstreamMergePoint(pandora::CartesianVector(0.f, 0.f, 0.f)),
153  m_upstreamMergeDirection(pandora::CartesianVector(0.f, 0.f, 0.f)),
154  m_downstreamMergePoint(pandora::CartesianVector(0.f, 0.f, 0.f)),
155  m_downstreamMergeDirection(pandora::CartesianVector(0.f, 0.f, 0.f)),
156  m_connectingLineDirection(pandora::CartesianVector(0.f, 0.f, 0.f))
157 {
158 }
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_connectingLineDirection
The unit vector of the line connecting the upstream and downstream merge points (upstream -> downstre...
TFile f
Definition: plotHisto.C:6
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.
lar_content::ClusterAssociation::ClusterAssociation ( const pandora::CartesianVector &  upstreamMergePoint,
const pandora::CartesianVector &  upstreamMergeDirection,
const pandora::CartesianVector &  downstreamMergePoint,
const pandora::CartesianVector &  downstreamMergeDirection 
)
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

Definition at line 162 of file ClusterAssociation.h.

References m_connectingLineDirection, m_downstreamMergePoint, and m_upstreamMergePoint.

163  :
164  m_upstreamMergePoint(upstreamMergePoint),
165  m_upstreamMergeDirection(upstreamMergeDirection),
166  m_downstreamMergePoint(downstreamMergePoint),
167  m_downstreamMergeDirection(downstreamMergeDirection),
168  m_connectingLineDirection(0.f, 0.f, 0.f)
169 {
170  const pandora::CartesianVector connectingLineDirection(
172  m_connectingLineDirection = connectingLineDirection.GetUnitVector();
173 }
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_connectingLineDirection
The unit vector of the line connecting the upstream and downstream merge points (upstream -> downstre...
TFile f
Definition: plotHisto.C:6
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.

Member Function Documentation

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

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 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::CartesianVector lar_content::ClusterAssociation::GetDownstreamMergeDirection ( ) const
inline

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

Referenced by 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
inline

Returns the downstream cluster merge point.

Returns
the downstream merge point

Definition at line 208 of file ClusterAssociation.h.

References m_downstreamMergePoint.

Referenced by lar_content::TrackMergeRefinementAlgorithm::AreExtrapolatedHitsNearBoundaries(), lar_content::TrackMergeRefinementAlgorithm::CreateMainTrack(), lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries(), operator==(), and lar_content::TrackMergeRefinementAlgorithm::Run().

209 {
210  return m_downstreamMergePoint;
211 }
pandora::CartesianVector m_downstreamMergePoint
The downstream cluster point to be used in the merging process.
const pandora::CartesianVector lar_content::ClusterAssociation::GetUpstreamMergeDirection ( ) const
inline

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

Referenced by 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
inline

Definition at line 187 of file ClusterAssociation.h.

References GetUpstreamMergePoint(), 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
inline

Definition at line 177 of file ClusterAssociation.h.

References GetDownstreamMergeDirection(), GetDownstreamMergePoint(), GetUpstreamMergeDirection(), GetUpstreamMergePoint(), m_downstreamMergeDirection, m_downstreamMergePoint, m_upstreamMergeDirection, and 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)
inline

Set the downstream merge point.

Parameters
downstreamMergePointthe new downstream merge point

Definition at line 237 of file ClusterAssociation.h.

References m_downstreamMergePoint, and 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)
inline

Set the upstream merge point.

Parameters
upstreamMergePointthe new upstream merge point

Definition at line 229 of file ClusterAssociation.h.

References m_upstreamMergePoint, and 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 ( )
inlineprotected

Update the connecting line.

Definition at line 245 of file ClusterAssociation.h.

References m_connectingLineDirection, m_downstreamMergePoint, and m_upstreamMergePoint.

Referenced by SetDownstreamMergePoint(), and 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
protected

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 ClusterAssociation(), GetConnectingLineDirection(), and UpdateConnectingLine().

pandora::CartesianVector lar_content::ClusterAssociation::m_downstreamMergeDirection
protected

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 GetDownstreamMergeDirection(), and operator==().

pandora::CartesianVector lar_content::ClusterAssociation::m_downstreamMergePoint
protected

The downstream cluster point to be used in the merging process.

Definition at line 97 of file ClusterAssociation.h.

Referenced by ClusterAssociation(), GetDownstreamMergePoint(), operator==(), SetDownstreamMergePoint(), and UpdateConnectingLine().

pandora::CartesianVector lar_content::ClusterAssociation::m_upstreamMergeDirection
protected

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 GetUpstreamMergeDirection(), and operator==().

pandora::CartesianVector lar_content::ClusterAssociation::m_upstreamMergePoint
protected

The upstream cluster point to be used in the merging process.

Definition at line 95 of file ClusterAssociation.h.

Referenced by ClusterAssociation(), GetUpstreamMergePoint(), operator<(), operator==(), SetUpstreamMergePoint(), and UpdateConnectingLine().


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