LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::FragmentOverlapResult Class Reference

FragmentOverlapResult class. More...

#include "LArTrackOverlapResult.h"

Inheritance diagram for lar_content::FragmentOverlapResult:
lar_content::TrackOverlapResult

Public Member Functions

 FragmentOverlapResult ()
 Default constructor. More...
 
 FragmentOverlapResult (const TrackOverlapResult trackOverlapResult, const pandora::CaloHitList &caloHitList, const pandora::ClusterList &clusterList)
 Constructor. More...
 
 FragmentOverlapResult (const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2, const pandora::CaloHitList &caloHitList, const pandora::ClusterList &clusterList)
 Constructor. More...
 
 FragmentOverlapResult (const FragmentOverlapResult &rhs)
 Copy constructor. More...
 
 ~FragmentOverlapResult ()
 Destructor. More...
 
const pandora::CaloHitList & GetFragmentCaloHitList () const
 Get the list of fragment-associated hits. More...
 
const pandora::ClusterList & GetFragmentClusterList () const
 Get the list of fragment-associated clusters. More...
 
pandora::HitType GetFragmentHitType () const
 Get the fragment hit type. More...
 
FragmentOverlapResultoperator= (const FragmentOverlapResult &rhs)
 Fragments overlap result assigment operator. More...
 
bool IsInitialized () const
 Whether the track overlap result has been initialized. More...
 
unsigned int GetNMatchedSamplingPoints () const
 Get the number of matched sampling points. More...
 
unsigned int GetNSamplingPoints () const
 Get the number of sampling points. More...
 
float GetMatchedFraction () const
 Get the fraction of sampling points resulting in a match. More...
 
float GetChi2 () const
 Get the absolute chi2 value. More...
 
float GetReducedChi2 () const
 Get the chi2 per samping point value. More...
 
bool operator< (const TrackOverlapResult &rhs) const
 Track overlap result less than operator. More...
 
bool operator> (const TrackOverlapResult &rhs) const
 Track overlap result greater than operator. More...
 

Protected Attributes

bool m_isInitialized
 Whether the track overlap result has been initialized. More...
 
unsigned int m_nMatchedSamplingPoints
 The number of matched sampling points. More...
 
unsigned int m_nSamplingPoints
 The number of sampling points. More...
 
float m_matchedFraction
 The fraction of sampling points resulting in a match. More...
 
float m_chi2
 The absolute chi2 value. More...
 
float m_reducedChi2
 The chi2 per samping point value. More...
 

Private Attributes

pandora::CaloHitList m_caloHitList
 The list of fragment-associated hits. More...
 
pandora::ClusterList m_clusterList
 The list of fragment-associated clusters. More...
 

Detailed Description

FragmentOverlapResult class.

Definition at line 269 of file LArTrackOverlapResult.h.

Constructor & Destructor Documentation

lar_content::FragmentOverlapResult::FragmentOverlapResult ( )

Default constructor.

Definition at line 243 of file LArTrackOverlapResult.cc.

243  :
245  m_caloHitList(),
246  m_clusterList()
247 {
248 }
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
TrackOverlapResult()
Default constructor.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
lar_content::FragmentOverlapResult::FragmentOverlapResult ( const TrackOverlapResult  trackOverlapResult,
const pandora::CaloHitList &  caloHitList,
const pandora::ClusterList &  clusterList 
)

Constructor.

Parameters
trackOverlapResult
caloHitList
clusterList

Definition at line 251 of file LArTrackOverlapResult.cc.

252  :
253  TrackOverlapResult(trackOverlapResult),
254  m_caloHitList(caloHitList),
255  m_clusterList(clusterList)
256 {
257 
258 }
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
TrackOverlapResult()
Default constructor.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
lar_content::FragmentOverlapResult::FragmentOverlapResult ( const unsigned int  nMatchedSamplingPoints,
const unsigned int  nSamplingPoints,
const float  chi2,
const pandora::CaloHitList &  caloHitList,
const pandora::ClusterList &  clusterList 
)

Constructor.

Parameters
nMatchedSamplingPoints
nSamplingPoints
chi2
caloHitList
clusterList

Definition at line 262 of file LArTrackOverlapResult.cc.

263  :
264  TrackOverlapResult(nMatchedSamplingPoints, nSamplingPoints, chi2),
265  m_caloHitList(caloHitList),
266  m_clusterList(clusterList)
267 {
268 }
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
TrackOverlapResult()
Default constructor.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
lar_content::FragmentOverlapResult::FragmentOverlapResult ( const FragmentOverlapResult rhs)

Copy constructor.

Parameters
rhs

Definition at line 272 of file LArTrackOverlapResult.cc.

272  :
273  TrackOverlapResult(rhs),
274  m_caloHitList(rhs.IsInitialized() ? rhs.GetFragmentCaloHitList() : CaloHitList()),
275  m_clusterList(rhs.IsInitialized() ? rhs.GetFragmentClusterList() : ClusterList())
276 {
277 }
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
TrackOverlapResult()
Default constructor.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
lar_content::FragmentOverlapResult::~FragmentOverlapResult ( )

Destructor.

Definition at line 281 of file LArTrackOverlapResult.cc.

282 {
283 }

Member Function Documentation

float lar_content::TrackOverlapResult::GetChi2 ( ) const
inlineinherited

Get the absolute chi2 value.

Returns
the absolute chi2 value

Definition at line 386 of file LArTrackOverlapResult.h.

References lar_content::TrackOverlapResult::m_chi2, and lar_content::TrackOverlapResult::m_isInitialized.

Referenced by lar_content::operator+().

387 {
388  if (m_isInitialized)
389  return m_chi2;
390 
391  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
392 }
float m_chi2
The absolute chi2 value.
bool m_isInitialized
Whether the track overlap result has been initialized.
const pandora::CaloHitList & lar_content::FragmentOverlapResult::GetFragmentCaloHitList ( ) const
inline

Get the list of fragment-associated hits.

Returns
the list of fragment-associated hits

Definition at line 433 of file LArTrackOverlapResult.h.

Referenced by lar_content::ClearTrackFragmentsTool::CheckOverlapResult(), lar_content::ThreeDTrackFragmentsAlgorithm::CheckOverlapResult(), operator=(), lar_content::ThreeDTrackFragmentsAlgorithm::PerformMainLoop(), and lar_content::ClearTrackFragmentsTool::ProcessTensorElement().

434 {
435  return m_caloHitList;
436 }
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
const pandora::ClusterList & lar_content::FragmentOverlapResult::GetFragmentClusterList ( ) const
inline

Get the list of fragment-associated clusters.

Returns
the list of fragment-associated clusters

Definition at line 440 of file LArTrackOverlapResult.h.

Referenced by lar_content::ClearTrackFragmentsTool::GetAffectedKeyClusters(), operator=(), and lar_content::ClearTrackFragmentsTool::ProcessTensorElement().

441 {
442  return m_clusterList;
443 }
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
pandora::HitType lar_content::FragmentOverlapResult::GetFragmentHitType ( ) const

Get the fragment hit type.

Returns
the fragment hit type

Definition at line 298 of file LArTrackOverlapResult.cc.

References m_caloHitList.

Referenced by lar_content::ClearTrackFragmentsTool::GetAffectedKeyClusters(), and lar_content::ClearTrackFragmentsTool::ProcessTensorElement().

299 {
300  if (m_caloHitList.empty())
301  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
302 
303  return (*(m_caloHitList.begin()))->GetHitType();
304 }
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
float lar_content::TrackOverlapResult::GetMatchedFraction ( ) const
inlineinherited

Get the fraction of sampling points resulting in a match.

Returns
the fraction of sampling points resulting in a match

Definition at line 376 of file LArTrackOverlapResult.h.

References lar_content::TrackOverlapResult::m_isInitialized, and lar_content::TrackOverlapResult::m_matchedFraction.

Referenced by lar_content::ClearTrackFragmentsTool::CheckOverlapResult(), lar_content::ThreeDTrackFragmentsAlgorithm::CheckOverlapResult(), and lar_content::ThreeDTransverseTracksAlgorithm::ThreeDTransverseTracksAlgorithm().

377 {
378  if (m_isInitialized)
379  return m_matchedFraction;
380 
381  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
382 }
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_matchedFraction
The fraction of sampling points resulting in a match.
unsigned int lar_content::TrackOverlapResult::GetNMatchedSamplingPoints ( ) const
inlineinherited

Get the number of matched sampling points.

Returns
the number of matched sampling points

Definition at line 356 of file LArTrackOverlapResult.h.

References lar_content::TrackOverlapResult::m_isInitialized, and lar_content::TrackOverlapResult::m_nMatchedSamplingPoints.

Referenced by lar_content::operator+(), lar_content::ThreeDLongitudinalTracksAlgorithm::ThreeDLongitudinalTracksAlgorithm(), and lar_content::ThreeDTransverseTracksAlgorithm::ThreeDTransverseTracksAlgorithm().

357 {
358  if (m_isInitialized)
360 
361  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
362 }
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int lar_content::TrackOverlapResult::GetNSamplingPoints ( ) const
inlineinherited

Get the number of sampling points.

Returns
the number of sampling points

Definition at line 366 of file LArTrackOverlapResult.h.

References lar_content::TrackOverlapResult::m_isInitialized, and lar_content::TrackOverlapResult::m_nSamplingPoints.

Referenced by lar_content::operator+(), and lar_content::ThreeDTransverseTracksAlgorithm::ThreeDTransverseTracksAlgorithm().

367 {
368  if (m_isInitialized)
369  return m_nSamplingPoints;
370 
371  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
372 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nSamplingPoints
The number of sampling points.
float lar_content::TrackOverlapResult::GetReducedChi2 ( ) const
inlineinherited

Get the chi2 per samping point value.

Returns
the chi2 per samping point value

Definition at line 396 of file LArTrackOverlapResult.h.

References lar_content::TrackOverlapResult::m_isInitialized, and lar_content::TrackOverlapResult::m_reducedChi2.

397 {
398  if (m_isInitialized)
399  return m_reducedChi2;
400 
401  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
402 }
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_reducedChi2
The chi2 per samping point value.
bool lar_content::TrackOverlapResult::operator< ( const TrackOverlapResult rhs) const
inherited

Track overlap result less than operator.

Parameters
rhsthe track overlap result for comparison

Definition at line 67 of file LArTrackOverlapResult.cc.

References lar_content::TrackOverlapResult::IsInitialized(), lar_content::TrackOverlapResult::m_isInitialized, lar_content::TrackOverlapResult::m_matchedFraction, lar_content::TrackOverlapResult::m_nMatchedSamplingPoints, and lar_content::TrackOverlapResult::m_reducedChi2.

68 {
69  if (this == &rhs)
70  return false;
71 
72  if (!m_isInitialized && !rhs.IsInitialized())
73  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
74 
75  if (!m_isInitialized)
76  return true;
77 
78  if (!rhs.IsInitialized())
79  return false;
80 
81  if (m_nMatchedSamplingPoints != rhs.m_nMatchedSamplingPoints)
82  return (m_nMatchedSamplingPoints < rhs.m_nMatchedSamplingPoints);
83 
84  if (std::fabs(m_reducedChi2 - rhs.m_reducedChi2) > std::numeric_limits<float>::epsilon())
85  return (m_reducedChi2 > rhs.m_reducedChi2);
86 
87  return (m_matchedFraction < rhs.m_matchedFraction);
88 }
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_reducedChi2
The chi2 per samping point value.
float m_matchedFraction
The fraction of sampling points resulting in a match.
FragmentOverlapResult & lar_content::FragmentOverlapResult::operator= ( const FragmentOverlapResult rhs)

Fragments overlap result assigment operator.

Parameters
rhsthe track overlap result to assign

Definition at line 287 of file LArTrackOverlapResult.cc.

References GetFragmentCaloHitList(), GetFragmentClusterList(), m_caloHitList, m_clusterList, and lar_content::TrackOverlapResult::operator=().

288 {
290  m_caloHitList = rhs.GetFragmentCaloHitList();
291  m_clusterList = rhs.GetFragmentClusterList();
292 
293  return *this;
294 }
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
TrackOverlapResult & operator=(const TrackOverlapResult &rhs)
Track overlap result assigment operator.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
bool lar_content::TrackOverlapResult::operator> ( const TrackOverlapResult rhs) const
inherited

Track overlap result greater than operator.

Parameters
rhsthe track overlap result for comparison

Definition at line 92 of file LArTrackOverlapResult.cc.

93 {
94  if (this == &rhs)
95  return false;
96 
97  return !(*this < rhs);
98 }

Member Data Documentation

pandora::CaloHitList lar_content::FragmentOverlapResult::m_caloHitList
private

The list of fragment-associated hits.

Definition at line 340 of file LArTrackOverlapResult.h.

Referenced by GetFragmentHitType(), and operator=().

float lar_content::TrackOverlapResult::m_chi2
protectedinherited
pandora::ClusterList lar_content::FragmentOverlapResult::m_clusterList
private

The list of fragment-associated clusters.

Definition at line 341 of file LArTrackOverlapResult.h.

Referenced by operator=().

float lar_content::TrackOverlapResult::m_matchedFraction
protectedinherited
unsigned int lar_content::TrackOverlapResult::m_nMatchedSamplingPoints
protectedinherited
unsigned int lar_content::TrackOverlapResult::m_nSamplingPoints
protectedinherited
float lar_content::TrackOverlapResult::m_reducedChi2
protectedinherited

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