 |
ATLAS Offline Software
|
Go to the documentation of this file.
22 #include "Identifier/Identifier.h"
24 #include "GaudiKernel/MsgStream.h"
45 , m_bounds(psf.m_bounds)
62 curvilinearRotation.col(0) = curvUVT.
curvU();
63 curvilinearRotation.col(1) = curvUVT.
curvV();
64 curvilinearRotation.col(2) = curvUVT.
curvT();
127 std::shared_ptr<const Trk::SurfaceBounds> tbounds)
128 :
Trk::
Surface(htrans), m_bounds(std::move(tbounds)) {}
151 return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
163 return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
178 return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
191 return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
212 Amg::Vector3D loc3Dframe = inverseTransformMultHelper(glopos);
214 return (loc3Dframe.z() * loc3Dframe.z() <=
215 s_onSurfaceTolerance * s_onSurfaceTolerance);
225 double u = (normal().dot((center() -
pos))) / (
denom);
228 bool isValid = forceDir ? (
u > 0.) :
true;
244 double norm = 1. / std::sqrt(scYZ.
cs * scYZ.
cs * scXZ.
sn * scXZ.
sn + scYZ.
sn * scYZ.
sn);
247 double sign = (scXZ.
sn < 0.) ? -1. : 1.;
267 double tol1,
double tol2)
const
269 Amg::Vector3D loc3Dframe = inverseTransformMultHelper(glopo);
270 if (std::abs(loc3Dframe(2)) > (s_onSurfaceTolerance + tol1)){
273 return (bchk ? bounds().
inside(
Amg::Vector2D(loc3Dframe(0), loc3Dframe(1)), tol1, tol2) :
true);
280 static const double tol = 0.001;
284 const double d = (
pos - center()).
dot(
N);
286 const double A =
dir.dot(
N);
288 if (std::abs(
d) < tol) {
289 return {1, 0.,
true, 0.};
291 return {0,
d,
true, 0.};
295 return {1,
d,
true, -
d /
A};
302 double Az[3] = { T(0, 2), T(1, 2), T(2, 2) };
306 double dx =
pos[0] - T(0, 3);
307 double dy =
pos[1] - T(1, 3);
308 double dz =
pos[2] - T(2, 3);
309 double z =
dx * Az[0] +
dy * Az[1] + dz * Az[2];
310 double az =
dir[0] * Az[0] +
dir[1] * Az[1] +
dir[2] * Az[2];
320 double dist = std::abs(
z);
322 return {
ns, std::abs(
z),
true,
s};
326 double x =
dx * T(0, 0) +
dy * T(1, 0) + dz * T(2, 0);
327 double y =
dx * T(0, 1) +
dy * T(1, 1) + dz * T(2, 1);
331 double d = bounds().minDistance(lp);
333 dist = std::sqrt(dist * dist +
d *
d);
335 return {
ns, dist,
true,
s};
virtual bool operator==(const Surface &sf) const override
Equality operator.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
void localToGlobalDirection(const Trk::LocalDirection &locdir, Amg::Vector3D &globdir) const
This method transforms a local direction wrt the plane to a global direction.
@ z
global position (cartesian)
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
Eigen::Matrix< double, 2, 1 > Vector2D
Helper to simultaneously calculate sin and cos of the same angle.
std::unique_ptr< ParametersBase< 5, Trk::Neutral > > NeutralTrackParametersUniquePtr
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
bool const RAWDATA *ch2 const
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance evaluation to Surface
@ u
Enums for curvilinear frames.
PlaneSurface()
Default Constructor - needed for persistency.
double angleYZ() const
access method for angle of local YZ projection
AmgSymMatrix(5) &GXFTrackState
std::unique_ptr< Transforms > m_transforms
Unique Pointer to the Transforms struct.
const Amg::Vector3D & curvT() const
static const NoBounds s_boundless
const Amg::Vector3D & curvU() const
Access methods.
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
represents the three-dimensional global direction with respect to a planar surface frame.
def dot(G, fn, nodesToHighlight=[])
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
Ensure that the ATLAS eigen extensions are properly loaded.
virtual Surface::ChargedTrackParametersUniquePtr createUniqueTrackParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - charged.
double charge(const T &p)
Eigen::Matrix< double, 3, 1 > Vector3D
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir, Trk::BoundaryCheck bchk) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(double l1, double l2, double phi, double theta, double oop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - neutral.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
const Amg::Vector3D & curvV() const
Eigen::Translation< double, 3 > Translation3D
Helper to simultaneously calculate sin and cos of the same angle.
double angleXZ() const
access method for angle of local XZ projection
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.