PandaRoot
genfit::DetPlane Class Reference

Detector plane. More...

#include <DetPlane.h>

Inheritance diagram for genfit::DetPlane:

Public Member Functions

 DetPlane (AbsFinitePlane *finite=nullptr)
 
 DetPlane (const TVector3 &o, const TVector3 &u, const TVector3 &v, AbsFinitePlane *finite=nullptr)
 
 DetPlane (const TVector3 &o, const TVector3 &n, AbsFinitePlane *finite=nullptr)
 
virtual ~DetPlane ()
 
 DetPlane (const DetPlane &)
 
DetPlaneoperator= (DetPlane)
 
void swap (DetPlane &other)
 
const TVector3 & getO () const
 
const TVector3 & getU () const
 
const TVector3 & getV () const
 
void set (const TVector3 &o, const TVector3 &u, const TVector3 &v)
 
void setO (const TVector3 &o)
 
void setO (double, double, double)
 
void setU (const TVector3 &u)
 
void setU (double, double, double)
 
void setV (const TVector3 &v)
 
void setV (double, double, double)
 
void setUV (const TVector3 &u, const TVector3 &v)
 
void setON (const TVector3 &o, const TVector3 &n)
 
void setFinitePlane (AbsFinitePlane *finite)
 
TVector3 getNormal () const
 
void setNormal (const TVector3 &n)
 
void setNormal (double, double, double)
 
void setNormal (const double &theta, const double &phi)
 
TVector2 project (const TVector3 &x) const
 projecting a direction onto the plane: More...
 
TVector2 LabToPlane (const TVector3 &x) const
 transform from Lab system into plane More...
 
TVector3 toLab (const TVector2 &x) const
 transform from plane coordinates to lab system More...
 
TVector3 dist (const TVector3 &point) const
 
TVector2 straightLineToPlane (const TVector3 &point, const TVector3 &dir) const
 gives u,v coordinates of the intersection point of a straight line with plane More...
 
void straightLineToPlane (const double &posX, const double &posY, const double &posZ, const double &dirX, const double &dirY, const double &dirZ, double &u, double &v) const
 gives u,v coordinates of the intersection point of a straight line with plane More...
 
void Print (const Option_t *="") const
 
double distance (const TVector3 &point) const
 absolute distance from a point to the plane More...
 
double distance (double, double, double) const
 
bool isInActive (const TVector3 &point, const TVector3 &dir) const
 intersect in the active area? C.f. AbsFinitePlane More...
 
bool isInActive (const double &posX, const double &posY, const double &posZ, const double &dirX, const double &dirY, const double &dirZ) const
 intersect in the active area? C.f. AbsFinitePlane More...
 
bool isInActive (double u, double v) const
 isInActive methods refer to finite plane. C.f. AbsFinitePlane More...
 
bool isInActive (const TVector2 &v) const
 isInActive methods refer to finite plane. C.f. AbsFinitePlane More...
 
bool isFinite () const
 
void rotate (double angle)
 rotate u and v around normal. Angle is in rad. More for debugging than for actual use. More...
 
void reset ()
 delete finitePlane_ and set O, U, V to default values More...
 

Friends

bool operator== (const DetPlane &lhs, const DetPlane &rhs)
 Checks equality of planes by comparing the 9 double values that define them. More...
 
bool operator!= (const DetPlane &lhs, const DetPlane &rhs)
 returns NOT == More...
 

Detailed Description

Detector plane.

A detector plane is the principle object to define coordinate systems for track fitting in genfit. Since a particle trajectory is a one-dimensional object (regardless of any specific parameterization) positions with respect to the track are always measured in a plane.

Which plane is chosen depends on the type of detector. Fixed plane detectors have their detector plane defined by their mechanical setup. While wire chambers or time projection chambers might want to define a detector plane more flexibly.

This class parameterizes a plane in terms of an origin vector o and two plane-spanning directions u and v.

Definition at line 60 of file DetPlane.h.

Constructor & Destructor Documentation

◆ DetPlane() [1/4]

genfit::DetPlane::DetPlane ( AbsFinitePlane finite = nullptr)

◆ DetPlane() [2/4]

genfit::DetPlane::DetPlane ( const TVector3 &  o,
const TVector3 &  u,
const TVector3 &  v,
AbsFinitePlane finite = nullptr 
)

◆ DetPlane() [3/4]

genfit::DetPlane::DetPlane ( const TVector3 &  o,
const TVector3 &  n,
AbsFinitePlane finite = nullptr 
)

◆ ~DetPlane()

virtual genfit::DetPlane::~DetPlane ( )
virtual

◆ DetPlane() [4/4]

genfit::DetPlane::DetPlane ( const DetPlane )

Member Function Documentation

◆ dist()

TVector3 genfit::DetPlane::dist ( const TVector3 &  point) const

Referenced by setFinitePlane().

◆ distance() [1/2]

double genfit::DetPlane::distance ( const TVector3 &  point) const

absolute distance from a point to the plane

Referenced by setFinitePlane().

◆ distance() [2/2]

double genfit::DetPlane::distance ( double  ,
double  ,
double   
) const

◆ getNormal()

TVector3 genfit::DetPlane::getNormal ( ) const

Referenced by setFinitePlane().

◆ getO()

const TVector3& genfit::DetPlane::getO ( ) const
inline

Definition at line 77 of file DetPlane.h.

77 { return o_; }

◆ getU()

const TVector3& genfit::DetPlane::getU ( ) const
inline

Definition at line 78 of file DetPlane.h.

78 { return u_; }

◆ getV()

const TVector3& genfit::DetPlane::getV ( ) const
inline

Definition at line 79 of file DetPlane.h.

References setO(), setON(), setU(), setUV(), setV(), and v.

79 { return v_; }

◆ isFinite()

bool genfit::DetPlane::isFinite ( ) const
inline

Definition at line 161 of file DetPlane.h.

References reset(), and rotate().

161 { return (finitePlane_.get() != nullptr); }

◆ isInActive() [1/4]

bool genfit::DetPlane::isInActive ( const TVector3 &  point,
const TVector3 &  dir 
) const
inline

intersect in the active area? C.f. AbsFinitePlane

Definition at line 133 of file DetPlane.h.

References straightLineToPlane().

Referenced by isInActive().

134  {
135  if (finitePlane_.get() == nullptr)
136  return true;
137  return this->isInActive(this->straightLineToPlane(point, dir));
138  }
bool isInActive(const TVector3 &point, const TVector3 &dir) const
intersect in the active area? C.f. AbsFinitePlane
Definition: DetPlane.h:133
TVector2 straightLineToPlane(const TVector3 &point, const TVector3 &dir) const
gives u,v coordinates of the intersection point of a straight line with plane

◆ isInActive() [2/4]

bool genfit::DetPlane::isInActive ( const double &  posX,
const double &  posY,
const double &  posZ,
const double &  dirX,
const double &  dirY,
const double &  dirZ 
) const
inline

intersect in the active area? C.f. AbsFinitePlane

Definition at line 141 of file DetPlane.h.

References isInActive(), straightLineToPlane(), and v.

142  {
143  if (finitePlane_.get() == nullptr)
144  return true;
145  double u, v;
146  this->straightLineToPlane(posX, posY, posZ, dirX, dirY, dirZ, u, v);
147  return this->isInActive(u, v);
148  }
__m128 v
Definition: P4_F32vec4.h:3
bool isInActive(const TVector3 &point, const TVector3 &dir) const
intersect in the active area? C.f. AbsFinitePlane
Definition: DetPlane.h:133
TVector2 straightLineToPlane(const TVector3 &point, const TVector3 &dir) const
gives u,v coordinates of the intersection point of a straight line with plane

◆ isInActive() [3/4]

bool genfit::DetPlane::isInActive ( double  u,
double  v 
) const
inline

isInActive methods refer to finite plane. C.f. AbsFinitePlane

Definition at line 151 of file DetPlane.h.

152  {
153  if (finitePlane_.get() == nullptr)
154  return true;
155  return finitePlane_->isInActive(u, v);
156  }
__m128 v
Definition: P4_F32vec4.h:3

◆ isInActive() [4/4]

bool genfit::DetPlane::isInActive ( const TVector2 &  v) const
inline

isInActive methods refer to finite plane. C.f. AbsFinitePlane

Definition at line 159 of file DetPlane.h.

References isInActive().

Referenced by isInActive().

159 { return isInActive(v.X(), v.Y()); }
__m128 v
Definition: P4_F32vec4.h:3
bool isInActive(const TVector3 &point, const TVector3 &dir) const
intersect in the active area? C.f. AbsFinitePlane
Definition: DetPlane.h:133

◆ LabToPlane()

TVector2 genfit::DetPlane::LabToPlane ( const TVector3 &  x) const

transform from Lab system into plane

Referenced by setFinitePlane().

◆ operator=()

DetPlane& genfit::DetPlane::operator= ( DetPlane  )

◆ Print()

void genfit::DetPlane::Print ( const Option_t *  = "") const

Referenced by setFinitePlane().

◆ project()

TVector2 genfit::DetPlane::project ( const TVector3 &  x) const

projecting a direction onto the plane:

Referenced by setFinitePlane().

◆ reset()

void genfit::DetPlane::reset ( )

delete finitePlane_ and set O, U, V to default values

Referenced by isFinite().

◆ rotate()

void genfit::DetPlane::rotate ( double  angle)

rotate u and v around normal. Angle is in rad. More for debugging than for actual use.

Referenced by isFinite().

◆ set()

void genfit::DetPlane::set ( const TVector3 &  o,
const TVector3 &  u,
const TVector3 &  v 
)

◆ setFinitePlane()

void genfit::DetPlane::setFinitePlane ( AbsFinitePlane finite)
inline

Optionally, set the finite plane definition. This is most important for avoiding fake intersection points in fitting of curlers. This should be implemented for silicon detectors most importantly.

Definition at line 95 of file DetPlane.h.

References dist(), distance(), getNormal(), LabToPlane(), operator!=, operator==, Print(), project(), setNormal(), straightLineToPlane(), and toLab().

95 { finitePlane_.reset(finite); }

◆ setNormal() [1/3]

void genfit::DetPlane::setNormal ( const TVector3 &  n)

Referenced by setFinitePlane().

◆ setNormal() [2/3]

void genfit::DetPlane::setNormal ( double  ,
double  ,
double   
)

◆ setNormal() [3/3]

void genfit::DetPlane::setNormal ( const double &  theta,
const double &  phi 
)

◆ setO() [1/2]

void genfit::DetPlane::setO ( const TVector3 &  o)

Referenced by getV().

◆ setO() [2/2]

void genfit::DetPlane::setO ( double  ,
double  ,
double   
)

◆ setON()

void genfit::DetPlane::setON ( const TVector3 &  o,
const TVector3 &  n 
)

Referenced by getV().

◆ setU() [1/2]

void genfit::DetPlane::setU ( const TVector3 &  u)

Referenced by getV().

◆ setU() [2/2]

void genfit::DetPlane::setU ( double  ,
double  ,
double   
)

◆ setUV()

void genfit::DetPlane::setUV ( const TVector3 &  u,
const TVector3 &  v 
)

Referenced by getV().

◆ setV() [1/2]

void genfit::DetPlane::setV ( const TVector3 &  v)

Referenced by getV().

◆ setV() [2/2]

void genfit::DetPlane::setV ( double  ,
double  ,
double   
)

◆ straightLineToPlane() [1/2]

TVector2 genfit::DetPlane::straightLineToPlane ( const TVector3 &  point,
const TVector3 &  dir 
) const

gives u,v coordinates of the intersection point of a straight line with plane

Referenced by isInActive(), and setFinitePlane().

◆ straightLineToPlane() [2/2]

void genfit::DetPlane::straightLineToPlane ( const double &  posX,
const double &  posY,
const double &  posZ,
const double &  dirX,
const double &  dirY,
const double &  dirZ,
double &  u,
double &  v 
) const

gives u,v coordinates of the intersection point of a straight line with plane

◆ swap()

void genfit::DetPlane::swap ( DetPlane other)

◆ toLab()

TVector3 genfit::DetPlane::toLab ( const TVector2 &  x) const

transform from plane coordinates to lab system

Referenced by setFinitePlane().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const DetPlane lhs,
const DetPlane rhs 
)
friend

returns NOT ==

Referenced by setFinitePlane().

◆ operator==

bool operator== ( const DetPlane lhs,
const DetPlane rhs 
)
friend

Checks equality of planes by comparing the 9 double values that define them.

Referenced by setFinitePlane().


The documentation for this class was generated from the following file: