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