CMS 3D CMS Logo

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::ALIPlane ( const CLHEP::Hep3Vector &  point,
const CLHEP::Hep3Vector &  normal 
)

Definition at line 15 of file ALIPlane.cc.

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

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

Member Function Documentation

◆ lineProject()

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

Definition at line 42 of file ALIPlane.cc.

References _normal, _point, and amptDefault_cfi::proj.

42  {
43  //---------- Project vec on normal to plane
44  ALIdouble proj = vec.dot(_normal) * (1. / vec.mag());
45  //---------- Substract this projection to vec
46  CLHEP::Hep3Vector vecproj = vec - (proj * _normal);
47  //- ALIUtils::dump3v( _normal, "plane _normal");
48  //- std::cout << " proj on normal " << proj << std::endl;
49  //- ALIUtils::dump3v( vec , "std::vector");
50  return ALILine(this->_point, vecproj);
51 }
long double ALIdouble
Definition: CocoaGlobals.h:11
CLHEP::Hep3Vector _normal
Definition: ALIPlane.h:27
CLHEP::Hep3Vector _point
Definition: ALIPlane.h:23

◆ normal()

const CLHEP::Hep3Vector& ALIPlane::normal ( ) const
inline

Definition at line 23 of file ALIPlane.h.

References _normal.

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

23 { return _normal; };
CLHEP::Hep3Vector _normal
Definition: ALIPlane.h:27

◆ point()

const CLHEP::Hep3Vector& ALIPlane::point ( ) const
inline

Definition at line 22 of file ALIPlane.h.

References _point.

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

22 { return _point; };
CLHEP::Hep3Vector _point
Definition: ALIPlane.h:23

◆ project()

CLHEP::Hep3Vector ALIPlane::project ( const CLHEP::Hep3Vector &  vec)

Definition at line 27 of file ALIPlane.cc.

References _normal, and amptDefault_cfi::proj.

Referenced by OptOCOPS::makeMeasurement().

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

Member Data Documentation

◆ _normal

CLHEP::Hep3Vector ALIPlane::_normal
private

Definition at line 27 of file ALIPlane.h.

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

◆ _point

CLHEP::Hep3Vector ALIPlane::_point
private

Definition at line 23 of file ALIPlane.h.

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