CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcGeomSvc::AdjCandiTgtLine2D Struct Reference

forms a line in x-y space, ax + by + c = 0 More...

#include <MdcGeomSvc.h>

Public Member Functions

 AdjCandiTgtLine2D ()
 
CLHEP::Hep2Vector direction ()
 get direction vector of a line. garanteed to be outwards
 
double angleWithR ()
 returns the cosine of angle of the line with R at its location (x0,y0). note that location is the mid point of two wires at selected plane.
 
CLHEP::Hep2Vector location ()
 
HepPoint3D location3 ()
 
bool isLocationValid ()
 

Public Attributes

double a
 
double b
 
double c
 
double x0
 
double y0
 
double z0
 
double angle2D
 
double angle3D
 

Static Public Attributes

static const double INFTY =1./0
 

Detailed Description

forms a line in x-y space, ax + by + c = 0

Definition at line 58 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

Constructor & Destructor Documentation

◆ AdjCandiTgtLine2D()

Member Function Documentation

◆ angleWithR()

double MdcGeomSvc::AdjCandiTgtLine2D::angleWithR ( )
inline

returns the cosine of angle of the line with R at its location (x0,y0). note that location is the mid point of two wires at selected plane.

Returns
double

Definition at line 79 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

79 {
80 CLHEP::Hep2Vector directionR(x0,y0);
81 CLHEP::Hep2Vector dirRRot90(-y0,x0);
82 CLHEP::Hep2Vector dirL=direction();
83 int sgn=dirRRot90.dot(dirL)>0; // bad-optimized code for telling rotate L-R.
84 return sgn*directionR.angle(dirL);
85 }
CLHEP::Hep2Vector direction()
get direction vector of a line. garanteed to be outwards

◆ direction()

CLHEP::Hep2Vector MdcGeomSvc::AdjCandiTgtLine2D::direction ( )
inline

get direction vector of a line. garanteed to be outwards

Definition at line 68 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

68 {
69 CLHEP::Hep2Vector ret(b,-a);
70 if (ret.dot(location())<0)
71 ret=-ret;
72 return ret;
73 }

Referenced by angleWithR().

◆ isLocationValid()

bool MdcGeomSvc::AdjCandiTgtLine2D::isLocationValid ( )
inline

Definition at line 95 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

95 {
96 return x0<99999 && x0>-99999;
97 }

◆ location()

CLHEP::Hep2Vector MdcGeomSvc::AdjCandiTgtLine2D::location ( )
inline

Definition at line 87 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

87 {
88 CLHEP::Hep2Vector ret(x0,y0);
89 return ret;
90 }

Referenced by direction().

◆ location3()

HepPoint3D MdcGeomSvc::AdjCandiTgtLine2D::location3 ( )
inline

Definition at line 91 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

91 {
92 HepPoint3D ret(x0,y0,z0);
93 return ret;
94 }

Member Data Documentation

◆ a

double MdcGeomSvc::AdjCandiTgtLine2D::a

◆ angle2D

double MdcGeomSvc::AdjCandiTgtLine2D::angle2D

Definition at line 62 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

◆ angle3D

double MdcGeomSvc::AdjCandiTgtLine2D::angle3D

Definition at line 63 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

◆ b

double MdcGeomSvc::AdjCandiTgtLine2D::b

◆ c

double MdcGeomSvc::AdjCandiTgtLine2D::c

◆ INFTY

const double MdcGeomSvc::AdjCandiTgtLine2D::INFTY =1./0
static

Definition at line 59 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

◆ x0

double MdcGeomSvc::AdjCandiTgtLine2D::x0

◆ y0

double MdcGeomSvc::AdjCandiTgtLine2D::y0

Definition at line 61 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

Referenced by angleWithR(), location(), and location3().

◆ z0

double MdcGeomSvc::AdjCandiTgtLine2D::z0

Definition at line 61 of file MdcGeomSvc-00-01-42/MdcGeomSvc/MdcGeomSvc.h.

Referenced by location3().


The documentation for this struct was generated from the following files: