CMS 3D CMS Logo

List of all members | Public Member Functions
PixelRecoRange< T > Class Template Reference

#include <InnerDeltaPhi.h>

Inheritance diagram for PixelRecoRange< T >:

Public Member Functions

bool empty () const
 
bool hasIntersection (const PixelRecoRange< T > &r) const
 
bool inside (const T &value) const
 
PixelRecoRange< Tintersection (const PixelRecoRange< T > &r) const
 
T max () const
 
T mean () const
 
T min () const
 
 PixelRecoRange ()
 
template<class U >
 PixelRecoRange (PixelRecoRange< U > other)
 
 PixelRecoRange (T aMin, T aMax)
 
 PixelRecoRange (const std::pair< T, T > &aPair)
 
PixelRecoRange< T > & sort ()
 
PixelRecoRange< Tsum (const PixelRecoRange< T > &r) const
 
PixelRecoRange< T > & swap ()
 

Detailed Description

template<class T>
class PixelRecoRange< T >

Define a range [aMin,aMax]

Definition at line 14 of file InnerDeltaPhi.h.

Constructor & Destructor Documentation

◆ PixelRecoRange() [1/4]

template<class T>
PixelRecoRange< T >::PixelRecoRange ( )
inline

Definition at line 16 of file PixelRecoRange.h.

Referenced by PixelRecoRange< float >::sum().

16 {}

◆ PixelRecoRange() [2/4]

template<class T>
template<class U >
PixelRecoRange< T >::PixelRecoRange ( PixelRecoRange< U >  other)
inline

Definition at line 19 of file PixelRecoRange.h.

19 : std::pair<T, T>(other.min(), other.max()) {}

◆ PixelRecoRange() [3/4]

template<class T>
PixelRecoRange< T >::PixelRecoRange ( T  aMin,
T  aMax 
)
inline

Definition at line 21 of file PixelRecoRange.h.

21 : std::pair<T, T>(aMin, aMax) {}

◆ PixelRecoRange() [4/4]

template<class T>
PixelRecoRange< T >::PixelRecoRange ( const std::pair< T, T > &  aPair)
inline

Definition at line 23 of file PixelRecoRange.h.

23 : std::pair<T, T>(aPair) {}

Member Function Documentation

◆ empty()

template<class T>
bool PixelRecoRange< T >::empty ( void  ) const
inline

◆ hasIntersection()

template<class T>
bool PixelRecoRange< T >::hasIntersection ( const PixelRecoRange< T > &  r) const
inline

Definition at line 38 of file PixelRecoRange.h.

38 { return rangesIntersect(*this, r); }
bool rangesIntersect(const Range &a, const Range &b)

◆ inside()

template<class T>
bool PixelRecoRange< T >::inside ( const T value) const
inline

Definition at line 36 of file PixelRecoRange.h.

Referenced by MultipleScatteringGeometry::detLayers(), MSLayer::distance2(), HitRCheck::operator()(), and HitZCheck::operator()().

36 { return !((value < this->first) | (this->second < value)); }
U second(std::pair< T, U > const &p)
Definition: value.py:1

◆ intersection()

template<class T>
PixelRecoRange<T> PixelRecoRange< T >::intersection ( const PixelRecoRange< T > &  r) const
inline

◆ max()

template<class T>
T PixelRecoRange< T >::max ( ) const
inline

◆ mean()

template<class T>
T PixelRecoRange< T >::mean ( ) const
inline

Definition at line 27 of file PixelRecoRange.h.

Referenced by OuterHitPhiPrediction::asym(), and RectangularEtaPhiTrackingRegion::estimator().

27 { return T(0.5) * (this->first + this->second); }
U second(std::pair< T, U > const &p)
long double T

◆ min()

template<class T>
T PixelRecoRange< T >::min ( ) const
inline

◆ sort()

template<class T>
PixelRecoRange<T>& PixelRecoRange< T >::sort ( )
inline

Definition at line 51 of file PixelRecoRange.h.

Referenced by PixelTripletNoTipGenerator::hitTriplets().

51  {
52  if (empty())
53  std::swap(this->first, this->second);
54  return *this;
55  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
U second(std::pair< T, U > const &p)
bool empty() const

◆ sum()

template<class T>
PixelRecoRange<T> PixelRecoRange< T >::sum ( const PixelRecoRange< T > &  r) const
inline

Definition at line 42 of file PixelRecoRange.h.

42  {
43  if (this->empty())
44  return r;
45  else if (r.empty())
46  return *this;
47  else
48  return PixelRecoRange(std::min(min(), r.min()), std::max(max(), r.max()));
49  }
bool empty() const

◆ swap()

template<class T>
PixelRecoRange<T>& PixelRecoRange< T >::swap ( )
inline

Definition at line 31 of file PixelRecoRange.h.

31  {
32  std::swap(this->second, this->first);
33  return *this;
34  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
U second(std::pair< T, U > const &p)