17 #ifndef LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_H 18 #define LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_H 27 #include <type_traits> 46 template <
typename Op,
typename... T>
50 <
typename Op,
typename First,
typename Second,
typename... Others>
52 static auto compute(Op op, First&& a, Second&& b, Others&&... others)
58 (op, std::forward<Second>(b), std::forward<Others>(others)...)
63 template <
typename Op,
typename T>
65 static auto compute(Op, T&& v) -> decltype(
auto)
66 {
return std::forward<T>(v); }
69 template <
typename Op,
typename... T>
74 template <
typename... T>
77 auto and_op = [](
auto&& a,
auto&& b) {
return a && b; };
94 template <
typename Vector>
97 template <
typename Vector>
102 template <
typename Vector>
106 template<
typename Class>
107 static constexpr
bool TestX(decltype(std::declval<Class>().
X())*) {
return true; }
108 template<
typename Class>
109 static constexpr
bool TestX(...) {
return false; }
110 template<
typename Class>
111 static constexpr
bool TestY(decltype(std::declval<Class>().
Y())*) {
return true; }
112 template<
typename Class>
113 static constexpr
bool TestY(...) {
return false; }
114 template<
typename Class>
115 static constexpr
bool TestZ(decltype(std::declval<Class>().
Z())*) {
return true; }
116 template<
typename Class>
117 static constexpr
bool TestZ(...) {
return false; }
118 template<
typename Class>
119 static constexpr
bool TestT(decltype(std::declval<Class>().T())*) {
return true; }
120 template<
typename Class>
121 static constexpr
bool TestT(...) {
return false; }
124 static constexpr
bool X = TestX<Vector>(
nullptr);
125 static constexpr
bool Y = TestY<Vector>(
nullptr);
126 static constexpr
bool Z = TestZ<Vector>(
nullptr);
127 static constexpr
bool T = TestT<Vector>(
nullptr);
130 template <
typename Vector>
132 template <
typename Vector>
134 template <
typename Vector>
136 template <
typename Vector>
139 template <
typename Vector>
141 return HasT<Vector>()? 4U
150 template <
typename Vector>
152 = std::array<VectorScalar_t<Vector>, dimension<Vector>()>;
155 template <
typename T>
160 =
typename decltype(std::mem_fn(std::declval<T>()))::result_type;
163 template <
typename T>
166 template <
typename T>
169 template <
typename Class,
typename Func>
172 template <
typename T>
176 template <
typename Vector,
typename SetterType =
void>
179 template <
typename Vector>
186 template <
typename Vector,
typename SetterType>
199 "Invalid setter type" 204 template <
typename Vector>
216 template <
typename Vector>
239 template <
typename Getter>
242 using Vector_t = std::remove_reference_t<MemberFuncClass_t<Getter>>;
247 template <
typename Vector,
typename SetterType>
260 template <
typename Vector,
typename SetterType>
273 :
Base_t(getter), fSetter(setter) {}
298 template <
typename Getter,
typename Setter>
301 using Vector_t = std::remove_reference_t<MemberFuncClass_t<Getter>>;
307 template <
typename CoordHelper,
typename StoredVector>
320 : fCoord(coordManager), fVector(v) {}
324 : fCoord(getter), fVector(v) {}
345 template <
typename CoordHelper,
typename StoredVector>
362 :
Base_t(v, coordManager) {}
403 template <
typename T>
405 if (std::abs(value) < tol)
return 0.;
406 if (std::abs(std::abs(value) - 1.) < tol)
return (value > 0.)? 1.: -1.;
568 template <
typename Vector>
570 constexpr
unsigned int dimension() {
return details::dimension<Vector>(); }
571 template <
typename Vector>
572 constexpr
unsigned int dimension(Vector&&) {
return dimension<Vector>(); }
576 template <
typename Vector>
578 constexpr std::array<std::size_t, geo::vect::dimension<Vector>()>
indices();
579 template <
typename Vector>
580 constexpr
auto indices(Vector
const&) -> decltype(indices<Vector>());
584 template <
typename Vector>
607 template <
typename Vector,
typename Coords>
611 template <
typename Vector>
616 template <
typename Vector>
641 template <
typename Vector>
666 template <
typename Vector>
672 template <
typename Vector>
678 template <
typename Vector>
684 template <
typename Vector>
690 template <
typename Vector>
696 template <
typename Vector>
702 template <
typename Vector>
747 template <
typename Vector>
761 template <
typename Vector>
766 template <
typename Vector>
769 template <
typename Vector>
774 template <
typename Vector>
777 template <
typename Vector>
783 template <
typename Vector>
792 template <
typename Vector>
795 {
return { v, helper }; }
808 template <
typename Vector>
810 {
return bindCoord(v, XcoordManager<Vector>); }
822 template <
typename Vector>
824 {
return bindCoord<Vector>(v, YcoordManager<Vector>); }
836 template <
typename Vector>
838 {
return bindCoord<Vector>(v, ZcoordManager<Vector>); }
850 template <
typename Vector>
852 {
return bindCoord<Vector>(v, TcoordManager<Vector>); }
865 template <
typename Vector>
866 auto coord(Vector& v,
unsigned int n) noexcept;
871 template <
typename Vector>
876 template <
typename Vector>
890 template <
typename Dest,
typename Source>
909 template <
typename Dest,
typename Source>
910 std::vector<Dest>
convertCollTo(std::vector<Source>
const& coll);
924 template <
typename Vector,
typename Pred>
963 template <
typename Vector,
typename Scalar>
972 template <
typename Vector,
typename Scalar>
977 template <
typename Vector>
981 template <
typename Vector>
985 template <
typename Vector>
986 Vector
cross(Vector
const& a, Vector
const& b) {
return a.Cross(b); }
989 template <
typename Vector>
990 constexpr
auto dot(Vector
const& a, Vector
const& b) {
return a.Dot(b); }
993 template <
typename Vector>
994 auto mag2(Vector
const& v) {
return v.Mag2(); }
997 template <
typename Vector>
998 auto norm(Vector
const& v) {
return v.Mag(); }
1002 template <
typename Vector>
1041 template <
unsigned int N = 3U>
1043 static constexpr
unsigned int Dim = N;
1059 template <
typename BeginIter,
typename EndIter>
1062 { add(begin, end); }
1070 bool empty()
const {
return fW == 0.0; }
1086 template <
typename Po
int>
1089 {
return makeWeightedPoint<Point>(1.0 / fW); }
1094 {
return middlePointAs<geo::Point_t>(); }
1111 template <
typename Po
int>
1114 std::size_t ic = 0U;
1125 template <
typename Po
int>
1128 std::size_t ic = 0U;
1130 fSums[ic++] += weight * c();
1143 template <
typename BeginIter,
typename EndIter>
1145 { std::for_each(begin, end, [
this](
auto const& p){ this->add(p); }); }
1148 void clear() { fSums.fill(0.); fW = 0.0; }
1156 template <
typename Point, std::size_t... I>
1158 {
return { fSums.operator[](I)... }; }
1160 template <
typename Point, std::size_t... I>
1162 {
return { (fSums.operator[](I) * w)... }; }
1165 template <
typename Po
int>
1167 {
return geo::vect::makeFromCoords<Point>(fSums); }
1171 template <
typename Po
int>
1210 template <
typename Po
int,
typename BeginIter,
typename EndIter>
1213 constexpr
auto Dim = geo::vect::dimension<Point>();
1215 .
template middlePointAs<Point>();
1239 template <
typename BeginIter,
typename EndIter>
1241 {
return middlePointAs<geo::Point_t>(
begin,
end); }
1259 template <
typename Po
int>
1262 constexpr
auto Dim = geo::vect::dimension<Point>();
1264 .
template middlePointAs<Point>();
1280 template <
typename Po
int>
1282 {
return geo::vect::convertTo<::geo::Point_t>(p); }
1285 template <
typename Vector>
1287 {
return geo::vect::convertTo<::geo::Vector_t>(v); }
1292 template <
typename Po
int>
1294 (std::vector<Point>
const& coll)
1295 {
return convertCollTo<geo::Point_t>(coll); }
1299 template <
typename Vector>
1301 (std::vector<Vector>
const& coll)
1302 {
return convertCollTo<geo::Vector_t>(coll); }
1306 template <
typename Coords>
1308 {
return makeFromCoords<::geo::Point_t>(std::forward<Coords>(coords)); }
1311 template <
typename Coords>
1313 {
return makeFromCoords<::geo::Vector_t>(std::forward<Coords>(coords)); }
1355 template <
typename T>
1357 {
return static_cast<T&&
>(t); }
1359 template<
typename T>
1362 static_assert(!std::is_lvalue_reference<T>(),
1363 "template argument substituting T is an lvalue reference type");
1364 return static_cast<T&&
>(t);
1369 template <
typename Vector>
1372 template <
typename Vector>
1375 template <
typename Vector>
1377 {
return makeVectorIndices<Vector>(); }
1380 template <
typename T, T... Indices>
1384 {
return std::array<T,
sizeof...(Indices)>{{ Indices... }}; }
1387 template <
typename T, T N>
1389 {
return makeIndexSeqImpl<T>(std::make_integer_sequence<T, N>{}); }
1393 template <std::
size_t I,
typename Data>
1396 template <
typename Vector,
typename Coords, std::size_t... Indices>
1398 (Coords&& coords, std::index_sequence<Indices...>)
1401 { accessElement<Indices>(constexpr_forward<Coords>(coords))... };
1406 template <
typename Vector>
1409 template <
typename Vector,
unsigned int Dim = dimension<Vector>()>
1412 template <
typename Vector>
1414 static auto get(
unsigned int n) noexcept
1415 {
return (n == 0)? XcoordManager<Vector>: NoCoordManager<Vector>; }
1418 template <
typename Vector>
1420 static auto get(
unsigned int n) noexcept
1427 template <
typename Vector>
1429 static auto get(
unsigned int n) noexcept
1436 template <
typename Vector>
1438 static auto get(
unsigned int n) noexcept
1448 template <
typename Vector,
unsigned int N>
1450 static constexpr
unsigned int Dim = N;
1455 static_assert(dimension<Vector>() == Dim,
"Inconsistent vector size.");
1458 template <
typename Vector,
unsigned int N>
1461 template <
typename Vector>
1472 XcoordManager<Vector>
1473 , YcoordManager<Vector>
1478 template <
typename Vector>
1489 XcoordManager<Vector>
1490 , YcoordManager<Vector>
1491 , ZcoordManager<Vector>
1496 template <
typename Vector>
1507 XcoordManager<Vector>
1508 , YcoordManager<Vector>
1509 , ZcoordManager<Vector>
1510 , TcoordManager<Vector>
1517 template <
typename Vector,
unsigned int N>
1519 static constexpr
unsigned int Dim = N;
1524 static_assert(dimension<Vector>() == Dim,
"Inconsistent vector size.");
1527 template <
typename Vector,
unsigned int N>
1530 template <
typename Vector>
1547 template <
typename Vector>
1565 template <
typename Vector>
1586 template<
typename Dest,
typename Source>
1588 static_assert(dimension<Source>() == dimension<Dest>(),
1589 "Source and destination vectors must have the same dimension.");
1594 template <
typename Dest,
typename Source,
unsigned int Dim>
1599 "This vector dimensionality is not implemented yet." 1603 template <
typename Dest,
typename Source>
1611 template <
typename Dest,
typename Source>
1619 template <
typename Dest,
typename Source>
1629 <
typename Dest,
typename Source,
unsigned int Dim = dimension<Source>()>
1633 template <
typename Vector,
unsigned int Dim>
1636 (Dim == dimension<Vector>(),
"Inconsistent vector dimension");
1637 static constexpr Vector
convert(Vector
const& v) {
return v; }
1642 template <
typename Point, std::size_t... I>
1654 template <
typename Vector>
1655 constexpr std::array<std::size_t, geo::vect::dimension<Vector>()>
1658 return details::makeIndexSeq<std::size_t, dimension<Vector>()>();
1661 template <
typename Vector>
1663 {
return indices<Vector>(); }
1667 template <
typename Vector,
typename Coords>
1670 return makeFromCoordsImpl<Vector>
1671 (constexpr_forward<Coords>(coords), makeVectorIndices<Vector>());
1676 template <
typename Vector>
1682 template <
typename Vector>
1684 return vect::bindCoord<Vector>(v, coordManager<Vector>(
n));
1689 template <
typename Vector>
1691 using PlainVector = std::remove_reference_t<Vector>;
1696 template <
typename Vector>
1698 {
return coordManagers<Vector>(); }
1701 template <
typename Vector>
1703 using ConstVector = std::add_const_t<std::remove_reference_t<Vector>>;
1708 template <
typename Vector>
1710 {
return coordReaders<Vector>(); }
1714 template <
typename Vector>
1720 template <
typename Vector>
1722 using ConstVector = std::add_const_t<std::remove_reference_t<Vector>>;
1729 template <
typename Dest,
typename Source>
1735 template <
typename Dest,
typename Source>
1738 std::vector<Dest> dest;
1739 dest.reserve(coll.size());
1740 std::transform(coll.begin(), coll.end(), std::back_inserter(dest),
1741 geo::vect::convertTo<Dest, Source>);
1748 template <
typename Vector,
typename Pred>
1753 return makeFromCoords<Vector>(values);
1758 template <
typename Vector>
1765 #endif // LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_UTILS_H
void operator()(Vector_t &v, Scalar_t c) const
Setter: assigns a value to the bound coordinate of specified vector.
constexpr auto coordManager(unsigned int n)
Returns an object that can be bound to a vector to manage one of its coordinates. ...
static constexpr bool TestZ(...)
void round01(Vector &v, Scalar tol)
Returns a vector with all components rounded if close to 0, -1 or +1.
static constexpr auto XcoordManager< Vector const >
Object that can be bound to a vector to access its X coordinate.
constexpr T && constexpr_forward(std::remove_reference_t< T > &t)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
typename BaseTypes_t::Scalar_t Scalar_t
BoundCoordManager(Stored_t &v, CoordHelper_t coordManager)
Constructor: manage the specified coordinate of specified vector.
typename Traits_t::Getter_t Getter_t
void clear()
Resets the status of the object to no accumulated points.
typename CoordHelper_t::Getter_t Getter_t
constexpr auto dot(Vector const &a, Vector const &b)
Return cross product of two vectors.
Point makePoint() const
Converts the internal sums into a Point.
constexpr auto accessElement(Data &&data)
static auto compute(Op op, First &&a, Second &&b, Others &&...others) -> decltype(auto)
std::array< Manager_t, Dim > Return_t
Point middlePointAs() const
Returns the middle point, NaN components if no point.
auto Zcoord(Vector &v)
Returns an object to manage the coordinate Z of the vector v.
static constexpr bool TestX(...)
constexpr auto makeIndexSeq()
constexpr auto makeVectorIndices()
static constexpr auto XcoordManager
Object that can be bound to a vector to manage its X coordinate.
Point makePointImpl(std::index_sequence< I... >) const
std::vector< Dest > convertCollTo(std::vector< Source > const &coll)
Returns a vector of type Dest with the same content as a Src.
void mult(Vector_t &v, Scalar_t f) const
Multiplies the coordinate by the specified amount.
static constexpr Vector convert(Vector const &v)
std::array< Manager_t, Dim > Return_t
decltype(XcoordManager< Vector >) Manager_t
static constexpr auto YcoordManager< Vector const >
static constexpr auto const YcoordManager
typename BaseTypes_t::Vector_t Vector_t
auto mixedProduct(Vector const &a, Vector const &b, Vector const &c)
auto coord(Vector &v, unsigned int n) noexcept
Returns an object to manage the coordinate n of a vector.
constexpr auto bindCoordReaders(Vector const &v)
typename Vector::Scalar type
Helper class to compute the middle point in a point set.
constexpr auto makeCoordReader(Getter getter)
typename Traits_t::Setter_t Setter_t
std::decay_t< Vector > Vector_t
constexpr auto makeIndexSeqImpl(std::integer_sequence< T, Indices... >)
typename MemberFuncReturnType< T >::type MemberFuncReturn_t
double weight() const
Returns the total weight (number of points if all have weight 1).
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
::geo::Vector_t toVector(Vector const &v)
Convert the specified vector into a geo::Vector_t.
static constexpr auto TcoordManager
constexpr auto bindCoord(Vector const &v, CoordReader_t< Vector > helper)
Binds the specified constant vector to the coordinate reader.
BoundCoordManager(Stored_t &v, Getter_t getter, Setter_t setter)
Constructor: manage the specified vector with specified methods.
static constexpr auto ZcoordManager
decltype(Xcoord(std::declval< Vector >())) Manager_t
static Return_t bind(Vector &v)
typename BaseTypes_t::Getter_t Getter_t
typename BaseTypes_t::Setter_t Setter_t
constexpr auto coordManagers()
Returns an array with all coordinate managers for a type of vector.
static Return_t bind(Vector &v)
Helper class for read/write of a single vector coordinate.
typename CoordHelper_t::Vector_t Vector_t
typename MemberFuncClassType< T >::type MemberFuncClass_t
BoundCoordGetter(Stored_t &v, Getter_t getter)
Constructor: manage the specified vector with specified methods.
std::array< Length_t, Dim > fSums
Sum of each of the point components.
void add(Point const &p)
Accumulates a point.
static constexpr auto ZcoordManager< Vector const >
recob::tracking::Point_t Point_t
typename BaseTypes_t::Scalar_t Scalar_t
Point middlePointAs(BeginIter begin, EndIter end)
Returns the middle of the specified points.
void add(Point const &p, double weight)
Accumulates a point.
static constexpr bool TestX(decltype(std::declval< Class >().X())*)
typename VectorScalar< Vector >::type VectorScalar_t
typename Traits_t::Vector_t Vector_t
constexpr unsigned int dimension()
static Dest convert(Source const &v)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::array< Manager_t, Dim > Return_t
constexpr auto coordReaders()
Returns an array with all coordinate readers for a type of vector.
void decr(Vector_t &v, Scalar_t c) const
Decrements the coordinate by the specified amount.
CoordHelper CoordHelper_t
bool isfinite(Vector const &v)
Returns whether all components of the vector are finite.
typename BaseTypes_t::Vector_t Vector_t
auto array(Array const &a)
Returns a manipulator which will print the specified array.
typename Traits_t::Scalar_t Scalar_t
Getter_t fGetter
Member function returning the coordinate value.
constexpr CoordManager_t< Vector > NoCoordManager
void add(BeginIter begin, EndIter end)
Adds a sequence of points.
bool empty() const
Returns whether the total weight is zero (usually means no points).
typename BaseTypes_t::Vector_t Vector_t
void incr(Vector_t &v, Scalar_t c) const
Increments the coordinate by the specified amount.
Definitions of geometry vector data types.
std::vector< geo::Point_t > convertCollToPoint(std::vector< Point > const &coll)
constexpr Vector makeFromCoordsImpl(Coords &&coords, std::index_sequence< Indices... >)
constexpr CoordGetter(Getter_t getter)
Constructor: sets getter and setter functions.
typename BaseTypes_t::Scalar_t Scalar_t
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
static Dest convert(Source const &v)
MiddlePointAccumulatorDim(BeginIter begin, EndIter end)
Constructor: starts with accumulating a sequence of points.
typename CoordHelper_t::Setter_t Setter_t
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
typename CoordHelper_t::Scalar_t Scalar_t
constexpr std::array< std::size_t, geo::vect::dimension< Vector >)> indices()
Returns a sequence of indices valid for a vector of the specified type.
MemberFuncReturn_t< Setter_t > SetterReturn_t
constexpr auto makeCoordManager(Getter getter, Setter setter)
static Return_t bind(Vector &v)
Point makeWeightedPoint(double w) const
std::array< Manager_t, Dim > Return_t
String & operator+=(String &s, VectorDumper< Vector > const &manip)
Appends a string rendering of a vector to the specified string.
auto Ycoord(Vector &v)
Returns an object to manage the coordinate Y of the vector v.
typename decltype(std::mem_fn(std::declval< T >()))::result_type type
static constexpr bool TestY(...)
bool isfiniteImpl(Point const &point, std::index_sequence< I... >)
Stored_t & vector() const
Vector transformCoords(Vector const &v, Pred &&pred)
Returns a new vector applying a predicate to each component.
static auto compute(Op, T &&v) -> decltype(auto)
CoordHelper_t fCoord
Helper to manage a specific coordinate.
auto norm(Vector const &v)
Return norm of the specified vector.
Vector rounded01(Vector const &v, Scalar tol)
Returns a vector with all components rounded if close to 0, -1 or +1.
auto mag2(Vector const &v)
Return norm of the specified vector.
std::array< Manager_t, Dim > Return_t
auto Xcoord(Vector &v)
Returns an object to manage the coordinate X of the vector v.
typename BaseTypes_t::Getter_t Getter_t
static Dest convert(Source const &v)
Point makeWeightedPointImpl(double w, std::index_sequence< I... >) const
BoundCoordGetter(Stored_t &v, CoordHelper_t coordManager)
Constructor: manage the specified coordinate of specified vector.
std::array< Manager_t, Dim > Return_t
auto Tcoord(Vector &v)
Returns an object to manage the coordinate T of the vector v.
geo::Point_t middlePoint() const
std::string value(boost::any const &)
CoordHelper_t const & manager() const
auto extended_accumulate(Op op, T &&...args)
typename BaseTypes_t::Getter_t Getter_t
auto extended_and(T...args) -> decltype(auto)
std::make_index_sequence< Dim > IndexSequence_t
static constexpr auto TcoordManager< Vector const >
std::array< VectorScalar_t< Vector >, dimension< Vector >()> CoordinateArray_t
A STL array suitable to contain all coordinate values of a Vector.
decltype(details::makeCoordReader(&Vector::X)) CoordReader_t
Type of a coordinate reader for a vector type.
std::vector< geo::Vector_t > convertCollToVector(std::vector< Vector > const &coll)
constexpr auto bindCoordManagers(Vector &v)
constexpr CoordManager(Getter_t getter, Setter_t setter)
Constructor: sets getter and setter functions.
std::array< Manager_t, Dim > Return_t
std::array< Manager_t, Dim > Return_t
Setter_t fSetter
Member function setting the coordinate value.
Stored_t & fVector
The vector to manage the coordinate of.
MiddlePointAccumulatorDim()
Default constructor: starts with no accumulated point.
Helper class for read of a single vector coordinate.
details::VectorScalar_t< Vector > coordinate_t
Type of coordinate of the specified vector type.
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
VectorScalar_t< Vector > Scalar_t
constexpr Vector makeFromCoords(Coords &&coords)
Creates a Vector object with coordinates from coords.
static constexpr bool TestT(...)
std::make_index_sequence< dimension< Vector >()> VectorIndices_t
Type of sequence of indices up to Vector size.
Vector cross(Vector const &a, Vector const &b)
Return cross product of two vectors.
Vector normalize(Vector const &v)
Returns a vector parallel to v and with norm 1.
Dest convertTo(Source const &v)
Returns a vector of type Dest with the same content as a Src.
void div(Vector_t &v, Scalar_t f) const
Divides the coordinate by the specified amount.
decltype(details::makeCoordManager(&Vector::X,&Vector::SetX)) CoordManager_t
Type of a coordinate manager for a vector type.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
GENVECTOR_CONSTEXPR::geo::Point_t makePointFromCoords(Coords &&coords)
Creates a geo::Point_t from its coordinates (see makeFromCoords()).
Namespace collecting geometry-related classes utilities.
GENVECTOR_CONSTEXPR::geo::Vector_t makeVectorFromCoords(Coords &&coords)
Creates a geo::Vector_t from its coordinates (see makeFromCoords()).
recob::tracking::Vector_t Vector_t
geo::Point_t middlePoint(BeginIter begin, EndIter end)
Returns the middle of the specified points.
Scalar_t(Vector_t::*)() const Getter_t
static constexpr bool TestY(decltype(std::declval< Class >().Y())*)
static constexpr bool TestZ(decltype(std::declval< Class >().Z())*)
static constexpr bool TestT(decltype(std::declval< Class >().T())*)