test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ALIPlane Class Reference

#include <ALIPlane.h>

Public Member Functions

 ALIPlane (const CLHEP::Hep3Vector &point, const CLHEP::Hep3Vector &normal)
 
ALILine lineProject (const CLHEP::Hep3Vector &vec)
 
const CLHEP::Hep3Vector & normal () const
 
const CLHEP::Hep3Vector & point () const
 
CLHEP::Hep3Vector project (const CLHEP::Hep3Vector &vec)
 

Private Attributes

CLHEP::Hep3Vector _normal
 
CLHEP::Hep3Vector _point
 

Detailed Description

Definition at line 15 of file ALIPlane.h.

Constructor & Destructor Documentation

ALIPlane::ALIPlane ( const CLHEP::Hep3Vector &  point,
const CLHEP::Hep3Vector &  normal 
)

Definition at line 16 of file ALIPlane.cc.

References _normal, _point, ALIUtils::debug, and ALIUtils::dump3v().

17 : _point(point)
18 {
19  _normal = normal * (1. / normal.mag());
20  if (ALIUtils::debug >= 5) {
21  ALIUtils::dump3v( _point, " Created ALIplane: point");
22  ALIUtils::dump3v( _normal, " Created ALIPlane: normal");
23  }
24 }
CLHEP::Hep3Vector _normal
Definition: ALIPlane.h:28
static ALIint debug
Definition: ALIUtils.h:36
CLHEP::Hep3Vector _point
Definition: ALIPlane.h:24
const CLHEP::Hep3Vector & point() const
Definition: ALIPlane.h:23
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
Definition: ALIUtils.cc:61
const CLHEP::Hep3Vector & normal() const
Definition: ALIPlane.h:24

Member Function Documentation

ALILine ALIPlane::lineProject ( const CLHEP::Hep3Vector &  vec)

Definition at line 46 of file ALIPlane.cc.

References _normal, and _point.

47 {
48  //---------- Project vec on normal to plane
49  ALIdouble proj = vec.dot(_normal) * (1. / vec.mag() );
50  //---------- Substract this projection to vec
51  CLHEP::Hep3Vector vecproj = vec - (proj * _normal);
52  //- ALIUtils::dump3v( _normal, "plane _normal");
53  //- std::cout << " proj on normal " << proj << std::endl;
54  //- ALIUtils::dump3v( vec , "std::vector");
55  return ALILine( this->_point, vecproj );
56 }
long double ALIdouble
Definition: CocoaGlobals.h:11
CLHEP::Hep3Vector _normal
Definition: ALIPlane.h:28
CLHEP::Hep3Vector _point
Definition: ALIPlane.h:24
const CLHEP::Hep3Vector& ALIPlane::normal ( ) const
inline

Definition at line 24 of file ALIPlane.h.

References _normal.

Referenced by ALILine::intersect(), LightRay::intersect(), LightRay::reflect(), and LightRay::refract().

24 {return _normal;};
CLHEP::Hep3Vector _normal
Definition: ALIPlane.h:28
const CLHEP::Hep3Vector& ALIPlane::point ( ) const
inline

Definition at line 23 of file ALIPlane.h.

References _point.

Referenced by ALILine::intersect(), and LightRay::intersect().

23 {return _point;};
CLHEP::Hep3Vector _point
Definition: ALIPlane.h:24
CLHEP::Hep3Vector ALIPlane::project ( const CLHEP::Hep3Vector &  vec)

Definition at line 30 of file ALIPlane.cc.

References _normal.

Referenced by OptOCOPS::makeMeasurement().

31 {
32  //---------- Project vec on normal to plane
33  ALIdouble proj = vec.dot(_normal) * (1. / vec.mag() );
34  //---------- Substract this projection to vec
35  CLHEP::Hep3Vector vecproj = vec - (proj * _normal);
36  //- ALIUtils::dump3v( _normal, "plane _normal");
37  //- std::cout << " proj on normal " << proj << std::endl;
38  //- ALIUtils::dump3v( vec , "std::vector");
39  return vecproj;
40 }
long double ALIdouble
Definition: CocoaGlobals.h:11
CLHEP::Hep3Vector _normal
Definition: ALIPlane.h:28

Member Data Documentation

CLHEP::Hep3Vector ALIPlane::_normal
private

Definition at line 28 of file ALIPlane.h.

Referenced by ALIPlane(), lineProject(), normal(), and project().

CLHEP::Hep3Vector ALIPlane::_point
private

Definition at line 24 of file ALIPlane.h.

Referenced by ALIPlane(), lineProject(), and point().