ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
eflowRangeBase< T > Class Template Reference

eflowRangeBase is an object to represent a length in eta or phi, and this is used in eflowCellIntegrator as a variable in the integrations over eta and phi. More...

#include <eflowUtil.h>

Collaboration diagram for eflowRangeBase< T >:

Public Member Functions

 eflowRangeBase ()=default
 
 eflowRangeBase (const T &min, const T &max)
 
void setCenterAndWidth (T center, double width)
 
void shift (double shift)
 
getMax () const
 
getMin () const
 
getCenter () const
 
getWidth () const
 
bool contains (const T &x)
 
std::string print () const
 

Private Attributes

m_min {NAN}
 
m_max {NAN}
 

Detailed Description

template<class T>
class eflowRangeBase< T >

eflowRangeBase is an object to represent a length in eta or phi, and this is used in eflowCellIntegrator as a variable in the integrations over eta and phi.

Definition at line 110 of file eflowUtil.h.

Constructor & Destructor Documentation

◆ eflowRangeBase() [1/2]

template<class T >
eflowRangeBase< T >::eflowRangeBase ( )
default

◆ eflowRangeBase() [2/2]

template<class T >
eflowRangeBase< T >::eflowRangeBase ( const T &  min,
const T &  max 
)
inline

Definition at line 113 of file eflowUtil.h.

113 : m_min(min), m_max(max) { }

Member Function Documentation

◆ contains()

template<class T >
bool eflowRangeBase< T >::contains ( const T &  x)
inline

Definition at line 124 of file eflowUtil.h.

124 { return ( (m_min < x) && (m_max > x) ); }

◆ getCenter()

template<class T >
T eflowRangeBase< T >::getCenter ( ) const
inline

Definition at line 121 of file eflowUtil.h.

121 { return (m_max + m_min)/2; }

◆ getMax()

template<class T >
T eflowRangeBase< T >::getMax ( ) const
inline

Definition at line 118 of file eflowUtil.h.

118 { return m_max; }

◆ getMin()

template<class T >
T eflowRangeBase< T >::getMin ( ) const
inline

Definition at line 119 of file eflowUtil.h.

119 { return m_min; }

◆ getWidth()

template<class T >
T eflowRangeBase< T >::getWidth ( ) const
inline

Definition at line 122 of file eflowUtil.h.

122 { return (m_max - m_min); }

◆ print()

template<class T >
std::string eflowRangeBase< T >::print ( ) const
inline

Definition at line 126 of file eflowUtil.h.

126  {
127  std::string result = "[";
129  result += ", ";
131  result += ']';
132  return result;
133  }

◆ setCenterAndWidth()

template<class T >
void eflowRangeBase< T >::setCenterAndWidth ( center,
double  width 
)
inline

Definition at line 115 of file eflowUtil.h.

115 { m_min = center - width/2; m_max = m_min + width; }

◆ shift()

template<class T >
void eflowRangeBase< T >::shift ( double  shift)
inline

Definition at line 116 of file eflowUtil.h.

116 { m_min += shift; m_max += shift; }

Member Data Documentation

◆ m_max

template<class T >
T eflowRangeBase< T >::m_max {NAN}
private

Definition at line 137 of file eflowUtil.h.

◆ m_min

template<class T >
T eflowRangeBase< T >::m_min {NAN}
private

Definition at line 136 of file eflowUtil.h.


The documentation for this class was generated from the following file:
eflowRangeBase::m_max
T m_max
Definition: eflowUtil.h:137
get_generator_info.result
result
Definition: get_generator_info.py:21
max
#define max(a, b)
Definition: cfImp.cxx:41
x
#define x
min
#define min(a, b)
Definition: cfImp.cxx:40
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
eflowRangeBase::m_min
T m_min
Definition: eflowUtil.h:136
eflowRangeBase::shift
void shift(double shift)
Definition: eflowUtil.h:116