10#include <framework/geometry/VectorUtil.h>
11#include <Math/Vector2D.h>
12#include <Math/Vector3D.h>
13#include <Math/VectorUtil.h>
41 WireLine(
const ROOT::Math::XYZVector& forward,
const ROOT::Math::XYZVector& backward,
double sagCoeff);
53 return ROOT::Math::XYZVector(tmp.X(), tmp.Y(), z);
64 return ROOT::Math::XYZVector(tmp.X(), tmp.Y(), z);
74 pos2D.SetY(pos2D.Y() + sagY);
89 movePerZ.SetY(movePerZ.Y() + sagDYDZ);
102 const ROOT::Math::XYZVector& wirePos3D =
sagPos3DAtZ(pos3D.z());
103 const ROOT::Math::XYVector& tmp =
sagMovePerZ(pos3D.z());
104 const ROOT::Math::XYZVector movePerZ(tmp.X(), tmp.Y(), 1);
105 return ROOT::Math::VectorUtil::Perp((pos3D - wirePos3D), movePerZ);
116 ROOT::Math::XYZVector
sagClosest3D(
const ROOT::Math::XYZVector& point)
const
118 const ROOT::Math::XYZVector& wirePos3D =
sagPos3DAtZ(point.z());
119 const ROOT::Math::XYVector& tmp =
sagMovePerZ(point.z());
120 const ROOT::Math::XYZVector movePerZ(tmp.X(), tmp.Y(), 1);
121 return wirePos3D - ROOT::Math::VectorUtil::ProjVector((point - wirePos3D), movePerZ);
144 return ROOT::Math::XYZVector(tmp.X(), tmp.Y(),
deltaZ());
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
const ROOT::Math::XYVector & nominalMovePerZ() const
Gives the positional move in the xy projection per unit z.
double refX() const
Returns the the x coordinate of the reference point.
ROOT::Math::XYZVector wireVector() const
Getter for the vector from backward to the forward position.
ROOT::Math::XYZVector nominalPos3DAtZ(const double z) const
Gives the three dimensional position without wire sag effect of the line at the given z value.
double forwardPhiToRef() const
Gives the azimuth angle of the forward position relative to the reference position.
ROOT::Math::XYZVector backward3D() const
Gives the position of the backward point.
double m_backwardZ
Memory for the backward end z coordinate.
ROOT::Math::XYZVector m_refPos3D
Memory for the reference position.
double lambda() const
Returns the nominal lambda angle of the line.
double refCylindricalRSquared() const
Returns the cylindrical radius of the reference position.
double sagDistance(const ROOT::Math::XYZVector &pos3D) const
Calculates the distance of the given point to the wire with wire sag effect.
double backwardCylindricalR() const
Gives the cylindrical radius of the backward position.
ROOT::Math::XYVector sagPos2DAtZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
double backwardPhiToRef() const
Gives the azimuth angle of the backward position relative to the reference position.
WireLine()
Default constructor initialising to all members to zero.
double backwardZ() const
Gives the backward z coordinate.
ROOT::Math::XYZVector nominalPerigee3D() const
Returns the point of nominal closest approach to the z axes.
double forwardPhi() const
Gives the forward azimuth angle.
double refZ() const
Returns the the z coordinate of the reference point.
double backwardToForwardAngle() const
Gives the azimuth angle difference from backward to forward position.
ROOT::Math::XYZVector forward3D() const
Gives the position of the forward point.
double tanTheta() const
Returns the tangent of the opening angle between tangential vector and the z axes Also know as ds / d...
ROOT::Math::XYZVector sagPos3DAtZ(const double z) const
Gives the three dimensional position with wire sag effect of the line at the given z value.
double forwardZ() const
Gives the forward z coordinate.
double deltaZ() const
Returns the difference between forward and backward z.
double tanLambda() const
Returns the nominal tan lambda of the line. Also know as dz / ds.
ROOT::Math::XYVector sagMovePerZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
ROOT::Math::XYVector forward2D() const
Gives the xy position of the forward point.
ROOT::Math::XYVector nominalPos2DAtZ(const double z) const
Gives the two dimensional position without wire sag effect of the line at the given z value.
double nominalPerigeeZ() const
Returns the z coordinate of the point of nominal closest approach to the z axes.
double forwardCylindricalR() const
Gives the cylindrical radius of the forward position.
WireLine movedBy(const ROOT::Math::XYZVector &offset) const
Returns a copy of the wire line moved by a three dimensional offset.
double outOfZBoundsFactor(double z) const
Returns the amount how much the given z position is outside the bounds in units of the wire length.
double sagCoeff() const
Returns the wire sag coefficient due to gravity.
ROOT::Math::XYZVector nominalClosest3D(const ROOT::Math::XYZVector &point) const
Returns the closest approach on the wire without wire sag effect to the give point.
ROOT::Math::XYVector m_refPos2D
Memory for the 2D reference position (to avoid [-Wreturn-stack-address] in refPos2D())
const ROOT::Math::XYVector & refPos2D() const
Returns the xy vector of the reference position.
ROOT::Math::XYVector m_nominalMovePerZ
Memory for the nominal movement of the xy position per z unit off the reference.
double m_forwardZ
Memory for the forward end z coordinate.
const ROOT::Math::XYZVector & refPos3D() const
Returns the reference position.
double nominalDistance(const ROOT::Math::XYZVector &pos3D) const
Calculates the distance of the given point to the wire without wire sag effect.
double refY() const
Returns the the y coordinate of the reference point.
ROOT::Math::XYZVector sagClosest3D(const ROOT::Math::XYZVector &point) const
Returns the closest approach on the wire with wire sag effect to the give point.
double m_sagCoeff
Memory for the wire sag coefficient.
ROOT::Math::XYVector backward2D() const
Gives the xy position of the backward point.
double theta() const
Returns the nominal opening angle between tangential vector and the z axes.
double backwardPhi() const
Gives the backward azimuth angle.
ROOT::Math::XYVector nominalPerigee2D() const
Returns the point of nominal closest approach to the z axes.
Abstract base class for different kinds of events.