5#ifndef TRKSURFACES_ANNULUSBOUNDSPC_H
6#define TRKSURFACES_ANNULUSBOUNDSPC_H
16#ifdef TRKDETDESCR_USEFLOATPRECISON
33 using Transform2D = Eigen::Transform<double, 2, Eigen::Affine>;
127 double r()
const override;
153 MsgStream&
dump(MsgStream& sl)
const override;
154 std::ostream&
dump(std::ostream& sl)
const override;
167 std::array<std::pair<double, double>, 4>
corners()
const;
205 const Eigen::Matrix<double, 2, 2>& weight) ;
double phiMax() const
Returns the left angular edge of the module.
static double squaredNorm(const Amg::Vector2D &v, const Eigen::Matrix< double, 2, 2 > &weight)
Eigen::Matrix< double, 2, 2 > Matrix2D
Amg::Vector2D m_outLeftModulePC
Amg::Vector2D stripXYToModulePC(const Amg::Vector2D &vStripXY) const
Amg::Vector2D m_inRightStripPC
AnnulusBoundsPC & operator=(const AnnulusBoundsPC &sbo)=default
Assignment operator.
Transform2D m_rotationStripPC
Amg::Vector2D m_outRightStripPC
AnnulusBoundsPC(AnnulusBoundsPC &&annbo)=default
Move constructor.
Eigen::Transform< double, 2, Eigen::Affine > Transform2D
bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const override final
Returns if a point in local coordinates is inside the bounds.
Amg::Vector2D m_outLeftStripPC
SurfaceBounds::BoundsType type() const override
Return the bounds type - for persistency optimization.
double rMin() const
Returns inner radial bounds (module system)
AnnulusBoundsPC & operator=(AnnulusBoundsPC &&sbo)=default
Move assignment.
Amg::Vector2D m_inRightModulePC
Amg::Vector2D m_inLeftStripPC
static std::pair< AnnulusBoundsPC, double > fromCartesian(const AnnulusBounds &annbo)
Static factory method to produce an instance of this class from the cartesian implementation.
double phiMin() const
Returns the right angular edge of the module.
Amg::Vector2D m_inRightStripXY
bool operator==(const SurfaceBounds &sb) const override
Equality operator.
Amg::Vector2D m_outRightModulePC
Eigen::Rotation2D< double > Rotation2D
Amg::Vector2D m_inLeftModulePC
Amg::Vector2D m_inLeftStripXY
AnnulusBoundsPC(double minR, double maxR, double phiMin, double phiMax, Amg::Vector2D moduleOrigin={0, 0}, double phiAvg=0)
Default constructor from parameters.
std::vector< TDD_real_t > m_boundValues
Amg::Vector2D m_outRightStripXY
AnnulusBoundsPC(const AnnulusBoundsPC &annbo)=default
Copy constructor.
Amg::Vector2D moduleOrigin() const
Returns moduleOrigin, but rotated out, so avgPhi is already considered.
virtual AnnulusBoundsPC * clone() const override
clone() method to make deep copy in Surface copy constructor and for assigment operator of the Surfac...
bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
Check if local point is inside of phi bounds.
double r() const override
Returns middle radius.
std::array< std::pair< double, double >, 4 > corners() const
Returns the four corners of the bounds.
double rMax() const
Returns outer radial bounds (module system)
Amg::Vector2D m_moduleOrigin
double minDistance(const Amg::Vector2D &locpo) const override final
Return minimum distance a point is away from the bounds.
static Amg::Vector2D closestOnSegment(const Amg::Vector2D &a, const Amg::Vector2D &b, const Amg::Vector2D &p, const Eigen::Matrix< double, 2, 2 > &weight)
Transform2D m_translation
bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
Check if local point is inside of r bounds.
Amg::Vector2D m_outLeftStripXY
Bounds for a annulus-like, planar Surface.
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
SurfaceBounds()=default
Default Constructor.
BoundsType
This enumerator simplifies the persistency, by saving a dynamic_cast to happen.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 2, 1 > Vector2D
Ensure that the ATLAS eigen extensions are properly loaded.