Public Member Functions | Public Attributes | List of all members
lar_content::ThreeViewShowersAlgorithm::XSampling Class Reference

XSampling class. More...

Public Member Functions

 XSampling (const TwoDSlidingFitResult &fitResultU, const TwoDSlidingFitResult &fitResultV, const TwoDSlidingFitResult &fitResultW)
 Constructor. More...
 
pandora::StatusCode GetBin (const float x, int &xBin) const
 Convert an x position into a sampling bin. More...
 

Public Attributes

float m_uMinX
 The min x value in the u view. More...
 
float m_uMaxX
 The max x value in the u view. More...
 
float m_vMinX
 The min x value in the v view. More...
 
float m_vMaxX
 The max x value in the v view. More...
 
float m_wMinX
 The min x value in the w view. More...
 
float m_wMaxX
 The max x value in the w view. More...
 
float m_minX
 The min x value of the common x-overlap range. More...
 
float m_maxX
 The max x value of the common x-overlap range. More...
 
float m_xOverlapSpan
 The x-overlap span. More...
 
float m_nPoints
 The number of sampling points to be used. More...
 

Detailed Description

XSampling class.

Definition at line 55 of file ThreeViewShowersAlgorithm.h.

Constructor & Destructor Documentation

lar_content::ThreeViewShowersAlgorithm::XSampling::XSampling ( const TwoDSlidingFitResult fitResultU,
const TwoDSlidingFitResult fitResultV,
const TwoDSlidingFitResult fitResultW 
)

Constructor.

Parameters
fitResultUthe sliding fit result for the u view
fitResultVthe sliding fit result for the v view
fitResultWthe sliding fit result for the w view

Definition at line 346 of file ThreeViewShowersAlgorithm.cc.

348 {
349  fitResultU.GetMinAndMaxX(m_uMinX, m_uMaxX);
350  fitResultV.GetMinAndMaxX(m_vMinX, m_vMaxX);
351  fitResultW.GetMinAndMaxX(m_wMinX, m_wMaxX);
355  m_nPoints = 1.f;
356 
357  if (m_xOverlapSpan > std::numeric_limits<float>::epsilon())
358  {
359  const float nPointsU(
360  std::fabs((m_xOverlapSpan / (m_uMaxX - m_uMinX)) * static_cast<float>(fitResultU.GetMaxLayer() - fitResultU.GetMinLayer())));
361  const float nPointsV(
362  std::fabs((m_xOverlapSpan / (m_vMaxX - m_vMinX)) * static_cast<float>(fitResultV.GetMaxLayer() - fitResultV.GetMinLayer())));
363  const float nPointsW(
364  std::fabs((m_xOverlapSpan / (m_wMaxX - m_wMinX)) * static_cast<float>(fitResultW.GetMaxLayer() - fitResultW.GetMinLayer())));
365  m_nPoints = 1.f + ((nPointsU + nPointsV + nPointsW) / 3.f);
366  }
367 }
float m_minX
The min x value of the common x-overlap range.
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
float m_nPoints
The number of sampling points to be used.
float m_maxX
The max x value of the common x-overlap range.

Member Function Documentation

StatusCode lar_content::ThreeViewShowersAlgorithm::XSampling::GetBin ( const float  x,
int &  xBin 
) const

Convert an x position into a sampling bin.

Parameters
xthe input x coordinate
xBinto receive the x bin
Returns
status code, faster than throwing in regular use-cases

Definition at line 371 of file ThreeViewShowersAlgorithm.cc.

372 {
373  if (((x - m_minX) < -std::numeric_limits<float>::epsilon()) || ((x - m_maxX) > +std::numeric_limits<float>::epsilon()))
374  return STATUS_CODE_NOT_FOUND;
375 
376  xBin = static_cast<int>(0.5f + m_nPoints * (x - m_minX) / (m_maxX - m_minX));
377  return STATUS_CODE_SUCCESS;
378 }
float m_minX
The min x value of the common x-overlap range.
float m_nPoints
The number of sampling points to be used.
float m_maxX
The max x value of the common x-overlap range.
list x
Definition: train.py:276

Member Data Documentation

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_maxX

The max x value of the common x-overlap range.

Definition at line 84 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_minX

The min x value of the common x-overlap range.

Definition at line 83 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_nPoints

The number of sampling points to be used.

Definition at line 86 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_uMaxX

The max x value in the u view.

Definition at line 78 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_uMinX

The min x value in the u view.

Definition at line 77 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_vMaxX

The max x value in the v view.

Definition at line 80 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_vMinX

The min x value in the v view.

Definition at line 79 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_wMaxX

The max x value in the w view.

Definition at line 82 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_wMinX

The min x value in the w view.

Definition at line 81 of file ThreeViewShowersAlgorithm.h.

float lar_content::ThreeViewShowersAlgorithm::XSampling::m_xOverlapSpan

The x-overlap span.

Definition at line 85 of file ThreeViewShowersAlgorithm.h.


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