Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
HepGeom::Normal3D< double > Class Reference

#include <Normal3D.h>

Inheritance diagram for HepGeom::Normal3D< double >:

Public Member Functions

 Normal3D ()=default
 Normal3D (double x1, double y1, double z1)
 Normal3D (const float *a)
 Normal3D (const double *a)
 Normal3D (const Normal3D< double > &)=default
 Normal3D (Normal3D< double > &&)=default
 Normal3D (const BasicVector3D< float > &v)
 Normal3D (const BasicVector3D< double > &v)
 ~Normal3D ()=default
 Normal3D (const CLHEP::Hep3Vector &v)
 operator CLHEP::Hep3Vector () const
Normal3D< double > & operator= (const Normal3D< double > &)=default
Normal3D< double > & operator= (const BasicVector3D< float > &v)
Normal3D< double > & operator= (const BasicVector3D< double > &v)
Normal3D< double > & operator= (Normal3D< double > &&)=default
Normal3D< double > & transform (const Transform3D &m)
Public Member Functions inherited from HepGeom::BasicVector3D< double >
float pseudoRapidity () const
void setEta (float a)
float angle (const BasicVector3D< float > &v) const
BasicVector3D< float > & rotateX (float a)
BasicVector3D< float > & rotateY (float a)
BasicVector3D< float > & rotateZ (float a)
BasicVector3D< float > & rotate (float a, const BasicVector3D< float > &v)
double pseudoRapidity () const
void setEta (double a)
double angle (const BasicVector3D< double > &v) const
BasicVector3D< double > & rotateX (double a)
BasicVector3D< double > & rotateY (double a)
BasicVector3D< double > & rotateZ (double a)
BasicVector3D< double > & rotate (double a, const BasicVector3D< double > &v)
virtual ~BasicVector3D ()=default
 operator double * ()
 operator const double * () const
 operator CLHEP::Hep3Vector () const
BasicVector3D< double > & operator= (const BasicVector3D< double > &)=default
BasicVector3D< double > & operator+= (const BasicVector3D< double > &v)
BasicVector3D< double > & operator-= (const BasicVector3D< double > &v)
BasicVector3D< double > & operator*= (double a)
BasicVector3D< double > & operator/= (double a)
double operator() (int i) const
double operator[] (int i) const
double x () const
double y () const
double z () const
void setX (double a)
void setY (double a)
void setZ (double a)
void set (double x1, double y1, double z1)
double perp2 () const
double perp () const
double rho () const
void setPerp (double rh)
double mag2 () const
double mag () const
double r () const
double phi () const
double theta () const
double cosTheta () const
double getR () const
double getPhi () const
double getTheta () const
void setMag (double ma)
void setR (double ma)
void setPhi (double ph)
void setTheta (double th)
double eta () const
double getEta () const
double dot (const BasicVector3D< double > &v) const
BasicVector3D< double > cross (const BasicVector3D< double > &v) const
BasicVector3D< double > unit () const
BasicVector3D< double > orthogonal () const

(Note that these are not member symbols.)

Normal3D< float > operator* (const Transform3D &m, const Normal3D< float > &n)
Normal3D< double > operator* (const Transform3D &m, const Normal3D< double > &n)

Additional Inherited Members

Public Types inherited from HepGeom::BasicVector3D< double >
enum  
Protected Member Functions inherited from HepGeom::BasicVector3D< double >
 BasicVector3D ()
Protected Attributes inherited from HepGeom::BasicVector3D< double >
double v_ [3]

Detailed Description

Geometrical 3D Normal with components of double type.

Author
Evgeni Chernyaev Evgue.nosp@m.ni.T.nosp@m.chern.nosp@m.iaev.nosp@m.@cern.nosp@m..ch

Definition at line 107 of file Normal3D.h.

Constructor & Destructor Documentation

◆ Normal3D() [1/9]

HepGeom::Normal3D< double >::Normal3D ( )
default

Default constructor.

Referenced by Normal3D(), Normal3D(), operator=(), operator=(), operator=(), operator=(), and transform().

◆ Normal3D() [2/9]

HepGeom::Normal3D< double >::Normal3D ( double x1,
double y1,
double z1 )
inline

Constructor from three numbers.

Definition at line 115 of file Normal3D.h.

◆ Normal3D() [3/9]

HepGeom::Normal3D< double >::Normal3D ( const float * a)
inlineexplicit

Constructor from array of floats.

Definition at line 119 of file Normal3D.h.

120 : BasicVector3D<double>(a[0],a[1],a[2]) {}

◆ Normal3D() [4/9]

HepGeom::Normal3D< double >::Normal3D ( const double * a)
inlineexplicit

Constructor from array of doubles.

Definition at line 124 of file Normal3D.h.

125 : BasicVector3D<double>(a[0],a[1],a[2]) {}

◆ Normal3D() [5/9]

HepGeom::Normal3D< double >::Normal3D ( const Normal3D< double > & )
default

Copy constructor.

◆ Normal3D() [6/9]

HepGeom::Normal3D< double >::Normal3D ( Normal3D< double > && )
default

Move constructor.

◆ Normal3D() [7/9]

HepGeom::Normal3D< double >::Normal3D ( const BasicVector3D< float > & v)
inline

Constructor from BasicVector3D<float>.

Definition at line 137 of file Normal3D.h.

◆ Normal3D() [8/9]

HepGeom::Normal3D< double >::Normal3D ( const BasicVector3D< double > & v)
inline

Constructor from BasicVector3D<double>.

Definition at line 141 of file Normal3D.h.

◆ ~Normal3D()

HepGeom::Normal3D< double >::~Normal3D ( )
default

Destructor.

◆ Normal3D() [9/9]

HepGeom::Normal3D< double >::Normal3D ( const CLHEP::Hep3Vector & v)
inline

Constructor from CLHEP::Hep3Vector. This constructor is needed only for backward compatibility and in principle should be absent.

Definition at line 152 of file Normal3D.h.

Member Function Documentation

◆ operator CLHEP::Hep3Vector()

HepGeom::Normal3D< double >::operator CLHEP::Hep3Vector ( ) const
inline

Conversion (cast) to CLHEP::Hep3Vector. This operator is needed only for backward compatibility and in principle should not exit.

Definition at line 160 of file Normal3D.h.

160{ return CLHEP::Hep3Vector(x(),y(),z()); }

◆ operator=() [1/4]

Normal3D< double > & HepGeom::Normal3D< double >::operator= ( const BasicVector3D< double > & v)
inline

Assignment from BasicVector3D<double>.

Definition at line 175 of file Normal3D.h.

175 {
177 return *this;
178 }
BasicVector3D< T > & operator=(const BasicVector3D< T > &)=default

◆ operator=() [2/4]

Normal3D< double > & HepGeom::Normal3D< double >::operator= ( const BasicVector3D< float > & v)
inline

Assignment from BasicVector3D<float>.

Definition at line 168 of file Normal3D.h.

168 {
170 return *this;
171 }

◆ operator=() [3/4]

Normal3D< double > & HepGeom::Normal3D< double >::operator= ( const Normal3D< double > & )
default

Assignment.

◆ operator=() [4/4]

Normal3D< double > & HepGeom::Normal3D< double >::operator= ( Normal3D< double > && )
default

Move assignment.

◆ transform()

Normal3D< double > & HepGeom::Normal3D< double >::transform ( const Transform3D & m)

Transformation by Transform3D.

Definition at line 36 of file Normal3D.cc.

36 {
37 double vx = x(), vy = y(), vz = z();
38 double xx = m.xx(), xy = m.xy(), xz = m.xz();
39 double yx = m.yx(), yy = m.yy(), yz = m.yz();
40 double zx = m.zx(), zy = m.zy(), zz = m.zz();
41 set((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
42 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
43 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
44 return *this;
45 }
void set(double x1, double y1, double z1)

Referenced by operator=().

◆ operator*() [1/2]

Normal3D< double > operator* ( const Transform3D & m,
const Normal3D< double > & n )
related

Transformation of Normal<double> by Transform3D.

Definition at line 194 of file Normal3D.cc.

49 {
50 double vx = v.x(), vy = v.y(), vz = v.z();
51 double xx = m.xx(), xy = m.xy(), xz = m.xz();
52 double yx = m.yx(), yy = m.yy(), yz = m.yz();
53 double zx = m.zx(), zy = m.zy(), zz = m.zz();
54 return Normal3D<double>
55 ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
56 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
57 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
58 }

◆ operator*() [2/2]

Normal3D< float > operator* ( const Transform3D & m,
const Normal3D< float > & n )
related

Transformation of Normal<float> by Transform3D.

Definition at line 98 of file Normal3D.cc.

23 {
24 double vx = v.x(), vy = v.y(), vz = v.z();
25 double xx = m.xx(), xy = m.xy(), xz = m.xz();
26 double yx = m.yx(), yy = m.yy(), yz = m.yz();
27 double zx = m.zx(), zy = m.zy(), zz = m.zz();
28 return Normal3D<float>
29 ((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
30 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
31 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
32 }

The documentation for this class was generated from the following files: