23 WireParams::~WireParams()
33 "center_mm":{"x":0.0, "y":0.0, "z":0.0}, 34 "size_mm":{"x":10.0, "y":1000.0, "z":1000.0}, 35 "pitch_mm":{"u":3.0, "v":3.0, "w":3.0}, 36 "angle_deg":{"u":60.0, "v":-60.0, "w":0.0}, 37 "offset_mm":{"u":0.0, "v":0.0, "w":0.0}, 38 "plane_mm":{"u":3.0, "v":2.0, "w":1.0} 56 const Point deltabb(dx,dy,dz);
57 const Point bbmax = center + 0.5*deltabb;
58 const Point bbmin = center - 0.5*deltabb;
65 const Vector wU(0, std::cos(angU), std::sin(angU));
66 const Vector wV(0, std::cos(angV), std::sin(angV));
67 const Vector wW(0, std::cos(angW), std::sin(angW));
90 oU.
x(get<double>(cfg,
"plane_mm.u")*
units::mm);
91 oV.
x(get<double>(cfg,
"plane_mm.v")*
units::mm);
92 oW.
x(get<double>(cfg,
"plane_mm.w")*
units::mm);
96 const Ray U(oU, oU+pU), V(oV, oV+pV),
W(oW, oW+pW);
110 void WireParams::set(
double dx,
double dy,
double dz,
111 double pitch,
double angle)
115 const Point deltabb(dx,dy,dz);
116 const Point bbmax = center + 0.5*deltabb;
117 const Point bbmin = center - 0.5*deltabb;
119 double angU = +angle;
120 double angV = -angle;
124 const Vector wU(0, std::cos(angU), std::sin(angU));
125 const Vector wV(0, std::cos(angV), std::sin(angV));
128 const Vector xaxis(1,0,0);
137 const Point oU(0.375*dx, 0.0, 0.0);
138 const Point oV(0.250*dx, 0.0, 0.0);
139 const Point oW(0.125*dx, 0.0, 0.0);
142 const Ray U(oU, oU+pU);
143 const Ray V(oV, oV+pV);
144 const Ray W(oW, oW+pW);
150 const Ray& WireParams::pitchU()
const {
return m_pitchU; }
151 const Ray& WireParams::pitchV()
const {
return m_pitchV; }
152 const Ray& WireParams::pitchW()
const {
return m_pitchW; }
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
static const double degree
D3Vector norm() const
Return a normalized vector in the direction of this vector.
WIRECELL_FACTORY(WireParams, WireCell::WireParams, WireCell::IWireParameters, WireCell::IConfigurable) using namespace WireCell
BoundingBox bounds(int x, int y, int w, int h)
Json::Value Configuration
D3Vector cross(const D3Vector &rhs) const
Return the cross product of this vector and the other.