SurfWireLine.cxx
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 ///
3 /// \file SurfWireLine.cxx
4 ///
5 /// \brief Linear surface defined by wire id and x coordinate.
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  /// x - X coordinate.
24  ///
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 
47  /// Destructor.
49  {}
50 
51 } // end namespace trkf
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:65
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:250
art framework interface to geometry description
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
list x
Definition: train.py:276
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Definition: WireGeo.cxx:73
SurfYZLine()
Default constructor.
Definition: SurfYZLine.cxx:25
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const