LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
SurfWireLine.cxx
Go to the documentation of this file.
1 
14 
16 
17 #include "TMath.h"
18 
19 namespace trkf {
20 
28  SurfWireLine::SurfWireLine(const geo::WireID& wireid, double x)
29  {
30  auto const& wireReadoutGeom = art::ServiceHandle<geo::WireReadout>()->Get();
31  geo::WireGeo const& wgeom = wireReadoutGeom.Wire(wireid);
32 
33  // Get wire center and angle from the wire geometry.
34  // Put local origin at center of wire.
35 
36  auto const xyz = wgeom.GetCenter();
37  double phi = TMath::PiOver2() - wgeom.ThetaZ();
38 
39  // Update base class.
40 
41  *static_cast<SurfYZLine*>(this) = SurfYZLine(x, xyz.Y(), xyz.Z(), phi);
42  }
43 
45  SurfWireLine::~SurfWireLine() = default;
46 
47 } // 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:112
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:219
SurfWireLine(const geo::WireID &wireid, double x)
Constructor.
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
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:93
SurfYZLine()
Default constructor.
Definition: SurfYZLine.cxx:25