CMS 3D CMS Logo

PixelRecoRange< T > Class Template Reference

Define a range [aMin,aMax]. More...

#include <RecoTracker/TkMSParametrization/interface/PixelRecoRange.h>

List of all members.

Public Member Functions

bool empty () const
bool hasIntersection (const PixelRecoRange< T > &r) const
bool inside (const T &value) const
PixelRecoRange< T > intersection (const PixelRecoRange< T > &r) const
const T & max () const
mean () const
const T & min () const
 PixelRecoRange (const std::pair< T, T > &aPair)
 PixelRecoRange (const T &aMin, const T &aMax)
 PixelRecoRange ()
void sort ()
PixelRecoRange< T > sum (const PixelRecoRange< T > &r) const


Detailed Description

template<class T>
class PixelRecoRange< T >

Define a range [aMin,aMax].

Definition at line 13 of file PixelRecoRange.h.


Constructor & Destructor Documentation

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

Definition at line 16 of file PixelRecoRange.h.

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

00016 { }

template<class T>
PixelRecoRange< T >::PixelRecoRange ( const T &  aMin,
const T &  aMax 
) [inline]

Definition at line 18 of file PixelRecoRange.h.

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

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

Definition at line 21 of file PixelRecoRange.h.

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


Member Function Documentation

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

Definition at line 28 of file PixelRecoRange.h.

Referenced by RectangularEtaPhiTrackingRegion::estimator(), HitPairGeneratorFromLayerPair::hitPairs(), ThirdHitPredictionFromInvParabola::operator()(), PixelRecoRange< T >::sort(), and PixelRecoRange< T >::sum().

00028 { return (this->second < this->first); }

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

Definition at line 34 of file PixelRecoRange.h.

References rangesIntersect().

00034                                                            {
00035     return rangesIntersect(*this,r); 
00036   }

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

Definition at line 30 of file PixelRecoRange.h.

References first.

Referenced by MultipleScatteringGeometry::detLayers(), MSLayer::distance(), LayerHitMapLoop::getHit(), OuterDetCompatibility::maximalLocalDisplacement(), LayerHitMapLoop::nextRange(), HitZCheck::operator()(), and HitRCheck::operator()().

00030                                      {
00031     if (value < this->first || this->second < value)  return false; else  return true;
00032   }

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

Definition at line 38 of file PixelRecoRange.h.

References rangeIntersection().

Referenced by PixelTripletHLTGenerator::hitTriplets(), ThirdHitPredictionFromInvParabola::init(), and ThirdHitPredictionFromInvParabola::operator()().

00039                                          {
00040     return rangeIntersection(*this,r); 
00041   }

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

Definition at line 25 of file PixelRecoRange.h.

References edm::second().

Referenced by OuterHitCompatibility::checkPhi(), RectangularEtaPhiTrackingRegion::checkRZ(), FastTSGFromL2Muon::clean(), ThirdHitCorrection::correctRZRange(), MSLayer::crossing(), MSLayer::distance(), RectangularEtaPhiTrackingRegion::estimator(), ThirdHitPrediction::getRanges(), PixelTripletHLTGenerator::hitTriplets(), LayerHitMapLoop::LayerHitMapLoop(), OuterDetCompatibility::maximalLocalDisplacement(), LayerHitMapLoop::nextRange(), ThirdHitPredictionFromInvParabola::operator()(), OuterHitPhiPrediction::operator()(), ThirdHitRZPrediction::operator()(), MSLayer::operator<(), operator<<(), TrackingRegionBase::print(), TrackingRegionBase::ptMin(), RectangularEtaPhiTrackingRegion::rzConstraint(), LayerHitMapLoop::setSafeRzRange(), and PixelRecoRange< T >::sum().

00025 { return this->second; }

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

Definition at line 26 of file PixelRecoRange.h.

Referenced by OuterDetCompatibility::center(), RectangularEtaPhiTrackingRegion::checkRZ(), FastTSGFromL2Muon::clean(), RectangularEtaPhiTrackingRegion::estimator(), and OuterHitPhiPrediction::operator()().

00026 { return (this->first+this->second)/2.; }

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

Definition at line 24 of file PixelRecoRange.h.

References first.

Referenced by OuterHitCompatibility::checkPhi(), RectangularEtaPhiTrackingRegion::checkRZ(), ThirdHitCorrection::correctRZRange(), MSLayer::crossing(), MSLayer::distance(), RectangularEtaPhiTrackingRegion::estimator(), ThirdHitPrediction::getRanges(), PixelTripletHLTGenerator::hitTriplets(), LayerHitMapLoop::LayerHitMapLoop(), OuterDetCompatibility::maximalLocalDisplacement(), LayerHitMapLoop::nextRange(), ThirdHitPredictionFromInvParabola::operator()(), OuterHitPhiPrediction::operator()(), ThirdHitRZPrediction::operator()(), operator<<(), TrackingRegionBase::ptMin(), RectangularEtaPhiTrackingRegion::rzConstraint(), LayerHitMapLoop::setSafeRzRange(), and PixelRecoRange< T >::sum().

00024 { return this->first; }

template<class T>
void PixelRecoRange< T >::sort (  )  [inline]

Definition at line 52 of file PixelRecoRange.h.

References PixelRecoRange< T >::empty(), and std::swap().

Referenced by ThirdHitPredictionFromInvParabola::init(), and ThirdHitPredictionFromInvParabola::operator()().

00052 { if (empty() ) std::swap(this->first,this->second); }

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

Definition at line 43 of file PixelRecoRange.h.

References PixelRecoRange< T >::empty(), PixelRecoRange< T >::max(), PixelRecoRange< T >::min(), and PixelRecoRange< T >::PixelRecoRange().

00043                                                            {
00044    if( this->empty()) return r;
00045    else if( r.empty()) return *this;
00046    else return 
00047        PixelRecoRange( 
00048          (min() < r.min()) ? min() : r.min(), 
00049          (max() < r.max()) ? r.max() : max()); 
00050   }


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:30:03 2009 for CMSSW by  doxygen 1.5.4