LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
SurfWireX.cxx
Go to the documentation of this file.
1 
14 
16 
17 #include "TMath.h"
18 
19 namespace trkf {
20 
28  {
29  auto const& wireReadoutGeom = art::ServiceHandle<geo::WireReadout>()->Get();
30  geo::WireGeo const& wgeom = wireReadoutGeom.Wire(wireid);
31 
32  // Get wire center and angle from the wire geometry.
33  // Put local origin at center of wire.
34 
35  auto const xyz = wgeom.GetCenter();
36  double phi = TMath::PiOver2() - wgeom.ThetaZ();
37 
38  // Update base class.
39 
40  *static_cast<SurfYZPlane*>(this) = SurfYZPlane(0., xyz.Y(), xyz.Z(), phi);
41  }
42 
44  SurfWireX::~SurfWireX() = default;
45 
46 } // end namespace trkf
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:112
virtual ~SurfWireX()
Destructor.
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:219
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
Definition: AddMC.C:8
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
Definition: WireGeo.h:246
Encapsulate the geometry of a wire .
SurfYZPlane()
Default constructor.
Definition: SurfYZPlane.cxx:24
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:61
SurfWireX(const geo::WireID &wireid)
Constructor.
Definition: SurfWireX.cxx:27
Planar surface defined by wire id and x-axis.