All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
lar_content::BoundedClusterMopUpAlgorithm::XSampling Class Reference

XSampling class. More...

Public Member Functions

 XSampling (const TwoDSlidingFitResult &fitResult)
 Constructor. More...
 
int GetBin (const float x) const
 Convert an x position into a sampling bin. More...
 

Public Attributes

float m_minX
 The min x value. More...
 
float m_maxX
 The max x value. More...
 
int m_nPoints
 The number of sampling points to be used. More...
 

Detailed Description

XSampling class.

Definition at line 36 of file BoundedClusterMopUpAlgorithm.h.

Constructor & Destructor Documentation

lar_content::BoundedClusterMopUpAlgorithm::XSampling::XSampling ( const TwoDSlidingFitResult fitResult)

Constructor.

Parameters
fitResultthe sliding fit result

Definition at line 147 of file BoundedClusterMopUpAlgorithm.cc.

148 {
149  fitResult.GetMinAndMaxX(m_minX, m_maxX);
150 
151  m_nPoints = 1 + fitResult.GetMaxLayer() - fitResult.GetMinLayer();
152 
153  if (((m_maxX - m_minX) < std::numeric_limits<float>::epsilon()) || (0 >= m_nPoints))
154  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
155 }
int m_nPoints
The number of sampling points to be used.

Member Function Documentation

int lar_content::BoundedClusterMopUpAlgorithm::XSampling::GetBin ( const float  x) const

Convert an x position into a sampling bin.

Parameters
xthe input x coordinate

Definition at line 159 of file BoundedClusterMopUpAlgorithm.cc.

160 {
161  if (((x - m_minX) < -std::numeric_limits<float>::epsilon()) || ((x - m_maxX) > +std::numeric_limits<float>::epsilon()))
162  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
163 
164  return static_cast<int>(0.5f + static_cast<float>(m_nPoints) * (x - m_minX) / (m_maxX - m_minX));
165 }
process_name opflash particleana ie x
int m_nPoints
The number of sampling points to be used.

Member Data Documentation

float lar_content::BoundedClusterMopUpAlgorithm::XSampling::m_maxX

The max x value.

Definition at line 54 of file BoundedClusterMopUpAlgorithm.h.

float lar_content::BoundedClusterMopUpAlgorithm::XSampling::m_minX

The min x value.

Definition at line 53 of file BoundedClusterMopUpAlgorithm.h.

int lar_content::BoundedClusterMopUpAlgorithm::XSampling::m_nPoints

The number of sampling points to be used.

Definition at line 55 of file BoundedClusterMopUpAlgorithm.h.


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