LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TrackingPlaneHelper.h
Go to the documentation of this file.
1 #ifndef TRACKINGPLANEHELPER_H
2 #define TRACKINGPLANEHELPER_H
3 
9 
10 #include "TMath.h"
15 
16 namespace recob::tracking {
17 
20  {
21  return Plane(pos, dir);
22  }
23 
26  {
27  return Plane(s.position, s.direction());
28  }
29 
31  inline Plane makePlane(trkf::SurfWireX const& s)
32  {
33  return Plane(Point_t(s.x0(), s.y0(), s.z0()),
34  Vector_t(0, -std::sin(s.phi()), std::cos(s.phi())));
35  }
36 
38  inline Plane makePlane(geo::WireGeo const& wgeom)
39  {
40  auto xyz = wgeom.GetCenter();
41  xyz.SetX(0.);
42  double const phi = TMath::PiOver2() - wgeom.ThetaZ();
43  return Plane{xyz, Vector_t{0, -std::sin(phi), std::cos(phi)}};
44  }
45 
46 }
47 
48 #endif
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:114
Data product for reconstructed trajectory in space.
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:221
A point in the trajectory, with position and momentum.
Definition: TrackingTypes.h:85
double z0() const
Z origin.
Definition: SurfYZPlane.h:60
double x0() const
X origin.
Definition: SurfYZPlane.h:58
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
Definition: WireGeo.h:248
double y0() const
Y origin.
Definition: SurfYZPlane.h:59
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
Definition: TrackingTypes.h:31
Plane makePlane(recob::tracking::Point_t const &pos, recob::tracking::Vector_t const &dir)
helper function to construct a recob::tracking::Plane from a Point_t and a Vector_t; the point is on ...
Class defining a plane for tracking. It provides various functionalities to convert track parameters ...
Definition: TrackingPlane.h:37
Encapsulate the geometry of a wire.
Vector_t direction() const
Returns the direction of the trajectory (unit vector of the momentum).
Definition: TrackingTypes.h:97
TDirectory * dir
Definition: macro.C:5
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:61
recob::tracking::Plane Plane
Definition: TrackState.h:17
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
Definition: TrackingTypes.h:27
Planar surface defined by wire id and x-axis.
Point_t position
position in the trajectory [cm].
Definition: TrackingTypes.h:87