31 #ifndef genfit_DetPlane_h
32 #define genfit_DetPlane_h
34 #include "AbsFinitePlane.h"
83 const TVector3& getO()
const {
return o_;}
84 const TVector3& getU()
const {
return u_;}
85 const TVector3& getV()
const {
return v_;}
88 void set(
const TVector3& o,
91 void setO(
const TVector3& o);
92 void setO(
double,
double,
double);
93 void setU(
const TVector3& u);
94 void setU(
double,
double,
double);
95 void setV(
const TVector3& v);
96 void setV(
double,
double,
double);
97 void setUV(
const TVector3& u,
const TVector3& v);
98 void setON(
const TVector3& o,
const TVector3& n);
106 TVector3 getNormal()
const;
107 void setNormal(
const TVector3& n);
108 void setNormal(
double,
double,
double);
109 void setNormal(
const double& theta,
const double& phi);
112 TVector2
project(
const TVector3& x)
const;
118 TVector3
toLab(
const TVector2& x)
const;
121 TVector3 dist(
const TVector3& point)
const;
128 const double& dirX,
const double& dirY,
const double& dirZ,
129 double& u,
double& v)
const;
131 void Print(
const Option_t* =
"")
const;
139 double distance(
const TVector3& point)
const;
140 double distance(
double,
double,
double)
const;
144 bool isInActive(
const TVector3& point,
const TVector3& dir)
const {
145 if(finitePlane_.get() ==
nullptr)
return true;
150 bool isInActive(
const double& posX,
const double& posY,
const double& posZ,
151 const double& dirX,
const double& dirY,
const double& dirZ)
const {
152 if(finitePlane_.get() ==
nullptr)
return true;
160 if(finitePlane_.get() ==
nullptr)
return true;
161 return finitePlane_->isInActive(u,v);
169 bool isFinite()
const {
170 return (finitePlane_.get() !=
nullptr);
174 void rotate(
double angle);
188 std::unique_ptr<AbsFinitePlane> finitePlane_;
Abstract base class for finite detector planes.
bool isInActive(const TVector2 &v) const
isInActive methods refer to finite plane. C.f. AbsFinitePlane
void rotate(double angle)
rotate u and v around normal. Angle is in rad. More for debugging than for actual use.
TVector2 project(const TVector3 &x) const
projecting a direction onto the plane:
TVector3 toLab(const TVector2 &x) const
transform from plane coordinates to lab system
bool isInActive(const TVector3 &point, const TVector3 &dir) const
intersect in the active area? C.f. AbsFinitePlane
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
bool isInActive(double u, double v) const
isInActive methods refer to finite plane. C.f. AbsFinitePlane
TVector2 LabToPlane(const TVector3 &x) const
transform from Lab system into plane
friend bool operator==(const DetPlane &lhs, const DetPlane &rhs)
Checks equality of planes by comparing the 9 double values that define them.
void reset()
delete finitePlane_ and set O, U, V to default values
double distance(const TVector3 &point) const
absolute distance from a point to the plane
TVector2 straightLineToPlane(const TVector3 &point, const TVector3 &dir) const
gives u,v coordinates of the intersection point of a straight line with plane
friend bool operator!=(const DetPlane &lhs, const DetPlane &rhs)
returns NOT ==
void sane()
ensures orthonormal coordinates
void setFinitePlane(AbsFinitePlane *finite)
Optionally, set the finite plane definition.
Defines for I/O streams used for error and debug printing.