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 ()
 
 PixelRecoRange (const std::pair< T, T > &aPair)
 
template<class U >
 PixelRecoRange (PixelRecoRange< U > other)
 
 PixelRecoRange (T aMin, T aMax)
 
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 15 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.

16 {}

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

◆ 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); }

◆ inside()

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

Definition at line 36 of file PixelRecoRange.h.

36 { return !((value < this->first) | (this->second < value)); }

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

◆ 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.

27 { return T(0.5) * (this->first + this->second); }

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

◆ 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.

51  {
52  if (empty())
53  std::swap(this->first, this->second);
54  return *this;
55  }

Referenced by PixelTripletNoTipGenerator::hitTriplets().

◆ 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  }

◆ 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  }
PixelRecoRange::PixelRecoRange
PixelRecoRange()
Definition: PixelRecoRange.h:16
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
dqmdumpme.first
first
Definition: dqmdumpme.py:55
PixelRecoRange::empty
bool empty() const
Definition: PixelRecoRange.h:29
PixelRecoRange::min
T min() const
Definition: PixelRecoRange.h:25
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
PixelRecoRange::max
T max() const
Definition: PixelRecoRange.h:26
trackingPlots.other
other
Definition: trackingPlots.py:1465
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
value
Definition: value.py:1
alignCSCRings.r
r
Definition: alignCSCRings.py:93
rangeIntersection
Range rangeIntersection(const Range &a, const Range &b)
Definition: rangeIntersection.h:16
T
long double T
Definition: Basic3DVectorLD.h:48
rangesIntersect
bool rangesIntersect(const Range &a, const Range &b)
Definition: rangesIntersect.h:14