LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector > Class Template Reference

Class to transform between world and local coordinates. More...

#include "LocalTransformationGeo.h"

Inheritance diagram for geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >:
geo::LocalTransformation< StoredMatrix >

Public Types

using GlobalPoint_t = geo::Point_t
 Type for global 3D point. More...
 
using GlobalVector_t = geo::Vector_t
 Type for global 3D displacement. More...
 
using LocalPoint_t = LocalPoint
 Type for local 3D point. More...
 
using LocalVector_t = LocalVector
 Type for local 3D displacement. More...
 
using TransformationMatrix_t = StoredMatrix
 Type of transformation matrix. More...
 

Public Member Functions

 LocalTransformationGeo (std::vector< TGeoNode const * > const &path, size_t depth)
 Constructor: uses the specified transformation matrix. More...
 
GlobalPoint_t toWorldCoords (LocalPoint_t const &local) const
 Transforms a point from local frame to world frame. More...
 
GlobalVector_t toWorldCoords (LocalVector_t const &local) const
 Transforms a vector from local frame to world frame. More...
 
LocalPoint_t toLocalCoords (GlobalPoint_t const &world) const
 Transforms a point from world frame to local frame. More...
 
LocalVector_t toLocalCoords (GlobalVector_t const &world) const
 Transforms a vector from world frame to local frame. More...
 
void LocalToWorld (double const *local, double *world) const
 Transforms a point from local frame to world frame. More...
 
void LocalToWorldVect (double const *local, double *world) const
 Transforms a vector from local frame to world frame. More...
 
void WorldToLocal (double const *world, double *local) const
 Transforms a point from world frame to local frame. More...
 
void WorldToLocalVect (const double *world, double *local) const
 Transforms a vector from world frame to local frame. More...
 
TransformationMatrix_t const & Matrix () const
 Direct access to the transformation matrix. More...
 
template<>
TGeoHMatrix transformationFromPath (std::vector< TGeoNode const * > const &path, size_t depth)
 
template<>
HepGeom::Transform3D transformationFromPath (std::vector< TGeoNode const * > const &path, size_t depth)
 
 LocalTransformationGeo (TransformationMatrix_t const &matrix)
 Constructor: uses the specified transformation matrix. More...
 
 LocalTransformationGeo (TransformationMatrix_t &&matrix)
 Constructor: uses the specified transformation matrix. More...
 
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>>
DestPoint LocalToWorld (SrcPoint const &local) const
 Transforms a point from local frame to world frame. More...
 
template<typename Point >
Point LocalToWorld (Point const &local) const
 Transforms a point from local frame to world frame. More...
 
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>>
DestVector LocalToWorldVect (SrcVector const &local) const
 Transforms a vector from local frame to world frame. More...
 
template<typename Vector >
Vector LocalToWorldVect (Vector const &local) const
 Transforms a vector from local frame to world frame. More...
 
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>>
DestPoint WorldToLocal (SrcPoint const &world) const
 Transforms a point from world frame to local frame. More...
 
template<typename Point >
Point WorldToLocal (Point const &world) const
 Transforms a point from world frame to local frame. More...
 
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>>
DestVector WorldToLocalVect (SrcVector const &world) const
 Transforms a vector from world frame to local frame. More...
 
template<typename Vector >
Vector WorldToLocalVect (Vector const &world) const
 Transforms a vector from world frame to local frame. More...
 

Static Public Member Functions

static TransformationMatrix_t transformationFromPath (std::vector< TGeoNode const * > const &path, size_t depth)
 Builds a matrix to go from local to world coordinates in one step. More...
 

Protected Member Functions

template<typename DestPoint , typename SrcPoint >
DestPoint LocalToWorldImpl (SrcPoint const &local) const
 
template<typename DestVector , typename SrcVector >
DestVector LocalToWorldVectImpl (SrcVector const &local) const
 
template<typename DestPoint , typename SrcPoint >
DestPoint WorldToLocalImpl (SrcPoint const &world) const
 
template<typename DestVector , typename SrcVector >
DestVector WorldToLocalVectImpl (SrcVector const &world) const
 

Protected Attributes

TransformationMatrix_t fGeoMatrix
 local to world transform More...
 

Private Types

using Base_t = geo::LocalTransformation< StoredMatrix >
 

Detailed Description

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
class geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >

Class to transform between world and local coordinates.

Template Parameters
StoredMatrixtype of transformation matrix internally stored
LocalPointtype representing a local point
LocalVectortype representing a local displacement vector
See also
geo::LocalTransformation

This class provides two directions of transformations (world to local and the other way around), for points and for vectors.

Compared to geo::LocalTransformation, this class offers a simplified interface for the supported vectors: toWorldCoords() and toLocalCoords() apply the correct transformation depending on whether the argument is a point or a displacement vector.

Note
In the class method examples, the following definition is assumed:
using LocalTransformationGeo_t = geo::LocalTransformationGeo
<TGeoHMatrix, geo::Point_t, geo::Vector_t>;
This is conceptually wrong since geo::Point_t and geo::Vector_t are explicitly tagged to be in the global coordinate frame, but mechanically it will work just the same.

Definition at line 52 of file LocalTransformationGeo.h.

Member Typedef Documentation

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
using geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::Base_t = geo::LocalTransformation<StoredMatrix>
private

Definition at line 53 of file LocalTransformationGeo.h.

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
using geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::GlobalPoint_t = geo::Point_t

Type for global 3D point.

Definition at line 56 of file LocalTransformationGeo.h.

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
using geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::GlobalVector_t = geo::Vector_t

Type for global 3D displacement.

Definition at line 57 of file LocalTransformationGeo.h.

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
using geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::LocalPoint_t = LocalPoint

Type for local 3D point.

Definition at line 58 of file LocalTransformationGeo.h.

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
using geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::LocalVector_t = LocalVector

Type for local 3D displacement.

Definition at line 59 of file LocalTransformationGeo.h.

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
using geo::LocalTransformation< StoredMatrix >::TransformationMatrix_t = StoredMatrix

Type of transformation matrix.

Definition at line 49 of file LocalTransformation.h.

Constructor & Destructor Documentation

template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::LocalTransformationGeo ( TransformationMatrix_t const &  matrix)
inline

Constructor: uses the specified transformation matrix.

Parameters
matrixthe transformation matrix to be used

The specified matrix is copied into a local copy.

Definition at line 70 of file LocalTransformationGeo.h.

Referenced by geo::LocalTransformationGeo< TGeoHMatrix, LocalPoint_t, LocalVector_t >::LocalTransformationGeo().

71  : Base_t(matrix) {}
geo::LocalTransformation< StoredMatrix > Base_t
template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::LocalTransformationGeo ( TransformationMatrix_t &&  matrix)
inline

Constructor: uses the specified transformation matrix.

Parameters
matrixthe transformation matrix to be used

The specified matrix is copied into a local copy.

Definition at line 72 of file LocalTransformationGeo.h.

73  : Base_t(std::move(matrix)) {}
geo::LocalTransformation< StoredMatrix > Base_t
template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::LocalTransformationGeo ( std::vector< TGeoNode const * > const &  path,
size_t  depth 
)
inline

Constructor: uses the specified transformation matrix.

Parameters
paththe path of ROOT geometry nodes
depththe index in the path of the last node to be considered

The specified matrix is copied into a local copy.

Definition at line 84 of file LocalTransformationGeo.h.

85  : Base_t(path, depth) {}
geo::LocalTransformation< StoredMatrix > Base_t

Member Function Documentation

template<typename StoredMatrix>
void geo::LocalTransformation< StoredMatrix >::LocalToWorld ( double const *  local,
double *  world 
) const
inherited

Transforms a point from local frame to world frame.

Parameters
locallocal coordinates: [0] x, [1] y, [2] z [cm]
world(output) corresponding world coordinates [cm]

The full transformation is applied. Fox example:

LocalTransformation_t trans( ... ); // with proper initialisation
std::array<double, 3U> origin, center;
origin.fill(0.);
trans.LocalToWorld(origin.data(), center.data());

center will contain the world coordinates of the center of the volume, which is usually represented by the origin in the local coordinates.

In-place replacement is not supported: world and local buffers are assumed not to, and must not, overlap.

Referenced by geo::GeometryCore::DetectorEnclosureBox(), geo::OpDetGeo::Height(), geo::AuxDetGeo::LocalToWorld(), geo::AuxDetSensitiveGeo::LocalToWorld(), geo::CryostatGeo::LocalToWorld(), geo::TPCGeo::LocalToWorld(), and geo::LocalTransformation< TGeoHMatrix >::LocalTransformation().

template<typename StoredMatrix>
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>>
DestPoint geo::LocalTransformation< StoredMatrix >::LocalToWorld ( SrcPoint const &  local) const
inlineinherited

Transforms a point from local frame to world frame.

Template Parameters
SrcPointtype of the input (local) vector
DestPointtype of the output (world) vector (default: as Point)
Parameters
locallocal coordinates [cm]
Returns
corresponding world coordinates [cm]

The full transformation is applied. Fox example:

LocalTransformation_t trans( ... ); // with proper initialisation
auto center = trans.LocalToWorld(TVector3());

center will be a TVector3 containing the world coordinates of the center of the volume, which is usually represented by the origin in the local coordinates (a TVector3 is by default constructed to point to the origin).

Definition at line 119 of file LocalTransformation.h.

120  { return LocalToWorldImpl<DestPoint>(local); }
template<typename StoredMatrix>
template<typename Point >
Point geo::LocalTransformation< StoredMatrix >::LocalToWorld ( Point const &  local) const
inlineinherited

Transforms a point from local frame to world frame.

Template Parameters
SrcPointtype of the input (local) vector
DestPointtype of the output (world) vector (default: as Point)
Parameters
locallocal coordinates [cm]
Returns
corresponding world coordinates [cm]

The full transformation is applied. Fox example:

LocalTransformation_t trans( ... ); // with proper initialisation
auto center = trans.LocalToWorld(TVector3());

center will be a TVector3 containing the world coordinates of the center of the volume, which is usually represented by the origin in the local coordinates (a TVector3 is by default constructed to point to the origin).

Definition at line 122 of file LocalTransformation.h.

123  { return LocalToWorldImpl<Point>(local); }
template<typename StoredMatrix>
template<typename DestPoint , typename SrcPoint >
DestPoint geo::LocalTransformation< StoredMatrix >::LocalToWorldImpl ( SrcPoint const &  local) const
protectedinherited
template<typename StoredMatrix>
void geo::LocalTransformation< StoredMatrix >::LocalToWorldVect ( double const *  local,
double *  world 
) const
inherited

Transforms a vector from local frame to world frame.

Parameters
locallocal coordinates: [0] x, [1] y, [2] z [cm]
world(output) corresponding world coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

In-place replacement is not supported: world and local buffers are assumed not to, and must not, overlap.

Referenced by geo::LocalTransformation< TGeoHMatrix >::LocalToWorld(), geo::OpDetGeo::LocalToWorldVect(), geo::AuxDetGeo::LocalToWorldVect(), geo::AuxDetSensitiveGeo::LocalToWorldVect(), geo::WireGeo::LocalToWorldVect(), geo::CryostatGeo::LocalToWorldVect(), and geo::TPCGeo::LocalToWorldVect().

template<typename StoredMatrix>
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>>
DestVector geo::LocalTransformation< StoredMatrix >::LocalToWorldVect ( SrcVector const &  local) const
inlineinherited

Transforms a vector from local frame to world frame.

Template Parameters
SrcVectortype of the input (local) vector
DestVectortype of output (world) vector (default: as Vector)
Parameters
locallocal coordinates [cm]
Returns
corresponding world coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

Definition at line 154 of file LocalTransformation.h.

155  { return LocalToWorldVectImpl<DestVector>(local); }
template<typename StoredMatrix>
template<typename Vector >
Vector geo::LocalTransformation< StoredMatrix >::LocalToWorldVect ( Vector const &  local) const
inlineinherited

Transforms a vector from local frame to world frame.

Template Parameters
SrcVectortype of the input (local) vector
DestVectortype of output (world) vector (default: as Vector)
Parameters
locallocal coordinates [cm]
Returns
corresponding world coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

Definition at line 157 of file LocalTransformation.h.

158  { return LocalToWorldVectImpl<Vector>(local); }
template<typename StoredMatrix>
template<typename DestVector , typename SrcVector >
DestVector geo::LocalTransformation< StoredMatrix >::LocalToWorldVectImpl ( SrcVector const &  local) const
protectedinherited
template<typename StoredMatrix>
TransformationMatrix_t const& geo::LocalTransformation< StoredMatrix >::Matrix ( ) const
inlineinherited

Direct access to the transformation matrix.

Definition at line 247 of file LocalTransformation.h.

Referenced by geo::AuxDetGeo::AuxDetGeo(), and geo::TPCGeo::TPCGeo().

247 { return fGeoMatrix; }
TransformationMatrix_t fGeoMatrix
local to world transform
template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
LocalPoint_t geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords ( GlobalPoint_t const &  world) const
inline

Transforms a point from world frame to local frame.

Parameters
worldworld coordinates [cm]
Returns
corresponding local coordinates [cm]

The full transformation is applied. Fox example:

geo::LocalTransformation trans( ... ); // with proper initialisation
geo::Point_t p = { 4.0, 5.0, -2.5 };
auto local = trans.toLocalCoords(p);

local will be a LocalPoint_t containing the local coordinates of the specified point.

Definition at line 133 of file LocalTransformationGeo.h.

Referenced by geo::OpDetGeo::toLocalCoords(), geo::AuxDetGeo::toLocalCoords(), geo::AuxDetSensitiveGeo::toLocalCoords(), geo::WireGeo::toLocalCoords(), geo::CryostatGeo::toLocalCoords(), and geo::TPCGeo::toLocalCoords().

134  { return Base_t::template WorldToLocal<LocalPoint_t>(world); }
template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
LocalVector_t geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toLocalCoords ( GlobalVector_t const &  world) const
inline

Transforms a vector from world frame to local frame.

Parameters
worldworld coordinates: [0] x, [1] y, [2] z [cm]
Returns
a local vector with corresponding local coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

Definition at line 144 of file LocalTransformationGeo.h.

145  { return Base_t::template WorldToLocalVect<LocalVector_t>(world); }
template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
GlobalPoint_t geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords ( LocalPoint_t const &  local) const
inline

Transforms a point from local frame to world frame.

Parameters
locallocal coordinates [cm]
Returns
corresponding world coordinates [cm]

The full transformation is applied. Fox example:

geo::LocalTransformationGeo_t trans( ... ); // with proper initialisation
auto center = trans.toWorldCoords(geo::origin());

center will be a geo::Point_t containing the world coordinates of the center of the volume, which is usually represented by the origin in the local coordinates.

Definition at line 103 of file LocalTransformationGeo.h.

Referenced by geo::OpDetGeo::toWorldCoords(), geo::AuxDetGeo::toWorldCoords(), geo::AuxDetSensitiveGeo::toWorldCoords(), geo::WireGeo::toWorldCoords(), geo::CryostatGeo::toWorldCoords(), and geo::TPCGeo::toWorldCoords().

104  { return Base_t::template LocalToWorld<GlobalPoint_t>(local); }
template<typename StoredMatrix, typename LocalPoint = geo::Point_t, typename LocalVector = geo::Vector_t>
GlobalVector_t geo::LocalTransformationGeo< StoredMatrix, LocalPoint, LocalVector >::toWorldCoords ( LocalVector_t const &  local) const
inline

Transforms a vector from local frame to world frame.

Parameters
locallocal coordinates [cm]
Returns
corresponding world coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

Definition at line 115 of file LocalTransformationGeo.h.

116  { return Base_t::template LocalToWorldVect<GlobalVector_t>(local); }
template<>
TGeoHMatrix geo::LocalTransformation< TGeoHMatrix >::transformationFromPath ( std::vector< TGeoNode const * > const &  path,
size_t  depth 
)
inherited

Definition at line 30 of file LocalTransformation.cxx.

References geo::LocalTransformation< StoredMatrix >::transformationFromPath().

31  {
32 
33  TGeoHMatrix matrix = *(path[0]->GetMatrix());
34  for(size_t i = 1; i <= depth; ++i)
35  matrix.Multiply(path[i]->GetMatrix());
36  return matrix;
37 
38  } // geo::LocalTransformation::transformationFromPath()
template<>
HepGeom::Transform3D geo::LocalTransformation< HepGeom::Transform3D >::transformationFromPath ( std::vector< TGeoNode const * > const &  path,
size_t  depth 
)
inherited

Definition at line 45 of file LocalTransformation.cxx.

References mat, and geo::LocalTransformation< StoredMatrix >::transformationFromPath().

46  {
47 
48  auto const mat =
50  (path, depth);
51  const Double_t* translation = mat.GetTranslation();
52  return HepGeom::Transform3D(
53  CLHEP::HepRotation(CLHEP::HepRep3x3(mat.GetRotationMatrix())),
54  CLHEP::Hep3Vector(translation[0], translation[1], translation[2])
55  );
56 
57  } // geo::LocalTransformation::transformationFromPath()
static TransformationMatrix_t transformationFromPath(std::vector< TGeoNode const * > const &path, size_t depth)
Builds a matrix to go from local to world coordinates in one step.
Float_t mat
Definition: plot.C:40
template<typename StoredMatrix>
static TransformationMatrix_t geo::LocalTransformation< StoredMatrix >::transformationFromPath ( std::vector< TGeoNode const * > const &  path,
size_t  depth 
)
staticinherited

Builds a matrix to go from local to world coordinates in one step.

Referenced by geo::LocalTransformation< TGeoHMatrix >::Matrix(), and geo::LocalTransformation< StoredMatrix >::transformationFromPath().

template<typename StoredMatrix>
void geo::LocalTransformation< StoredMatrix >::WorldToLocal ( double const *  world,
double *  local 
) const
inherited

Transforms a point from world frame to local frame.

Parameters
worldworld coordinates: [0] x, [1] y, [2] z [cm]
local(output) corresponding local coordinates [cm]

The full transformation is applied. Fox example:

LocalTransformation_t trans( ... ); // with proper initialisation
std::array<double, 3U> world{ 4.0, 5.0, -2.5 }, local;
trans.WorldToLocal(world.data(), local.data());

local will contain the local coordinates of the specified point.

In-place replacement is not supported: world and local buffers are assumed not to, and must not, overlap.

Referenced by geo::LocalTransformation< TGeoHMatrix >::LocalToWorldVect(), geo::OpDetGeo::WorldToLocal(), geo::AuxDetGeo::WorldToLocal(), geo::AuxDetSensitiveGeo::WorldToLocal(), geo::WireGeo::WorldToLocal(), geo::CryostatGeo::WorldToLocal(), and geo::TPCGeo::WorldToLocal().

template<typename StoredMatrix>
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>>
DestPoint geo::LocalTransformation< StoredMatrix >::WorldToLocal ( SrcPoint const &  world) const
inlineinherited

Transforms a point from world frame to local frame.

Template Parameters
SrcPointtype of the input (local) vector
DestPointtype of the output (world) vector (default: as Point)
Parameters
worldworld coordinates [cm]
Returns
corresponding local coordinates [cm]

The full transformation is applied. Fox example:

LocalTransformation_t trans( ... ); // with proper initialisation
auto local = trans.WorldToLocal(TVector3(4.0, 5.0, -2.5));

local will be a TVector3 containing the local coordinates of the specified point.

Definition at line 202 of file LocalTransformation.h.

203  { return WorldToLocalImpl<DestPoint>(world); }
template<typename StoredMatrix>
template<typename Point >
Point geo::LocalTransformation< StoredMatrix >::WorldToLocal ( Point const &  world) const
inlineinherited

Transforms a point from world frame to local frame.

Template Parameters
SrcPointtype of the input (local) vector
DestPointtype of the output (world) vector (default: as Point)
Parameters
worldworld coordinates [cm]
Returns
corresponding local coordinates [cm]

The full transformation is applied. Fox example:

LocalTransformation_t trans( ... ); // with proper initialisation
auto local = trans.WorldToLocal(TVector3(4.0, 5.0, -2.5));

local will be a TVector3 containing the local coordinates of the specified point.

Definition at line 205 of file LocalTransformation.h.

206  { return WorldToLocalImpl<Point>(world); }
template<typename StoredMatrix>
template<typename DestPoint , typename SrcPoint >
DestPoint geo::LocalTransformation< StoredMatrix >::WorldToLocalImpl ( SrcPoint const &  world) const
protectedinherited
template<typename StoredMatrix>
void geo::LocalTransformation< StoredMatrix >::WorldToLocalVect ( const double *  world,
double *  local 
) const
inherited

Transforms a vector from world frame to local frame.

Parameters
worldworld coordinates: [0] x, [1] y, [2] z [cm]
local(output) corresponding local coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

In-place replacement is not supported: world and local buffers are assumed not to, and must not, overlap.

Referenced by geo::LocalTransformation< TGeoHMatrix >::WorldToLocal(), geo::OpDetGeo::WorldToLocalVect(), geo::AuxDetGeo::WorldToLocalVect(), geo::AuxDetSensitiveGeo::WorldToLocalVect(), geo::WireGeo::WorldToLocalVect(), geo::CryostatGeo::WorldToLocalVect(), and geo::TPCGeo::WorldToLocalVect().

template<typename StoredMatrix>
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>>
DestVector geo::LocalTransformation< StoredMatrix >::WorldToLocalVect ( SrcVector const &  world) const
inlineinherited

Transforms a vector from world frame to local frame.

Template Parameters
SrcVectortype of the input (local) vector
DestVectortype of output (world) vector (default: as Vector)
Parameters
worldcoordinates [cm]
Returns
corresponding world coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

Definition at line 238 of file LocalTransformation.h.

239  { return WorldToLocalVectImpl<DestVector>(world); }
template<typename StoredMatrix>
template<typename Vector >
Vector geo::LocalTransformation< StoredMatrix >::WorldToLocalVect ( Vector const &  world) const
inlineinherited

Transforms a vector from world frame to local frame.

Template Parameters
SrcVectortype of the input (local) vector
DestVectortype of output (world) vector (default: as Vector)
Parameters
worldcoordinates [cm]
Returns
corresponding world coordinates [cm]

The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.

Definition at line 241 of file LocalTransformation.h.

242  { return WorldToLocalVectImpl<Vector>(world); }
template<typename StoredMatrix>
template<typename DestVector , typename SrcVector >
DestVector geo::LocalTransformation< StoredMatrix >::WorldToLocalVectImpl ( SrcVector const &  world) const
protectedinherited

Member Data Documentation

template<typename StoredMatrix>
TransformationMatrix_t geo::LocalTransformation< StoredMatrix >::fGeoMatrix
protectedinherited

local to world transform

Definition at line 257 of file LocalTransformation.h.

Referenced by geo::LocalTransformation< TGeoHMatrix >::Matrix().


The documentation for this class was generated from the following file: