All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
13  /// \file lardata/RecoObjects/TrackingPlaneHelper.h
14  ///
15  /// \author G. Cerati (FNAL, MicroBooNE)
16  /// \date 2017
17  /// \version 1.0
18 
19  /// helper function to construct a recob::tracking::Plane from a Point_t and a Vector_t; the point is on the plane, the vector is orthogonal to the plane.
20  inline Plane makePlane(recob::tracking::Point_t const& pos, recob::tracking::Vector_t const& dir) { return Plane(pos, dir); }
21 
22  /// helper function to construct a recob::tracking::Plane from a recob::Trajectory::TrajectoryPoint_t.
24 
25  /// helper function to construct a recob::tracking::Plane from a trkf::SurfWireX object.
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 
28  /// helper function to construct a recob::tracking::Plane from a geo::WireGeo object. The plane will contain the wire and the x axis, assumed to be the drift direction (to be generalized).
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:65
Data product for reconstructed trajectory in space.
A point in the trajectory, with position and momentum.
Definition: TrackingTypes.h:63
BEGIN_PROLOG true icarus_rawdigitfilter FilterTools FilterPlane1 Plane
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:250
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
tuple dir
Definition: dropbox.py:28
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
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:63
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Definition: WireGeo.cxx:73
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