24 const int nwiresperplane = 21;
29 const double wire_extent = pitch * 0.5 * (nwiresperplane - 1);
31 std::vector<Vector> uvw_wire{
Vector(0, cos(angle), sin(angle)),
32 Vector(0, cos(angle), -sin(angle)),
36 std::vector<Vector> uvw_pitch{
Vector(0, -sin(angle), cos(angle)),
37 Vector(0, sin(angle), cos(angle)),
41 std::vector<Pimpos>
pimpos;
42 for (
int iplane=0; iplane<3; ++iplane) {
43 Pimpos p(nwiresperplane, -wire_extent, wire_extent, uvw_wire[iplane], uvw_pitch[iplane]);
46 const double wpdot = uvw_wire[iplane].dot(uvw_pitch[iplane]);
51 TCanvas canvas(
"c",
"c",500,500);
53 canvas.SetFixedAspectRatio(
true);
57 const double fsize_mm = 0.8*2.0*wire_extent/
units::mm;
58 TH1F* frame = canvas.DrawFrame(-fsize_mm, -fsize_mm, fsize_mm, fsize_mm);
59 frame->SetTitle(
"Pitch (thick) and wire (thin) red=U, blue=V, +X (-drift) direction into page");
60 frame->SetXTitle(
"Transverse Z [mm]");
61 frame->SetYTitle(
"Transverse Y [mm]");
64 for (
int iplane=0; iplane<3; ++iplane) {
66 const Vector wiredir = pimpos[iplane].axis(1);
67 const Vector pitchdir = pimpos[iplane].axis(2);
69 const Binning& binning = pimpos[iplane].region_binning();
71 for (
int ipitch = 0; ipitch <= binning.
nbins(); ++ipitch) {
72 const double pitch1 = binning.
edge(ipitch);
75 const Vector vpitch1 = origin + pitchdir * pitch1;
77 const Ray r_pitch(vpitch1, vpitch2);
78 const Vector vwire = 1.2*wiredir * wire_extent;
79 const Ray r_wire(origin + vpitch1 - vwire,
80 origin + vpitch1 + vwire);
82 if (ipitch < binning.
nbins()) {
86 a_pitch->SetLineColor(colors[iplane]);
87 a_pitch->SetLineWidth(2);
92 a_wire->SetLineColor(colors[iplane]);
98 canvas.Print(Form(
"%s.pdf", argv[0]));
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
int main(int argc, char *argv[])
static const double degree
static Ray pitch2(const IWire::vector &wires)
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
std::vector< float > Vector
Pimpos pimpos(nwires, min_wire_pitch, max_wire_pitch)
double edge(int ind) const
constexpr Point origin()
Returns a origin position with a point of the specified type.