SurfWireX.cxx
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 ///
3 /// \file SurfWireX.cxx
4 ///
5 /// \brief Planar surface defined by wire id and x-axis.
6 ///
7 /// \author H. Greenlee
8 ///
9 ////////////////////////////////////////////////////////////////////////
10 
14 #include "TMath.h"
15 
16 namespace trkf {
17 
18  /// Constructor.
19  ///
20  /// Arguments:
21  ///
22  /// wireid - Wire id.
23  ///
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 
46  /// Destructor.
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:65
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:250
art framework interface to geometry description
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:73
Planar surface defined by wire id and x-axis.
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const