CMS 3D CMS Logo

Public Member Functions | Private Attributes

ALIPlane Class Reference

#include <ALIPlane.h>

List of all members.

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().

: _point(point)
{
  _normal = normal * (1. / normal.mag());
  if (ALIUtils::debug >= 5) {
    ALIUtils::dump3v( _point, " Created ALIplane: point");
    ALIUtils::dump3v( _normal, " Created ALIPlane: normal");
  }
}

Member Function Documentation

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

Definition at line 46 of file ALIPlane.cc.

References _normal, _point, and trackerHitRTTI::proj.

{
  //---------- Project vec on normal to plane 
  ALIdouble proj = vec.dot(_normal) * (1. / vec.mag() );
  //---------- Substract this projection to vec
  CLHEP::Hep3Vector vecproj = vec - (proj * _normal);
  //-  ALIUtils::dump3v( _normal, "plane _normal");
  //- std::cout << " proj on normal " << proj << std::endl;
  //- ALIUtils::dump3v( vec , "std::vector");
  return ALILine( this->_point, vecproj );
}
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().

{return _normal;};
const CLHEP::Hep3Vector& ALIPlane::point ( ) const [inline]

Definition at line 23 of file ALIPlane.h.

References _point.

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

{return _point;};
CLHEP::Hep3Vector ALIPlane::project ( const CLHEP::Hep3Vector &  vec)

Definition at line 30 of file ALIPlane.cc.

References _normal, and trackerHitRTTI::proj.

Referenced by OptOCOPS::makeMeasurement().

{
  //---------- Project vec on normal to plane 
  ALIdouble proj = vec.dot(_normal) * (1. / vec.mag() );
  //---------- Substract this projection to vec
  CLHEP::Hep3Vector vecproj = vec - (proj * _normal);
  //-  ALIUtils::dump3v( _normal, "plane _normal");
  //- std::cout << " proj on normal " << proj << std::endl;
  //- ALIUtils::dump3v( vec , "std::vector");
  return vecproj;
}

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().