LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TrackingPlaneHelper.h
Go to the documentation of this file.
1 #ifndef TRACKINGPLANEHELPER_H
2 #define TRACKINGPLANEHELPER_H
3 
8 #include "TMath.h"
9 
10 namespace recob {
11  namespace tracking {
12 
18 
20  inline Plane makePlane(recob::tracking::Point_t const& pos, recob::tracking::Vector_t const& dir) { return Plane(pos, dir); }
21 
24 
26  inline Plane makePlane(trkf::SurfWireX const& s) { return Plane(Point_t(s.x0(),s.y0(),s.z0()), Vector_t(0,-std::sin(s.phi()),std::cos(s.phi()))); }
27 
29  inline Plane makePlane(geo::WireGeo const& wgeom) {
30  double xyz[3] = {0.};
31  wgeom.GetCenter(xyz);
32  double phi = TMath::PiOver2() - wgeom.ThetaZ();
33  return Plane(Point_t(0.,xyz[1], xyz[2]), Vector_t(0,-std::sin(phi),std::cos(phi)));
34  }
35 
36  }
37 }
38 
39 #endif
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:61
Float_t s
Definition: plot.C:23
Data product for reconstructed trajectory in space.
A point in the trajectory, with position and momentum.
Definition: TrackingTypes.h:63
Reconstruction base classes.
double z0() const
Z origin.
Definition: SurfYZPlane.h:62
double x0() const
X origin.
Definition: SurfYZPlane.h:60
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
Definition: WireGeo.h:192
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:29
double y0() const
Y origin.
Definition: SurfYZPlane.h:61
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:76
TDirectory * dir
Definition: macro.C:5
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:63
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Definition: WireGeo.cxx:68
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:26
Planar surface defined by wire id and x-axis.
Point_t position
position in the trajectory [cm].
Definition: TrackingTypes.h:65