CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
HepLine3D Class Reference

#include <Line3D.h>

Public Member Functions

double dist (const HepGeom::Point3D< double > &q) const
 
double dist2 (const HepGeom::Point3D< double > &q) const
 
 HepLine3D (const HepGeom::Point3D< double > &p, const HepGeom::Vector3D< double > &v, double sml=1.e-10)
 
 HepLine3D (const HepGeom::Point3D< double > &p1, const HepGeom::Point3D< double > &p2, double sml=1.e-10)
 
 HepLine3D (const HepLine3D &line)
 
bool operator!= (const HepLine3D &l) const
 
HepLine3Doperator= (const HepLine3D &line)
 
bool operator== (const HepLine3D &l) const
 
HepGeom::Point3D< double > point (const HepGeom::Plane3D< double > &pl, bool &parallel) const
 
HepGeom::Point3D< double > point (const HepGeom::Point3D< double > &q) const
 
const HepGeom::Point3D< double > & pt () const
 
const HepGeom::Vector3D< double > & uv () const
 
 ~HepLine3D ()
 

Protected Attributes

double eps
 
HepGeom::Point3D< double > pp
 
HepGeom::Vector3D< double > uu
 

Detailed Description

Definition at line 15 of file Line3D.h.

Constructor & Destructor Documentation

◆ HepLine3D() [1/3]

HepLine3D::HepLine3D ( const HepGeom::Point3D< double > &  p,
const HepGeom::Vector3D< double > &  v,
double  sml = 1.e-10 
)
inline

Definition at line 22 of file Line3D.h.

23  : pp(p), uu(v * (v.mag() > 1.e-10 ? 1. / v.mag() : 1)), eps(fabs(sml)) {}

◆ HepLine3D() [2/3]

HepLine3D::HepLine3D ( const HepGeom::Point3D< double > &  p1,
const HepGeom::Point3D< double > &  p2,
double  sml = 1.e-10 
)
inline

Definition at line 25 of file Line3D.h.

26  : pp(p1), uu((p2 - p1) * ((p2 - p1).mag() > 1.e-10 ? 1. / (p2 - p1).mag() : 1)), eps(fabs(sml)) {}

◆ HepLine3D() [3/3]

HepLine3D::HepLine3D ( const HepLine3D line)
inline

Definition at line 29 of file Line3D.h.

29 : pp(line.pp), uu(line.uu), eps(line.eps) {}

◆ ~HepLine3D()

HepLine3D::~HepLine3D ( )
inline

Definition at line 32 of file Line3D.h.

32 {};

Member Function Documentation

◆ dist()

double HepLine3D::dist ( const HepGeom::Point3D< double > &  q) const
inline

Definition at line 66 of file Line3D.h.

66 { return (q - point(q)).mag(); }

References point(), and submitPVResolutionJobs::q.

◆ dist2()

double HepLine3D::dist2 ( const HepGeom::Point3D< double > &  q) const
inline

Definition at line 65 of file Line3D.h.

65 { return (q - point(q)).mag2(); }

References point(), and submitPVResolutionJobs::q.

◆ operator!=()

bool HepLine3D::operator!= ( const HepLine3D l) const
inline

Definition at line 46 of file Line3D.h.

46 { return pp != l.pp || uu != l.uu; }

References cmsLHEtoEOSManager::l, pp, and uu.

◆ operator=()

HepLine3D& HepLine3D::operator= ( const HepLine3D line)
inline

Definition at line 35 of file Line3D.h.

35  {
36  pp = line.pp;
37  uu = line.uu;
38  eps = line.eps;
39  return *this;
40  }

References eps, mps_splice::line, pp, and uu.

◆ operator==()

bool HepLine3D::operator== ( const HepLine3D l) const
inline

Definition at line 43 of file Line3D.h.

43 { return pp == l.pp && uu == l.uu; }

References cmsLHEtoEOSManager::l, pp, and uu.

◆ point() [1/2]

HepGeom::Point3D<double> HepLine3D::point ( const HepGeom::Plane3D< double > &  pl,
bool &  parallel 
) const
inline

Definition at line 52 of file Line3D.h.

52  {
53  const double num(-pl.d() - pl.a() * pp.x() - pl.b() * pp.y() - pl.c() * pp.z());
54  const double den(pl.a() * uu.x() + pl.b() * uu.y() + pl.c() * uu.z());
55 
56  parallel = (eps > fabs(num)) || (eps > fabs(den));
57 
58  return (parallel ? pp : HepGeom::Point3D<double>(pp + uu * (num / den)));
59  }

References eps, EgammaValidation_cff::num, pp, and uu.

Referenced by CaloCellCrossing::CaloCellCrossing(), dist(), and dist2().

◆ point() [2/2]

HepGeom::Point3D<double> HepLine3D::point ( const HepGeom::Point3D< double > &  q) const
inline

Definition at line 61 of file Line3D.h.

61  {
62  return (pp + ((q.x() - pp.x()) * uu.x() + (q.y() - pp.y()) * uu.y() + (q.z() - pp.z()) * uu.z()) * uu);
63  }

References pp, submitPVResolutionJobs::q, and uu.

◆ pt()

const HepGeom::Point3D<double>& HepLine3D::pt ( ) const
inline

◆ uv()

const HepGeom::Vector3D<double>& HepLine3D::uv ( ) const
inline

Definition at line 50 of file Line3D.h.

50 { return uu; }

References uu.

Member Data Documentation

◆ eps

double HepLine3D::eps
protected

Definition at line 19 of file Line3D.h.

Referenced by operator=(), and point().

◆ pp

HepGeom::Point3D<double> HepLine3D::pp
protected

Definition at line 17 of file Line3D.h.

Referenced by operator!=(), operator=(), operator==(), point(), and pt().

◆ uu

HepGeom::Vector3D<double> HepLine3D::uu
protected

Definition at line 18 of file Line3D.h.

Referenced by operator!=(), operator=(), operator==(), point(), and uv().

AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
findQualityFiles.v
v
Definition: findQualityFiles.py:179
HepLine3D::pp
HepGeom::Point3D< double > pp
Definition: Line3D.h:17
p2
double p2[4]
Definition: TauolaWrapper.h:90
HepLine3D::eps
double eps
Definition: Line3D.h:19
HepLine3D::uu
HepGeom::Vector3D< double > uu
Definition: Line3D.h:18
p1
double p1[4]
Definition: TauolaWrapper.h:89
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
HepLine3D::point
HepGeom::Point3D< double > point(const HepGeom::Plane3D< double > &pl, bool &parallel) const
Definition: Line3D.h:52
mps_splice.line
line
Definition: mps_splice.py:76
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37