|
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();
157 return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
169 return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
184 return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
197 return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
216 Amg::Vector3D loc3Dframe = inverseTransformMultHelper(glopos);
218 return (loc3Dframe.z() * loc3Dframe.z() <=
219 s_onSurfaceTolerance * s_onSurfaceTolerance);
229 double u = (normal().dot((center() -
pos))) / (
denom);
232 bool isValid = forceDir ? (
u > 0.) :
true;
248 double norm = 1. / std::sqrt(scYZ.
cs * scYZ.
cs * scXZ.
sn * scXZ.
sn + scYZ.
sn * scYZ.
sn);
251 double sign = (scXZ.
sn < 0.) ? -1. : 1.;
270 double tol1,
double tol2)
const
272 Amg::Vector3D loc3Dframe = inverseTransformMultHelper(glopo);
273 if (std::abs(loc3Dframe(2)) > (s_onSurfaceTolerance + tol1)){
276 return (bchk ? bounds().
inside(
Amg::Vector2D(loc3Dframe(0), loc3Dframe(1)), tol1, tol2) :
true);
283 static const double tol = 0.001;
287 const double d = (
pos - center()).
dot(
N);
289 const double A =
dir.dot(
N);
291 if (std::abs(
d) < tol) {
292 return {1, 0.,
true, 0.};
294 return {0,
d,
true, 0.};
298 return {1,
d,
true, -
d /
A};
305 double Az[3] = { T(0, 2), T(1, 2), T(2, 2) };
309 double dx =
pos[0] - T(0, 3);
310 double dy =
pos[1] - T(1, 3);
311 double dz =
pos[2] - T(2, 3);
312 double z =
dx * Az[0] +
dy * Az[1] + dz * Az[2];
313 double az =
dir[0] * Az[0] +
dir[1] * Az[1] +
dir[2] * Az[2];
323 double dist = std::abs(
z);
325 return {
ns, std::abs(
z),
true,
s};
329 double x =
dx * T(0, 0) +
dy * T(1, 0) + dz * T(2, 0);
330 double y =
dx * T(0, 1) +
dy * T(1, 1) + dz * T(2, 1);
334 double d = bounds().minDistance(lp);
336 dist = std::sqrt(dist * dist +
d *
d);
338 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
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
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=[])
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...
std::shared_ptr< T > SharedObject
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.
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...
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.