LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Class with methods to decompose and compose back vectors. More...
#include "Decomposer.h"
Public Types | |
using | Point_t = typename PlaneDecomposer_t::Point_t |
Type for a vector. More... | |
using | Vector_t = typename PlaneDecomposer_t::Vector_t |
using | Projection_t = typename PlaneDecomposer_t::Projection_t |
Type representing the projection vector. More... | |
using | Distance_t = typename PlaneDecomposer_t::Distance_t |
Type representing the signed distance from the projection plane. More... | |
using | DecomposedVector_t = typename PlaneDecomposer_t::DecomposedVector_t |
Type representing a decomposition on the plane. More... | |
using | AffinePlaneBase_t = typename PlaneDecomposer_t::AffinePlaneBase_t |
Type of vector base for the space. More... | |
Public Member Functions | |
Decomposer ()=default | |
Default constructor: projection on (x,y) with origin (0, 0, 0) More... | |
Decomposer (AffinePlaneBase_t &&base) | |
Constructor: specifies a base (an origin and two direction vectors) More... | |
Decomposer (AffinePlaneBase_t const &base) | |
Constructor: specifies a base (an origin and two direction vectors) More... | |
Setters | |
void | SetBase (AffinePlaneBase_t &&base) |
Change projection base. More... | |
void | SetBase (AffinePlaneBase_t const &base) |
Change projection base. More... | |
void | SetOrigin (Point_t const &point) |
Change the 3D point of the reference frame origin. More... | |
void | SetMainDir (Vector_t const &dir) |
Change the main direction of the projection base. More... | |
void | SetSecondaryDir (Vector_t const &dir) |
Change the secondary direction of the projection base. More... | |
Reference directions and point | |
Point_t | ReferencePoint () const |
Returns the reference point for the plane coordinate, as a 3D point. More... | |
AffinePlaneBase_t const & | Base () const |
Returns the base of the decomposition. More... | |
Vector_t const & | MainDir () const |
Returns the plane main axis direction. More... | |
Vector_t const & | SecondaryDir () const |
Returns the plane secondary axis direction. More... | |
Vector_t const & | NormalDir () const |
Returns the plane normal axis direction. More... | |
Decomposition of a 3D point | |
auto | PointMainComponent (Point_t const &point) const |
Returns the main component of a point. More... | |
auto | PointSecondaryComponent (Point_t const &point) const |
Returns the secondary component of a point. More... | |
auto | PointNormalComponent (Point_t const &point) const |
Returns the secondary component of a point. More... | |
Projection_t | ProjectPointOnPlane (Point_t const &point) const |
Returns the projection of the specified point on the plane. More... | |
DecomposedVector_t | DecomposePoint (Point_t const &point) const |
Decomposes a 3D point in two components. More... | |
Decomposition of a 3D vector | |
auto | VectorMainComponent (Vector_t const &v) const |
Returns the main component of a vector. More... | |
auto | VectorSecondaryComponent (Vector_t const &v) const |
Returns the secondary component of a vector. More... | |
auto | VectorNormalComponent (Vector_t const &v) const |
Returns the secondary component of a vector. More... | |
Projection_t | ProjectVectorOnPlane (Vector_t const &v) const |
Returns the projection of the specified vector on the plane. More... | |
DecomposedVector_t | DecomposeVector (Vector_t const &v) const |
Decomposes a 3D vector in two components. More... | |
double | Angle (Vector_t const &v) const |
Returns the angle of the projection from main direction. More... | |
Decomposition of a projection vector | |
auto | MainComponent (Projection_t const &v) const |
Returns the main component of a projection vector. More... | |
auto | SecondaryComponent (Projection_t const &v) const |
Returns the secondary component of a projection vector. More... | |
Composition of a point | |
Point_t | ComposePoint (DecomposedVector_t const &decomp) const |
Returns the 3D point from composition of projection and distance. More... | |
Point_t | ComposePoint (double distance, Projection_t const &proj) const |
Returns the 3D point from composition of projection and distance. More... | |
Composition of a vector | |
Vector_t | ComposeVector (DecomposedVector_t const &decomp) const |
Returns the 3D vector from composition of projection and distance. More... | |
Vector_t | ComposeVector (double distance, Projection_t const &proj) const |
Returns the 3D vector from composition of projection and distance. More... | |
Private Types | |
using | PlaneDecomposer_t = PlaneDecomposer< Vector, Point, ProjVector > |
Private Member Functions | |
PlaneDecomposer_t const & | Plane () const |
Returns the plane decomposer. More... | |
Private Attributes | |
PlaneDecomposer_t | fPlaneDecomp |
Manages the projection on the plane. More... | |
Class with methods to decompose and compose back vectors.
Vector | type to represent 3D vectors |
Point | type to represent 3D points |
ProjVector | type to represent 2D projection on plane |
These methods deal with projection of points and vectors on a plane and the axis orthogonal to it.
Definition at line 391 of file Decomposer.h.
using geo::Decomposer< Vector, Point, ProjVector >::AffinePlaneBase_t = typename PlaneDecomposer_t::AffinePlaneBase_t |
Type of vector base for the space.
Definition at line 417 of file Decomposer.h.
using geo::Decomposer< Vector, Point, ProjVector >::DecomposedVector_t = typename PlaneDecomposer_t::DecomposedVector_t |
Type representing a decomposition on the plane.
Definition at line 414 of file Decomposer.h.
using geo::Decomposer< Vector, Point, ProjVector >::Distance_t = typename PlaneDecomposer_t::Distance_t |
Type representing the signed distance from the projection plane.
Definition at line 411 of file Decomposer.h.
|
private |
Definition at line 393 of file Decomposer.h.
using geo::Decomposer< Vector, Point, ProjVector >::Point_t = typename PlaneDecomposer_t::Point_t |
Type for a vector.
Definition at line 404 of file Decomposer.h.
using geo::Decomposer< Vector, Point, ProjVector >::Projection_t = typename PlaneDecomposer_t::Projection_t |
Type representing the projection vector.
Definition at line 408 of file Decomposer.h.
using geo::Decomposer< Vector, Point, ProjVector >::Vector_t = typename PlaneDecomposer_t::Vector_t |
Definition at line 405 of file Decomposer.h.
|
default |
Default constructor: projection on (x,y) with origin (0, 0, 0)
|
inline |
Constructor: specifies a base (an origin and two direction vectors)
Definition at line 424 of file Decomposer.h.
|
inline |
Constructor: specifies a base (an origin and two direction vectors)
Definition at line 427 of file Decomposer.h.
|
inline |
Returns the angle of the projection from main direction.
v | vector to get the angle of |
The projection on the plane is taken, and its angle from the main direction is returned. That angle is defined in the range , so that it is 0 for a projection matching the main direction and for one matching the secondary direction.
Definition at line 580 of file Decomposer.h.
|
inline |
Returns the base of the decomposition.
Definition at line 460 of file Decomposer.h.
|
inline |
Returns the 3D point from composition of projection and distance.
decomp | decomposed point |
See ComposePoint(double, Projection_t const&)
for details.
Definition at line 611 of file Decomposer.h.
|
inline |
Returns the 3D point from composition of projection and distance.
distance | distance of the target point from the wire plane |
proj | projection of the target point on the wire plane |
The returned point is the sum of two 3D contributions:
ProjectPointOnPlane()
gives the input projectionGiven the arbitrary definition of the projection reference, it is assumed that the same convention is used as in ProjectPointOnPlane() and PointNormalComponent().
Definition at line 632 of file Decomposer.h.
|
inline |
Returns the 3D vector from composition of projection and distance.
decomp | decomposed vector |
See ComposeVector(double, Projection_t const&)
for details.
Definition at line 648 of file Decomposer.h.
|
inline |
Returns the 3D vector from composition of projection and distance.
distance | distance of the target point from the wire plane |
proj | projection of the target point on the wire plane |
The returned vector is the sum of two 3D vectors:
ProjectVectorOnPlane()
gives the input projectionGiven the arbitrary definition of the projection reference, it is assumed that the same convention is used as in ProjectVectorOnPlane() and VectorNormalComponent().
Definition at line 669 of file Decomposer.h.
|
inline |
Decomposes a 3D point in two components.
point | the point to be decomposed |
The point is decomposed in:
The distance is obtained as by PointNormalComponent(). The projection on the plane is obtained following the same convention as ProjectPointOnPlane().
Definition at line 517 of file Decomposer.h.
Referenced by geo::DriftPartitions::TPCat().
|
inline |
Decomposes a 3D vector in two components.
v | the vector to be decomposed |
The vector is decomposed in:
The distance is obtained as by VectorNormalComponent(). The projection on the plane is obtained following the same convention as ProjectVectorOnPlane().
Definition at line 566 of file Decomposer.h.
|
inline |
Returns the main component of a projection vector.
Definition at line 590 of file Decomposer.h.
|
inline |
Returns the plane main axis direction.
Definition at line 463 of file Decomposer.h.
|
inline |
Returns the plane normal axis direction.
Definition at line 469 of file Decomposer.h.
Referenced by geo::PlaneGeo::UpdateWireDir().
|
inlineprivate |
Returns the plane decomposer.
Definition at line 398 of file Decomposer.h.
|
inline |
Returns the main component of a point.
Definition at line 478 of file Decomposer.h.
|
inline |
Returns the secondary component of a point.
Definition at line 486 of file Decomposer.h.
Referenced by geo::DriftPartitions::computeCoverage(), geo::DriftPartitions::driftCoord(), and sortTPCsByDriftCoord().
|
inline |
Returns the secondary component of a point.
Definition at line 482 of file Decomposer.h.
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the plane. The vector is expressed as , components following the main direction (MainDir()
) and the secondary one (SecondaryDir()
) respectively. The origin point is the one from ReferencePoint().
Definition at line 500 of file Decomposer.h.
Referenced by TPCarea().
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the wire plane. The vector is expressed as , components following the main direction (MainDir()
) and the secondary one (SecondaryDir()
) respectively.
Definition at line 549 of file Decomposer.h.
|
inline |
Returns the reference point for the plane coordinate, as a 3D point.
Definition at line 457 of file Decomposer.h.
|
inline |
Returns the secondary component of a projection vector.
Definition at line 594 of file Decomposer.h.
|
inline |
Returns the plane secondary axis direction.
Definition at line 466 of file Decomposer.h.
Referenced by geo::PlaneGeo::UpdateWidthDepthDir().
|
inline |
Change projection base.
Definition at line 433 of file Decomposer.h.
|
inline |
Change projection base.
Definition at line 437 of file Decomposer.h.
|
inline |
Change the main direction of the projection base.
Definition at line 444 of file Decomposer.h.
Referenced by geo::PlaneGeo::DetectGeometryDirections(), and geo::PlaneGeo::UpdateWireDir().
|
inline |
Change the 3D point of the reference frame origin.
Definition at line 441 of file Decomposer.h.
Referenced by geo::PlaneGeo::DetectGeometryDirections(), geo::PlaneGeo::UpdateDecompWireOrigin(), and geo::PlaneGeo::UpdateWirePlaneCenter().
|
inline |
Change the secondary direction of the projection base.
Definition at line 447 of file Decomposer.h.
Referenced by geo::PlaneGeo::DetectGeometryDirections(), geo::PlaneGeo::UpdateIncreasingWireDir(), and geo::PlaneGeo::UpdateWidthDepthDir().
|
inline |
Returns the main component of a vector.
Definition at line 527 of file Decomposer.h.
|
inline |
Returns the secondary component of a vector.
Definition at line 535 of file Decomposer.h.
|
inline |
Returns the secondary component of a vector.
Definition at line 531 of file Decomposer.h.
|
private |
Manages the projection on the plane.
Definition at line 395 of file Decomposer.h.