12 std::vector<TVector2> edges;
14 for(
unsigned iq=0; iq<
dim; iq++)
15 edges.push_back(TVector2(xx[iq], yy[iq]));
23 unsigned xsplit,
unsigned ysplit)
25 if (!xsplit) xsplit = 1;
if (!ysplit) ysplit = 1;
27 double x0 = bl.X(), y0 = bl.Y();
28 double xstep = (tr.X() - bl.X())/xsplit, ystep = (tr.Y() - bl.Y())/ysplit;
31 for(
unsigned ix=0; ix<xsplit; ix++) {
32 double xOffset = x0 + xstep*ix;
34 for(
unsigned iy=0; iy<ysplit; iy++) {
35 double yOffset = y0 + ystep*iy;
37 std::vector<TVector2>
buffer;
39 buffer.push_back(TVector2(xOffset, yOffset));
40 buffer.push_back(TVector2(xOffset + xstep, yOffset));
41 buffer.push_back(TVector2(xOffset + xstep, yOffset + ystep));
42 buffer.push_back(TVector2(xOffset, yOffset + ystep));
52 unsigned xsplit,
unsigned ysplit)
54 AddRectangle(TVector2(x0 - xsize/2, y0 - ysize/2), TVector2(x0 + xsize/2, y0 + ysize/2),
75 double xxc[dim+1], yyc[dim+1];
77 for(
unsigned iq=0; iq<
dim; iq++) {
78 auto xyc =
eic->cnv(TVector2(xx[iq], yy[iq]));
79 xxc[iq] = xyc.X(); yyc[iq] = xyc.Y();
81 xxc[
dim] = xxc[0]; yyc[
dim] = yyc[0];
83 TPolyLine *
poly =
new TPolyLine(dim+1, xxc, yyc);
90 if (line) poly->Draw();
92 if (
eic->mUseDetectorHighlighting) {
93 TPolyLine *qpoly =
new TPolyLine(dim+1, xxc, yyc);
95 qpoly->SetLineColor(kWhite);
96 qpoly->SetLineWidth(3);
99 if (line) qpoly->Draw();
106 const TVector2 *shift,
unsigned tb)
const
109 unsigned dim = polygon.size();
112 for(
unsigned iq=0; iq<
dim; iq++) {
113 TVector2
vtx = polygon[iq] + (shift ? *shift : TVector2());
116 yy[iq] = vtx.Y()*(tb ? -1.0 : 1.0);