16#ifndef ALICEO2_CARTESIAN3D_H
17#define ALICEO2_CARTESIAN3D_H
21#if (!defined(GPUCA_STANDALONE) || !defined(DGPUCA_NO_ROOT)) && !defined(GPUCA_GPUCODE) && !defined(GPUCOMMONRTYPES_H_ACTIVE)
22#include <Math/SMatrix.h>
23#include <Math/SVector.h>
24#include <Math/GenVector/DisplacementVector3D.h>
25#include <Math/GenVector/PositionVector3D.h>
26#include <Math/GenVector/Rotation3D.h>
27#include <Math/GenVector/Transform3D.h>
28#include <Math/GenVector/Translation3D.h>
29#include <Math/GenVector/DisplacementVector2D.h>
30#include <Math/GenVector/PositionVector2D.h>
31#include <TGeoMatrix.h>
54 static constexpr int L2G = 0;
55 static constexpr int T2L = 1;
56 static constexpr int T2G = 2;
60template <
typename value_T>
102 return Point3D<T>(
v.X() * mCos -
v.Y() * mSin,
v.X() * mSin +
v.Y() * mCos,
v.Z());
105 template <
typename T>
108 return Point3D<T>(
v.X() * mCos +
v.Y() * mSin, -
v.X() * mSin +
v.Y() * mCos,
v.Z());
111 template <
typename T>
114 return Vector3D<T>(
v.X() * mCos -
v.Y() * mSin,
v.X() * mSin +
v.Y() * mCos,
v.Z());
117 template <
typename T>
120 return Vector3D<T>(
v.X() * mCos +
v.Y() * mSin, -
v.X() * mSin +
v.Y() * mCos,
v.Z());
123 template <
typename T>
126 return Point2D<T>(
v.X() * mCos -
v.Y() * mSin,
v.X() * mSin +
v.Y() * mCos);
129 template <
typename T>
132 return Point2D<T>(
v.X() * mCos +
v.Y() * mSin, -
v.X() * mSin +
v.Y() * mCos);
135 template <
typename T>
138 return Vector2D<T>(
v.X() * mCos -
v.Y() * mSin,
v.X() * mSin +
v.Y() * mCos);
141 template <
typename T>
144 return Vector2D<T>(
v.X() * mCos +
v.Y() * mSin, -
v.X() * mSin +
v.Y() * mCos);
157#if (!defined(GPUCA_STANDALONE) || !defined(DGPUCA_NO_ROOT)) && !defined(GPUCA_GPUCODE) && !defined(GPUCOMMONRTYPES_H_ACTIVE)
176 using ROOT::Math::Transform3D::operator=;
189 operator TGeoHMatrix&()
const
191 static TGeoHMatrix tmp;
192 double rot[9], tra[3];
193 GetComponents(rot[0], rot[1], rot[2], tra[0], rot[3], rot[4], rot[5], tra[1], rot[6], rot[7], rot[8], tra[2]);
194 tmp.SetRotation(rot);
195 tmp.SetTranslation(tra);
199 void set(
const TGeoMatrix&
m);
201 using ROOT::Math::Transform3D::operator();
211 template <
typename T>
214 return ApplyInverse(p);
217 template <
typename T>
220 return ApplyInverse(
v);
224 template <
typename T>
227 mst = operator()(loc);
230 template <
typename T>
236 template <
typename T>
239 mst = operator()(loc);
242 template <
typename T>
255#if (!defined(GPUCA_STANDALONE) || !defined(DGPUCA_NO_ROOT)) && !defined(GPUCA_GPUCODE) && !defined(GPUCOMMONRTYPES_H_ACTIVE)
256template <
class T,
unsigned int D>
259 return ROOT::Math::Dot(lhs, rhs);
262template <
class T,
unsigned int D1,
unsigned int D2,
class R>
263inline SMatrix<T, D1, D1, MatRepSym<T, D1>>
Similarity(
const SMatrix<T, D1, D2, R>& lhs,
const SMatrix<T, D2, D2,
MatRepSym<T, D2>>& rhs)
265 return ROOT::Math::Similarity(lhs, rhs);
268template <
class T,
unsigned int D>
271 return o2::math_utils::detail::Dot(lhs, rhs);
274template <
class T,
unsigned int D1,
unsigned int D2,
class R>
275GPUdi()
SMatrix<T, D1, D1,
MatRepSym<T, D1>>
Similarity(const
SMatrix<T, D1, D2,
R>& lhs, const
SMatrix<T, D2, D2,
MatRepSym<T, D2>>& rhs)
284#if (!defined(GPUCA_STANDALONE) || !defined(DGPUCA_NO_ROOT)) && !defined(GPUCA_GPUCODE) && !defined(GPUCOMMONRTYPES_H_ACTIVE)
303struct is_trivially_copyable<
o2::math_utils::Point3D<T>> : std::true_type {
std::ostream & operator<<(std::ostream &os, const o2::math_utils::Rotation2Df_t &t)
This is a close porting of the SMatrix and SVectorGPU ROOT interfaces. Only parts strictly requiring ...
Vector2D< T > operator^(const Vector2D< T > &v) const
void set(value_t cs, value_t sn)
Rotation2D & operator=(const Rotation2D &src)=default
Rotation2D & operator=(Rotation2D &&src)=default
Point3D< T > operator()(const Point3D< T > &v) const
Vector2D< T > operator()(const Vector2D< T > &v) const
void getComponents(value_t &cs, value_t &sn) const
Point2D< T > operator^(const Point2D< T > &v) const
Point3D< T > operator^(const Point3D< T > &v) const
Rotation2D(value_t cs, value_t sn)
Rotation2D(const Rotation2D &src)=default
Point2D< T > operator()(const Point2D< T > &v) const
Vector3D< T > operator()(const Vector3D< T > &v) const
Rotation2D(Rotation2D &&src)=default
Vector3D< T > operator^(const Vector3D< T > &v) const
MatRepSymGPU< T, D1 > Similarity(const SMatrixGPU< T, D1, D2, R > &lhs, const SMatrixGPU< T, D2, D2, MatRepSymGPU< T, D2 > > &rhs)
ROOT::Math::MatRepSym< T, D > MatRepSym
GPUdi() float to02Pi(float phi)
ROOT::Math::SVector< T, N > SVector
ROOT::Math::SMatrix< T, D1, D2, R > SMatrix
SMatrix< T, D1, D1, MatRepSym< T, D1 > > Similarity(const SMatrix< T, D1, D2, R > &lhs, const SMatrix< T, D2, D2, MatRepSym< T, D2 > > &rhs)
T Dot(const SVector< T, D > &lhs, const SVector< T, D > &rhs)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.