LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
geo_vectors.h
Go to the documentation of this file.
1 
14 #ifndef LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_H
15 #define LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_H
16 
17 // ROOT libraries
18 #include "Math/GenVector/Cartesian3D.h"
19 #include "Math/GenVector/CoordinateSystemTags.h"
20 #include "Math/GenVector/DisplacementVector3D.h"
21 #include "Math/GenVector/PositionVector3D.h"
22 #include "Math/GenVector/Rotation3D.h"
23 
24 // BEGIN -- GENVECTOR_CONSTEXPR issue ------------------------------------------
44 #include "RVersion.h"
45 #define GENVECTOR_CONSTEXPR
46 // use the following definition if the issue is ever resolved
47 // # define GENVECTOR_CONSTEXPR constexpr
48 // END -- GENVECTOR_CONSTEXPR issue --------------------------------------------
49 
50 // BEGIN Geometry group --------------------------------------------------------
53 
63 namespace geo {
64 
67 
71  template <typename T, typename C = ROOT::Math::GlobalCoordinateSystemTag>
72  using GenVector3DBase_t = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<T>, C>;
73 
77  template <typename T, typename C = ROOT::Math::GlobalCoordinateSystemTag>
78  using GenPoint3DBase_t = ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<T>, C>;
79 
82  template <typename C>
84 
86  template <typename C>
89 
91 
93 
132  using Length_t = double;
134 
146  using GlobalCoords = ROOT::Math::GlobalCoordinateSystemTag;
147 
157  // the actual definition commented out is not understood by GenReflex
158  // using Vector_t = Vector3DBase_t<GlobalCoords>;
159  using Vector_t = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,
160  ROOT::Math::GlobalCoordinateSystemTag>;
161 
177  // the actual definition commented out is not understood by GenReflex
178  // using Point_t = Point3DBase_t<GlobalCoords>;
179  using Point_t = ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<double>,
180  ROOT::Math::GlobalCoordinateSystemTag>;
181 
189  template <typename CoordSystemTag>
191 
199  template <typename CoordSystemTag>
201 
203  using Rotation_t = ROOT::Math::Rotation3D;
204 
205  //--------------------------------------------------------------------------
207  template <typename Vector = Vector_t>
208  constexpr Vector Xaxis()
209  {
210  return {1.0, 0.0, 0.0};
211  }
212 
214  template <typename Vector = Vector_t>
215  constexpr Vector Yaxis()
216  {
217  return {0.0, 1.0, 0.0};
218  }
219 
221  template <typename Vector = Vector_t>
222  constexpr Vector Zaxis()
223  {
224  return {0.0, 0.0, 1.0};
225  }
226 
228  template <typename Point = Point_t>
229  constexpr Point origin()
230  {
231  return {0.0, 0.0, 0.0};
232  }
233 
235 
236  //----------------------------------------------------------------------------
237 
238 } // namespace geo
240 // END Geometry group ----------------------------------------------------------
241 
242 #endif // LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_H
double Length_t
Type used for coordinates and distances. They are measured in centimeters.
Definition: geo_vectors.h:133
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:160
ROOT::Math::GlobalCoordinateSystemTag GlobalCoords
Tag for vectors in the global coordinate system.
Definition: geo_vectors.h:146
constexpr Vector Yaxis()
Returns a y axis vector of the specified type.
Definition: geo_vectors.h:215
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< T >, C > GenPoint3DBase_t
Definition: geo_vectors.h:78
Vector3DBase_t< CoordSystemTag > VectorIn_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:190
constexpr Vector Xaxis()
Returns a x axis vector of the specified type.
Definition: geo_vectors.h:208
constexpr Vector Zaxis()
Returns a z axis vector of the specified type.
Definition: geo_vectors.h:222
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
Definition: geo_vectors.h:203
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
Definition: DCEL.h:42
Point3DBase_t< CoordSystemTag > PointIn_t
Type for representation of positions in 3D space.
Definition: geo_vectors.h:200
GenPoint3DBase_t< double, C > Point3DBase_t
Type of 3D point with representation in double precision.
Definition: geo_vectors.h:88
GenVector3DBase_t< double, C > Vector3DBase_t
Definition: geo_vectors.h:83
Namespace collecting geometry-related classes utilities.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< T >, C > GenVector3DBase_t
Definition: geo_vectors.h:72
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:229