LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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...
 
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...
 

Protected Attributes

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

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

Detailed Description

Constructor & Destructor Documentation

lar_content::TwoViewTransverseOverlapResult::TwoViewTransverseOverlapResult ( )

Default constructor.

Definition at line 189 of file LArTrackTwoViewOverlapResult.cc.

189  :
195  m_twoViewXOverlap(TwoViewXOverlap(0.f, 0.f, 0.f, 0.f))
196 {
197 }
TFile f
Definition: plotHisto.C:6
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 201 of file LArTrackTwoViewOverlapResult.cc.

202  :
203  TrackTwoViewOverlapResult(matchingScore),
204  m_downsamplingFactor(downsamplingFactor),
205  m_nSamplingPoints(nSamplingPoints),
206  m_nMatchedSamplingPoints(nMatchedSamplingPoints),
207  m_correlationCoefficient(correlationCoefficient),
208  m_twoViewXOverlap(twoViewXOverlap)
209 {
210 }
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 214 of file LArTrackTwoViewOverlapResult.cc.

214  :
216  m_downsamplingFactor(rhs.m_downsamplingFactor),
217  m_nSamplingPoints(rhs.m_nSamplingPoints),
218  m_nMatchedSamplingPoints(rhs.m_nMatchedSamplingPoints),
219  m_correlationCoefficient(rhs.m_correlationCoefficient),
220  m_twoViewXOverlap(rhs.m_isInitialized ? rhs.m_twoViewXOverlap : TwoViewXOverlap(0.f, 0.f, 0.f, 0.f))
221 {
222 }
TFile f
Definition: plotHisto.C:6
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 226 of file LArTrackTwoViewOverlapResult.cc.

227 {
228 }

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.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

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.

References f, and lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

Referenced by operator<().

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.
TFile f
Definition: plotHisto.C:6
unsigned int m_nSamplingPoints
The number of sampling points.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
float lar_content::TrackTwoViewOverlapResult::GetMatchingScore ( ) const
inlineinherited

Get the matching score of the overlap result.

Returns
matching score

Definition at line 363 of file LArTrackTwoViewOverlapResult.h.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

364 {
365  if (m_isInitialized)
366  return m_matchingScore;
367 
368  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
369 }
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_matchingScore
The compatability score for the two objects associated with the overlap result.
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.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

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.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

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.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

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.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

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.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

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::TrackTwoViewOverlapResult::IsInitialized ( ) const
inlineinherited

Whether the track overlap result has been initialized.

Returns
boolean

Definition at line 356 of file LArTrackTwoViewOverlapResult.h.

References lar_content::TwoViewDeltaRayOverlapResult::m_isInitialized.

Referenced by lar_content::TwoViewTransverseTracksAlgorithm::TwoViewTransverseTracksAlgorithm().

357 {
358  return m_isInitialized;
359 }
bool m_isInitialized
Whether the track overlap result has been initialized.
bool lar_content::TrackTwoViewOverlapResult::operator< ( const TrackTwoViewOverlapResult rhs) const
inherited

Track two view overlap result less than operator.

Parameters
rhsthe track two view overlap result for comparison

Definition at line 146 of file LArTrackTwoViewOverlapResult.cc.

References lar_content::TrackTwoViewOverlapResult::m_isInitialized, and lar_content::TrackTwoViewOverlapResult::m_matchingScore.

147 {
148  if (this == &rhs)
149  return false;
150 
151  if (!m_isInitialized && !rhs.m_isInitialized)
152  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
153 
154  if (!m_isInitialized)
155  return true;
156 
157  if (!rhs.m_isInitialized)
158  return false;
159 
160  return (m_matchingScore < rhs.m_matchingScore);
161 }
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_matchingScore
The compatability score for the two objects associated with the overlap result.
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 232 of file LArTrackTwoViewOverlapResult.cc.

References GetLocallyMatchedFraction(), lar_content::TwoViewXOverlap::GetTwoViewXOverlapSpan(), lar_content::TwoViewXOverlap::GetXSpan0(), lar_content::TwoViewXOverlap::GetXSpan1(), m_correlationCoefficient, lar_content::TrackTwoViewOverlapResult::m_isInitialized, lar_content::TrackTwoViewOverlapResult::m_matchingScore, m_nMatchedSamplingPoints, m_nSamplingPoints, and m_twoViewXOverlap.

233 {
234  if (this == &rhs)
235  return false;
236 
237  if (!m_isInitialized && !rhs.m_isInitialized)
238  throw StatusCodeException(STATUS_CODE_NOT_INITIALIZED);
239 
240  if (!m_isInitialized)
241  return true;
242 
243  if (!rhs.m_isInitialized)
244  return false;
245 
246  if (std::fabs(m_matchingScore - rhs.m_matchingScore) > std::numeric_limits<float>::epsilon())
247  return (m_matchingScore < rhs.m_matchingScore);
248 
249  if (std::fabs(m_correlationCoefficient - rhs.m_correlationCoefficient) > std::numeric_limits<float>::epsilon())
250  return (m_correlationCoefficient < rhs.m_correlationCoefficient);
251 
252  if (m_nMatchedSamplingPoints != rhs.m_nMatchedSamplingPoints)
253  return (m_nMatchedSamplingPoints < rhs.m_nMatchedSamplingPoints);
254 
255  if (m_nSamplingPoints != rhs.m_nSamplingPoints)
256  return (m_nSamplingPoints < rhs.m_nSamplingPoints);
257 
258  if (std::fabs(this->GetLocallyMatchedFraction() - rhs.GetLocallyMatchedFraction()) > std::numeric_limits<float>::epsilon())
259  return (this->GetLocallyMatchedFraction() < rhs.GetLocallyMatchedFraction());
260 
261  if (std::fabs(m_twoViewXOverlap.GetTwoViewXOverlapSpan() - rhs.m_twoViewXOverlap.GetTwoViewXOverlapSpan()) > std::numeric_limits<float>::epsilon())
262  return (m_twoViewXOverlap.GetTwoViewXOverlapSpan() < rhs.m_twoViewXOverlap.GetTwoViewXOverlapSpan());
263 
264  if (std::fabs(m_twoViewXOverlap.GetXSpan0() - rhs.m_twoViewXOverlap.GetXSpan0()) > std::numeric_limits<float>::epsilon())
265  return (m_twoViewXOverlap.GetXSpan0() < rhs.m_twoViewXOverlap.GetXSpan0());
266 
267  return (m_twoViewXOverlap.GetXSpan1() < rhs.m_twoViewXOverlap.GetXSpan1());
268 }
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 272 of file LArTrackTwoViewOverlapResult.cc.

References f, m_correlationCoefficient, m_downsamplingFactor, lar_content::TrackTwoViewOverlapResult::m_isInitialized, lar_content::TrackTwoViewOverlapResult::m_matchingScore, m_nMatchedSamplingPoints, m_nSamplingPoints, m_twoViewXOverlap, and lar_content::TrackTwoViewOverlapResult::operator=().

273 {
275 
276  if (rhs.m_isInitialized)
277  {
278  m_isInitialized = rhs.m_isInitialized;
279  m_matchingScore = rhs.m_matchingScore;
280  m_downsamplingFactor = rhs.m_downsamplingFactor;
281  m_nSamplingPoints = rhs.m_nSamplingPoints;
282  m_nMatchedSamplingPoints = rhs.m_nMatchedSamplingPoints;
283  m_correlationCoefficient = rhs.m_correlationCoefficient;
284  m_twoViewXOverlap = rhs.m_twoViewXOverlap;
285  }
286  else
287  {
288  m_isInitialized = false;
289  m_matchingScore = 0.f;
290  m_downsamplingFactor = 0.f;
291  m_nSamplingPoints = 0;
294  m_twoViewXOverlap = TwoViewXOverlap(0.f, 0.f, 0.f, 0.f);
295  }
296 
297  return *this;
298 }
TrackTwoViewOverlapResult & operator=(const TrackTwoViewOverlapResult &rhs)
Track overlap result assigment operator.
bool m_isInitialized
Whether the track overlap result has been initialized.
TFile f
Definition: plotHisto.C:6
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.
bool lar_content::TrackTwoViewOverlapResult::operator> ( const TrackTwoViewOverlapResult rhs) const
inherited

Track two view overlap result greater than operator.

Parameters
rhsthe track two view overlap result for comparison

Definition at line 165 of file LArTrackTwoViewOverlapResult.cc.

166 {
167  if (this == &rhs)
168  return false;
169 
170  return !(*this < rhs);
171 }

Member Data Documentation

float lar_content::TwoViewTransverseOverlapResult::m_correlationCoefficient
private

The correlation coefficient.

Definition at line 304 of file LArTrackTwoViewOverlapResult.h.

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

float lar_content::TwoViewTransverseOverlapResult::m_downsamplingFactor
private

The downsampling factor.

Definition at line 301 of file LArTrackTwoViewOverlapResult.h.

Referenced by operator=().

bool lar_content::TrackTwoViewOverlapResult::m_isInitialized
protectedinherited

Whether the track overlap result has been initialized.

Definition at line 195 of file LArTrackTwoViewOverlapResult.h.

Referenced by lar_content::TrackTwoViewOverlapResult::operator<(), operator<(), lar_content::TrackTwoViewOverlapResult::operator=(), and operator=().

float lar_content::TrackTwoViewOverlapResult::m_matchingScore
protectedinherited

The compatability score for the two objects associated with the overlap result.

Definition at line 196 of file LArTrackTwoViewOverlapResult.h.

Referenced by lar_content::TrackTwoViewOverlapResult::operator<(), operator<(), lar_content::TrackTwoViewOverlapResult::operator=(), and operator=().

unsigned int lar_content::TwoViewTransverseOverlapResult::m_nMatchedSamplingPoints
private

The number of matched sampling points.

Definition at line 303 of file LArTrackTwoViewOverlapResult.h.

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

unsigned int lar_content::TwoViewTransverseOverlapResult::m_nSamplingPoints
private

The number of sampling points.

Definition at line 302 of file LArTrackTwoViewOverlapResult.h.

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

TwoViewXOverlap lar_content::TwoViewTransverseOverlapResult::m_twoViewXOverlap
private

The two view x overlap object.

Definition at line 305 of file LArTrackTwoViewOverlapResult.h.

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


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