Public Member Functions | Private Attributes | List of all members
lar_content::TwoViewTransverseOverlapResult Class Reference

TwoViewTransverseOverlapResult class. More...

#include <LArTrackTwoViewOverlapResult.h>

Inheritance diagram for lar_content::TwoViewTransverseOverlapResult:
lar_content::TrackTwoViewOverlapResult

Public Member Functions

 TwoViewTransverseOverlapResult ()
 Default constructor. More...
 
 TwoViewTransverseOverlapResult (const float matchingScore, const float downsamplingFactor, const unsigned int nSamplingPoints, const unsigned int nMatchedSamplingPoints, const float correlationCoefficient, const TwoViewXOverlap &twoViewXOverlap)
 Constructor. More...
 
 TwoViewTransverseOverlapResult (const TwoViewTransverseOverlapResult &rhs)
 Copy constructor. More...
 
 ~TwoViewTransverseOverlapResult ()
 Destructor. More...
 
unsigned int GetNSamplingPoints () const
 Get the number of sampling points. More...
 
unsigned int GetNMatchedSamplingPoints () const
 Get the number of matched sampling points. More...
 
unsigned int GetNReUpsampledSamplingPoints () const
 Get the number of re-upsampled sampling points. More...
 
unsigned int GetNMatchedReUpsampledSamplingPoints () const
 Get the number of matched re-upsampled sampling points. More...
 
float GetCorrelationCoefficient () const
 Get the correlation coefficient. More...
 
float GetLocallyMatchedFraction () const
 Get the locally matched fraction. More...
 
const TwoViewXOverlapGetTwoViewXOverlap () const
 Get the two view x overlap object. More...
 
bool operator< (const TwoViewTransverseOverlapResult &rhs) const
 Track two view overlap result less than operator. More...
 
TwoViewTransverseOverlapResultoperator= (const TwoViewTransverseOverlapResult &rhs)
 Track overlap result assigment operator. More...
 
- Public Member Functions inherited from lar_content::TrackTwoViewOverlapResult
 TrackTwoViewOverlapResult ()
 Default constructor. More...
 
 TrackTwoViewOverlapResult (const float matchingScore)
 constructor More...
 
 TrackTwoViewOverlapResult (const TrackTwoViewOverlapResult &rhs)
 Copy constructor. More...
 
virtual ~TrackTwoViewOverlapResult ()
 Destructor. More...
 
bool IsInitialized () const
 Whether the track overlap result has been initialized. More...
 
float GetMatchingScore () const
 Get the matching score of the overlap result. More...
 
bool operator< (const TrackTwoViewOverlapResult &rhs) const
 Track two view overlap result less than operator. More...
 
bool operator> (const TrackTwoViewOverlapResult &rhs) const
 Track two view overlap result greater than operator. More...
 
TrackTwoViewOverlapResultoperator= (const TrackTwoViewOverlapResult &rhs)
 Track overlap result assigment operator. More...
 

Private Attributes

float m_downsamplingFactor
 The downsampling factor. More...
 
unsigned int m_nSamplingPoints
 The number of sampling points. More...
 
unsigned int m_nMatchedSamplingPoints
 The number of matched sampling points. More...
 
float m_correlationCoefficient
 The correlation coefficient. More...
 
TwoViewXOverlap m_twoViewXOverlap
 The two view x overlap object. More...
 

Additional Inherited Members

- Protected Attributes inherited from lar_content::TrackTwoViewOverlapResult
bool m_isInitialized
 Whether the track overlap result has been initialized. More...
 
float m_matchingScore
 The compatability score for the two objects associated with the overlap result. More...
 

Detailed Description

TwoViewTransverseOverlapResult class.

Definition at line 204 of file LArTrackTwoViewOverlapResult.h.

Constructor & Destructor Documentation

lar_content::TwoViewTransverseOverlapResult::TwoViewTransverseOverlapResult ( )

Default constructor.

Definition at line 185 of file LArTrackTwoViewOverlapResult.cc.

185  :
191  m_twoViewXOverlap(TwoViewXOverlap(0.f, 0.f, 0.f, 0.f))
192 {
193 }
float m_correlationCoefficient
The correlation coefficient.
unsigned int m_nSamplingPoints
The number of sampling points.
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
lar_content::TwoViewTransverseOverlapResult::TwoViewTransverseOverlapResult ( const float  matchingScore,
const float  downsamplingFactor,
const unsigned int  nSamplingPoints,
const unsigned int  nMatchedSamplingPoints,
const float  correlationCoefficient,
const TwoViewXOverlap twoViewXOverlap 
)

Constructor.

Parameters
matchingScorethe matching candidate matching score
downsamplingFactorthe downsampling factor
nSamplingPointsthe number of sampling points used in the matching
nMatchedSamplingPointsthe number of matched sampling points
correlationCoefficientthe corerlation coefficient for the matching candidate
twoViewXOverlapthe description of the geometrical overlap for the matching candidate

Definition at line 197 of file LArTrackTwoViewOverlapResult.cc.

198  :
199  TrackTwoViewOverlapResult(matchingScore),
200  m_downsamplingFactor(downsamplingFactor),
201  m_nSamplingPoints(nSamplingPoints),
202  m_nMatchedSamplingPoints(nMatchedSamplingPoints),
203  m_correlationCoefficient(correlationCoefficient),
204  m_twoViewXOverlap(twoViewXOverlap)
205 {
206 }
float m_correlationCoefficient
The correlation coefficient.
unsigned int m_nSamplingPoints
The number of sampling points.
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
lar_content::TwoViewTransverseOverlapResult::TwoViewTransverseOverlapResult ( const TwoViewTransverseOverlapResult rhs)

Copy constructor.

Parameters
rhsthe rhs

Definition at line 210 of file LArTrackTwoViewOverlapResult.cc.

210  :
212  m_downsamplingFactor(rhs.m_downsamplingFactor),
213  m_nSamplingPoints(rhs.m_nSamplingPoints),
214  m_nMatchedSamplingPoints(rhs.m_nMatchedSamplingPoints),
215  m_correlationCoefficient(rhs.m_correlationCoefficient),
216  m_twoViewXOverlap(rhs.m_isInitialized ? rhs.m_twoViewXOverlap : TwoViewXOverlap(0.f, 0.f, 0.f, 0.f))
217 {
218 }
float m_correlationCoefficient
The correlation coefficient.
unsigned int m_nSamplingPoints
The number of sampling points.
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
lar_content::TwoViewTransverseOverlapResult::~TwoViewTransverseOverlapResult ( )

Destructor.

Definition at line 222 of file LArTrackTwoViewOverlapResult.cc.

223 {
224 }

Member Function Documentation

float lar_content::TwoViewTransverseOverlapResult::GetCorrelationCoefficient ( ) const
inline

Get the correlation coefficient.

Returns
the correlation coefficient

Definition at line 414 of file LArTrackTwoViewOverlapResult.h.

415 {
416  if (m_isInitialized)
418 
419  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
420 }
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_correlationCoefficient
The correlation coefficient.
float lar_content::TwoViewTransverseOverlapResult::GetLocallyMatchedFraction ( ) const
inline

Get the locally matched fraction.

Returns
the locally matched fraction

Definition at line 424 of file LArTrackTwoViewOverlapResult.h.

425 {
426  if (m_isInitialized)
427  return (m_nSamplingPoints > 0 ? static_cast<float>(m_nMatchedSamplingPoints) / static_cast<float>(m_nSamplingPoints) : 0.f);
428 
429  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
430 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nSamplingPoints
The number of sampling points.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
unsigned int lar_content::TwoViewTransverseOverlapResult::GetNMatchedReUpsampledSamplingPoints ( ) const
inline

Get the number of matched re-upsampled sampling points.

Returns
the number of matched re-upsampled sampling points

Definition at line 404 of file LArTrackTwoViewOverlapResult.h.

405 {
406  if (m_isInitialized)
407  return static_cast<unsigned int>(m_downsamplingFactor * static_cast<float>(m_nMatchedSamplingPoints));
408 
409  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
410 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
unsigned int lar_content::TwoViewTransverseOverlapResult::GetNMatchedSamplingPoints ( ) const
inline

Get the number of matched sampling points.

Returns
the number of matched sampling points

Definition at line 384 of file LArTrackTwoViewOverlapResult.h.

385 {
386  if (m_isInitialized)
388 
389  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
390 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
unsigned int lar_content::TwoViewTransverseOverlapResult::GetNReUpsampledSamplingPoints ( ) const
inline

Get the number of re-upsampled sampling points.

Returns
the number of re-upsampled sampling points

Definition at line 394 of file LArTrackTwoViewOverlapResult.h.

395 {
396  if (m_isInitialized)
397  return static_cast<unsigned int>(m_downsamplingFactor * static_cast<float>(m_nSamplingPoints));
398 
399  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
400 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nSamplingPoints
The number of sampling points.
unsigned int lar_content::TwoViewTransverseOverlapResult::GetNSamplingPoints ( ) const
inline

Get the number of sampling points.

Returns
the number of sampling points

Definition at line 374 of file LArTrackTwoViewOverlapResult.h.

375 {
376  if (m_isInitialized)
377  return m_nSamplingPoints;
378 
379  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
380 }
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nSamplingPoints
The number of sampling points.
const TwoViewXOverlap & lar_content::TwoViewTransverseOverlapResult::GetTwoViewXOverlap ( ) const
inline

Get the two view x overlap object.

Returns
the two view x overlap object

Definition at line 434 of file LArTrackTwoViewOverlapResult.h.

435 {
436  if (m_isInitialized)
437  return m_twoViewXOverlap;
438 
439  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
440 }
bool m_isInitialized
Whether the track overlap result has been initialized.
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
bool lar_content::TwoViewTransverseOverlapResult::operator< ( const TwoViewTransverseOverlapResult rhs) const

Track two view overlap result less than operator.

Parameters
rhsthe track two view overlap result for comparison

Definition at line 228 of file LArTrackTwoViewOverlapResult.cc.

229 {
230  if (this == &rhs)
231  return false;
232 
233  if (!m_isInitialized && !rhs.m_isInitialized)
234  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
235 
236  if (!m_isInitialized)
237  return true;
238 
239  if (!rhs.m_isInitialized)
240  return false;
241 
242  if (std::fabs(m_matchingScore - rhs.m_matchingScore) > std::numeric_limits<float>::epsilon())
243  return (m_matchingScore < rhs.m_matchingScore);
244 
245  if (std::fabs(m_correlationCoefficient - rhs.m_correlationCoefficient) > std::numeric_limits<float>::epsilon())
246  return (m_correlationCoefficient < rhs.m_correlationCoefficient);
247 
248  if (m_nMatchedSamplingPoints != rhs.m_nMatchedSamplingPoints)
249  return (m_nMatchedSamplingPoints < rhs.m_nMatchedSamplingPoints);
250 
251  if (m_nSamplingPoints != rhs.m_nSamplingPoints)
252  return (m_nSamplingPoints < rhs.m_nSamplingPoints);
253 
254  if (std::fabs(this->GetLocallyMatchedFraction() - rhs.GetLocallyMatchedFraction()) > std::numeric_limits<float>::epsilon())
255  return (this->GetLocallyMatchedFraction() < rhs.GetLocallyMatchedFraction());
256 
257  if (std::fabs(m_twoViewXOverlap.GetTwoViewXOverlapSpan() - rhs.m_twoViewXOverlap.GetTwoViewXOverlapSpan()) > std::numeric_limits<float>::epsilon())
258  return (m_twoViewXOverlap.GetTwoViewXOverlapSpan() < rhs.m_twoViewXOverlap.GetTwoViewXOverlapSpan());
259 
260  if (std::fabs(m_twoViewXOverlap.GetXSpan0() - rhs.m_twoViewXOverlap.GetXSpan0()) > std::numeric_limits<float>::epsilon())
261  return (m_twoViewXOverlap.GetXSpan0() < rhs.m_twoViewXOverlap.GetXSpan0());
262 
263  return (m_twoViewXOverlap.GetXSpan1() < rhs.m_twoViewXOverlap.GetXSpan1());
264 }
bool m_isInitialized
Whether the track overlap result has been initialized.
float GetLocallyMatchedFraction() const
Get the locally matched fraction.
float GetXSpan0() const
Get the x span in the view 0.
float GetXSpan1() const
Get the x span in the view 1.
float m_correlationCoefficient
The correlation coefficient.
float m_matchingScore
The compatability score for the two objects associated with the overlap result.
float GetTwoViewXOverlapSpan() const
Get the x overlap span.
unsigned int m_nSamplingPoints
The number of sampling points.
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
TwoViewTransverseOverlapResult & lar_content::TwoViewTransverseOverlapResult::operator= ( const TwoViewTransverseOverlapResult rhs)

Track overlap result assigment operator.

Parameters
rhsthe track overlap result to assign

Definition at line 268 of file LArTrackTwoViewOverlapResult.cc.

269 {
271 
272  if (rhs.m_isInitialized)
273  {
274  m_isInitialized = rhs.m_isInitialized;
275  m_matchingScore = rhs.m_matchingScore;
276  m_downsamplingFactor = rhs.m_downsamplingFactor;
277  m_nSamplingPoints = rhs.m_nSamplingPoints;
278  m_nMatchedSamplingPoints = rhs.m_nMatchedSamplingPoints;
279  m_correlationCoefficient = rhs.m_correlationCoefficient;
280  m_twoViewXOverlap = rhs.m_twoViewXOverlap;
281  }
282  else
283  {
284  m_isInitialized = false;
285  m_matchingScore = 0.f;
286  m_downsamplingFactor = 0.f;
287  m_nSamplingPoints = 0;
290  m_twoViewXOverlap = TwoViewXOverlap(0.f, 0.f, 0.f, 0.f);
291  }
292 
293  return *this;
294 }
TrackTwoViewOverlapResult & operator=(const TrackTwoViewOverlapResult &rhs)
Track overlap result assigment operator.
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_correlationCoefficient
The correlation coefficient.
float m_matchingScore
The compatability score for the two objects associated with the overlap result.
unsigned int m_nSamplingPoints
The number of sampling points.
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.

Member Data Documentation

float lar_content::TwoViewTransverseOverlapResult::m_correlationCoefficient
private

The correlation coefficient.

Definition at line 304 of file LArTrackTwoViewOverlapResult.h.

float lar_content::TwoViewTransverseOverlapResult::m_downsamplingFactor
private

The downsampling factor.

Definition at line 301 of file LArTrackTwoViewOverlapResult.h.

unsigned int lar_content::TwoViewTransverseOverlapResult::m_nMatchedSamplingPoints
private

The number of matched sampling points.

Definition at line 303 of file LArTrackTwoViewOverlapResult.h.

unsigned int lar_content::TwoViewTransverseOverlapResult::m_nSamplingPoints
private

The number of sampling points.

Definition at line 302 of file LArTrackTwoViewOverlapResult.h.

TwoViewXOverlap lar_content::TwoViewTransverseOverlapResult::m_twoViewXOverlap
private

The two view x overlap object.

Definition at line 305 of file LArTrackTwoViewOverlapResult.h.


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