CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 16 of file PixelRecoRange.h.

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

16 {}
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()) {}
T max() const
T min() const
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) {}
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

template<class T>
bool PixelRecoRange< T >::empty ( void  ) const
inline
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)
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)
template<class T>
PixelRecoRange<T> PixelRecoRange< T >::intersection ( const PixelRecoRange< T > &  r) const
inline
template<class T>
T PixelRecoRange< T >::max ( ) const
inline
template<class T>
T PixelRecoRange< T >::mean ( ) const
inline

Definition at line 27 of file PixelRecoRange.h.

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

27 { return T(0.5) * (this->first + this->second); }
U second(std::pair< T, U > const &p)
long double T
template<class T>
T PixelRecoRange< T >::min ( ) const
inline
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  }
bool empty() const
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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  }
T max() const
bool empty() const
T min() const
T min(T a, T b)
Definition: MathUtil.h:58
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  }
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)