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)
 
void sort ()
 
PixelRecoRange< Tsum (const PixelRecoRange< T > &r) const
 

Detailed Description

template<class T>
class PixelRecoRange< T >

Define a range [aMin,aMax]

Definition at line 13 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 40 of file PixelRecoRange.h.

40  {
41  return rangesIntersect(*this,r);
42  }
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(), and GCC11_FINAL< T, TOPO >::operator()().

36  {
37  return !(value < this->first || this->second < value);
38  }
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:79
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 FastTSGFromL2Muon::clean(), FastTSGFromIOHit::clean(), and OuterHitPhiPrediction::operator()().

32 { return T(0.5)*(this->first+this->second); }
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:79
long double T
template<class T>
T PixelRecoRange< T >::min ( ) const
inline
template<class T>
void PixelRecoRange< T >::sort ( )
inline

Definition at line 57 of file PixelRecoRange.h.

Referenced by PixelTripletNoTipGenerator::hitTriplets().

57 { if (empty() ) std::swap(this->first,this->second); }
bool empty() const
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool first
Definition: L1TdeRCT.cc:79
template<class T>
PixelRecoRange<T> PixelRecoRange< T >::sum ( const PixelRecoRange< T > &  r) const
inline

Definition at line 48 of file PixelRecoRange.h.

48  {
49  if( this->empty()) return r;
50  else if( r.empty()) return *this;
51  else return
53  std::max( max(),r.max())
54  );
55  }
T max() const
bool empty() const
T min() const
const T & max(const T &a, const T &b)