CMS 3D CMS Logo

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

#include <Point3DBase.h>

Inheritance diagram for Point3DBase< T, FrameTag >:
PV3DBase< T, PointTag, FrameTag >

Public Types

typedef PV3DBase< T, PointTag,
FrameTag > 
BaseClass
 
typedef BaseClass::BasicVectorType BasicVectorType
 
typedef BaseClass::Cylindrical Cylindrical
 
typedef BaseClass::Polar Polar
 
typedef BaseClass::Spherical Spherical
 
typedef Vector3DBase< T, FrameTag > VectorType
 
- Public Types inherited from PV3DBase< T, PointTag, FrameTag >
typedef Basic3DVector< TBasicVectorType
 
typedef
BasicVectorType::Cylindrical 
Cylindrical
 
typedef BasicVectorType::MathVector MathVector
 
typedef BasicVectorType::Polar Polar
 
typedef T ScalarType
 
typedef BasicVectorType::Spherical Spherical
 

Public Member Functions

template<class U >
Point3DBaseoperator+= (const Vector3DBase< U, FrameTag > &v)
 
template<class U >
Point3DBaseoperator-= (const Vector3DBase< U, FrameTag > &v)
 
bool operator== (const Point3DBase &rh) const
 
 Point3DBase ()
 
template<class U >
 Point3DBase (const Point3DBase< U, FrameTag > &p)
 
 Point3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
 Point3DBase (const Cylindrical &set)
 
 Point3DBase (const Polar &set)
 construct from polar coordinates More...
 
 Point3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
 
 Point3DBase (const T &x, const T &y)
 
 Point3DBase (Point2DBase< T, FrameTag > p)
 
template<class U >
 Point3DBase (const Basic3DVector< U > &v)
 
- Public Member Functions inherited from PV3DBase< T, PointTag, FrameTag >
T barePhi () const
 
T bareTheta () const
 
const BasicVectorTypebasicVector () const
 
T eta () const
 
T mag () const
 
T mag2 () const
 
MathVector const & mathVector () const
 
MathVectormathVector ()
 
T perp () const
 
T perp2 () const
 
Geom::Phi< Tphi () const
 
 PV3DBase ()
 
 PV3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
 PV3DBase (const Cylindrical &set)
 
 PV3DBase (const Polar &set)
 construct from polar coordinates More...
 
 PV3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
 
 PV3DBase (const Basic3DVector< U > &v)
 
Geom::Theta< Ttheta () const
 
T transverse () const
 
T x () const
 
T y () const
 
T z () const
 

Additional Inherited Members

- Protected Attributes inherited from PV3DBase< T, PointTag, FrameTag >
BasicVectorType theVector
 

Detailed Description

template<class T, class FrameTag>
class Point3DBase< T, FrameTag >

Definition at line 10 of file Point3DBase.h.

Member Typedef Documentation

template<class T, class FrameTag>
typedef PV3DBase<T, PointTag, FrameTag> Point3DBase< T, FrameTag >::BaseClass

Definition at line 12 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::BasicVectorType Point3DBase< T, FrameTag >::BasicVectorType

Definition at line 17 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Cylindrical Point3DBase< T, FrameTag >::Cylindrical

Definition at line 14 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Polar Point3DBase< T, FrameTag >::Polar

Definition at line 16 of file Point3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Spherical Point3DBase< T, FrameTag >::Spherical

Definition at line 15 of file Point3DBase.h.

template<class T, class FrameTag>
typedef Vector3DBase<T, FrameTag> Point3DBase< T, FrameTag >::VectorType

Definition at line 13 of file Point3DBase.h.

Constructor & Destructor Documentation

template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( )
inline

default constructor uses default constructor of T to initialize the components. For built-in floating-point types this means initialization to zero

Definition at line 23 of file Point3DBase.h.

23 {}
template<class T, class FrameTag>
template<class U >
Point3DBase< T, FrameTag >::Point3DBase ( const Point3DBase< U, FrameTag > &  p)
inline

Construct from another point in the same reference frame, possiblly with different precision

Definition at line 29 of file Point3DBase.h.

29 : BaseClass(p.basicVector()) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const T x,
const T y,
const T z 
)
inline

construct from cartesian coordinates

Definition at line 32 of file Point3DBase.h.

32 : BaseClass(x, y, z) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const Cylindrical set)
inlineexplicit

Construct from cylindrical coordinates.

Definition at line 36 of file Point3DBase.h.

36 : BaseClass(set) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const Polar set)
inlineexplicit

construct from polar coordinates

Definition at line 39 of file Point3DBase.h.

39 : BaseClass(set) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const Geom::Theta< T > &  th,
const Geom::Phi< T > &  ph,
const T r 
)
inline

Deprecated construct from polar coordinates, use constructor from Polar( theta, phi, r) instead.

Definition at line 44 of file Point3DBase.h.

44 : BaseClass(th, ph, r) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( const T x,
const T y 
)
inline

Mimick 2D point. This constructor is convenient for points on a plane, since the z component for them is zero.

Definition at line 49 of file Point3DBase.h.

49 : BaseClass(x, y, 0) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
template<class T, class FrameTag>
Point3DBase< T, FrameTag >::Point3DBase ( Point2DBase< T, FrameTag >  p)
inlineexplicit

Definition at line 50 of file Point3DBase.h.

50 : BaseClass(p.x(), p.y(), 0) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12
template<class T, class FrameTag>
template<class U >
Point3DBase< T, FrameTag >::Point3DBase ( const Basic3DVector< U > &  v)
inlineexplicit

Explicit constructor from BasicVectorType, bypasses consistency checks for point/vector and for coordinate frame. To be used as carefully as e.g. const_cast.

Definition at line 57 of file Point3DBase.h.

57 : BaseClass(v) {}
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:12

Member Function Documentation

template<class T, class FrameTag>
template<class U >
Point3DBase& Point3DBase< T, FrameTag >::operator+= ( const Vector3DBase< U, FrameTag > &  v)
inline

A Point can be shifted by a Vector of possibly different precision, defined in the same coordinate frame

Definition at line 66 of file Point3DBase.h.

66  {
67  this->theVector += v.basicVector();
68  return *this;
69  }
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
template<class T, class FrameTag>
template<class U >
Point3DBase& Point3DBase< T, FrameTag >::operator-= ( const Vector3DBase< U, FrameTag > &  v)
inline

Definition at line 72 of file Point3DBase.h.

72  {
73  this->theVector -= v.basicVector();
74  return *this;
75  }
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
template<class T, class FrameTag>
bool Point3DBase< T, FrameTag >::operator== ( const Point3DBase< T, FrameTag > &  rh) const
inline

Definition at line 60 of file Point3DBase.h.

60 { return this->basicVector() == rh.basicVector(); }
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53