CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions
geomsort::ExtractPhi< T, Scalar > Class Template Reference

#include <GeometricSorting.h>

Public Types

typedef Geom::Phi< Scalar > result_type
 

Public Member Functions

Geom::Phi< Scalar > operator() (const T *p) const
 
Geom::Phi< Scalar > operator() (const T &p) const
 

Detailed Description

template<class T, class Scalar = typename T::Scalar>
class geomsort::ExtractPhi< T, Scalar >

functor to sort in phi (from -pi to pi) using precomputed_value_sort. Can be used for any object with a member position().

Note that sorting in phi is done within the phi range of (-pi, pi]. It may NOT be what you expect if the elements cluster around the pi discontinuity.

Use:

precomputed_value_sort(v.begin(), v.end(), ExtractPhi<Surface>());

Date:
2007/01/17 20:58:43
Revision:
1.1
Author
N. Amapane - CERN

Definition at line 50 of file GeometricSorting.h.

Member Typedef Documentation

template<class T , class Scalar = typename T::Scalar>
typedef Geom::Phi<Scalar> geomsort::ExtractPhi< T, Scalar >::result_type

Definition at line 51 of file GeometricSorting.h.

Member Function Documentation

template<class T , class Scalar = typename T::Scalar>
Geom::Phi<Scalar> geomsort::ExtractPhi< T, Scalar >::operator() ( const T p) const
inline

Definition at line 52 of file GeometricSorting.h.

52 {return p->position().phi();}
template<class T , class Scalar = typename T::Scalar>
Geom::Phi<Scalar> geomsort::ExtractPhi< T, Scalar >::operator() ( const T p) const
inline

Definition at line 53 of file GeometricSorting.h.

53 {return p.position().phi();}