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

#include <Normal3D.h>

Inheritance diagram for HepGeom::Normal3D< float >:

Public Member Functions

 Normal3D ()=default
 Normal3D (float x1, float y1, float z1)
 Normal3D (const float *a)
 Normal3D (const Normal3D< float > &)=default
 Normal3D (Normal3D< float > &&)=default
 Normal3D (const BasicVector3D< float > &v)
 ~Normal3D ()=default
Normal3D< float > & operator= (const Normal3D< float > &)=default
Normal3D< float > & operator= (const BasicVector3D< float > &v)
Normal3D< float > & operator= (Normal3D< float > &&)=default
Normal3D< float > & transform (const Transform3D &m)
Public Member Functions inherited from HepGeom::BasicVector3D< float >
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 float * ()
 operator const float * () const
 operator CLHEP::Hep3Vector () const
BasicVector3D< float > & operator= (const BasicVector3D< float > &)=default
BasicVector3D< float > & operator+= (const BasicVector3D< float > &v)
BasicVector3D< float > & operator-= (const BasicVector3D< float > &v)
BasicVector3D< float > & operator*= (double a)
BasicVector3D< float > & operator/= (double a)
float operator() (int i) const
float operator[] (int i) const
float x () const
float y () const
float z () const
void setX (float a)
void setY (float a)
void setZ (float a)
void set (float x1, float y1, float z1)
float perp2 () const
float perp () const
float rho () const
void setPerp (float rh)
float mag2 () const
float mag () const
float r () const
float phi () const
float theta () const
float cosTheta () const
float getR () const
float getPhi () const
float getTheta () const
void setMag (float ma)
void setR (float ma)
void setPhi (float ph)
void setTheta (float th)
float eta () const
float getEta () const
float dot (const BasicVector3D< float > &v) const
BasicVector3D< float > cross (const BasicVector3D< float > &v) const
BasicVector3D< float > unit () const
BasicVector3D< float > 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< float >
enum  
Protected Member Functions inherited from HepGeom::BasicVector3D< float >
 BasicVector3D ()
Protected Attributes inherited from HepGeom::BasicVector3D< float >
float v_ [3]

Detailed Description

Geometrical 3D Normal with components of float type.

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

Definition at line 42 of file Normal3D.h.

Constructor & Destructor Documentation

◆ Normal3D() [1/6]

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

Default constructor.

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

◆ Normal3D() [2/6]

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

Constructor from three numbers.

Definition at line 50 of file Normal3D.h.

◆ Normal3D() [3/6]

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

Constructor from array of floats.

Definition at line 54 of file Normal3D.h.

55 : BasicVector3D<float>(a[0],a[1],a[2]) {}

◆ Normal3D() [4/6]

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

Copy constructor.

◆ Normal3D() [5/6]

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

Move constructor.

◆ Normal3D() [6/6]

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

Constructor from BasicVector3D<float>.

Definition at line 67 of file Normal3D.h.

◆ ~Normal3D()

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

Destructor.

Member Function Documentation

◆ operator=() [1/3]

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

Assignment from BasicVector3D<float>.

Definition at line 79 of file Normal3D.h.

79 {
81 return *this;
82 }
BasicVector3D< T > & operator=(const BasicVector3D< T > &)=default

◆ operator=() [2/3]

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

Assignment.

◆ operator=() [3/3]

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

Move assignment.

◆ transform()

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

Transformation by Transform3D.

Definition at line 10 of file Normal3D.cc.

10 {
11 double vx = x(), vy = y(), vz = z();
12 double xx = m.xx(), xy = m.xy(), xz = m.xz();
13 double yx = m.yx(), yy = m.yy(), yz = m.yz();
14 double zx = m.zx(), zy = m.zy(), zz = m.zz();
15 set((yy*zz-yz*zy)*vx+(yz*zx-yx*zz)*vy+(yx*zy-yy*zx)*vz,
16 (zy*xz-zz*xy)*vx+(zz*xx-zx*xz)*vy+(zx*xy-zy*xx)*vz,
17 (xy*yz-xz*yy)*vx+(xz*yx-xx*yz)*vy+(xx*yy-xy*yx)*vz);
18 return *this;
19 }
void set(float x1, float y1, float 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: