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

TwoViewXOverlap class. More...

#include "LArTwoViewXOverlap.h"

Public Member Functions

 TwoViewXOverlap (const float xMin0, const float xMax0, const float xMin1, const float xMax1)
 Constructor. More...
 
float GetXMin0 () const
 Get the min x value in the view 0. More...
 
float GetXMax0 () const
 Get the max x value in the view 0. More...
 
float GetXMin1 () const
 Get the min x value in the view 1. More...
 
float GetXMax1 () const
 Get the max x value in the view 1. More...
 
float GetXSpan0 () const
 Get the x span in the view 0. More...
 
float GetXSpan1 () const
 Get the x span in the view 1. More...
 
float GetTwoViewXOverlapSpan () const
 Get the x overlap span. More...
 
float GetTwoViewXOverlapMin () const
 Get the x overlap max X value. More...
 
float GetTwoViewXOverlapMax () const
 Get the x overlap min X value. More...
 
float GetXOverlapFraction0 () const
 Get the fraction of the view 0 cluster that overlaps in x. More...
 
float GetXOverlapFraction1 () const
 Get the fraction of the view 1 cluster that overlaps in x. More...
 

Private Attributes

float m_xMin0
 The min x value in the view 0. More...
 
float m_xMax0
 The max x value in the view 0. More...
 
float m_xMin1
 The min x value in the view 1. More...
 
float m_xMax1
 The max x value in the view 1. More...
 
float m_xOverlapSpan
 The x overlap span. More...
 

Detailed Description

TwoViewXOverlap class.

Definition at line 21 of file LArTwoViewXOverlap.h.

Constructor & Destructor Documentation

lar_content::TwoViewXOverlap::TwoViewXOverlap ( const float  xMin0,
const float  xMax0,
const float  xMin1,
const float  xMax1 
)
inline

Constructor.

Parameters
xMin0min x value in the view 0
xMax0max x value in the view 0
xMin1min x value in the view 1
xMax1max x value in the view 1

Definition at line 129 of file LArTwoViewXOverlap.h.

Referenced by lar_content::operator+().

129  :
130  m_xMin0(xMin0),
131  m_xMax0(xMax0),
132  m_xMin1(xMin1),
133  m_xMax1(xMax1),
134  m_xOverlapSpan(std::min(m_xMax0, m_xMax1) - std::max(m_xMin0, m_xMin1))
135 {
136 }
float m_xMax1
The max x value in the view 1.
float m_xMin1
The min x value in the view 1.
float m_xMax0
The max x value in the view 0.
float m_xOverlapSpan
The x overlap span.
float m_xMin0
The min x value in the view 0.

Member Function Documentation

float lar_content::TwoViewXOverlap::GetTwoViewXOverlapMax ( ) const
inline

Get the x overlap min X value.

Returns
the x overlap max

Definition at line 196 of file LArTwoViewXOverlap.h.

References m_xMax0, and m_xMax1.

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

197 {
198  return std::min(m_xMax0, m_xMax1);
199 }
float m_xMax1
The max x value in the view 1.
float m_xMax0
The max x value in the view 0.
float lar_content::TwoViewXOverlap::GetTwoViewXOverlapMin ( ) const
inline

Get the x overlap max X value.

Returns
the x overlap min

Definition at line 189 of file LArTwoViewXOverlap.h.

References m_xMin0, and m_xMin1.

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

190 {
191  return std::max(m_xMin0, m_xMin1);
192 }
float m_xMin1
The min x value in the view 1.
float m_xMin0
The min x value in the view 0.
float lar_content::TwoViewXOverlap::GetTwoViewXOverlapSpan ( ) const
inline
float lar_content::TwoViewXOverlap::GetXMax0 ( ) const
inline

Get the max x value in the view 0.

Returns
the max x value in the view 0

Definition at line 147 of file LArTwoViewXOverlap.h.

References m_xMax0.

Referenced by lar_content::operator+().

148 {
149  return m_xMax0;
150 }
float m_xMax0
The max x value in the view 0.
float lar_content::TwoViewXOverlap::GetXMax1 ( ) const
inline

Get the max x value in the view 1.

Returns
the max x value in the view 1

Definition at line 161 of file LArTwoViewXOverlap.h.

References m_xMax1.

Referenced by lar_content::operator+().

162 {
163  return m_xMax1;
164 }
float m_xMax1
The max x value in the view 1.
float lar_content::TwoViewXOverlap::GetXMin0 ( ) const
inline

Get the min x value in the view 0.

Returns
the min x value in the view 0

Definition at line 140 of file LArTwoViewXOverlap.h.

References m_xMin0.

Referenced by lar_content::operator+().

141 {
142  return m_xMin0;
143 }
float m_xMin0
The min x value in the view 0.
float lar_content::TwoViewXOverlap::GetXMin1 ( ) const
inline

Get the min x value in the view 1.

Returns
the min x value in the view 1

Definition at line 154 of file LArTwoViewXOverlap.h.

References m_xMin1.

Referenced by lar_content::operator+().

155 {
156  return m_xMin1;
157 }
float m_xMin1
The min x value in the view 1.
float lar_content::TwoViewXOverlap::GetXOverlapFraction0 ( ) const
inline

Get the fraction of the view 0 cluster that overlaps in x.

Returns
the view 0 cluster's fractional overlap

Definition at line 203 of file LArTwoViewXOverlap.h.

References GetXSpan0(), and m_xOverlapSpan.

204 {
205  return (std::numeric_limits<float>::epsilon() < this->GetXSpan0()) ? m_xOverlapSpan / this->GetXSpan0() : 0.f;
206 }
TFile f
Definition: plotHisto.C:6
float GetXSpan0() const
Get the x span in the view 0.
float m_xOverlapSpan
The x overlap span.
float lar_content::TwoViewXOverlap::GetXOverlapFraction1 ( ) const
inline

Get the fraction of the view 1 cluster that overlaps in x.

Returns
the view 1 cluster's fractional overlap

Definition at line 210 of file LArTwoViewXOverlap.h.

References GetXSpan1(), and m_xOverlapSpan.

211 {
212  return (std::numeric_limits<float>::epsilon() < this->GetXSpan1()) ? m_xOverlapSpan / this->GetXSpan1() : 0.f;
213 }
TFile f
Definition: plotHisto.C:6
float GetXSpan1() const
Get the x span in the view 1.
float m_xOverlapSpan
The x overlap span.
float lar_content::TwoViewXOverlap::GetXSpan0 ( ) const
inline

Get the x span in the view 0.

Returns
the x span in the view 0

Definition at line 168 of file LArTwoViewXOverlap.h.

References m_xMax0, and m_xMin0.

Referenced by GetXOverlapFraction0(), lar_content::TwoViewTransverseOverlapResult::operator<(), and lar_content::TwoViewTransverseTracksAlgorithm::TwoViewTransverseTracksAlgorithm().

169 {
170  return std::fabs(m_xMax0 - m_xMin0);
171 }
float m_xMax0
The max x value in the view 0.
float m_xMin0
The min x value in the view 0.
float lar_content::TwoViewXOverlap::GetXSpan1 ( ) const
inline

Get the x span in the view 1.

Returns
the x span in the view 1

Definition at line 175 of file LArTwoViewXOverlap.h.

References m_xMax1, and m_xMin1.

Referenced by GetXOverlapFraction1(), lar_content::TwoViewTransverseOverlapResult::operator<(), and lar_content::TwoViewTransverseTracksAlgorithm::TwoViewTransverseTracksAlgorithm().

176 {
177  return std::fabs(m_xMax1 - m_xMin1);
178 }
float m_xMax1
The max x value in the view 1.
float m_xMin1
The min x value in the view 1.

Member Data Documentation

float lar_content::TwoViewXOverlap::m_xMax0
private

The max x value in the view 0.

Definition at line 113 of file LArTwoViewXOverlap.h.

Referenced by GetTwoViewXOverlapMax(), GetXMax0(), and GetXSpan0().

float lar_content::TwoViewXOverlap::m_xMax1
private

The max x value in the view 1.

Definition at line 115 of file LArTwoViewXOverlap.h.

Referenced by GetTwoViewXOverlapMax(), GetXMax1(), and GetXSpan1().

float lar_content::TwoViewXOverlap::m_xMin0
private

The min x value in the view 0.

Definition at line 112 of file LArTwoViewXOverlap.h.

Referenced by GetTwoViewXOverlapMin(), GetXMin0(), and GetXSpan0().

float lar_content::TwoViewXOverlap::m_xMin1
private

The min x value in the view 1.

Definition at line 114 of file LArTwoViewXOverlap.h.

Referenced by GetTwoViewXOverlapMin(), GetXMin1(), and GetXSpan1().

float lar_content::TwoViewXOverlap::m_xOverlapSpan
private

The x overlap span.

Definition at line 116 of file LArTwoViewXOverlap.h.

Referenced by GetTwoViewXOverlapSpan(), GetXOverlapFraction0(), and GetXOverlapFraction1().


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