test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 16 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 20 of file PixelRecoRange.h.

20  :
21  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 24 of file PixelRecoRange.h.

25  : std::pair<T,T> (aMin,aMax) { }
template<class T>
PixelRecoRange< T >::PixelRecoRange ( const std::pair< T, T > &  aPair)
inline

Definition at line 27 of file PixelRecoRange.h.

28  : 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 43 of file PixelRecoRange.h.

43  {
44  return rangesIntersect(*this,r);
45  }
bool rangesIntersect(const Range &a, const Range &b)
template<class T>
bool PixelRecoRange< T >::inside ( const T value) const
inline

Definition at line 39 of file PixelRecoRange.h.

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

39  {
40  return !( (value < this->first) | (this->second < value) );
41  }
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 32 of file PixelRecoRange.h.

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

32 { 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 60 of file PixelRecoRange.h.

Referenced by PixelTripletNoTipGenerator::hitTriplets().

60 { if (empty() ) std::swap(this->first,this->second); return *this;}
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 51 of file PixelRecoRange.h.

51  {
52  if( this->empty()) return r;
53  else if( r.empty()) return *this;
54  else return
56  std::max( max(),r.max())
57  );
58  }
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 36 of file PixelRecoRange.h.

36 { std::swap(this->second,this->first); return *this;}
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)