LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SurfWireX.cxx
Go to the documentation of this file.
1 
14 #include "TMath.h"
15 
16 namespace trkf {
17 
25  {
26  // Get geometry service.
27 
29 
30  // Get wire geometry.
31 
32  geo::WireGeo const& wgeom = geom->WireIDToWireGeo(wireid);
33 
34  // Get wire center and angle from the wire geometry.
35  // Put local origin at center of wire.
36 
37  double xyz[3] = {0.};
38  wgeom.GetCenter(xyz);
39  double phi = TMath::PiOver2() - wgeom.ThetaZ();
40 
41  // Update base class.
42 
43  *static_cast<SurfYZPlane*>(this) = SurfYZPlane(0., xyz[1], xyz[2], phi);
44  }
45 
48  {}
49 
50 } // end namespace trkf
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:61
virtual ~SurfWireX()
Destructor.
Definition: SurfWireX.cxx:47
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
Definition: WireGeo.h:192
Encapsulate the geometry of a wire.
SurfYZPlane()
Default constructor.
Definition: SurfYZPlane.cxx:24
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:63
SurfWireX(const geo::WireID &wireid)
Constructor.
Definition: SurfWireX.cxx:24
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Definition: WireGeo.cxx:68
Planar surface defined by wire id and x-axis.
art framework interface to geometry description
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const
Returns the specified wire.