From e030d07779d4426ee69be5ecf8cffbf77d2c0496 Mon Sep 17 00:00:00 2001 From: Andreas Salzburger <Andreas.Salzburger@cern.ch> Date: Sun, 16 Oct 2016 22:21:31 +0200 Subject: [PATCH] doxygen fixes in Surfaces --- Core/include/ACTS/Surfaces/ConeBounds.hpp | 46 ++++++++++-- Core/include/ACTS/Surfaces/ConeSurface.hpp | 31 +++++++- Core/include/ACTS/Surfaces/CylinderBounds.hpp | 50 ++++++++++--- .../include/ACTS/Surfaces/CylinderSurface.hpp | 35 ++++++++- Core/include/ACTS/Surfaces/DiamondBounds.hpp | 27 ++++++- Core/include/ACTS/Surfaces/DiscBounds.hpp | 4 + Core/include/ACTS/Surfaces/DiscSurface.hpp | 65 ++++++++++++++-- .../ACTS/Surfaces/DiscTrapezoidalBounds.hpp | 2 +- Core/include/ACTS/Surfaces/EllipseBounds.hpp | 42 +++++++++-- Core/include/ACTS/Surfaces/InfiniteBounds.hpp | 14 +++- Core/include/ACTS/Surfaces/LineBounds.hpp | 60 +++++++++++++-- Core/include/ACTS/Surfaces/LineSurface.hpp | 53 +++++++++++-- Core/include/ACTS/Surfaces/PerigeeSurface.hpp | 17 ++++- Core/include/ACTS/Surfaces/PlanarBounds.hpp | 4 + Core/include/ACTS/Surfaces/PlaneSurface.hpp | 46 ++++++++++-- Core/include/ACTS/Surfaces/RadialBounds.hpp | 49 +++++++++--- .../ACTS/Surfaces/RealQuadraticEquation.hpp | 8 +- .../include/ACTS/Surfaces/RectangleBounds.hpp | 47 ++++++++++-- Core/include/ACTS/Surfaces/StrawSurface.hpp | 17 ++++- Core/include/ACTS/Surfaces/Surface.hpp | 57 +++++++++++--- Core/include/ACTS/Surfaces/SurfaceBounds.hpp | 42 +++++++++-- .../include/ACTS/Surfaces/TrapezoidBounds.hpp | 75 +++++++++++++++---- Core/include/ACTS/Surfaces/TriangleBounds.hpp | 37 +++++++-- Core/src/Surfaces/ConeBounds.cpp | 2 +- Core/src/Surfaces/CylinderBounds.cpp | 2 +- Core/src/Surfaces/DiamondBounds.cpp | 2 +- Core/src/Surfaces/DiscTrapezoidalBounds.cpp | 2 +- Core/src/Surfaces/EllipseBounds.cpp | 2 +- Core/src/Surfaces/LineBounds.cpp | 2 +- Core/src/Surfaces/RadialBounds.cpp | 2 +- Core/src/Surfaces/RectangleBounds.cpp | 2 +- Core/src/Surfaces/TrapezoidBounds.cpp | 2 +- Core/src/Surfaces/TriangleBounds.cpp | 2 +- 33 files changed, 711 insertions(+), 137 deletions(-) diff --git a/Core/include/ACTS/Surfaces/ConeBounds.hpp b/Core/include/ACTS/Surfaces/ConeBounds.hpp index 4630e7d76..8692b6660 100644 --- a/Core/include/ACTS/Surfaces/ConeBounds.hpp +++ b/Core/include/ACTS/Surfaces/ConeBounds.hpp @@ -49,19 +49,21 @@ public: /// Constructor - open cone with alpha, by default a full cone /// but optionally can make a conical section + /// /// @param alpha is the opening angle of the cone /// @param symm is the boolean indicating if the cone is symmetric in +/- z /// @param halfphi is the half opening angle (default is pi) - /// @param alpha is angle of the local 3D x axis (default is 0) + /// @param avphi is the phi value around which the bounds are opened (default=0) ConeBounds(double alpha, bool symm, double halfphi = M_PI, double avphi = 0.); /// Constructor - open cone with alpha, minz and maxz, by /// default a full cone but can optionally make it a conical section + /// /// @param alpha is the opening angle of the cone /// @param zmin cone expanding from minimal z /// @param zmax cone expanding to maximal z /// @param halfphi is the half opening angle (default is pi) - /// @param alpha is angle of the local 3D x axis (default is 0) + /// @param avphi is the phi value around which the bounds are opened (default=0) ConeBounds(double alpha, double zmin, double zmax, @@ -69,6 +71,7 @@ public: double avphi = 0.); /// Copy Constructor + /// /// @param cobo is the source bounds for the assignment ConeBounds(const ConeBounds& cobo) : SurfaceBounds(cobo) @@ -82,7 +85,7 @@ public: virtual ~ConeBounds(); /// Assignment operator - /// @param cylbo is the source bounds for the assignment + /// @param cobo is the source bounds for the assignment ConeBounds& operator=(const ConeBounds& cobo); @@ -97,23 +100,46 @@ public: return SurfaceBounds::Cone; } - /// @copydoc SurfaceBounds::inside + /// inside method for local position + /// + /// @param lpos is the local position to be checked + /// @param bchk is the boundary check directive + /// + /// @return is a boolean indicating if the position is inside virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk = true) const override; - /// @copydoc SurfaceBounds::insideLoc0 + /// Inside method for the first local parameter + /// + /// @param lpos is the local position to be checked + /// @param tol0 is the absolute tolerance on the first parameter + /// + /// @return is a boolean indicating if the position is insideLoc0 virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; - /// @copydoc SurfaceBounds::insideLoc1 + /// Inside method for the second local parameter + /// + /// @param lpos is the local position to be checked + /// @param tol1 is the absolute tolerance on the first parameter + /// + /// @return is a boolean indicating if the position is insideLoc1 virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// @copydoc SurfaceBounds::minDistance + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& gpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// Return the radius at a specific z values + /// + /// @param is the z value for which r is requested + /// + /// @return is the r value associated with z double r(double z) const; @@ -154,6 +180,10 @@ public: halfPhiSector() const; /// Output Method for std::ostream + /// + /// @param sl is the ostrea into which the dump is done + /// + /// @return is the input obect virtual std::ostream& dump(std::ostream& sl) const override; diff --git a/Core/include/ACTS/Surfaces/ConeSurface.hpp b/Core/include/ACTS/Surfaces/ConeSurface.hpp index dff876ee8..a43a06e7c 100644 --- a/Core/include/ACTS/Surfaces/ConeSurface.hpp +++ b/Core/include/ACTS/Surfaces/ConeSurface.hpp @@ -38,6 +38,7 @@ public: ConeSurface() = delete; /// Constructor form HepTransform and an opening angle + /// /// @param htrans is the transform to place to cone in a 3D frame /// @param alpha is the opening angle of the cone /// @param symmetric indicates if the cones are built to +/1 z @@ -46,6 +47,7 @@ public: bool symmetric = false); /// Constructor form HepTransform and an opening angle + /// /// @param htrans is the transform that places the cone in the global frame /// @param alpha is the opening angle of the cone /// @param locZmin is the z range over which the cone spans @@ -58,16 +60,19 @@ public: double halfPhi = M_PI); /// Constructor from HepTransform and ConeBounds + /// /// @param htrans is the transform that places the cone in the global frame /// @param cbounds is the boundary class, the bounds must exit ConeSurface(std::shared_ptr<Transform3D> htrans, std::shared_ptr<const ConeBounds> cbounds); /// Copy constructor + /// /// @param csf is the source cone surface ConeSurface(const ConeSurface& csf); /// Copy constructor - with shift + /// /// @param csf is the source cone surface /// @param htrans is the additional transfrom applied after copying ConeSurface(const ConeSurface& csf, const Transform3D& htrans); @@ -76,18 +81,22 @@ public: virtual ~ConeSurface(); /// Assignment operator + /// /// @param csf is the source surface for the assignment ConeSurface& operator=(const ConeSurface& csf); /// Implicit Constructor + /// /// @param shift is the optional shift applied after cloning virtual ConeSurface* clone(const Transform3D* shift = nullptr) const override; /// The binning position method - is overloaded for r-type binning + /// /// @param bValue defines the type of binning to be applied in the global /// frame + /// /// @return The return type is a vector for positioning in the global frame virtual const Vector3D binningPosition(BinningValue bValue) const override; @@ -102,24 +111,34 @@ public: /// Return the measurement frame - this is needed for alignment, in particular /// for StraightLine and Perigee Surface /// - the default implementation is the the RotationMatrix3D of the transform + /// + /// @param gpos is the global position where the measurement frame is constructed + /// @param mom is the momentum used for the measurement frame construction + /// + /// @return matrix that indicates the measurement frame const RotationMatrix3D measurementFrame(const Vector3D& gpos, const Vector3D& mom) const final; /// Return method for surface normal information + /// /// @param lpos is the local position on the cone for which the normal vector /// is requested + /// /// @return Vector3D normal vector in global frame const Vector3D normal(const Vector2D& lpos) const final; /// Return method for surface normal information + /// /// @param gpos is the global position on the cone for which the normal vector /// is requested + /// /// @return Vector3D normal vector in global frame const Vector3D normal(const Vector3D& gpos) const final; // Return method for the rotational symmetry axis + /// // @return This returns the local z axis virtual const Vector3D rotSymmetryAxis() const; @@ -129,6 +148,7 @@ public: bounds() const override; /// Local to global transformation + /// /// @param lpos is the local position to be transformed /// @param mom is the global momentum (ignored in this operation) /// @param gpos is the global position shich is filled @@ -138,9 +158,11 @@ public: Vector3D& gpos) const override; /// Global to local transfomration + /// /// @param gpos is the global position to be transformed /// @param mom is the global momentum (ignored in this operation) /// @param lpos is hte local position to be filled + /// /// @return is a boolean indicating if the transformation succeeded virtual bool globalToLocal(const Vector3D& gpos, @@ -193,9 +215,12 @@ public: bool forceDir = false, const BoundaryCheck& bchk = false) const override; - // the pathCorrection for derived classes with thickness - // @param gpos is the global potion at the correction point - // @param mom is the momentum at the correction point + /// the pathCorrection for derived classes with thickness + /// + /// @param gpos is the global potion at the correction point + /// @param mom is the momentum at the correction point + /// + /// @return is the path correction due to incident angle virtual double pathCorrection(const Vector3D& gpos, const Vector3D& mom) const override; diff --git a/Core/include/ACTS/Surfaces/CylinderBounds.hpp b/Core/include/ACTS/Surfaces/CylinderBounds.hpp index bafda8a03..c1b101070 100644 --- a/Core/include/ACTS/Surfaces/CylinderBounds.hpp +++ b/Core/include/ACTS/Surfaces/CylinderBounds.hpp @@ -52,17 +52,20 @@ public: CylinderBounds() = delete; /// Constructor - full cylinder + /// /// @param radius is the radius of the cylinder /// @param halez is the half length in z CylinderBounds(double radius, double halez); /// Constructor - open cylinder + /// /// @param radius is the radius of the cylinder /// @param halfphi is the half opening angle /// @param halez is the half length in z CylinderBounds(double radius, double halfphi, double halez); /// Constructor - open cylinder + /// /// @param radius is the radius of the cylinder /// @param avphi is the middle phi position of the segment /// @param halfphi is the half opening angle @@ -70,7 +73,10 @@ public: CylinderBounds(double radius, double avphi, double halfphi, double halez); /// Copy Constructor + /// + /// @param cylbo is the source object CylinderBounds(const CylinderBounds& cylbo) : SurfaceBounds(cylbo) {} + /// Destructor virtual ~CylinderBounds(); @@ -89,26 +95,52 @@ public: return SurfaceBounds::Cylinder; } - /// @copydoc SurfaceBounds::inside + /// Inside check for the bounds object driven by the boundary check directive + /// Each Bounds has a method inside, which checks if a LocalPosition is inside + /// the bounds Inside can be called without/with tolerances. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param bchk boundary check directive + /// + /// @return boolean indicator for the success of this operation bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; - /// specialized method for CylinderBounds + /// Specialized method for CylinderBounds that checks if a global position + /// is within the the cylinder cover + /// + /// @param pos is the position in the cylinder frame + /// @param bchk is the boundary check directive + /// + /// return boolean indicator for operation success bool - inside3D(const Vector3D& gp, const BoundaryCheck& bchk = true) const; - - /// @copydoc Surface::insideLoc0 + inside3D(const Vector3D& pos, const BoundaryCheck& bchk = true) const; + + /// Inside method for the second local parameter + /// + /// @param lpos is the local position to be checked + /// @param tol0 is the absolute tolerance on the first parameter + /// + /// @return is a boolean indicating if the position is insideLoc0 virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; - /// @copydoc Surface::insideLoc1 + /// Inside method for the second local parameter + /// + /// @param lpos is the local position to be checked + /// @param tol1 is the absolute tolerance on the first parameter + /// + /// @return is a boolean indicating if the position is insideLoc1 virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// Minimal distance to boundary - /// return minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& pos) const override; + distanceToBoundary(const Vector2D& pos) const override; /// This method returns the radius virtual double diff --git a/Core/include/ACTS/Surfaces/CylinderSurface.hpp b/Core/include/ACTS/Surfaces/CylinderSurface.hpp index 827d994d2..14700b86d 100644 --- a/Core/include/ACTS/Surfaces/CylinderSurface.hpp +++ b/Core/include/ACTS/Surfaces/CylinderSurface.hpp @@ -37,6 +37,7 @@ public: CylinderSurface() = delete; /// Constructor from Transform3D, radius and halflenght + /// /// @param htrans transform to position the surface, can be nullptr /// @note if htrans == nullptr, the cylinder is positioned around (0.,0.,0.) /// @param radius is the radius of the cylinder @@ -46,6 +47,7 @@ public: double hlength); /// Constructor from Transform3D, radius halfphi, and halflenght + /// /// @param htrans transform to position the surface, can be nullptr /// @note if htrans == nullptr, the cylinder is positioned around (0.,0.,0.) /// @param radius is the radius of the cylinder @@ -57,6 +59,7 @@ public: double hlength); /// Constructor from Transform3D and CylinderBounds + /// /// @param htrans transform to position the surface, can be nullptr /// @note if htrans == nullptr, the cylinder is positioned around (0.,0.,0.) /// @param cbounds is a shared pointer to a cylindeer bounds object, must @@ -65,10 +68,12 @@ public: std::shared_ptr<const CylinderBounds> cbounds); /// Copy constructor + /// /// @param csf is the source cylinder for the copy CylinderSurface(const CylinderSurface& csf); /// Copy constructor with shift + /// /// @param csf is the source cylinder for the copy /// @param htrans is the additional transform applied after copying the /// cylinder @@ -78,24 +83,33 @@ public: virtual ~CylinderSurface(); /// Assignment operator + /// + /// @param csf is the source cylinder for the copy CylinderSurface& operator=(const CylinderSurface& csf); /// Implicit Constructor - optionally with a shift + /// /// @param shift is an optional transform for a shift applied after coping virtual CylinderSurface* clone(const Transform3D* shift = nullptr) const override; /// The binning position method - is overloaded for r-type binning + /// /// @param bValue is the type of global binning to be done + /// + /// @return is the global position to be used for binning virtual const Vector3D binningPosition(BinningValue bValue) const override; /// Return the measurement frame - this is needed for alignment, in particular /// The measurement frame of a cylinder is the tangential plane at a given /// position + /// /// @param gpos is the position where the measurement frame is defined /// @param mom is the momentum vector (ignored) + /// + /// @return rotation matrix that defines the measurement frame virtual const RotationMatrix3D measurementFrame(const Vector3D& gpos, const Vector3D& mom) const override; @@ -109,19 +123,25 @@ public: /// Return method for surface normal information /// @note for a Cylinder a local position is always required for the normal /// vector + /// /// @param lpos is the local postion for which the normal vector is requested + /// + /// @return normal vector at the local position virtual const Vector3D normal(const Vector2D& lpos) const override; /// Return method for surface normal information /// @note for a Cylinder a local position is always required for the normal /// vector + /// /// @param gpos is the global postion for which the normal vector is requested + /// + /// @return normal vector at the global position virtual const Vector3D normal(const Vector3D& gpos) const override; - /// Return method for the rotational symmetry axis - the z-Axis of the - /// HepTransform + /// Return method for the rotational symmetry axis + /// @return the z-Axis of transform virtual const Vector3D rotSymmetryAxis() const; @@ -130,6 +150,7 @@ public: bounds() const override; /// Local to global transformation + /// /// @param lpos is the local position to be transformed /// @param mom is the global momentum (ignored in this operation) /// @param gpos is the global position shich is filled @@ -139,9 +160,11 @@ public: Vector3D& gpos) const override; /// Global to local transfomration + /// /// @param gpos is the global position to be transformed /// @param mom is the global momentum (ignored in this operation) /// @param lpos is hte local position to be filled + /// /// @return is a boolean indicating if the transformation succeeded virtual bool globalToLocal(const Vector3D& gpos, @@ -149,9 +172,11 @@ public: Vector2D& lpos) const override; /// Check for position on surface + /// /// @param gpos is the global position to be checked - /// @bhck is the boundary check object - /// @rreturn is a boolean indicating if the position is on surface + /// @param bhck is the boundary check object + /// + /// @return is a boolean indicating if the position is on surface virtual bool isOnSurface(const Vector3D& gpos, const BoundaryCheck& bchk = true) const override; @@ -193,8 +218,10 @@ public: const BoundaryCheck& bchk = false) const override; /// Path correction due to incident of the track + /// /// @param gpos is the global position as a starting point /// @param mom is the global momentum at the starting point + /// /// @return is the correction factor due to incident virtual double pathCorrection(const Vector3D& gpos, const Vector3D& mom) const override; diff --git a/Core/include/ACTS/Surfaces/DiamondBounds.hpp b/Core/include/ACTS/Surfaces/DiamondBounds.hpp index b93912a4a..9ac6d8ab2 100644 --- a/Core/include/ACTS/Surfaces/DiamondBounds.hpp +++ b/Core/include/ACTS/Surfaces/DiamondBounds.hpp @@ -41,6 +41,7 @@ public: DiamondBounds() = delete; /// Constructor for symmetric Diamond + /// /// @param minhalex is the halflength in x at minimal y /// @param medhalex is the halflength in x at y = 0 /// @param maxhalex is the halflength in x at maximal y @@ -53,6 +54,7 @@ public: double haley2); /// Copy constructor + /// /// @param diabo are the source bounds for the copy DiamondBounds(const DiamondBounds& diabo); @@ -64,11 +66,13 @@ public: clone() const override; /// Assignment operator + /// /// @param diabo are the source bounds for the copy DiamondBounds& operator=(const DiamondBounds& diabo); /// Comparison (Equality) operator + /// /// @param sbo are the source bounds for check virtual bool operator==(const SurfaceBounds& sbo) const override; @@ -111,7 +115,14 @@ public: double alpha2() const; - /// @copydoc Surface::inside + /// Inside check for the bounds object driven by the boundary check directive + /// Each Bounds has a method inside, which checks if a LocalPosition is inside + /// the bounds Inside can be called without/with tolerances. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param bchk boundary check directive + /// + /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; @@ -119,6 +130,9 @@ public: /// - loc1/loc2 correspond to the natural coordinates of the surface /// - As loc1/loc2 are correlated the single check doesn't make sense : /// -> check is done on enclosing Rectangle ! + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 is the absolute tolerance virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; @@ -126,18 +140,27 @@ public: /// - loc1/loc2 correspond to the natural coordinates of the surface /// - As loc1/loc2 are correlated the single check doesn't make sense : /// -> check is done on enclosing Rectangle ! + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 is the absolute tolerance virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& pos) const override; + distanceToBoundary(const Vector2D& pos) const override; /// Return the vertices - or, the points of the extremas virtual const std::vector<Vector2D> vertices() const override; /// Output Method for std::ostream + /// + /// @param sl is the ostream in which it is dumped virtual std::ostream& dump(std::ostream& sl) const override; diff --git a/Core/include/ACTS/Surfaces/DiscBounds.hpp b/Core/include/ACTS/Surfaces/DiscBounds.hpp index 629d52710..6feb4d268 100644 --- a/Core/include/ACTS/Surfaces/DiscBounds.hpp +++ b/Core/include/ACTS/Surfaces/DiscBounds.hpp @@ -26,9 +26,13 @@ class DiscBounds : public SurfaceBounds { public: /// Default Constructor + /// + /// @param sSize is the size of the store DiscBounds(size_t sSize = 0) : SurfaceBounds(sSize) {} + /// Destructor virtual ~DiscBounds() {} + /// Virtual Constructor virtual DiscBounds* clone() const = 0; diff --git a/Core/include/ACTS/Surfaces/DiscSurface.hpp b/Core/include/ACTS/Surfaces/DiscSurface.hpp index 58c09807d..af2bf6847 100644 --- a/Core/include/ACTS/Surfaces/DiscSurface.hpp +++ b/Core/include/ACTS/Surfaces/DiscSurface.hpp @@ -41,6 +41,7 @@ public: DiscSurface() = delete; /// Constructor for Discs from Transform3D, \f$ r_{min}, r_{max} \f$ + /// /// @param htrans is transform that places the disc in the global 3D space /// (can be nullptr) /// @param rmin is the inner radius of the disc surface @@ -55,12 +56,13 @@ public: /// Constructor for Discs from Transform3D, \f$ r_{min}, r_{max}, hx_{min}, /// hx_{max} \f$ /// This is n this case you have DiscTrapezoidalBounds + /// /// @param minhalfx is the half length in x at minimal r /// @param minhalfx is the half length in x at maximal r /// @param rmin is the inner radius of the disc surface /// @param rmax is the outer radius of the disc surface - /// @param is the position in phi (default is 0.) - /// @param is the optional stereo angle + /// @param avephi is the position in phi (default is 0.) + /// @param stereo is the optional stereo angle DiscSurface(std::shared_ptr<Transform3D> htrans, double minhalfx, double maxhalfx, @@ -70,6 +72,7 @@ public: double stereo = 0.); /// Constructor for Discs from Transform3D and shared DiscBounds + /// /// @param htrans is the transform that positions the disc in the global 3D /// frame /// @param dbounds are the disc bounds describing the surface coverage @@ -78,6 +81,7 @@ public: /// Constructor from detector element and identifier /// @note the surface only acts as a proxy of the detector element + /// /// @param dbounds are the disc bounds associated to this surface, must not be /// nullptr /// @param detelement is the detector element that is represented by this @@ -89,10 +93,12 @@ public: const Identifier& identifier = Identifier()); /// Copy Constructor + /// /// @param dsf is the source surface for the copy DiscSurface(const DiscSurface& dsf); /// Copy Constructor with shift + /// /// @param dsf is the source sourface for the copy /// @param transf is the additional transform applied to the surface DiscSurface(const DiscSurface& dsf, const Transform3D& transf); @@ -101,10 +107,13 @@ public: virtual ~DiscSurface(); /// Assignement operator + /// + /// @param dsf is the source sourface for the assignment DiscSurface& operator=(const DiscSurface& dsf); /// Virtual constructor - shift can be given optionally + /// /// @param shift the otional transform applied after cloning virtual DiscSurface* clone(const Transform3D* shift = nullptr) const override; @@ -117,11 +126,19 @@ public: } /// Normal vector + /// /// @param lpos the local position where the normal is requested (ignored) + /// + /// @return is a normal vector const Vector3D normal(const Vector2D& lpos = s_origin2D) const final; - /// @copydoc Surface::biningPosition + /// The binning position is the position calcualted + /// for a certain binning type + /// + /// @param bValue is the binning type to be used + /// + /// @return position that can beused for this binning virtual const Vector3D binningPosition(BinningValue bValue) const final; @@ -130,21 +147,42 @@ public: bounds() const override; /// This method returns true if the GlobalPosition is on the Surface for both, - /// within - /// or without check of whether the local position is inside boundaries or not + /// within or without check of whether the local position is inside boundaries or not + /// + /// @param gpos is the global position to be checked + /// @param bchk is the boundary check directive + /// + /// @return bollean that indicates if the position is on surface virtual bool isOnSurface(const Vector3D& gpos, const BoundaryCheck& bchk = true) const override; - /// @copydoc Surface::localToGlobal + /// Local to global transformation + /// For planar surfaces the momentum is ignroed in the local to global + /// transformation + /// + /// @param lpos local 2D posittion in specialized surface frame + /// @param gmom global 3D momentum representation (optionally ignored) + /// @param gpos global 3D position to be filled (given by reference for method + /// symmetry) + /// /// @note the momentum is ignored for Disc surfaces in this calculateion virtual void localToGlobal(const Vector2D& lpos, const Vector3D& mom, Vector3D& gpos) const override; - /// @copydoc Surface::globalToLocal + /// Global to local transformation /// @note the momentum is ignored for Disc surfaces in this calculateion + /// + /// @param gpos global 3D position - considered to be on surface but not + /// inside bounds (check is done) + /// @param gmom global 3D momentum representation (optionally ignored) + /// @param lpos local 2D position to be filled (given by reference for method + /// symmetry) + /// + /// @return boolean indication if operation was successful (fail means global + /// position was not on surface) virtual bool globalToLocal(const Vector3D& gpos, const Vector3D& mom, @@ -152,41 +190,54 @@ public: /// Special method for DiscSurface : local<->local transformations polar <-> /// cartesian + /// /// @param lpolar is a local position in polar coordinates + /// /// @return values is local 2D position in carthesian coordinates @todo check const Vector2D localPolarToCartesian(const Vector2D& lpolar) const; /// Special method for Disc surface : local<->local transformations polar <-> /// cartesian + /// /// @param lcart is local 2D position in carthesian coordinates + /// /// @return value is a local position in polar coordinates const Vector2D localCartesianToPolar(const Vector2D& lcart) const; /// Special method for DiscSurface : local<->local transformations polar <-> /// cartesian + /// /// @param lpolar is a local position in polar coordinates + /// /// @return values is local 2D position in carthesian coordinates const Vector2D localPolarToLocalCartesian(const Vector2D& lpolar) const; /// Special method for DiscSurface : local<->global transformation when /// provided cartesian coordinates + /// /// @param lcart is local 2D position in carthesian coordinates + /// /// @return value is a global carthesian 3D position const Vector3D localCartesianToGlobal(const Vector2D& lcart) const; /// Special method for DiscSurface : global<->local from cartesian coordinates + /// /// @param gpos is a global carthesian 3D position + /// @param tol is the absoltue tolerance parameter + /// /// @return value is a local polar const Vector2D globalToLocalCartesian(const Vector3D& gpos, double tol = 0.) const; /// Path correction due to incident of the track + /// /// @param gpos is the global position as a starting point /// @param mom is the global momentum at the starting point + /// /// @return is the correction factor due to incident double pathCorrection(const Vector3D& gpos, const Vector3D& mom) const override; diff --git a/Core/include/ACTS/Surfaces/DiscTrapezoidalBounds.hpp b/Core/include/ACTS/Surfaces/DiscTrapezoidalBounds.hpp index 23b1f1add..631734ff5 100644 --- a/Core/include/ACTS/Surfaces/DiscTrapezoidalBounds.hpp +++ b/Core/include/ACTS/Surfaces/DiscTrapezoidalBounds.hpp @@ -113,7 +113,7 @@ public: /// @param lpos is the local position to be checked (in polar coordinates) /// @return is the minimal distance ( > 0 if outside and <=0 if inside) virtual double - minDistance(const Vector2D& lpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// This method returns inner radius double diff --git a/Core/include/ACTS/Surfaces/EllipseBounds.hpp b/Core/include/ACTS/Surfaces/EllipseBounds.hpp index 837b3c029..8368e8e2d 100644 --- a/Core/include/ACTS/Surfaces/EllipseBounds.hpp +++ b/Core/include/ACTS/Surfaces/EllipseBounds.hpp @@ -45,6 +45,7 @@ public: EllipseBounds() = delete; /// Constructor for full of an ellipsoid disc + /// /// @param minrad1 /// @param minrad2 /// @param maxrad1 @@ -59,18 +60,23 @@ public: double hphisec = M_PI); /// Copy constructor + /// /// @param ebo is the source bounds for the copy EllipseBounds(const EllipseBounds& ebo) : PlanarBounds(ebo) {} /// Destructor virtual ~EllipseBounds(); /// Assignment operator + /// + /// @param ebo is the source bounds for the copy EllipseBounds& - operator=(const EllipseBounds& discbo); + operator=(const EllipseBounds& ebo); /// Move assignment operator + /// + /// @param ebo is the source bounds for the copy EllipseBounds& - operator=(EllipseBounds&& discbo); + operator=(EllipseBounds&& ebo); /// Virtual constructor virtual EllipseBounds* @@ -86,22 +92,40 @@ public: /// This method checks if the point given in the local coordinates is between /// two ellipsoids if only tol0 is given and additional in the phi sector is /// tol1 is given - /// @copydoc SurfaceBounds::inside + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param bchk boundary check directive + + /// + /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; /// Check for inside first local coordinate + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absolute tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; /// Check for inside second local coordinate + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol1 absolute tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// Minimal distance to boundary - /// return minimal distance ( > 0 if outside and <=0 if inside) + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& lpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// This method returns first inner radius double @@ -137,10 +161,16 @@ public: private: /// private helper function + /// + /// @param lpos is the local position for checking + /// @param tol0 is the absolute tolerance on the first parameter + /// @param tol1 is the absolute tolerance on the second parameter bool inside(const Vector2D& lpos, double tol0, double tol1) const; /// helper function for squaring + /// + /// @param x is the input for squaring inline double square(double x) const { diff --git a/Core/include/ACTS/Surfaces/InfiniteBounds.hpp b/Core/include/ACTS/Surfaces/InfiniteBounds.hpp index 59bf62c5a..3c59b7e2c 100644 --- a/Core/include/ACTS/Surfaces/InfiniteBounds.hpp +++ b/Core/include/ACTS/Surfaces/InfiniteBounds.hpp @@ -28,8 +28,10 @@ class InfiniteBounds : public SurfaceBounds public: /// Default Constructor InfiniteBounds() {} + /// Destructor ~InfiniteBounds() {} + /// Return SurfaceBounds type for persistency mainly virtual SurfaceBounds::BoundsType type() const final @@ -38,7 +40,9 @@ public: } /// Method inside() returns true for any case + /// /// ignores input parameters + /// /// @return always true virtual bool inside(const Vector2D&, const BoundaryCheck&) const final @@ -47,19 +51,23 @@ public: } /// Method inside() returns true for loc 0 + /// /// ignores input parameters + /// /// @return always true virtual bool - insideLoc0(const Vector2D& lpos, double tol0 = 0.) const final + insideLoc0(const Vector2D&, double tol0 = 0.) const final { return true; } /// Method inside() returns true for loc 1 + /// /// ignores input parameters + /// /// @return always true virtual bool - insideLoc1(const Vector2D& lpos, double tol1 = 0.) const final + insideLoc1(const Vector2D&, double tol1 = 0.) const final { return true; } @@ -68,7 +76,7 @@ public: /// ignores input parameter /// @return always 0. (should be -NaN) virtual double - minDistance(const Vector2D& pos) const final + distanceToBoundary(const Vector2D& pos) const final { return 0.; } diff --git a/Core/include/ACTS/Surfaces/LineBounds.hpp b/Core/include/ACTS/Surfaces/LineBounds.hpp index 39e787c79..03e89bcb6 100644 --- a/Core/include/ACTS/Surfaces/LineBounds.hpp +++ b/Core/include/ACTS/Surfaces/LineBounds.hpp @@ -31,17 +31,23 @@ public: enum BoundValues { bv_radius = 0, bv_halfZ = 1, bv_length = 2 }; /// Constructor + /// /// @param radius is the radius of the cylinder, default = 0. /// @param halez is the half length in z, defualt = 0. LineBounds(double radius = 0., double halez = 0.); /// Copy constructor /// calls teh base copy constructor - LineBounds(const LineBounds& lbo) : SurfaceBounds(lbo) {} + /// + /// @param libo are the source bounds + LineBounds(const LineBounds& libo) : SurfaceBounds(lbo) {} + /// Destructor virtual ~LineBounds(); /// Assignment operator + /// + /// @param libo are the source bounds LineBounds& operator=(const LineBounds& libo); @@ -56,22 +62,44 @@ public: return SurfaceBounds::Line; } - /// @copydoc SurfaceBounds::inside + /// Inside check for the bounds object driven by the boundary check directive + /// Each Bounds has a method inside, which checks if a LocalPosition is inside + /// the bounds Inside can be called without/with tolerances. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param bchk boundary check directive + /// + /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; - /// @copydoc Surface::insideLoc0 + /// Inside check for the bounds object with tolerance + /// checks for first coordinate only. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absolute tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; - /// @copydoc Surface::insideLoc1 + /// Inside check for the bounds object with tolerance + /// checks for second coordinate only. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol1 absulote tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// Minimal distance to boundary - /// return minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& lpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// This method returns the radius virtual double @@ -82,19 +110,37 @@ public: halflengthZ() const; /// Output Method for std::ostream + /// + /// @param sl is the ostream to be dumped into virtual std::ostream& dump(std::ostream& sl) const override; private: /// private helper method + /// + /// @param r is the radius to be checked + /// @param tol0 is the tolerance on the radius + /// + /// @return is a boolean indicating the operation success bool insideLocR(double r, double tol0) const; /// private helper method + /// + /// @param z is the a position to be checked + /// @param tol1 is the tolerance on z + /// + /// @return is a boolean indicating the operation success bool insideLocZ(double z, double tol1) const; /// private method for inside check + /// + /// @param lpos is the local position to check for the distance + /// @param r is the radius to be checked + /// @param tol1 is the tolerance on z + /// + /// @return is a boolean indicating the operation success bool inside(const Vector2D& lpos, double tol0, double tol1) const; }; diff --git a/Core/include/ACTS/Surfaces/LineSurface.hpp b/Core/include/ACTS/Surfaces/LineSurface.hpp index fd8df3005..2b5cce1b1 100644 --- a/Core/include/ACTS/Surfaces/LineSurface.hpp +++ b/Core/include/ACTS/Surfaces/LineSurface.hpp @@ -37,6 +37,7 @@ public: LineSurface() = delete; /// Constructor from Transform3D and bounds + /// /// @param htrans is the transform that positions the surface in the global /// frame /// @param radius is the straw radius @@ -44,6 +45,7 @@ public: LineSurface(std::shared_ptr<Transform3D> htrans, double radius, double halez); /// Constructor from Transform3D and a shared bounds object + /// /// @param htrans is the transform that positions the surface in the global /// frame /// @param lbounds are teh bounds describing the straw dimensions, can be @@ -52,19 +54,22 @@ public: std::shared_ptr<const LineBounds> lbounds = nullptr); /// Constructor from DetectorElementBase and Element identifier + /// /// @param lbounds are teh bounds describing the straw dimensions, they must /// not be nullptr /// @param detelement for which this surface is (at least) one representation - /// @param identifier + /// @param identifier is the identifier associated with this surface LineSurface(std::shared_ptr<const LineBounds> lbounds, const DetectorElementBase& detelement, const Identifier& identifier = Identifier()); /// Copy constructor + /// /// @param slsf is teh source surface for copying LineSurface(const LineSurface& slsf); /// Copy constructor with shift + /// /// @param slsf is the source surface dor copying /// @param transf is the additional transform applied after copying LineSurface(const LineSurface& slsf, const Transform3D& transf); @@ -73,26 +78,43 @@ public: virtual ~LineSurface(); /// Assignment operator + /// + /// @param slsf is the source surface dor copying LineSurface& operator=(const LineSurface& slsf); /// Normal vector return + /// /// @param lpos is the local position is ignored + /// /// return a Vector3D by value const Vector3D normal(const Vector2D& lpos = s_origin2D) const override; - /// @copydoc Surface::biningPosition + /// The binning position is the position calcualted + /// for a certain binning type + /// + /// @param bValue is the binning type to be used + /// + /// @return position that can beused for this binning virtual const Vector3D binningPosition(BinningValue bValue) const final; /// Return the measurement frame - this is needed for alignment, in particular + /// /// for StraightLine and Perigee Surface /// - the default implementation is the the RotationMatrix3D of the transform + /// + /// @param gpos is the global position where the measurement frame is constructed + /// @param mom is the momentum used for the measurement frame construction + /// + /// @return is a rotation matrix that indicates the measurement frame virtual const RotationMatrix3D measurementFrame(const Vector3D& gpos, const Vector3D& mom) const override; /// Local to global transformation + /// for line surfaces the momentum is used in order to interpret the drift radius + /// /// @param lpos is the local position to be transformed /// @param mom is the global momentum (used to sign the closest approach) /// @param gpos is the global position shich is filled @@ -128,6 +150,14 @@ public: /// \f$ sign = -sign(\vec{d} \cdot \vec{measX}) \f$ /// /// \image html SignOfDriftCircleD0.gif + /// @param gpos global 3D position - considered to be on surface but not + /// inside bounds (check is done) + /// @param gmom global 3D momentum representation (optionally ignored) + /// @param lpos local 2D position to be filled (given by reference for method + /// symmetry) + /// + /// @return boolean indication if operation was successful (fail means global + /// position was not on surface) virtual bool globalToLocal(const Vector3D& gpos, const Vector3D& mom, @@ -183,6 +213,9 @@ public: /// the pathCorrection for derived classes with thickness /// is by definition 1 for LineSurfaces + /// + /// input parameters are ignored + /// /// @note there's no material associated to the line surface virtual double pathCorrection(const Vector3D&, const Vector3D&) const override @@ -191,10 +224,14 @@ public: } /// This method checks if the provided GlobalPosition is inside the assigned - /// straw radius, but - /// no check is done whether the GlobalPosition is inside bounds or not. - /// It overwrites isOnSurface from Base Class as it saves the time of sign - /// determination. + /// straw radius, but no check is done whether the GlobalPosition is + /// inside bounds or not. It overwrites isOnSurface from Base Class + /// as it saves the time of sign determination. + /// + /// @param gpos is the global position to be checked + /// @param bchk is the boundary check directive + /// + /// @return bollean that indicates if the position is on surface virtual bool isOnSurface(const Vector3D& gpos, const BoundaryCheck& bchk = true) const override; @@ -215,6 +252,10 @@ protected: private: /// helper function to apply the globalToLocal with out transform + /// + /// @param pos is the global position + /// @param mom is the momentum + /// @param is the local position to be filled bool globalToLocalPlain(const Vector3D& pos, const Vector3D& mom, diff --git a/Core/include/ACTS/Surfaces/PerigeeSurface.hpp b/Core/include/ACTS/Surfaces/PerigeeSurface.hpp index 01dd3f375..857fd0331 100644 --- a/Core/include/ACTS/Surfaces/PerigeeSurface.hpp +++ b/Core/include/ACTS/Surfaces/PerigeeSurface.hpp @@ -33,16 +33,23 @@ public: PerigeeSurface() = delete; /// Constructor from GlobalPosition + /// /// @param gpos position where the perigee is centered PerigeeSurface(const Vector3D& gpos); /// Constructor with a Transform - needed for tilt + /// + /// @param tTransform is the transform for position and tilting PerigeeSurface(std::shared_ptr<Transform3D> tTransform); /// Copy constructor + /// + /// @param pesf is the source surface to be copied PerigeeSurface(const PerigeeSurface& pesf); /// Copy constructor with shift + /// + /// @param pesf is the source surface to be copied /// @param transf is the transformed applied after copying PerigeeSurface(const PerigeeSurface& pesf, const Transform3D& transf); @@ -50,12 +57,16 @@ public: virtual ~PerigeeSurface(); /// Virtual constructor + /// + /// @aram shift is the potential shift that is applied after cloning virtual PerigeeSurface* clone(const Transform3D* shift = nullptr) const override; /// Assignment operator + /// + /// @param pesf is the source surface to be assigned PerigeeSurface& - operator=(const PerigeeSurface& slsf); + operator=(const PerigeeSurface& pesf); /// Return the surface type virtual SurfaceType @@ -71,7 +82,9 @@ public: return "Acts::PerigeeSurface"; } - /// Output Method for std::ostream*/ + /// Output Method for std::ostream + /// + /// @param sl is the ostream to be dumped into virtual std::ostream& dump(std::ostream& sl) const override; }; diff --git a/Core/include/ACTS/Surfaces/PlanarBounds.hpp b/Core/include/ACTS/Surfaces/PlanarBounds.hpp index c887be96e..eea30bbfd 100644 --- a/Core/include/ACTS/Surfaces/PlanarBounds.hpp +++ b/Core/include/ACTS/Surfaces/PlanarBounds.hpp @@ -26,9 +26,13 @@ class PlanarBounds : public SurfaceBounds { public: /// Default Constructor + /// + /// @param sStore is the store size for the initialisation PlanarBounds(size_t sStore = 0) : SurfaceBounds(sStore) {} + /// Destructor virtual ~PlanarBounds() {} + /// Virtual Constructor virtual PlanarBounds* clone() const = 0; diff --git a/Core/include/ACTS/Surfaces/PlaneSurface.hpp b/Core/include/ACTS/Surfaces/PlaneSurface.hpp index f73ca0687..16efcfdb9 100644 --- a/Core/include/ACTS/Surfaces/PlaneSurface.hpp +++ b/Core/include/ACTS/Surfaces/PlaneSurface.hpp @@ -23,7 +23,6 @@ namespace Acts { class DetectorElementBase; -/// /// @class PlaneSurface /// /// Class for a planaer in the TrackingGeometry. @@ -40,28 +39,37 @@ public: PlaneSurface(); /// Copy Constructor + /// /// @param psf is the source surface for the copy PlaneSurface(const PlaneSurface& psf); /// Copy Constructor with shift + /// /// @param psf is the source surface for the copy /// @param htrans is the transformation that positions the surface in space PlaneSurface(const PlaneSurface& psf, const Transform3D& htrans); /// Dedicated Constructor with normal vector /// This is for curvilinear surfaces which are by definition boundless + /// /// @param center is the center position of the surface /// @param htrans is the transformation that positions the surface in space PlaneSurface(const Vector3D& center, const Vector3D& normal); /// Constructor from DetectorElementBase + /// + /// @param pbounds are the provided planar bounds (shared) + /// @param detelement is the linked detector element to this surface + /// @param identifier is the identifier of associated to this surfacex PlaneSurface(std::shared_ptr<const PlanarBounds> pbounds, const DetectorElementBase& detelement, const Identifier& identifier = Identifier()); /// Constructor for Planes with (optional) shared bounds object + /// /// @param htrans transform in 3D that positions this surface /// @param pbounds bounds object to describe the actual surface area + /// /// @attention the pointer to pbounds must not be a nullptr PlaneSurface(std::shared_ptr<Transform3D> htrans, std::shared_ptr<const PlanarBounds> pbounds); @@ -70,23 +78,31 @@ public: virtual ~PlaneSurface(); /// Assignment operator + /// /// @param psf source PlaneSurface for assignment PlaneSurface& operator=(const PlaneSurface& psf); /// Virtual constructor with optional shift /// ownership of the shift transform is not given !! - /// @copydoc Surface::clone + /// + /// @param shift is a potential shift after cloning virtual PlaneSurface* clone(const Transform3D* shift = nullptr) const override; /// Normal vector return + /// /// @param lpos is the local position is ignored /// return a Vector3D by value const Vector3D normal(const Vector2D& lpos = s_origin2D) const final; - /// @copydoc Surface::biningPosition + /// The binning position is the position calcualted + /// for a certain binning type + /// + /// @param bValue is the binning type to be used + /// + /// @return position that can beused for this binning virtual const Vector3D binningPosition(BinningValue bValue) const final; @@ -105,23 +121,41 @@ public: /// This method returns true if the GlobalPosition is on the Surface for both, /// within or without check of whether the local position is inside boundaries /// or not + /// /// @param gpos global position to be checked /// @param bchk gboundary check directive + /// + /// @return is a boolean indicator if the position is on surface virtual bool isOnSurface(const Vector3D& gpos, const BoundaryCheck& bchk = true) const override; - /// @copydoc Surface::localToGlobal + + /// Local to global transformation /// For planar surfaces the momentum is ignroed in the local to global /// transformation + /// + /// @param lpos local 2D posittion in specialized surface frame + /// @param gmom global 3D momentum representation (optionally ignored) + /// @param gpos global 3D position to be filled (given by reference for method + /// symmetry) virtual void localToGlobal(const Vector2D& lpos, const Vector3D& mom, Vector3D& gpos) const override; - /// @copydoc Surface::globalToLocal - /// For planar surfaces the momentum is ignroed in the gloabl to l + /// Global to local transformation + /// For planar surfaces the momentum is ignroed in the global to local /// transformation + /// + /// @param gpos global 3D position - considered to be on surface but not + /// inside bounds (check is done) + /// @param gmom global 3D momentum representation (optionally ignored) + /// @param lpos local 2D position to be filled (given by reference for method + /// symmetry) + /// + /// @return boolean indication if operation was successful (fail means global + /// position was not on surface) virtual bool globalToLocal(const Vector3D& gpos, const Vector3D& mom, diff --git a/Core/include/ACTS/Surfaces/RadialBounds.hpp b/Core/include/ACTS/Surfaces/RadialBounds.hpp index c9ce2b519..049975fc9 100644 --- a/Core/include/ACTS/Surfaces/RadialBounds.hpp +++ b/Core/include/ACTS/Surfaces/RadialBounds.hpp @@ -45,6 +45,7 @@ public: RadialBounds(); /// Constructor for full disc of symmetric disc around phi=0 + /// /// @param minrad is the inner radius of the disc (0 for full disc) /// @param maxrad is the outer radius of the disc /// @param hphisec is the half opening angle of the disc (Pi for full angular @@ -52,6 +53,7 @@ public: RadialBounds(double minrad, double maxrad, double hphisec = M_PI); /// Constructor for full disc of symmetric disc around phi!=0 + /// /// @param minrad is the inner radius of the disc (0 for full disc) /// @param maxrad is the outer radius of the disc /// @param avephi is the phi value of the local x-axis in the local 3D frame @@ -60,8 +62,10 @@ public: RadialBounds(double minrad, double maxrad, double avephi, double hphisec); /// Copy constructor + /// /// @param rbounds is the source bounds for assignment - RadialBounds(const RadialBounds& dbounds) : DiscBounds(dbounds) {} + RadialBounds(const RadialBounds& rbounds) : DiscBounds(dbounds) {} + /// Destructor virtual ~RadialBounds(); @@ -81,31 +85,41 @@ public: return SurfaceBounds::Disc; } - /// @copydoc SurfaceBounds::inside - /// /// For disc surfaces the local position in (r,phi) is checked + /// /// @param lpos local position to be checked /// @param bchk boundary check directive + /// + /// @return is a boolean indicating the operation success virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; - /// @copydoc SurfaceBounds::insideLoc0 + /// Inside check for the first coordinate /// - /// For disc surfaces the local position in (r,phi) is checked + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absolute tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; - /// @copydoc SurfaceBounds::insideLoc1 + /// Inside check for the bounds object with tolerance + /// checks for second coordinate only. /// - /// For disc surfaces the local position in (r,phi) is checked + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol1 absulote tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; /// Minimal distance to boundary calculation - /// @param local 2D position in surface coordinate frame + /// + /// @param lpos local 2D position in surface coordinate frame + /// /// @return distance to boundary ( > 0 if outside and <=0 if inside) virtual double - minDistance(const Vector2D& pos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// Return method for inner Radius double @@ -115,8 +129,8 @@ public: double rMax() const; - /// Return method for the central phi value (i.e. phi value of x-axis of local - /// 3D frame) + /// Return method for the central phi value + ///(i.e. phi value of x-axis of local 3D frame) double averagePhi() const; @@ -125,11 +139,24 @@ public: halfPhiSector() const; /// Outstream operator + /// + /// @param sl is the ostream to be dumped into virtual std::ostream& dump(std::ostream& sl) const override; private: /// private helper method for inside + /// + /// @param lpos is the local position to be checked + /// @param tol0 is the absolute tolerance on the first parameter + /// @param tol1 is the absoltue tolerance on the second parameter + /// Inside check for the bounds object with tolerance + /// checks for second coordinate only. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol1 absulote tolerance parameter + /// + /// @return boolean indicator for the success of this operation bool inside(const Vector2D& lpos, double tol0, double tol1) const; }; diff --git a/Core/include/ACTS/Surfaces/RealQuadraticEquation.hpp b/Core/include/ACTS/Surfaces/RealQuadraticEquation.hpp index 9f7833092..29aac3525 100644 --- a/Core/include/ACTS/Surfaces/RealQuadraticEquation.hpp +++ b/Core/include/ACTS/Surfaces/RealQuadraticEquation.hpp @@ -17,8 +17,7 @@ #include <utility> namespace Acts { -/** @enum RQESolutionType - */ +/// @enum RQESolutionType enum RQESolutionType { none = 0, one = 1, two = 2 }; @@ -55,6 +54,11 @@ struct RealQuadraticEquation double second; RQESolutionType solutions; + /// Constructor + /// + /// @param alpha is the first parameter of the quad equation + /// @param beta is the second parameter of the quad equation + /// @param gamma is the third parameter of the quad equation RealQuadraticEquation(double alpha, double beta, double gamma) : first(0.), second(0.) { diff --git a/Core/include/ACTS/Surfaces/RectangleBounds.hpp b/Core/include/ACTS/Surfaces/RectangleBounds.hpp index 21a20af8a..c1cd6e74c 100644 --- a/Core/include/ACTS/Surfaces/RectangleBounds.hpp +++ b/Core/include/ACTS/Surfaces/RectangleBounds.hpp @@ -38,16 +38,22 @@ public: RectangleBounds() = delete; /// Constructor with halflength in x and y + /// /// @param halfX halflength in X /// @param halfY halflength in Y RectangleBounds(double halfX, double halfY); /// Copy constructor + /// + /// @param recbo are the source bounds RectangleBounds(const RectangleBounds& recbo) : PlanarBounds(recbo) {} + /// Destructor virtual ~RectangleBounds(); /// Assignment Operator + /// + /// @param recbo are the source bounds RectangleBounds& operator=(const RectangleBounds& recbo); @@ -62,21 +68,44 @@ public: return SurfaceBounds::Rectangle; } - /// @copydoc SurfaceBounds::inside + /// Inside check for the bounds object driven by the boundary check directive + /// Each Bounds has a method inside, which checks if a LocalPosition is inside + /// the bounds Inside can be called without/with tolerances. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param bchk boundary check directive + /// + /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; - /// @copydoc SurfaceBounds::insideLoc0 + /// Inside check for the bounds object with tolerance + /// checks for first coordinate only. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absolute tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; - /// @copydoc SurfaceBounds::insideLoc1 + /// Inside check for the bounds object with tolerance + /// checks for second coordinate only. + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol1 absulote tolerance parameter + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// @copydoc SurfaceBounds::minDistance + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& lpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// Return method for the half length in X double @@ -91,11 +120,19 @@ public: vertices() const override; /// Output Method for std::ostream + /// + /// @param sl is the ostream for the dump virtual std::ostream& dump(std::ostream& sl) const override; private: /// Private helper method + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absulote tolerance parameter on the first coordinate + /// @param tol1 absulote tolerance parameter on the second coordinate + /// + /// @return boolean indicator for the success of this operation bool inside(const Vector2D& lpos, double tol0 = 0., double tol1 = 0.) const; }; diff --git a/Core/include/ACTS/Surfaces/StrawSurface.hpp b/Core/include/ACTS/Surfaces/StrawSurface.hpp index 62131cb28..bf2f277f9 100644 --- a/Core/include/ACTS/Surfaces/StrawSurface.hpp +++ b/Core/include/ACTS/Surfaces/StrawSurface.hpp @@ -34,16 +34,17 @@ public: StrawSurface() = delete; /// Constructor from Transform3D and bounds + /// /// @param htrans is the transform that positions the surface in the global /// frame /// @param radius is the straw radius /// @param halex is the half length in z StrawSurface(std::shared_ptr<Transform3D> htrans, double radius, double halez) : LineSurface(htrans, radius, halez) - { - } + {} /// Constructor from Transform3D and a shared bounds object + /// /// @param htrans is the transform that positions the surface in the global /// frame /// @param lbounds are teh bounds describing the straw dimensions, can be @@ -52,6 +53,7 @@ public: std::shared_ptr<const LineBounds> lbounds = nullptr); /// Constructor from DetectorElementBase and Element identifier + /// /// @param lbounds are teh bounds describing the straw dimensions, they must /// not be nullptr /// @param detelement for which this surface is (at least) one representation @@ -61,9 +63,12 @@ public: const Identifier& identifier = Identifier()); /// Copy constructor - /// @param slsf is teh source surface for copying + /// + /// @param slsf is the source surface for copying StrawSurface(const StrawSurface& slsf) : LineSurface(slsf) {} + /// Copy constructor with shift + /// /// @param slsf is the source surface dor copying /// @param htrans is the additional transform applied after copying StrawSurface(const StrawSurface& slsf, const Transform3D& htrans) @@ -74,10 +79,14 @@ public: virtual ~StrawSurface(); /// Assignment operator + /// + /// @param slsf is the source surface for copying StrawSurface& operator=(const StrawSurface& slsf); - /// Implicit constructor - shift can be provided */ + /// Implicit constructor - shift can be provided + /// + /// @param shift is an optional shift to be applied virtual StrawSurface* clone(const Transform3D* shift = nullptr) const override; diff --git a/Core/include/ACTS/Surfaces/Surface.hpp b/Core/include/ACTS/Surfaces/Surface.hpp index c52655a8c..f2ce56fea 100644 --- a/Core/include/ACTS/Surfaces/Surface.hpp +++ b/Core/include/ACTS/Surfaces/Surface.hpp @@ -63,23 +63,26 @@ public: }; /// Constructor with Transform3D as a shared object - /// @param htrans Transform3D defines the position of the surface in 3D global - /// space + /// + /// @param htrans Transform3D positions the surface in 3D global space /// @note also acts as default constructor Surface(std::shared_ptr<Transform3D> htrans = nullptr); /// Copy constructor /// - invalidates the association to detector element and identifier + /// /// @param sf Source surface for copy. Surface(const Surface& sf); /// Copy constructor with shift /// - invalidates the association to detector element and identifier + /// /// @param sf Source surface for copy /// @param transf Additional transform applied after copying from the source Surface(const Surface& sf, const Transform3D& transf); /// Constructor fromt DetectorElementBase and (optional) Identifier + /// /// @param detelement Detector element which is represented by this surface /// @param id Optional identifier if more than one surface are associated to a /// detector element @@ -93,6 +96,8 @@ public: /// @note handle with care ! // The alssignment invalidates the link to detector element, identifier, layer // or tracking volume. + /// + /// @param sf Source surface for the assignment Surface& operator=(const Surface& sf); @@ -102,19 +107,22 @@ public: /// (b) then type comparison /// (c) then bounds comparison /// (d) then transform comparison + /// /// @param sf source surface for the comparison virtual bool operator==(const Surface& sf) const; /// Comparison (non-equality) operator + /// /// @param sf Source surface for the comparison virtual bool operator!=(const Surface& sf) const; /// Implicit constructor /// uses the copy constructor a new position can optionally be given - /// @param shift An additional (optional shift can be given) shift after - /// cloning + /// + /// @param shift is an additional (optional shift can be given) + /// shift after cloning virtual Surface* clone(const Transform3D* shift = nullptr) const = 0; @@ -138,6 +146,9 @@ public: /// Return method for the normal vector of the surface /// The normal vector can only be generally defined at a given local position /// It requires a local position to be given (in general) + /// + /// @lpos is the local position where the normal verctor is constructed + /// /// @return normal vector by value virtual const Vector3D normal(const Vector2D& lpos) const = 0; @@ -145,6 +156,9 @@ public: /// Return method for the normal vector of the surface /// The normal vector can only be generally defined at a given local position /// It requires a local position to be given (in general) + /// + /// @param gpos is the global position where the normal vector is constructed + /// /// @return normal vector by value virtual const Vector3D normal(const Vector3D& gpos) const; @@ -177,13 +191,15 @@ public: /// Set Associated Layer /// Many surfaces can be associated to a Layer, but it might not be known yet /// during construction of the layer, this can be set afterwards - /// @param Layer by reference + /// + /// @param lay the assignment Layer by reference void - associateLayer(const Layer&) const; + associateLayer(const Layer& lay) const; /// Set Associated SurfaceMaterial /// The material is usually derived in a complicated way and loaded from /// a framework given source. As various srufaces may share the same + /// /// @param material Material description this given and stored as a shared /// pointer void @@ -193,8 +209,10 @@ public: /// In order to avoid unneccessary geometrical operations, it checks on the /// surface pointer first. /// If that check fails, it calls the geometrical check isOnSurface + /// /// @tparam parameters TrackParameters to be checked /// @param bchk BoundaryCheck directive for this onSurface check + /// /// @return boolean indication if operation was successful template <class T> bool @@ -202,25 +220,29 @@ public: const BoundaryCheck& bchk = BoundaryCheck(true)) const; /// The insideBounds method for local positions + /// /// @param lpos local position to check /// @param bchk BoundaryCheck directive for this onSurface check + /// /// @return boolean indication if operation was successful virtual bool insideBounds(const Vector2D& lpos, const BoundaryCheck& bchk = true) const; /// The geometric onSurface method /// Geometrical check whether position is on Surface + /// /// @param gpos global position to be evaludated /// @param bchk BoundaryCheck directive for this onSurface check + /// /// @return boolean indication if operation was successful virtual bool isOnSurface(const Vector3D& gpos, const BoundaryCheck& bchk = true) const; /// Local to global transformation /// Generalized local to global transformation for the surface types. Since - /// some surface - /// types need the global momentum/direction to resolve sign ambiguity this is - /// also provided + /// some surface types need the global momentum/direction to resolve sign + /// ambiguity this is also provided + /// /// @param lpos local 2D posittion in specialized surface frame /// @param gmom global 3D momentum representation (optionally ignored) /// @param gpos global 3D position to be filled (given by reference for method @@ -232,14 +254,15 @@ public: /// Global to local transformation /// Generalized global to local transformation for the surface types. Since - /// some surface - /// types need the global momentum/direction to resolve sign ambiguity this is - /// also provided + /// some surface types need the global momentum/direction to resolve sign + /// ambiguity this is also provided + /// /// @param gpos global 3D position - considered to be on surface but not /// inside bounds (check is done) /// @param gmom global 3D momentum representation (optionally ignored) /// @param lpos local 2D position to be filled (given by reference for method /// symmetry) + /// /// @return boolean indication if operation was successful (fail means global /// position was not on surface) virtual bool @@ -250,29 +273,35 @@ public: /// Return mehtod for the measurement frame /// This is the frame in which the covariance matrix is defined (specialized /// by all surfaces) + /// /// @param gpos global 3D position - considered to be on surface but not /// inside bounds (check is done) /// @param gmom global 3D momentum representation (optionally ignored) + /// /// @return RotationMatrix3D which defines the three axes of the measurement /// frame virtual const Acts::RotationMatrix3D measurementFrame(const Vector3D& gpos, const Vector3D& gmom) const; /// Calucation of the path correction for incident + /// /// @param gpos global 3D position - considered to be on surface but not /// inside bounds (check is done) /// @param gmom global 3D momentum representation + /// /// @return Path correction with respect to the nominal incident. virtual double pathCorrection(const Vector3D& gpos, const Vector3D& gmom) const = 0; /// Straight line intersection schema from parameters /// Templated for charged and neutral + /// /// @todo include intersector /// @param pars TrackParameters to start from /// @param forceDir boolean indication whether to force the direction given by /// the TrackParameters to hold /// @param bchk boundary check directive for this operation + /// /// @return Intersection class template <class T> Intersection @@ -287,12 +316,14 @@ public: /// Straight line intersection schema from parameters /// Templated for charged and neutral /// @todo include intersector + /// /// @param gpos global 3D position - considered to be on surface but not /// inside bounds (check is done) /// @param gdir global 3D direction representation /// @param forceDir boolean indication whether to force the direction given by /// the TrackParameters to hold /// @param bchk boundary check directive for this operation + /// /// @return Intersection class virtual Intersection intersectionEstimate(const Vector3D& gpos, @@ -307,6 +338,8 @@ public: isFree() const; /// Output Method for std::ostream, to be overloaded by child classes + /// + /// @param sl is the ostream to be dumped into virtual std::ostream& dump(std::ostream& sl) const; diff --git a/Core/include/ACTS/Surfaces/SurfaceBounds.hpp b/Core/include/ACTS/Surfaces/SurfaceBounds.hpp index c3d4442b7..ae7b5031f 100644 --- a/Core/include/ACTS/Surfaces/SurfaceBounds.hpp +++ b/Core/include/ACTS/Surfaces/SurfaceBounds.hpp @@ -57,40 +57,56 @@ public: }; /// Default Constructor + /// /// @param sSize is the size of the data store /// @note the value Store is initialized to the given size SurfaceBounds(size_t sSize = 0) : m_valueStore(sSize, 0.) {} + /// Copy constructor /// It copies the value store + /// + /// @param sb is the source bounds to be copied SurfaceBounds(const SurfaceBounds& sb) : m_valueStore(sb.m_valueStore) {} + /// Destructor virtual ~SurfaceBounds() {} + /// clone() method to make deep copy in Surface copy constructor and for /// assigment operator of the Surface class + /// + /// @return is a newly created object virtual SurfaceBounds* clone() const = 0; /// Assignment operator + /// + /// @param sb is the source bounds to be copied SurfaceBounds& operator=(const SurfaceBounds& sb); /// Comparison (equality) operator /// checks first on the pointer equality - /// then it cheks on the type - /// lastly it checks on the data store + /// then it cheks on the type lastly it checks on the data store + /// + /// @param sb is the source bounds to be copied virtual bool operator==(const SurfaceBounds& sb) const; /// Comparison (non-equality) operator /// checks first on the pointer equality, inverts operator== + /// + /// @param sb is the source bounds to be copied bool operator!=(const SurfaceBounds& sb) const; /// Return the bounds type - for persistency optimization + /// + /// @return is a BoundsType enum virtual BoundsType type() const = 0; /// Access method for bound variable store + /// /// @return of the stored values for the boundary object virtual const std::vector<TDD_real_t>& valueStore() const; @@ -98,33 +114,45 @@ public: /// Inside check for the bounds object driven by the boundary check directive /// Each Bounds has a method inside, which checks if a LocalPosition is inside /// the bounds Inside can be called without/with tolerances. + /// /// @param lpos Local position (assumed to be in right surface frame) /// @param bchk boundary check directive + /// /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const = 0; /// Inside check for the bounds object with tolerance /// checks for first coordinate only. + /// /// @param lpos Local position (assumed to be in right surface frame) - /// @param tol1 tolerance parameter + /// @param tol0 absolute tolerance parameter + /// /// @return boolean indicator for the success of this operation virtual bool - insideLoc0(const Vector2D& lpos, double tol1 = 0.) const = 0; + insideLoc0(const Vector2D& lpos, double tol0 = 0.) const = 0; /// Inside check for the bounds object with tolerance /// checks for second coordinate only. + /// /// @param lpos Local position (assumed to be in right surface frame) - /// @param tol2 tolerance parameter + /// @param tol1 absulote tolerance parameter + /// /// @return boolean indicator for the success of this operation virtual bool - insideLoc1(const Vector2D& lpos, double tol2 = 0.) const = 0; + insideLoc1(const Vector2D& lpos, double tol1 = 0.) const = 0; /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& pos) const = 0; + distanceToBoundary(const Vector2D& lpos) const = 0; /// Output Method for std::ostream, to be overloaded by child classes + /// + /// @param sl is the outstream in which the string dump is done virtual std::ostream& dump(std::ostream& sl) const = 0; diff --git a/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp b/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp index 9fb6170b1..f28d5d47d 100644 --- a/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp +++ b/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp @@ -43,22 +43,25 @@ public: TrapezoidBounds() = delete; /// Constructor for symmetric Trapezoid - /// @param minhalex minimal half lenght X - definition at negative halflength - /// Y - /// @param maxhalex maximal half length X - definition at maximum halflength Y + /// + /// @param minhalex minimal half lenght X, definition at negative halflength Y + /// @param maxhalex maximal half length X, definition at maximum halflength Y /// @param haley maximal half length Y - defined at x=0 TrapezoidBounds(double minhalex, double maxhalex, double haley); /// Constructor for arbitrary Trapezoid - /// @param minhalex minimal half lenght - definition at negative halflength Y - /// @param maxhalex maximal half length - definition at maximum halflength Y + /// + /// @param minhalex minimal half lenght X, definition at negative halflength Y + /// @param maxhalex maximal half length X, definition at maximum halflength Y /// @param alpha opening angle at @todo check /// @param beta opentin angle at @todo check TrapezoidBounds(double minhalex, double haley, double alpha, double beta); /// Copy constructor + /// /// @param trabo are the source bounds for assignment TrapezoidBounds(const TrapezoidBounds& trabo) : PlanarBounds(trabo) {} + /// Destructor virtual ~TrapezoidBounds(); @@ -102,7 +105,7 @@ public: double beta() const; - /// The orientation of the Trapezoid is according to the figure above, + /// The orientation of the Trapezoid is according to the figure above, /// in words: the shorter of the two parallel sides of the trapezoid /// intersects /// with the negative @f$ y @f$ - axis of the local frame. @@ -141,7 +144,12 @@ public: /// @f$ /// <br> /// and @f$ \delta_{I} = \delta_{II} = - \frac{1}{2}\kappa_{I}(x_{max} + - /// x_{min}) @f$ */ + /// x_{min}) @f$ + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param bchk boundary check directive + /// + /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; @@ -149,8 +157,11 @@ public: /// @note loc0/loc1 correspond to the natural coordinates of the surface /// @note As loc0/loc1 are correlated the single check doesn't make sense : /// check is done on enclosing Rectangle ! + /// /// @param lpos is the local position to be checked /// @param tol0 is the tolerance applied + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; @@ -158,41 +169,75 @@ public: /// @note loc0/loc1 correspond to the natural coordinates of the surface /// @note As loc0/loc1 are correlated the single check doesn't make sense : /// -> check is done on enclosing Rectangle ! + /// /// @param lpos is the local position to be checked /// @param tol1 is the tolerance applied + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// Minimal distance to boundary - /// @param lpos is the local position to be checked - /// @return minimal distance ( > 0 if outside and <=0 if inside) + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& lpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// Return the vertices - or, the points of the extremas virtual const std::vector<Vector2D> vertices() const override; /// Output Method for std::ostream + /// + /// @param sl is the ostream to be dumped into virtual std::ostream& dump(std::ostream& sl) const override; private: /// private helper method for inside check + /// + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absulote tolerance parameter on the first coordinate + /// @param tol1 absulote tolerance parameter on the second coordinate + /// + /// @return boolean indicator for the success of this operation bool inside(const Vector2D& lpos, double tol0, double tol2) const; /// private helper method inside() method for a full symmetric trapezoid + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absulote tolerance parameter on the first coordinate + /// @param tol1 absulote tolerance parameter on the second coordinate + /// + /// @return boolean indicator for the success of this operation bool insideFull(const Vector2D& lpos, double tol0 = 0., double tol1 = 0.) const; - /// private inside() method for the triangular exclude area for an arbitrary - /// trapezoid + /// private inside() method for the triangular exclude + /// area for an arbitrary trapezoid + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absulote tolerance parameter on the first coordinate + /// @param tol1 absulote tolerance parameter on the second coordinate + /// + /// @return boolean indicator for the success of this operation bool insideExclude(const Vector2D& lpos, double tol0 = 0., double tol1 = 0.) const; - /// private isAbove() method for checking whether a point lies above or under - /// a straight line + /// private isAbove() method for checking whether a point + /// lies above or under a straight line + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absulote tolerance parameter on the first coordinate + /// @param tol1 absulote tolerance parameter on the second coordinate + /// @param k is the first parameter of the parametric line equation + /// @param d is the second parameter of the parameteric line equation + /// + /// @return boolean indicator for the success of this operation bool isAbove(const Vector2D& lpos, double tol0, double tol1, double k, double d) const; diff --git a/Core/include/ACTS/Surfaces/TriangleBounds.hpp b/Core/include/ACTS/Surfaces/TriangleBounds.hpp index b5f4d3a9a..a4001a3e0 100644 --- a/Core/include/ACTS/Surfaces/TriangleBounds.hpp +++ b/Core/include/ACTS/Surfaces/TriangleBounds.hpp @@ -44,16 +44,20 @@ public: TriangleBounds() = delete; /// Constructor with coordinates of vertices + /// /// @param vertices is the vector of vertices TriangleBounds(const std::vector<Vector2D>& vertices); /// Copy constructor + /// /// @param tribo are the source bounds for assignment TriangleBounds(const TriangleBounds& tribo) : PlanarBounds(tribo) {} + /// Destructor virtual ~TriangleBounds(); /// Assignment Operator + /// /// @param tribo are the source bounds for assignment TriangleBounds& operator=(const TriangleBounds& tribo); @@ -71,41 +75,60 @@ public: /// This method checks if the provided local coordinates are inside the /// surface bounds + /// /// @param lpos local position in 2D local carthesian frame /// @param bchk is the boundary check directive + /// + /// @return boolean indicator for the success of this operation virtual bool inside(const Vector2D& lpos, const BoundaryCheck& bchk) const override; /// This method checks if the provided local coordinate 1 is inside the /// surface bounds + /// /// @param lpos local position in 2D local carthesian frame - /// @param bchk is the boundary check directive + /// @param tol0 is the absolute tolerance on the local first coordinate + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc0(const Vector2D& lpos, double tol0 = 0.) const override; /// This method checks if the provided local coordinate 2 is inside the /// surface bounds + /// /// @param lpos local position in 2D local carthesian frame - /// @param bchk is the boundary check directive + /// @param tol1 is the absolute tolerance on the local first coordinate + /// + /// @return boolean indicator for the success of this operation virtual bool insideLoc1(const Vector2D& lpos, double tol1 = 0.) const override; - /// Minimal distance to boundary - /// @param lpos is the local position in 2D local carthesian frame - /// @return the distance ( > 0 if outside and <=0 if inside) + /// Minimal distance to boundary ( > 0 if outside and <=0 if inside) + /// + /// @param lpos is the local position to check for the distance + /// + /// @return is a signed distance parameter virtual double - minDistance(const Vector2D& lpos) const override; + distanceToBoundary(const Vector2D& lpos) const override; /// This method returns the coordinates of vertices const std::vector<Vector2D> vertices() const override; /// Output Method for std::ostream + /// + /// @param sl is the ostream to be dumped into virtual std::ostream& dump(std::ostream& sl) const override; private: - /// private helper method for inside check + /// Private helper method + /// + /// @param lpos Local position (assumed to be in right surface frame) + /// @param tol0 absulote tolerance parameter on the first coordinate + /// @param tol1 absulote tolerance parameter on the second coordinate + /// + /// @return boolean indicator for the success of this operation bool inside(const Vector2D& lpos, double tol0, double tol2) const; }; diff --git a/Core/src/Surfaces/ConeBounds.cpp b/Core/src/Surfaces/ConeBounds.cpp index ce81bec07..7e0cfa6d9 100644 --- a/Core/src/Surfaces/ConeBounds.cpp +++ b/Core/src/Surfaces/ConeBounds.cpp @@ -67,7 +67,7 @@ Acts::ConeBounds::operator=(const Acts::ConeBounds& conebo) } double -Acts::ConeBounds::minDistance(const Acts::Vector2D& pos) const +Acts::ConeBounds::distanceToBoundary(const Acts::Vector2D& pos) const { // This needs to be split based on where pos is with respect to the // cone. Inside, its easy, inside the z-region or inside the phi diff --git a/Core/src/Surfaces/CylinderBounds.cpp b/Core/src/Surfaces/CylinderBounds.cpp index 7170a1c67..84101dfc2 100644 --- a/Core/src/Surfaces/CylinderBounds.cpp +++ b/Core/src/Surfaces/CylinderBounds.cpp @@ -58,7 +58,7 @@ Acts::CylinderBounds::operator=(const Acts::CylinderBounds& cylbo) } double -Acts::CylinderBounds::minDistance(const Acts::Vector2D& pos) const +Acts::CylinderBounds::distanceToBoundary(const Acts::Vector2D& pos) const { const double pi2 = 2. * M_PI; diff --git a/Core/src/Surfaces/DiamondBounds.cpp b/Core/src/Surfaces/DiamondBounds.cpp index a20cbe0f2..925ae4641 100644 --- a/Core/src/Surfaces/DiamondBounds.cpp +++ b/Core/src/Surfaces/DiamondBounds.cpp @@ -143,7 +143,7 @@ Acts::DiamondBounds::alpha2() const } double -Acts::DiamondBounds::minDistance(const Acts::Vector2D& pos) const +Acts::DiamondBounds::distanceToBoundary(const Acts::Vector2D& pos) const { const int Np = 6; diff --git a/Core/src/Surfaces/DiscTrapezoidalBounds.cpp b/Core/src/Surfaces/DiscTrapezoidalBounds.cpp index 26f30f861..35bfae91e 100644 --- a/Core/src/Surfaces/DiscTrapezoidalBounds.cpp +++ b/Core/src/Surfaces/DiscTrapezoidalBounds.cpp @@ -69,7 +69,7 @@ Acts::DiscTrapezoidalBounds::operator=(const DiscTrapezoidalBounds& disctrbo) } double -Acts::DiscTrapezoidalBounds::minDistance(const Acts::Vector2D& pos) const +Acts::DiscTrapezoidalBounds::distanceToBoundary(const Acts::Vector2D& pos) const { const double pi2 = 2. * M_PI; double alpha = fabs(pos[Acts::eLOC_PHI]); diff --git a/Core/src/Surfaces/EllipseBounds.cpp b/Core/src/Surfaces/EllipseBounds.cpp index 267e8035a..bfdf03e97 100644 --- a/Core/src/Surfaces/EllipseBounds.cpp +++ b/Core/src/Surfaces/EllipseBounds.cpp @@ -56,7 +56,7 @@ Acts::EllipseBounds::operator=(const EllipseBounds& ebo) // m_valueStore.at(EllipseBounds::bv_rMaxY) // double -Acts::EllipseBounds::minDistance(const Vector2D& lpos) const +Acts::EllipseBounds::distanceToBoundary(const Vector2D& lpos) const { const double pi2 = 2. * M_PI; diff --git a/Core/src/Surfaces/LineBounds.cpp b/Core/src/Surfaces/LineBounds.cpp index 915e0813f..737363df5 100644 --- a/Core/src/Surfaces/LineBounds.cpp +++ b/Core/src/Surfaces/LineBounds.cpp @@ -34,7 +34,7 @@ Acts::LineBounds::operator=(const Acts::LineBounds& libo) } double -Acts::LineBounds::minDistance(const Acts::Vector2D& lpos) const +Acts::LineBounds::distanceToBoundary(const Acts::Vector2D& lpos) const { // per definition the min Distance of a correct local position on the line is // r diff --git a/Core/src/Surfaces/RadialBounds.cpp b/Core/src/Surfaces/RadialBounds.cpp index cfa5f93a8..2c2a741d8 100644 --- a/Core/src/Surfaces/RadialBounds.cpp +++ b/Core/src/Surfaces/RadialBounds.cpp @@ -55,7 +55,7 @@ Acts::RadialBounds::operator=(const RadialBounds& rbo) } double -Acts::RadialBounds::minDistance(const Acts::Vector2D& lpos) const +Acts::RadialBounds::distanceToBoundary(const Acts::Vector2D& lpos) const { const double pi2 = 2. * M_PI; diff --git a/Core/src/Surfaces/RectangleBounds.cpp b/Core/src/Surfaces/RectangleBounds.cpp index 5f9305c9b..95b0e533b 100644 --- a/Core/src/Surfaces/RectangleBounds.cpp +++ b/Core/src/Surfaces/RectangleBounds.cpp @@ -33,7 +33,7 @@ Acts::RectangleBounds::operator=(const RectangleBounds& recbo) } double -Acts::RectangleBounds::minDistance(const Acts::Vector2D& lpos) const +Acts::RectangleBounds::distanceToBoundary(const Acts::Vector2D& lpos) const { double dx = fabs(lpos[0]) - m_valueStore.at(RectangleBounds::bv_halfX); double dy = fabs(lpos[1]) - m_valueStore.at(RectangleBounds::bv_halfY); diff --git a/Core/src/Surfaces/TrapezoidBounds.cpp b/Core/src/Surfaces/TrapezoidBounds.cpp index 591089cb5..60239164e 100644 --- a/Core/src/Surfaces/TrapezoidBounds.cpp +++ b/Core/src/Surfaces/TrapezoidBounds.cpp @@ -131,7 +131,7 @@ Acts::TrapezoidBounds::isAbove(const Acts::Vector2D& lpos, } double -Acts::TrapezoidBounds::minDistance(const Acts::Vector2D& lpos) const +Acts::TrapezoidBounds::distanceToBoundary(const Acts::Vector2D& lpos) const { const int Np = 4; diff --git a/Core/src/Surfaces/TriangleBounds.cpp b/Core/src/Surfaces/TriangleBounds.cpp index 0f26c1657..23d327a03 100644 --- a/Core/src/Surfaces/TriangleBounds.cpp +++ b/Core/src/Surfaces/TriangleBounds.cpp @@ -36,7 +36,7 @@ Acts::TriangleBounds::operator=(const TriangleBounds& tribo) } double -Acts::TriangleBounds::minDistance(const Acts::Vector2D& lpos) const +Acts::TriangleBounds::distanceToBoundary(const Acts::Vector2D& lpos) const { const int Np = 3; -- GitLab