LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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/CoordinateSystemTags.h"
19 #include "Math/GenVector/Cartesian3D.h"
20 #include "Math/GenVector/PositionVector3D.h"
21 #include "Math/GenVector/DisplacementVector3D.h"
22 #include "Math/GenVector/Rotation3D.h"
23 
24 
25 // BEGIN -- GENVECTOR_CONSTEXPR issue ------------------------------------------
45 #include "RVersion.h"
46 #if ROOT_VERSION_CODE <= ROOT_VERSION(6,12,6)
47 #define GENVECTOR_CONSTEXPR
48 #else
49 # error ("Please check if new ROOT supports constexpr GenVector objects.")
50 # define GENVECTOR_CONSTEXPR constexpr // ok, this is useless!
51 #endif
52 // END -- GENVECTOR_CONSTEXPR issue --------------------------------------------
53 
54 
55 // BEGIN Geometry group --------------------------------------------------------
58 
68 namespace geo {
69 
72 
76  template <typename T, typename C = ROOT::Math::GlobalCoordinateSystemTag>
77  using GenVector3DBase_t
78  = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<T>, C>;
79 
83  template <typename T, typename C = ROOT::Math::GlobalCoordinateSystemTag>
84  using GenPoint3DBase_t
85  = ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<T>, C>;
86 
89  template <typename C>
91 
93  template <typename C>
96 
98 
100 
139  using Length_t = double;
141 
153  using GlobalCoords = ROOT::Math::GlobalCoordinateSystemTag;
154 
164  // the actual definition commented out is not understood by GenReflex
165 // using Vector_t = Vector3DBase_t<GlobalCoords>;
166  using Vector_t = ROOT::Math::DisplacementVector3D
167  <ROOT::Math::Cartesian3D<double>, ROOT::Math::GlobalCoordinateSystemTag>;
168 
184  // the actual definition commented out is not understood by GenReflex
185 // using Point_t = Point3DBase_t<GlobalCoords>;
186  using Point_t = ROOT::Math::PositionVector3D
187  <ROOT::Math::Cartesian3D<double>, ROOT::Math::GlobalCoordinateSystemTag>;
188 
189 
197  template <typename CoordSystemTag>
199 
207  template <typename CoordSystemTag>
209 
210 
212  using Rotation_t = ROOT::Math::Rotation3D;
213 
214 
215  //--------------------------------------------------------------------------
217  template <typename Vector = Vector_t>
218  constexpr Vector Xaxis() { return { 1.0, 0.0, 0.0 }; }
219 
221  template <typename Vector = Vector_t>
222  constexpr Vector Yaxis() { return { 0.0, 1.0, 0.0 }; }
223 
225  template <typename Vector = Vector_t>
226  constexpr Vector Zaxis() { return { 0.0, 0.0, 1.0 }; }
227 
229  template <typename Point = Point_t>
230  constexpr Point origin() { return { 0.0, 0.0, 0.0 }; }
231 
233 
234 
235  //----------------------------------------------------------------------------
236 
237 } // namespace geo
239 // END Geometry group ----------------------------------------------------------
240 
241 
242 #endif // LARCOREOBJ_SIMPLETYPESANDCONSTANTS_GEO_VECTORS_H
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:167
double Length_t
Type used for coordinates and distances. They are measured in centimeters.
Definition: geo_vectors.h:140
ROOT::Math::GlobalCoordinateSystemTag GlobalCoords
Tag for vectors in the global coordinate system.
Definition: geo_vectors.h:153
constexpr Vector Yaxis()
Returns a y axis vector of the specified type.
Definition: geo_vectors.h:222
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< T >, C > GenPoint3DBase_t
Definition: geo_vectors.h:85
Vector3DBase_t< CoordSystemTag > VectorIn_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:198
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
Definition: DCEL.h:34
constexpr Vector Xaxis()
Returns a x axis vector of the specified type.
Definition: geo_vectors.h:218
constexpr Vector Zaxis()
Returns a z axis vector of the specified type.
Definition: geo_vectors.h:226
ROOT::Math::Rotation3D Rotation_t
Type for representation of space rotations.
Definition: geo_vectors.h:212
Point3DBase_t< CoordSystemTag > PointIn_t
Type for representation of positions in 3D space.
Definition: geo_vectors.h:208
GenPoint3DBase_t< double, C > Point3DBase_t
Type of 3D point with representation in double precision.
Definition: geo_vectors.h:95
GenVector3DBase_t< double, C > Vector3DBase_t
Definition: geo_vectors.h:90
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:187
Namespace collecting geometry-related classes utilities.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< T >, C > GenVector3DBase_t
Definition: geo_vectors.h:78
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230