54 :
TNamed ("Spectrum Painter2","Miroslav Morhac Painter")
58 gPad->Range(0, 0, 1 ,1);
60 fXmax = h2->GetNbinsX() - 1;
62 fYmax = h2->GetNbinsY() - 1;
64 fMaximumXScreenResolution = bs;
66 for (i = 0;i <= fXmax; i++) {
67 for (j = 0;j <= fYmax; j++) {
68 val = h2->GetBinContent(i + 1,j + 1);
69 if (val > fZmax) fZmax = val;
73 fBx1 =
gPad->XtoPixel(0.1);
74 fBx2 =
gPad->XtoPixel(0.99);
75 fBy1 =
gPad->YtoPixel(0.99);
76 fBy2 =
gPad->YtoPixel(0.05);
78 fModeGroup = kModeGroupLightHeight;
80 fDisplayMode = kDisplayModeSurface;
82 fZscale = kZScaleLinear;
84 fNodesx = fXmax-fXmin+1;
85 fNodesy = fYmax-fYmin+1;
113 fColorAlg = kColorAlgRgbSmooth;
135 fShadow = kShadowsNotPainted;
144 fBezier = kNoBezierInterpol;
150 fPenDash = kPenStyleSolid;
152 fChanmarkEnDis = kChannelMarksNotDrawn;
154 fChanmarkColor =
kBlue;
157 fChanmarkStyle = kChannelMarksStyleDot;
159 fChanlineEnDis = kChannelGridNotDrawn;
161 fChanlineColor =
kRed;
163 fEnvelope =
new Short_t [fMaximumXScreenResolution];
164 fEnvelopeContour =
new Short_t [fMaximumXScreenResolution];
165 for (i=0;i<fMaximumXScreenResolution;i++) {
167 fEnvelopeContour[i] = fBy2;
179 for (
int i=0; i<256; i++) {
207 if ((zmt==0)||(zmt==-3)||(zmt==-4)) {
214 if (zf>=1.0) zf =
log(zf);
218 if (zf>0) zf =
sqrt(zf);
247 Double_t da,db,dc=0,dd,dl,dm,dn,xtaz,ytaz,ztaz,
v=0,
v1;
252 if (z1>900) z1 = 900;
254 if (z2>900) z2 = 900;
256 if (z3>900) z3 = 900;
267 if ((i==1)||(i==3)) {
278 xtaz = (dx1+dx2+dx3)/3;
279 ytaz = (dy1+dy2+dy3)/3;
285 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
286 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
287 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
288 dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
290 if (dd!=0)
v = (da*dl+db*dm+dc*dn)/dd;
308 if (da>=1) da=
log(da);
309 if (db>=1) db=
log(db);
328 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
329 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
330 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
331 dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
333 if (dd!=0)
v = (da*dl+db*dm+dc*dn)/dd;
350 if (da>=1) da =
log(da);
351 if (db>=1) db =
log(db);
352 if (da!=0) dc = db/da;
391 Double_t pom1,pom2,sdx1=0,sdx2=0,sdy1,sdy2,spriz;
394 if (ztaz>900) ztaz = 900;
396 if (ztaz>32767) ztaz = 32767;
412 if (sx1<sx2) skrokx = 1;
414 if (sy1<sy2) skroky = 1;
418 if (
TMath::Abs(pom1)>0.0000001) sdx1 = pom2/pom1;
421 sdy1 = pom2-sdx1*pom1;
424 if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
427 sdy2 = pom2-sdx2*pom1;
430 pom2 = pom1*sdx1+sdy1;
432 for (;(sx1>(
fXmin-skrokx)) && (sx1<(
xmax-skrokx)) &&
433 (sy1>(
fYmin-skroky)) && (sy1<(
ymax-skroky)) &&
434 (spriz==0);sx1+=skrokx) {
436 pom2 = pom1*sdx1+sdy1;
440 pom2 = pom1*sdx2+sdy2;
441 sz2 = (
Int_t)(pom2+shad_noise);
442 if (sz1>sz2) spriz = 1;
445 }
else if (sy1!=sy2) {
446 if (sy1<sy2) skroky = 1;
450 if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
453 sdy2 = pom2-sdx2*pom1;
455 for (;(sy1>(
fYmin-skroky)) && (sy1<(
ymax-skroky)) &&
456 (spriz==0);sy1+=skroky) {
459 pom2 = pom1*sdx2+sdy2;
460 sz2 = (
Int_t)(pom2+shad_noise);
461 if (sz1>sz2) spriz=1;
477 unsigned long uinc1=0,uinc2=0,uinc3=0,upom,i;
482 else if (iv>255) iv = 255;
483 if (
gROOT->GetColor(250+iv)) {
491 if (
a >= UINT_MAX) uinc1 = UINT_MAX;
492 else uinc1 = (unsigned)
a;
494 i = (uinc1-upom)/256;
495 if ((i%2)==0) uinc1 = upom;
496 else uinc1 = 255-upom;
502 i = (uinc2-upom)/256;
503 if ((i%2)==0) uinc2 = upom;
504 else uinc2 = 255-upom;
510 i = (uinc3-upom)/256;
511 if ((i%2)==0) uinc3 = upom;
512 else uinc3 = 255-upom;
531 uinc2 = (
Int_t)green;
540 red =
a+0.956*
b+0.62*
c;
541 green =
a-0.272*
b-0.647*
c;
542 blue =
a-1.108*
b+1.705*
c;
543 if (red>=2) red = red-2;
544 else if (red>=1) red = 2-red;
545 if (green<0) green = -green;
546 if (blue>=2) blue = blue-2;
547 else if (blue>=1) blue = 2-blue;
548 else if (blue<-1) blue = 2+blue;
549 else if (blue<0) blue = -blue;
554 uinc2 = (
Int_t)green;
612 uinc2 = (
Int_t)green;
615 ui = uinc1+uinc2*256+uinc3*65536;
650 uinc2 = (
Int_t)green;
659 red =
a+0.956*
b+0.62*
c;
660 green =
a-0.272*
b-0.647*
c;
661 blue =
a-1.108*
b+1.705*
c;
662 if (red>=2) red = red-2;
663 else if (red>=1) red = red-1;
664 if (green<0) green = 1+green;
665 if (blue>=2) blue = blue-2;
666 else if (blue>=1) blue = blue-1;
667 else if (blue<-1) blue = 2+blue;
668 else if (blue<0) blue = 1+blue;
673 uinc2 = (
Int_t)green;
731 uinc2 = (
Int_t)green;
734 ui = uinc1+uinc2*256+uinc3*65536;
755 for (j=i+1;j<=3;j++)
a =
a*j;
756 for (j=1;j<=3-i;j++)
a =
a/j;
769 for (j=1;j<=i;j++)
v =
v*bezf;
770 for (j=1;j<=3-i;j++)
v =
v*(1-bezf);
799 Int_t x,
y,krok,xold=0,yold=0,prvy,yprv=0;
860 krok = (
x1<
x2)? 1:-1;
891 if (y1!=y2)
y += (y1<y2)? +1:-1;
912 Int_t x,
y,krok,xold=0,yold=0,prvy,xprv,yprv=0;
947 krok = (
x1<
x2)? 1:-1;
979 if (y1!=y2)
y+=(y1<y2)? +1:-1;
1028 gPad->PixeltoX(
x+w/2+1),
gPad->PixeltoY(
y)+1);
1032 gPad->PixeltoX(
x+w/2+1),
gPad->PixeltoY(
y+
h/2+1)+1);
1034 gPad->PixeltoX(
x+w/2+1),
gPad->PixeltoY(
y-
h/2-1)+1);
1048 gPad->PixeltoX(
x+w/2+1),
gPad->PixeltoY(
y+
h/2+1)+1);
1050 gPad->PixeltoX(
x+w/2+1),
gPad->PixeltoY(
y-
h/2-1)+1);
1085 Int_t krok,xi,yi,xj,yj,
a,
b,as,bs,pr,ae,be;
1098 krok = (xi<xj)? 1:-1;
1115 if (yi!=yj)
b += (yi<yj)? +1:-1;
1132 gPad->PixeltoX(ae),
gPad->PixeltoY(be)+1);
1149 for (
a=xi;
a<=xj;
a++) {
1155 for (
a=xj;
a<=xi;
a++) {
1586 Int_t q1=0,q2=0,qv=0,smer=0,flag=0,i=0,j=0,
x1=0,y1=0,
x2=0,y2=0,
x3=0,y3=0,
x4=0,y4=0,uhl=0,xp1=0,yp1=0,xp2=0,yp2=0;
1587 Int_t ix5,iy5,x6,y6,x7,y7,y8,x1d,y1d,x2d=0,y2d=0;
1588 Int_t i1=0,i2=0,i3=0,i4=0,j1=0,j2=0,j3=0,j4=0;
1589 Int_t s1=0,s2=0,s3=0,s4=0,
t1=0,t2=0,t3=0,t4=0;
1590 Double_t dx1,dx2,dx3,dx4,dy1,dy2,dy3,dy4,z1,z2,z3,z4,zl,zh;
1591 Double_t xa,xb=0,ya,yb=0,x5=0,y5=0;
1592 Double_t da=0,db=0,dc=0,dd=0,xtaz,ytaz,ztaz,
v,shad_noise;
1593 Int_t iv=0,ekv,stvor,sx1,sx2,sx3,sx4,sx5,sy1,sy2,sy3,sy4,sy5;
1594 Double_t pom1,pom2,sdx1,sdy1,sdx2=0,sdy2,sdx3,sdy3,sdy4,spriz;
1595 Int_t sr1=0,sr2=0,sr3=0,sr4=0,sr5=0,sr6=0,sr7=0,sr8=0;
1596 Int_t tr1=0,tr2=0,tr3=0,tr4=0,tr5=0,tr6=0,tr7=0,tr8=0;
1597 Int_t il,iv1=0,iv2=0,iv3=0,iv4=0;
1598 Double_t v1=0,
v2=0,
v3=0,
v4=0,dxr1,dxr2,dyr1,dyr2,zr1,zr2,bezf;
1599 Double_t dcount_reg,z1l,z2l,z3l,z4l,sdx2p,sdy2p,dap,dbp,dcp,ddp;
1600 Int_t sx1p,sy1p,sx3p,uip=0;
1602 Double_t p000x,p000y,p100x,p100y,p010x,p010y,p110x,p110y;
1603 Double_t p001x,p001y,p101x,p101y,p011x,p011y,p111x,p111y;
1604 Int_t ibezx1=0,ibezy1=0,ibezx2,ibezy2;
1605 unsigned ui1,ui2,ui3;
1606 Double_t fi,alfa,beta,x3max,y3max,mul,movx,movy;
1608 Double_t mxx,mxy,myx,myy,myz,px,py,kx,ky;
1609 Double_t bxl,bxh,byl,byh,xd,yd,
a,
b,rotx,roty;
1619 printf(
"The canvas size exceed the maximum X screen resolution.\n");
1620 printf(
"Use the option bf() to increase the buffer size (it should be greater than %d).\n",
fBx2);
1655 alfa = (
fAlpha*3.1415927)/180;
1656 beta = (
fBeta*3.1415927)/180;
1665 mx = (bxh-bxl)/(x3max*(
cos(alfa)+
cos(beta)));
1666 my = (bxh-bxl)/(y3max*(
cos(alfa)+
cos(beta)));
1667 mul = (byh-byl)/(bxh-bxl);
1668 movx = bxl+my*
cos(alfa)*y3max;
1672 myy = mul*((-1)*mx*
sin(beta)*
sin(fi)+my*
sin(alfa)*
cos(fi));
1673 px = rotx*mx*
cos(beta)-roty*my*
cos(alfa)+movx;
1688 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1689 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1690 movy = byl+mul*mz*zmax;
1692 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1697 if (zmin>=1) zmin =
log(zmin);
1699 if (zmax>=1) zmax =
log(zmax);
1701 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1702 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1703 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1704 movy = byl+mul*mz*zmax;
1706 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1711 if (zmin>=1) zmin =
sqrt(zmin);
1713 if (zmax>=1) zmax =
sqrt(zmax);
1715 if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
1716 mz = (bxh-bxl)*(
cos(alfa)+
cos(beta)-
sin(alfa)-
sin(beta));
1717 mz = mz/((zmax-zmin)*(
cos(alfa)+
cos(beta)));
1718 movy = byl+mul*mz*zmax;
1720 py = mul*(rotx*mx*
sin(beta)+roty*my*
sin(alfa))+movy;
1730 dcount_reg=
log(dcount_reg);
1733 dcount_reg=
sqrt(dcount_reg);
1744 p000y =
gPad->PixeltoY(
fYt)+1;
1747 p100y =
gPad->PixeltoY(
fYt)+1;
1750 p010y =
gPad->PixeltoY(
fYt)+1;
1753 p110y =
gPad->PixeltoY(
fYt)+1;
1757 p001y =
gPad->PixeltoY(
fYt)+1;
1760 p101y =
gPad->PixeltoY(
fYt)+1;
1763 p011y =
gPad->PixeltoY(
fYt)+1;
1766 p111y =
gPad->PixeltoY(
fYt)+1;
1767 Double_t bmin, bmax, binLow, binHigh, binWidth;
1768 Double_t axisLevel, gridDist, gridY1, gridY2;
1769 Int_t ndivx = 0, ndivy, ndivz, nbins;
1776 axis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx,
"");
1777 axis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivx,
"");
1779 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1781 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1782 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1783 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1789 nbins, binWidth,
" ");
1790 for (i = 0; i < nbins + 1; i++) {
1791 axisLevel = binLow+i*binWidth;
1792 gridDist = (axisLevel-bmin)*(p001y-p000y)/(bmax-bmin);
1793 gridY1 = p000y + gridDist, gridY2 = p100y + gridDist;
1795 gridY2 = p010y + gridDist;
1800 axis->
PaintAxis(p010x, p010y, p000x, p000y, bmin, bmax, ndivx,
"");
1801 axis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx,
"");
1803 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1805 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
1806 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
1807 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1813 nbins, binWidth,
" ");
1814 for (i = 0; i < nbins + 1; i++) {
1815 axisLevel = binLow+i*binWidth;
1816 gridDist = (axisLevel-bmin)*(p011y-p010y)/(bmax-bmin);
1817 gridY1 = p010y + gridDist, gridY2 = p000y + gridDist;
1819 gridY2 = p110y + gridDist;
1824 axis->
PaintAxis(p110x, p110y, p010x, p010y, bmin, bmax, ndivx,
"");
1825 axis->
PaintAxis(p110x, p110y, p100x, p100y, bmin, bmax, ndivx,
"");
1827 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1829 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
1830 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
1831 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1837 nbins, binWidth,
" ");
1838 for (i = 0; i < nbins + 1; i++) {
1839 axisLevel = binLow+i*binWidth;
1840 gridDist = (axisLevel-bmin)*(p111y-p110y)/(bmax-bmin);
1841 gridY1 = p110y + gridDist, gridY2 = p010y + gridDist;
1843 gridY2 = p100y + gridDist;
1848 axis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivx,
"");
1849 axis->
PaintAxis(p100x, p100y, p000x, p000y, bmin, bmax, ndivx,
"");
1851 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
1853 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
1854 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
1855 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
1861 nbins, binWidth,
" ");
1862 for (i = 0; i < nbins + 1; i++) {
1863 axisLevel = binLow+i*binWidth;
1864 gridDist = (axisLevel-bmin)*(p101y-p100y)/(bmax-bmin);
1865 gridY1 = p100y + gridDist, gridY2 = p110y + gridDist;
1867 gridY2 = p000y + gridDist;
1886 if (
x2>=
x1) turnj = 1;
1887 if (
x3>=
x2) turni = 1;
1915 if (smer==0) q1 -= 1;
1919 if (smer==0) q2 += 1;
1956 if ((q1!=q2||smer!=0) && flag==1) {
2051 xtaz = (dx1+dx2+dx4)/3;
2052 ytaz = (dy1+dy2+dy4)/3;
2053 ztaz = (z1+z2+z4)/3;
2057 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2062 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2071 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2076 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2086 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2091 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2101 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2106 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2120 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2125 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2130 da = (dxr1+dx2+dx1)/3;
2131 db = (dyr1+dy2+dy1)/3;
2135 da = (dxr1+dxr2+dx1)/3;
2136 db = (dyr1+dyr2+dy1)/3;
2137 dc = (zr1+zr2+z1)/3;
2140 da = (dxr2+dx1+dx4)/3;
2141 db = (dyr2+dy1+dy4)/3;
2146 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2151 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2156 da = (dx1+dx2+dx3)/3;
2157 db = (dy1+dy2+dy3)/3;
2161 da = (dx2+dxr1+dx3)/3;
2162 db = (dy2+dyr1+dy3)/3;
2166 da = (dx2+dxr2+dxr1)/3;
2167 db = (dy2+dyr2+dyr1)/3;
2168 dc = (z2+zr2+zr1)/3;
2171 da = (dxr2+dx2+dx1)/3;
2172 db = (dyr2+dy2+dy1)/3;
2177 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2182 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2187 da = (dx2+dx3+dx4)/3;
2188 db = (dy2+dy3+dy4)/3;
2192 da = (dx4+dx3+dxr1)/3;
2193 db = (dy4+dy3+dyr1)/3;
2197 da = (dx3+dxr2+dxr1)/3;
2198 db = (dy3+dyr2+dyr1)/3;
2199 dc = (z3+zr2+zr1)/3;
2202 da = (dx2+dxr2+dx3)/3;
2203 db = (dy2+dyr2+dy3)/3;
2208 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2213 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2218 da = (dx1+dx3+dx4)/3;
2219 db = (dy1+dy3+dy4)/3;
2223 da = (dx4+dx3+dxr2)/3;
2224 db = (dy4+dy3+dyr2)/3;
2228 da = (dx4+dxr2+dxr1)/3;
2229 db = (dy4+dyr2+dyr1)/3;
2230 dc = (z4+zr2+zr1)/3;
2233 da = (dx1+dx4+dxr1)/3;
2234 db = (dy1+dy4+dyr1)/3;
2306 xtaz = (dx3+dx2+dx4)/3;
2307 ytaz = (dy3+dy2+dy4)/3;
2308 ztaz = (z3+z2+z4)/3;
2363 if ((q1!=q2||smer!=0)&&flag==1) {
2458 xtaz = (dx1+dx2+dx4)/3;
2459 ytaz = (dy1+dy2+dy4)/3;
2460 ztaz = (z1+z2+z4)/3;
2464 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2469 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2478 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2483 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2493 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2498 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2508 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2513 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2527 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
2532 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
2537 da = (dxr1+dx2+dx1)/3;
2538 db = (dyr1+dy2+dy1)/3;
2542 da = (dxr1+dxr2+dx1)/3;
2543 db = (dyr1+dyr2+dy1)/3;
2544 dc = (zr1+zr2+z1)/3;
2547 da = (dxr2+dx1+dx4)/3;
2548 db = (dyr2+dy1+dy4)/3;
2553 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
2558 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
2563 da = (dx1+dx2+dx3)/3;
2564 db = (dy1+dy2+dy3)/3;
2568 da = (dx2+dxr1+dx3)/3;
2569 db = (dy2+dyr1+dy3)/3;
2573 da = (dx2+dxr2+dxr1)/3;
2574 db = (dy2+dyr2+dyr1)/3;
2575 dc = (z2+zr2+zr1)/3;
2578 da = (dxr2+dx2+dx1)/3;
2579 db = (dyr2+dy2+dy1)/3;
2584 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
2589 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
2594 da = (dx2+dx3+dx4)/3;
2595 db = (dy2+dy3+dy4)/3;
2599 da = (dx4+dx3+dxr1)/3;
2600 db = (dy4+dy3+dyr1)/3;
2604 da = (dx3+dxr2+dxr1)/3;
2605 db = (dy3+dyr2+dyr1)/3;
2606 dc = (z3+zr2+zr1)/3;
2609 da = (dx2+dxr2+dx3)/3;
2610 db = (dy2+dyr2+dy3)/3;
2615 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
2620 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
2625 da = (dx1+dx3+dx4)/3;
2626 db = (dy1+dy3+dy4)/3;
2630 da = (dx4+dx3+dxr2)/3;
2631 db = (dy4+dy3+dyr2)/3;
2635 da = (dx4+dxr2+dxr1)/3;
2636 db = (dy4+dyr2+dyr1)/3;
2637 dc = (z4+zr2+zr1)/3;
2640 da = (dx1+dx4+dxr1)/3;
2641 db = (dy1+dy4+dyr1)/3;
2688 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2689 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2690 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2691 dd = -da*dx1-db*dy1-dc*z1;
2708 if (pom2!=0) sdx1 = pom1/pom2;
2711 sdy1 = pom1-sdx1*pom2;
2712 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2714 sdy4 = sdx1*pom1+sdy1;
2715 sy4 = (
Int_t)(sdy4);
2723 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
2724 else v = (iv1+iv2+iv4)/3;
2738 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
2739 else v = (iv1+iv2+iv4)/3;
2763 if (pom2!=0) sdx2 = pom1/pom2;
2766 sdy2 = pom1-sdx2*pom2;
2777 xtaz = (dx3+dx2+dx4)/3;
2778 ytaz = (dy3+dy2+dy4)/3;
2779 ztaz = (z3+z2+z4)/3;
2814 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
2815 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
2816 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
2817 dd = -da*dx1-db*dy1-dc*z1;
2834 if (pom2!=0) sdx1 = pom1/pom2;
2837 sdy1 = pom1-sdx1*pom2;
2838 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
2840 sdy4 = sdx1*pom1+sdy1;
2849 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
2850 else v = (iv1+iv2+iv4)/3;
2864 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
2865 else v = (iv1+iv2+iv4)/3;
2875 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
2877 sdy4 = sdx2p*pom1+sdy2p;
2887 if (dcp!=0)
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2888 else v = (iv1+iv2+iv4)/3;
2903 if (dcp!=0)
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
2904 else v = (iv1+iv2+iv4)/3;
2929 if (pom2!=0) sdx2 = pom1/pom2;
2932 sdy2 = pom1-sdx2*pom2;
2933 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
2935 sdy4 = sdx2*pom1+sdy2;
2944 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
2945 else v =(iv1+iv2+iv4)/3;
2959 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
2960 else v =(iv1+iv2+iv4)/3;
2973 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
2978 }
else if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
3006 bezy1 = y1+(y2-y3)/6;
3007 bezy2 = y2-(y4-y1)/6;
3033 for (bezf=0;bezf<1.01;bezf+=0.1) {
3043 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3078 for (bezf=0;bezf<1.01;bezf+=0.1) {
3088 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3102 if ((q1!=q2||smer!=0)&&flag==1) {
3159 i1 = (
Int_t)(zl/dcount_reg+1);
3160 if (z1!=z2||z2!=z3||z3!=z4) {
3180 if (
fZ>zh)
goto eqend;
3184 if ((z2<=
fZ&&
fZ<z1)||(z2<
fZ&&
fZ<=z1)) {
3185 xb = (
fZ-z2)*(dx1-dx2)/(z1-z2)+dx2;
3188 if ((z1<=
fZ&&
fZ<z2)||(z1<
fZ&&
fZ<=z2)) {
3189 xb = (
fZ-z1)*(dx2-dx1)/(z2-z1)+dx1;
3192 if (z2==
fZ&&
fZ==z1) {
3201 if ((z1<=
fZ&&
fZ<z4)||(z1<
fZ&&
fZ<=z4)) {
3202 ya = (
fZ-z1)*(dy4-dy1)/(z4-z1)+dy1;
3205 if ((z4<=
fZ&&
fZ<z1)||(z4<
fZ&&
fZ<=z1)) {
3206 ya = (
fZ-z4)*(dy1-dy4)/(z1-z4)+dy4;
3209 if (z4==
fZ&&
fZ==z1) {
3221 if ((z3<=
fZ&&
fZ<z4)||(z3<
fZ&&
fZ<=z4)) {
3222 xa = (
fZ-z3)*(dx4-dx3)/(z4-z3)+dx3;
3225 if ((z4<=
fZ&&
fZ<z3)||(z4<
fZ&&
fZ<=z3)) {
3226 xa = (
fZ-z4)*(dx3-dx4)/(z3-z4)+dx4;
3229 if (z4==
fZ&&
fZ==z3) {
3241 if ((z2<=
fZ&&
fZ<z3)||(z2<
fZ&&
fZ<=z3)) {
3242 ya = (
fZ-z2)*(dy3-dy2)/(z3-z2)+dy2;
3245 if ((z3<=
fZ&&
fZ<z2)||(z3<
fZ&&
fZ<=z2)) {
3246 ya = (
fZ-z3)*(dy2-dy3)/(z2-z3)+dy3;
3249 if (z3==
fZ&&
fZ==z2) {
3268 if ((q1!=q2||smer!=0)&&flag==1) {
3280 if (
s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3294 if (
s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
3309 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3323 if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
3454 if (pom2!=0) sdx1 = pom1/pom2;
3457 sdy1 = pom1-sdx1*pom2;
3460 if (pom2!=0) sdx2 = pom1/pom2;
3463 sdy2 = pom1-sdx2*pom2;
3466 if (pom2!=0) sdx3 = pom1/pom2;
3469 sdy3 = pom1-sdx3*pom2;
3472 for (sx4=sx1;sx4<=sx2;sx4++) {
3474 sdy4 = sdx1*pom1+sdy1;
3477 sdy4 = sdx2*pom1+sdy2;
3485 if ((sy4<=y5)||(sy5<y5)) {
3494 for (sx4=sx2;sx4<=sx3;sx4++) {
3496 sdy4 = sdx3*pom1+sdy3;
3499 sdy4 = sdx2*pom1+sdy2;
3507 if ((sy4<=y5)||(sy5<y5)) {
3517 for (sx4=sx1;sx4<=sx3;sx4++) {
3519 sdy4 = sdx2*pom1+sdy2;
3522 sdy4 = sdx1*pom1+sdy1;
3530 if ((sy4<=y5)||(sy5<y5)) {
3539 for (sx4=sx3;sx4<=sx2;sx4++) {
3541 sdy4 = sdx3*pom1+sdy3;
3544 sdy4 = sdx1*pom1+sdy1;
3552 if ((sy4<=y5)||(sy5<y5)) {
3596 if (pom2!=0) sdx1 = pom1/pom2;
3599 sdy1 = pom1-sdx1*pom2;
3602 if (pom2!=0) sdx2 = pom1/pom2;
3605 sdy2 = pom1-sdx2*pom2;
3608 if (pom2!=0) sdx3 = pom1/pom2;
3611 sdy3 = pom1-sdx3*pom2;
3614 for (sx4=sx1;sx4<=sx2;sx4++) {
3616 sdy4 = sdx1*pom1+sdy1;
3619 sdy4 = sdx2*pom1+sdy2;
3627 if ((sy4<=y5)||(sy5<y5)) {
3636 for (sx4=sx2;sx4<=sx3;sx4++) {
3638 sdy4 = sdx3*pom1+sdy3;
3641 sdy4 = sdx2*pom1+sdy2;
3649 if ((sy4<=y5)||(sy5<y5)) {
3659 for (sx4=sx1;sx4<=sx3;sx4++) {
3661 sdy4 = sdx2*pom1+sdy2;
3664 sdy4 = sdx1*pom1+sdy1;
3672 if ((sy4<=y5)||(sy5<y5)) {
3681 for (sx4=sx3;sx4<=sx2;sx4++) {
3683 sdy4 = sdx3*pom1+sdy3;
3686 sdy4 = sdx1*pom1+sdy1;
3694 if ((sy4<=y5)||(sy5<y5)) {
3829 if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
3866 bezy1 = y1+(y2-y3)/6;
3867 bezy2 = y2-(y4-y1)/6;
3893 for (bezf=0;bezf<1.01;bezf+=0.1) {
3903 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
3938 for (bezf=0;bezf<1.01;bezf+=0.1) {
3948 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
3962 if ((q1!=q2||smer!=0)&&flag==1) {
4057 xtaz = (dx1+dx2+dx4)/3;
4058 ytaz = (dy1+dy2+dy4)/3;
4059 ztaz = (z1+z2+z4)/3;
4063 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4068 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4077 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4082 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4092 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4097 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4107 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4112 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4126 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4131 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4136 da = (dxr1+dx2+dx1)/3;
4137 db = (dyr1+dy2+dy1)/3;
4141 da = (dxr1+dxr2+dx1)/3;
4142 db = (dyr1+dyr2+dy1)/3;
4143 dc = (zr1+zr2+z1)/3;
4146 da = (dxr2+dx1+dx4)/3;
4147 db = (dyr2+dy1+dy4)/3;
4152 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4157 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4162 da = (dx1+dx2+dx3)/3;
4163 db = (dy1+dy2+dy3)/3;
4167 da = (dx2+dxr1+dx3)/3;
4168 db = (dy2+dyr1+dy3)/3;
4172 da = (dx2+dxr2+dxr1)/3;
4173 db = (dy2+dyr2+dyr1)/3;
4174 dc = (z2+zr2+zr1)/3;
4177 da = (dxr2+dx2+dx1)/3;
4178 db = (dyr2+dy2+dy1)/3;
4183 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4188 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4193 da = (dx2+dx3+dx4)/3;
4194 db = (dy2+dy3+dy4)/3;
4198 da = (dx4+dx3+dxr1)/3;
4199 db = (dy4+dy3+dyr1)/3;
4203 da = (dx3+dxr2+dxr1)/3;
4204 db = (dy3+dyr2+dyr1)/3;
4205 dc = (z3+zr2+zr1)/3;
4208 da = (dx2+dxr2+dx3)/3;
4209 db = (dy2+dyr2+dy3)/3;
4214 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4219 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4224 da = (dx1+dx3+dx4)/3;
4225 db = (dy1+dy3+dy4)/3;
4229 da = (dx4+dx3+dxr2)/3;
4230 db = (dy4+dy3+dyr2)/3;
4234 da = (dx4+dxr2+dxr1)/3;
4235 db = (dy4+dyr2+dyr1)/3;
4236 dc = (z4+zr2+zr1)/3;
4239 da = (dx1+dx4+dxr1)/3;
4240 db = (dy1+dy4+dyr1)/3;
4287 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4288 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4289 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4290 dd = -da*dx1-db*dy1-dc*z1;
4306 if (pom2!=0) sdx2 = pom1/pom2;
4309 sdy2 = pom1-sdx2*pom2;
4320 xtaz = (dx3+dx2+dx4)/3;
4321 ytaz = (dy3+dy2+dy4)/3;
4322 ztaz = (z3+z2+z4)/3;
4357 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4358 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4359 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4360 dd = -da*dx1-db*dy1-dc*z1;
4377 if (pom2!=0) sdx1 = pom1/pom2;
4380 sdy1 = pom1-sdx1*pom2;
4381 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4383 sdy4 = sdx1*pom1+sdy1;
4392 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
4393 else v =(iv1+iv2+iv4)/3;
4407 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
4408 else v =(iv1+iv2+iv4)/3;
4418 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
4420 sdy4 = sdx2p*pom1+sdy2p;
4430 if (dcp!=0)
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4431 else v = (iv1+iv2+iv4)/3;
4446 if (dcp!=0)
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
4447 else v = (iv1+iv2+iv4)/3;
4462 if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
4499 bezy1 = y1+(y2-y3)/6;
4500 bezy2 = y2-(y4-y1)/6;
4526 for (bezf=0;bezf<1.01;bezf+=0.1) {
4536 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
4571 for (bezf=0;bezf<1.01;bezf+=0.1) {
4581 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
4595 if ((q1!=q2||smer!=0)&&flag==1) {
4690 xtaz = (dx1+dx2+dx4)/3;
4691 ytaz = (dy1+dy2+dy4)/3;
4692 ztaz = (z1+z2+z4)/3;
4696 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4701 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4710 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4715 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4725 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4730 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4740 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4745 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4759 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
4764 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
4769 da = (dxr1+dx2+dx1)/3;
4770 db = (dyr1+dy2+dy1)/3;
4774 da = (dxr1+dxr2+dx1)/3;
4775 db = (dyr1+dyr2+dy1)/3;
4776 dc = (zr1+zr2+z1)/3;
4779 da = (dxr2+dx1+dx4)/3;
4780 db = (dyr2+dy1+dy4)/3;
4785 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
4790 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
4795 da = (dx1+dx2+dx3)/3;
4796 db = (dy1+dy2+dy3)/3;
4800 da = (dx2+dxr1+dx3)/3;
4801 db = (dy2+dyr1+dy3)/3;
4805 da = (dx2+dxr2+dxr1)/3;
4806 db = (dy2+dyr2+dyr1)/3;
4807 dc = (z2+zr2+zr1)/3;
4810 da = (dxr2+dx2+dx1)/3;
4811 db = (dyr2+dy2+dy1)/3;
4816 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
4821 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
4826 da = (dx2+dx3+dx4)/3;
4827 db = (dy2+dy3+dy4)/3;
4831 da = (dx4+dx3+dxr1)/3;
4832 db = (dy4+dy3+dyr1)/3;
4836 da = (dx3+dxr2+dxr1)/3;
4837 db = (dy3+dyr2+dyr1)/3;
4838 dc = (z3+zr2+zr1)/3;
4841 da = (dx2+dxr2+dx3)/3;
4842 db = (dy2+dyr2+dy3)/3;
4847 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
4852 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
4857 da = (dx1+dx3+dx4)/3;
4858 db = (dy1+dy3+dy4)/3;
4862 da = (dx4+dx3+dxr2)/3;
4863 db = (dy4+dy3+dyr2)/3;
4867 da = (dx4+dxr2+dxr1)/3;
4868 db = (dy4+dyr2+dyr1)/3;
4869 dc = (z4+zr2+zr1)/3;
4872 da = (dx1+dx4+dxr1)/3;
4873 db = (dy1+dy4+dyr1)/3;
4920 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
4921 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
4922 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
4923 dd = -da*dx1-db*dy1-dc*z1;
4940 if (pom2!=0) sdx1 = pom1/pom2;
4943 sdy1 = pom1-sdx1*pom2;
4944 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
4946 sdy4 = sdx1*pom1+sdy1;
4955 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
4956 else v =(iv1+iv2+iv4)/3;
4970 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
4971 else v =(iv1+iv2+iv4)/3;
4981 xtaz = (dx3+dx2+dx4)/3;
4982 ytaz = (dy3+dy2+dy4)/3;
4983 ztaz = (z3+z2+z4)/3;
5018 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5019 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5020 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5021 dd = -da*dx1-db*dy1-dc*z1;
5038 if (pom2!=0) sdx2 = pom1/pom2;
5041 sdy2 = pom1-sdx2*pom2;
5042 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
5044 sdy4 = sdx2*pom1+sdy2;
5053 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5054 else v =(iv1+iv2+iv4)/3;
5068 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5069 else v =(iv1+iv2+iv4)/3;
5098 box->SetFillStyle(1001);
5099 if ((q1!=q2||smer!=0)&&flag==1) {
5194 xtaz = (dx1+dx2+dx4)/3;
5195 ytaz = (dy1+dy2+dy4)/3;
5196 ztaz = (z1+z2+z4)/3;
5200 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5205 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5214 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5219 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5229 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5234 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5244 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5249 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5263 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
5268 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
5273 da = (dxr1+dx2+dx1)/3;
5274 db = (dyr1+dy2+dy1)/3;
5278 da = (dxr1+dxr2+dx1)/3;
5279 db = (dyr1+dyr2+dy1)/3;
5280 dc = (zr1+zr2+z1)/3;
5283 da = (dxr2+dx1+dx4)/3;
5284 db = (dyr2+dy1+dy4)/3;
5289 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
5294 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
5299 da = (dx1+dx2+dx3)/3;
5300 db = (dy1+dy2+dy3)/3;
5304 da = (dx2+dxr1+dx3)/3;
5305 db = (dy2+dyr1+dy3)/3;
5309 da = (dx2+dxr2+dxr1)/3;
5310 db = (dy2+dyr2+dyr1)/3;
5311 dc = (z2+zr2+zr1)/3;
5314 da = (dxr2+dx2+dx1)/3;
5315 db = (dyr2+dy2+dy1)/3;
5320 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
5325 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
5330 da = (dx2+dx3+dx4)/3;
5331 db = (dy2+dy3+dy4)/3;
5335 da = (dx4+dx3+dxr1)/3;
5336 db = (dy4+dy3+dyr1)/3;
5340 da = (dx3+dxr2+dxr1)/3;
5341 db = (dy3+dyr2+dyr1)/3;
5342 dc = (z3+zr2+zr1)/3;
5345 da = (dx2+dxr2+dx3)/3;
5346 db = (dy2+dyr2+dy3)/3;
5351 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
5356 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
5361 da = (dx1+dx3+dx4)/3;
5362 db = (dy1+dy3+dy4)/3;
5366 da = (dx4+dx3+dxr2)/3;
5367 db = (dy4+dy3+dyr2)/3;
5371 da = (dx4+dxr2+dxr1)/3;
5372 db = (dy4+dyr2+dyr1)/3;
5373 dc = (z4+zr2+zr1)/3;
5376 da = (dx1+dx4+dxr1)/3;
5377 db = (dy1+dy4+dyr1)/3;
5424 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5425 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5426 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5427 dd = -da*dx1-db*dy1-dc*z1;
5464 if (pom2!=0) sdx1 = pom1/pom2;
5467 sdy1 = pom1-sdx1*pom2;
5470 if (pom2!=0) sdx2 = pom1/pom2;
5473 sdy2 = pom1-sdx2*pom2;
5476 if (pom2!=0) sdx3 = pom1/pom2;
5479 sdy3 = pom1-sdx3*pom2;
5482 for (sx4=sx1;sx4<=sx2;sx4++) {
5484 sdy4 = sdx1*pom1+sdy1;
5487 sdy4 = sdx2*pom1+sdy2;
5495 if ((sy4<=y5)||(sy5<y5)) {
5499 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5501 for (il=sy5;il<=sy4+1;il++) {
5503 if(il<=sy4) dy1 = il;
5505 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5506 else v =(iv1+iv2+iv4)/3;
5510 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5518 for (sx4=sx2;sx4<=sx3;sx4++) {
5520 sdy4 = sdx3*pom1+sdy3;
5523 sdy4 = sdx2*pom1+sdy2;
5531 if ((sy4<=y5)||(sy5<y5)) {
5535 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5537 for (il=sy5;il<=sy4+1;il++) {
5539 if(il<=sy4) dy1 = il;
5541 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5542 else v =(iv1+iv2+iv4)/3;
5546 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5555 for (sx4=sx1;sx4<=sx3;sx4++) {
5557 sdy4 = sdx2*pom1+sdy2;
5560 sdy4 = sdx1*pom1+sdy1;
5568 if ((sy4<=y5)||(sy5<y5)) {
5572 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5574 for (il=sy5;il<=sy4+1;il++) {
5576 if(il<=sy4) dy1 = il;
5578 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5579 else v =(iv1+iv2+iv4)/3;
5583 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5591 for (sx4=sx3;sx4<=sx2;sx4++) {
5593 sdy4 = sdx3*pom1+sdy3;
5596 sdy4 = sdx1*pom1+sdy1;
5604 if ((sy4<=y5)||(sy5<y5)) {
5608 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5610 for (il=sy5;il<=sy4+1;il++) {
5612 if(il<=sy4) dy1 = il;
5614 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5615 else v =(iv1+iv2+iv4)/3;
5619 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5627 xtaz = (dx3+dx2+dx4)/3;
5628 ytaz = (dy3+dy2+dy4)/3;
5629 ztaz = (z3+z2+z4)/3;
5664 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
5665 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
5666 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
5667 dd = -da*dx1-db*dy1-dc*z1;
5704 if (pom2!=0) sdx1 = pom1/pom2;
5707 sdy1 = pom1-sdx1*pom2;
5710 if (pom2!=0) sdx2 = pom1/pom2;
5713 sdy2 = pom1-sdx2*pom2;
5716 if (pom2!=0) sdx3 = pom1/pom2;
5719 sdy3 = pom1-sdx3*pom2;
5722 for (sx4=sx1;sx4<=sx2;sx4++) {
5724 sdy4 = sdx1*pom1+sdy1;
5727 sdy4 = sdx2*pom1+sdy2;
5735 if ((sy4<=y5)||(sy5<y5)) {
5739 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5741 for (il=sy5;il<=sy4+1;il++) {
5743 if(il<=sy4) dy1 = il;
5745 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5746 else v =(iv2+iv3+iv4)/3;
5750 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5758 for (sx4=sx2;sx4<=sx3;sx4++) {
5760 sdy4 = sdx3*pom1+sdy3;
5763 sdy4 = sdx2*pom1+sdy2;
5771 if ((sy4<=y5)||(sy5<y5)) {
5775 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5777 for (il=sy5;il<=sy4+1;il++) {
5779 if(il<=sy4) dy1 = il;
5781 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5782 else v =(iv2+iv3+iv4)/3;
5786 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5795 for (sx4=sx1;sx4<=sx3;sx4++) {
5797 sdy4 = sdx2*pom1+sdy2;
5800 sdy4 = sdx1*pom1+sdy1;
5808 if ((sy4<=y5)||(sy5<y5)) {
5812 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5814 for (il=sy5;il<=sy4+1;il++) {
5816 if(il<=sy4) dy1 = il;
5818 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5819 else v =(iv2+iv3+iv4)/3;
5823 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5831 for (sx4=sx3;sx4<=sx2;sx4++) {
5833 sdy4 = sdx3*pom1+sdy3;
5836 sdy4 = sdx1*pom1+sdy1;
5844 if ((sy4<=y5)||(sy5<y5)) {
5848 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
5850 for (il=sy5;il<=sy4+1;il++) {
5852 if(il<=sy4) dy1 = il;
5854 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
5855 else v =(iv2+iv3+iv4)/3;
5859 box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
5871 if ((q1!=q2||smer!=0)&&flag==1) {
5915 if ((q1!=q2||smer!=0)&&flag==1) {
5958 if ((q1!=q2||smer!=0)&&flag==1) {
6053 xtaz = (dx1+dx2+dx4)/3;
6054 ytaz = (dy1+dy2+dy4)/3;
6055 ztaz = (z1+z2+z4)/3;
6059 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6064 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6073 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6078 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6088 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6093 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6103 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6108 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6122 if (sr1<0||sr1>w1||tr1<0||tr1>w2)
Transform(sr1,tr1,-1);
6127 if (sr8<0||sr8>w1||tr8<0||tr8>w2)
Transform(sr8,tr8,-1);
6132 da = (dxr1+dx2+dx1)/3;
6133 db = (dyr1+dy2+dy1)/3;
6137 da = (dxr1+dxr2+dx1)/3;
6138 db = (dyr1+dyr2+dy1)/3;
6139 dc = (zr1+zr2+z1)/3;
6142 da = (dxr2+dx1+dx4)/3;
6143 db = (dyr2+dy1+dy4)/3;
6148 if (sr3<0||sr3>w1||tr3<0||tr3>w2)
Transform(sr3,tr3,-1);
6153 if (sr2<0||sr2>w1||tr2<0||tr2>w2)
Transform(sr2,tr2,-1);
6158 da = (dx1+dx2+dx3)/3;
6159 db = (dy1+dy2+dy3)/3;
6163 da = (dx2+dxr1+dx3)/3;
6164 db = (dy2+dyr1+dy3)/3;
6168 da = (dx2+dxr2+dxr1)/3;
6169 db = (dy2+dyr2+dyr1)/3;
6170 dc = (z2+zr2+zr1)/3;
6173 da = (dxr2+dx2+dx1)/3;
6174 db = (dyr2+dy2+dy1)/3;
6179 if (sr5<0||sr5>w1||tr5<0||tr5>w2)
Transform(sr5,tr5,-1);
6184 if (sr4<0||sr4>w1||tr4<0||tr4>w2)
Transform(sr4,tr4,-1);
6189 da = (dx2+dx3+dx4)/3;
6190 db = (dy2+dy3+dy4)/3;
6194 da = (dx4+dx3+dxr1)/3;
6195 db = (dy4+dy3+dyr1)/3;
6199 da = (dx3+dxr2+dxr1)/3;
6200 db = (dy3+dyr2+dyr1)/3;
6201 dc = (z3+zr2+zr1)/3;
6204 da = (dx2+dxr2+dx3)/3;
6205 db = (dy2+dyr2+dy3)/3;
6210 if (sr7<0||sr7>w1||tr7<0||tr7>w2)
Transform(sr7,tr7,-1);
6215 if (sr6<0||sr6>w1||tr6<0||tr6>w2)
Transform(sr6,tr6,-1);
6220 da = (dx1+dx3+dx4)/3;
6221 db = (dy1+dy3+dy4)/3;
6225 da = (dx4+dx3+dxr2)/3;
6226 db = (dy4+dy3+dyr2)/3;
6230 da = (dx4+dxr2+dxr1)/3;
6231 db = (dy4+dyr2+dyr1)/3;
6232 dc = (z4+zr2+zr1)/3;
6235 da = (dx1+dx4+dxr1)/3;
6236 db = (dy1+dy4+dyr1)/3;
6283 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6284 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6285 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6286 dd = -da*dx1-db*dy1-dc*z1;
6303 if (pom2!=0) sdx1 = pom1/pom2;
6306 sdy1 = pom1-sdx1*pom2;
6307 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6309 sdy4 = sdx1*pom1+sdy1;
6318 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6319 else v = (iv1+iv2+iv4)/3;
6333 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6334 else v = (iv1+iv2+iv4)/3;
6358 if (pom2!=0) sdx2 = pom1/pom2;
6361 sdy2 = pom1-sdx2*pom2;
6372 xtaz = (dx3+dx2+dx4)/3;
6373 ytaz = (dy3+dy2+dy4)/3;
6374 ztaz = (z3+z2+z4)/3;
6409 da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
6410 db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
6411 dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
6412 dd = -da*dx1-db*dy1-dc*z1;
6429 if (pom2!=0) sdx1 = pom1/pom2;
6432 sdy1 = pom1-sdx1*pom2;
6433 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6435 sdy4 = sdx1*pom1+sdy1;
6444 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6445 else v = (iv1+iv2+iv4)/3;
6459 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6460 else v = (iv1+iv2+iv4)/3;
6485 if (pom2!=0) sdx1 = pom1/pom2;
6488 sdy1 = pom1-sdx1*pom2;
6489 for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
6491 sdy4 = sdx1*pom1+sdy1;
6500 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6501 else v = (iv1+iv2+iv4)/3;
6515 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6516 else v = (iv1+iv2+iv4)/3;
6526 for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
6528 sdy4 = sdx2p*pom1+sdy2p;
6538 if (dcp!=0)
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6539 else v = (iv1+iv2+iv4)/3;
6554 if (dcp!=0)
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
6555 else v = (iv1+iv2+iv4)/3;
6580 if (pom2!=0) sdx2 = pom1/pom2;
6583 sdy2 = pom1-sdx2*pom2;
6584 for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
6586 sdy4 = sdx2*pom1+sdy2;
6595 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6596 else v = (iv1+iv2+iv4)/3;
6610 if (dc!=0)
v = (-dd-da*dx1-db*dy1)/dc;
6611 else v = (iv1+iv2+iv4)/3;
6638 if (smer==0) q1 += 1;
6646 }
while ((q1!=qv||(q2!=(qv-1) && q2!=w2)||smer!=0||flag!=1) &&
6647 ((q1!=(qv-1) && q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6649 if (qv<=w2&&qv<=w1) {
6692 if (q2<=w2)
goto l2;
6694 }
while (q1<=w1&&q2<=w2);
6707 if (
x2>=
x1) turnj = 1;
6708 if (
x3>=
x2) turni = 1;
6736 if (smer==0) q1 -= 1;
6740 if (smer==0) q2 += 1;
6793 if (smer==0) q1 += 1;
6801 }
while ((q1!=qv||(q2!=(qv-1)&&q2!=w2)||smer!=0||flag!=1) &&
6802 ((q1!=(qv-1)&&q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
6804 if (qv<=w2&&qv<=w1) {
6847 if (q2<=w2)
goto lc2;
6849 }
while (q1<=w1&&q2<=w2);
6853 static char chopt[10] =
"";
6855 axis->
PaintAxis(p101x, p101y, p111x, p111y, bmin, bmax, ndivx,
"");
6856 axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx,
"");
6858 axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx,
"");
6863 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6865 strlcat(chopt,
"N",10);
6868 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
6873 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6875 strlcat(chopt,
"N",10);
6878 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6886 if (bmin <= 0) bmin=0.001*bmax;
6887 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz,
"G+");
6889 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6890 TGaxis *a1 =
new TGaxis(p010x, p010y, p011x, p011y,
"f1", ndivz,
"SDH+");
6896 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6898 strlcat(chopt,
"N",10);
6901 zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz, chopt);
6905 axis->
PaintAxis(p001x, p001y, p101x, p101y, bmin, bmax, ndivx,
"");
6906 axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx,
"");
6908 axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx,
"");
6913 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6915 strlcat(chopt,
"N",10);
6918 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6923 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6925 strlcat(chopt,
"N",10);
6928 yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
6936 if (bmin <= 0) bmin=0.001*bmax;
6937 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz,
"G+");
6939 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6940 TGaxis *a1 =
new TGaxis(p110x, p110y, p111x, p111y,
"f1", ndivz,
"SDH+");
6946 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6948 strlcat(chopt,
"N",10);
6951 zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz, chopt);
6955 axis->
PaintAxis(p011x, p011y, p001x, p001y, bmin, bmax, ndivx,
"");
6956 axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx,
"");
6958 axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx,
"");
6963 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6965 strlcat(chopt,
"N",10);
6968 xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
6973 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
6975 strlcat(chopt,
"N",10);
6978 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
6986 if (bmin <= 0) bmin=0.001*bmax;
6987 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz,
"G+");
6989 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
6990 TGaxis *a1 =
new TGaxis(p100x, p100y, p101x, p101y,
"f1", ndivz,
"SDH+");
6996 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
6998 strlcat(chopt,
"N",10);
7001 zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz, chopt);
7005 axis->
PaintAxis(p111x, p111y, p011x, p011y, bmin, bmax, ndivx,
"");
7006 axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx,
"");
7008 axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx,
"");
7013 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
7015 strlcat(chopt,
"N",10);
7018 xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
7023 chopt[0] = 0; strlcat(chopt,
"SDH-",10);
7025 strlcat(chopt,
"N",10);
7028 yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
7036 if (bmin <= 0) bmin=0.001*bmax;
7037 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"G+");
7039 TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
7040 TGaxis *a1 =
new TGaxis(p000x, p000y, p001x, p001y,
"f1", ndivz,
"SDH+");
7046 chopt[0] = 0; strlcat(chopt,
"SDH+",10);
7048 strlcat(chopt,
"N",10);
7051 zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz,
"SDH+");
7102 if (nodesx>1&&nodesy>1) {
7117 if (alpha>=0&&alpha<=90&&beta>=0&&beta<=90&&alpha+beta<=90) {
7162 if (
r>=0&&r<=255&&g>=0&&g<=255&&b>=0&&
b<=255) {
7176 if (
x>=0&&
y>=0&&z>=0) {
7229 if (weight>=0&&weight<=1)
fLHweight = weight;
7682 Int_t i1, i2, i3, i4, i5;
7687 while (opt.
Tokenize(token, from,
"[ (]")) {
7693 printf(
"PaintSpectrum: Display modes groups should be in the [0,3] range\n");
7697 if (i2<1 || i2>11) {
7698 printf(
"PaintSpectrum: Display modes should be in the [1,11] range\n");
7704 }
else if (token==
"pa") {
7711 }
else if (token==
"n") {
7717 }
else if (token==
"ca") {
7720 printf(
"PaintSpectrum: Color Algorithm should be in the [0,9] range\n");
7726 }
else if (token==
"zs") {
7729 printf(
"PaintSpectrum: Z-Scale should be in the [0,2] range\n");
7735 }
else if (token==
"ci") {
7742 }
else if (token==
"lhw") {
7747 }
else if (token==
"lp") {
7754 }
else if (token==
"cw") {
7759 }
else if (token==
"b") {
7762 printf(
"PaintSpectrum: Bezier should be in the [0,1] range\n");
7768 }
else if (token==
"s") {
7771 printf(
"PaintSpectrum: Shading should be in the [0,1] range\n");
7776 printf(
"PaintSpectrum: Shadow should be in the [0,1] range\n");
7782 }
else if (token==
"cm") {
7791 }
else if (token==
"cg") {
7797 }
else if (token==
"a" || token==
"a=") {
7804 }
else if (token==
"bf") {
7812 printf(
"Unknown option \"%s\"\n",token.
Data());
static const double x2[5]
static const double x4[22]
static const double x1[5]
static const double x3[11]
include TDocParser_001 C image html pict1_TDocParser_001 png width
virtual Int_t GetNdivisions() const
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
Int_t GetLast() const
Return last bin on the axis i.e.
Int_t GetFirst() const
Return first bin on the axis i.e.
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual void SetR1(Double_t r1)
virtual void SetX1(Double_t x1)
virtual void SetPhimax(Double_t phi=360)
virtual void SetPhimin(Double_t phi=0)
virtual void SetY1(Double_t y1)
virtual void Paint(Option_t *option="")
Paint this ellipse with its current attributes.
virtual void SetR2(Double_t r2)
virtual void SetTheta(Double_t theta=0)
virtual void Paint(Option_t *chopt="")
Draw this axis with its current attributes.
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
void SetLabelOffset(Float_t labeloffset)
Float_t GetLabelOffset() const
Float_t GetTickSize() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
Service class for 2-Dim histogram classes.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
The TNamed class is the base class for all named ROOT classes.
Two-dimensional graphics function.
void GetZScale(Int_t &scale)
Gets z-axis scale:
void SetColorIncrements(Double_t r, Double_t g, Double_t b)
Sets color increments between two color levels for r, g, b components:
void ColorModel(unsigned ui, unsigned ui1, unsigned ui2, unsigned ui3)
This function calculates color for one palette entry given by function parameter ui.
void GetLightPosition(Int_t &x, Int_t &y, Int_t &z)
Gets position of fictive light source in 3D space:
void CopyEnvelope(Double_t xr, Double_t xs, Double_t yr, Double_t ys)
Copies envelope vector, which ensures hidden surface removal for the contours display mode.
Double_t BezierBlend(Int_t i, Double_t bezf)
This function calculates Bezier approximation.
void BezierSmoothing(Double_t bezf)
Calculates screen coordinates of the smoothed point.
Int_t BezC(Int_t i)
This function is called from BezierBlend function.
void DrawMarker(Int_t x, Int_t y, Int_t w, Int_t h, Int_t type)
Draws channel mark at the screen coordinates x, y.
void Paint(Option_t *option)
Paints histogram according to preset parameters.
Double_t ColorCalculation(Double_t dx1, Double_t dy1, Double_t z1, Double_t dx2, Double_t dy2, Double_t z2, Double_t dx3, Double_t dy3, Double_t z3)
Calculates and returns color value for the surface triangle given by function parameters: -dx1,...
void SetNodes(Int_t nodesx, Int_t nodesy)
Sets nodes in both directions:
void SetPenAttr(Int_t color, Int_t style, Int_t width)
Sets pen attributes:
void SetDisplayMode(Int_t modeGroup, Int_t displayMode)
Sets display group mode and display mode:
void GetContourWidth(Int_t &width)
Gets width between horizontal slices:
void SetLightPosition(Int_t x, Int_t y, Int_t z)
Sets position of fictive light source in 3D space:
Int_t fNewColorIndex
buffers' size
void GetDisplayMode(Int_t &modeGroup, Int_t &displayMode)
Gets display group mode and display mode: -modeGroup - the following group modes might have been set:...
void GetNodes(Int_t &nodesx, Int_t &nodesy)
Gets nodes in both directions:
void GetPenAttr(Int_t &color, Int_t &style, Int_t &width)
Gets pen attributes: -color - color of spectrum -style - style of pen (solid, dash,...
void GetBezier(Int_t &bezier)
Gets Bezier smoothing switch:
void EnvelopeBars(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surface removal for Bars, BarsX and BarsY display modes.
void GetLightHeightWeight(Double_t &weight)
Gets weight between shading according to fictive light source and according to channels counts:
void SetAngles(Int_t alpha, Int_t beta, Int_t view)
Sets angles of the view:
void SetZScale(Int_t scale)
Sets z-axis scale:
void Slice(Double_t xr, Double_t yr, Double_t xs, Double_t ys, TLine *line)
Calculates screen coordinates of the line given by two nodes for contours display mode.
void GetColorAlgorithm(Int_t &colorAlgorithm)
Gets shading color algorithm:
static void PaintSpectrum(TH2 *h2, Option_t *option="", Int_t bs=1600)
This function allows to set all the possible options available in TSpectrum2Painter and paint "h2".
Short_t * fEnvelopeContour
void SetChanGrid(Int_t enable, Int_t color)
This function sets enables/disables drawing of channel grid and sets its color: -enable - decides whe...
void GetChanGrid(Int_t &enable, Int_t &color)
This function gets attributes for drawing channel:
void SetLightHeightWeight(Double_t weight)
Sets weight between shading according to fictive light source and according to channels counts:
void SetContourWidth(Int_t width)
Sets width between horizontal slices:
void SetColorAlgorithm(Int_t colorAlgorithm)
Sets shading color algorithm:
virtual ~TSpectrum2Painter()
TSpectrum2Painter destructor.
void SetShading(Int_t shading, Int_t shadow)
Sets on/off shading and shadow switches:
void GetChanMarks(Int_t &enable, Int_t &color, Int_t &width, Int_t &height, Int_t &style)
Gets drawing attributes for channel marks:
void Envelope(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surface removal.
void SetBezier(Int_t bezier)
Sets on/off Bezier smoothing:
void Transform(Int_t it, Int_t jt, Int_t zmt)
Reads out the value from histogram and calculates screen coordinates.
void GetColorIncrements(Double_t &r, Double_t &g, Double_t &b)
Gets color increments between two color levels for r, g, b components:
void SetChanMarks(Int_t enable, Int_t color, Int_t width, Int_t height, Int_t style)
Sets enables/disables drawing of channel marks and sets their attributes:
void GetAngles(Int_t &alpha, Int_t &beta, Int_t &view)
Gets angles of the view:
Int_t fMaximumXScreenResolution
Double_t ShadowColorCalculation(Double_t xtaz, Double_t ytaz, Double_t ztaz, Double_t shad_noise)
Determines whether the center of the triangle in 3-d space given by function parameters:
void GetShading(Int_t &shading, Int_t &shadow)
Gets shading and shadow switches:
@ kChannelMarksStyleCross
@ kChannelMarksStyleTriangle
@ kChannelMarksStyleDiamond
@ kChannelMarksStyleRectangle
Int_t Atoi() const
Return integer value of string.
Double_t Atof() const
Return floating-point value contained in string.
const char * Data() const
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Short_t Max(Short_t a, Short_t b)
Short_t Min(Short_t a, Short_t b)