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

LongitudinalOverlapResult class. More...

#include "LArTrackOverlapResult.h"

Inheritance diagram for lar_content::LongitudinalOverlapResult:
lar_content::TrackOverlapResult

Public Member Functions

 LongitudinalOverlapResult ()
 Default constructor. More...
 
 LongitudinalOverlapResult (const TrackOverlapResult trackOverlapResult, const float innerChi2, const float outerChi2)
 Constructor. More...
 
 LongitudinalOverlapResult (const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2, const float innerChi2, const float outerChi2)
 Constructor. More...
 
 LongitudinalOverlapResult (const LongitudinalOverlapResult &rhs)
 Copy constructor. More...
 
 ~LongitudinalOverlapResult ()
 Destructor. More...
 
float GetInnerChi2 () const
 
float GetOuterChi2 () const
 
LongitudinalOverlapResultoperator= (const LongitudinalOverlapResult &rhs)
 Track 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

float m_innerChi2
 The inner chi squared. More...
 
float m_outerChi2
 The outer chi squared. More...
 

Detailed Description

LongitudinalOverlapResult class.

Definition at line 194 of file LArTrackOverlapResult.h.

Constructor & Destructor Documentation

lar_content::LongitudinalOverlapResult::LongitudinalOverlapResult ( )

Default constructor.

Definition at line 188 of file LArTrackOverlapResult.cc.

188  :
190  m_innerChi2(0.f),
191  m_outerChi2(0.f)
192 {
193 }
TrackOverlapResult()
Default constructor.
float m_outerChi2
The outer chi squared.
float m_innerChi2
The inner chi squared.
TFile f
Definition: plotHisto.C:6
lar_content::LongitudinalOverlapResult::LongitudinalOverlapResult ( const TrackOverlapResult  trackOverlapResult,
const float  innerChi2,
const float  outerChi2 
)

Constructor.

Parameters
trackOverlapResult
innerChi2
outerChi2

Definition at line 196 of file LArTrackOverlapResult.cc.

196  :
197  TrackOverlapResult(trackOverlapResult),
198  m_innerChi2(innerChi2),
199  m_outerChi2(outerChi2)
200 {
201 }
TrackOverlapResult()
Default constructor.
float m_outerChi2
The outer chi squared.
float m_innerChi2
The inner chi squared.
lar_content::LongitudinalOverlapResult::LongitudinalOverlapResult ( const unsigned int  nMatchedSamplingPoints,
const unsigned int  nSamplingPoints,
const float  chi2,
const float  innerChi2,
const float  outerChi2 
)

Constructor.

Parameters
nMatchedSamplingPoints
nSamplingPoints
chi2
innerChi2
outerChi2

Definition at line 205 of file LArTrackOverlapResult.cc.

206  :
207  TrackOverlapResult(nMatchedSamplingPoints, nSamplingPoints, chi2),
208  m_innerChi2(innerChi2),
209  m_outerChi2(outerChi2)
210 {
211 }
TrackOverlapResult()
Default constructor.
float m_outerChi2
The outer chi squared.
float m_innerChi2
The inner chi squared.
lar_content::LongitudinalOverlapResult::LongitudinalOverlapResult ( const LongitudinalOverlapResult rhs)

Copy constructor.

Parameters
rhs

Definition at line 215 of file LArTrackOverlapResult.cc.

215  :
216  TrackOverlapResult(rhs),
217  m_innerChi2(rhs.IsInitialized() ? rhs.GetInnerChi2() : 0.f),
218  m_outerChi2(rhs.IsInitialized() ? rhs.GetOuterChi2() : 0.f)
219 {
220 }
TrackOverlapResult()
Default constructor.
float m_outerChi2
The outer chi squared.
float m_innerChi2
The inner chi squared.
lar_content::LongitudinalOverlapResult::~LongitudinalOverlapResult ( )

Destructor.

Definition at line 224 of file LArTrackOverlapResult.cc.

225 {
226 }

Member Function Documentation

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

Get the absolute chi2 value.

Returns
the absolute chi2 value

Definition at line 441 of file LArTrackOverlapResult.h.

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

Referenced by lar_content::operator+().

442 {
443  if (m_isInitialized)
444  return m_chi2;
445 
446  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
447 }
float m_chi2
The absolute chi2 value.
bool m_isInitialized
Whether the track overlap result has been initialized.
float lar_content::LongitudinalOverlapResult::GetInnerChi2 ( ) const
inline
Returns

Definition at line 473 of file LArTrackOverlapResult.h.

Referenced by operator=().

474 {
475  return m_innerChi2;
476 }
float m_innerChi2
The inner chi squared.
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 431 of file LArTrackOverlapResult.h.

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

Referenced by lar_content::ClearTrackFragmentsTool::CheckOverlapResult(), lar_content::ThreeViewTrackFragmentsAlgorithm::CheckOverlapResult(), and lar_content::ThreeViewTransverseTracksAlgorithm::ThreeViewTransverseTracksAlgorithm().

432 {
433  if (m_isInitialized)
434  return m_matchedFraction;
435 
436  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
437 }
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 411 of file LArTrackOverlapResult.h.

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

Referenced by lar_content::operator+(), lar_content::ThreeViewLongitudinalTracksAlgorithm::ThreeViewLongitudinalTracksAlgorithm(), and lar_content::ThreeViewTransverseTracksAlgorithm::ThreeViewTransverseTracksAlgorithm().

412 {
413  if (m_isInitialized)
415 
416  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
417 }
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 421 of file LArTrackOverlapResult.h.

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

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

422 {
423  if (m_isInitialized)
424  return m_nSamplingPoints;
425 
426  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
427 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nSamplingPoints
The number of sampling points.
float lar_content::LongitudinalOverlapResult::GetOuterChi2 ( ) const
inline
Returns

Definition at line 480 of file LArTrackOverlapResult.h.

Referenced by operator=().

481 {
482  return m_outerChi2;
483 }
float m_outerChi2
The outer chi squared.
float lar_content::TrackOverlapResult::GetReducedChi2 ( ) const
inlineinherited

Get the chi2 per samping point value.

Returns
the chi2 per samping point value

Definition at line 451 of file LArTrackOverlapResult.h.

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

452 {
453  if (m_isInitialized)
454  return m_reducedChi2;
455 
456  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
457 }
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.
LongitudinalOverlapResult & lar_content::LongitudinalOverlapResult::operator= ( const LongitudinalOverlapResult rhs)

Track overlap result assigment operator.

Parameters
rhsthe track overlap result to assign

Definition at line 230 of file LArTrackOverlapResult.cc.

References GetInnerChi2(), GetOuterChi2(), m_innerChi2, m_outerChi2, and lar_content::TrackOverlapResult::operator=().

231 {
233  m_innerChi2 = rhs.GetInnerChi2();
234  m_outerChi2 = rhs.GetOuterChi2();
235 
236  return *this;
237 }
float m_outerChi2
The outer chi squared.
float m_innerChi2
The inner chi squared.
TrackOverlapResult & operator=(const TrackOverlapResult &rhs)
Track overlap result assigment operator.
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

float lar_content::TrackOverlapResult::m_chi2
protectedinherited
float lar_content::LongitudinalOverlapResult::m_innerChi2
private

The inner chi squared.

Definition at line 257 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::LongitudinalOverlapResult::m_outerChi2
private

The outer chi squared.

Definition at line 258 of file LArTrackOverlapResult.h.

Referenced by operator=().

float lar_content::TrackOverlapResult::m_reducedChi2
protectedinherited

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