18 canvas.SetFixedAspectRatio(
true);
23 const double fsize_mm = 1.5*wire_extent/
units::mm;
25 const Point worigin = pimposes[2]->origin();
27 TH1F* frame = canvas.DrawFrame(worigin[2]-fsize_mm, worigin[1]-fsize_mm,
28 worigin[2]+fsize_mm, worigin[1]+fsize_mm);
29 frame->SetTitle(Form(
"%s: Pitch (thick) and wire (thin) red=U, blue=V, xorigin=%.3fcm",
31 frame->SetXTitle(
"Transverse Z [mm]");
32 frame->SetYTitle(
"Transverse Y [mm]");
35 for (
int iplane=0; iplane<3; ++iplane) {
42 const double middle = binning.
min() + 0.5*binning.
span();
45 for (
int ipitch = 0; ipitch <= binning.
nbins(); ++ipitch) {
46 const double pitch1 = binning.
edge(ipitch);
49 if (
std::abs(middle-pitch1) > wire_extent) {
52 if (
std::abs(middle-pitch2) > wire_extent) {
56 const Vector vpitch1 = origin + pitchdir * pitch1;
58 const Ray r_pitch(vpitch1, vpitch2);
59 const Vector vwire = 1.2*wiredir * wire_extent;
60 const Ray r_wire(vpitch1 - vwire,
63 if (ipitch < binning.
nbins()) {
67 a_pitch->SetLineColor(colors[iplane]);
68 a_pitch->SetLineWidth(2);
73 a_wire->SetLineColor(colors[iplane]);
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
double span() const
Return the max-min.
const Point & origin() const
Return given 3-point origin for plane pitch.
const Binning & region_binning() const
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.
const Vector & axis(int i) const