159 SetTubeDimensions(rmin, rmax, dz);
160 if ((fDz < 0) || (fRmin < 0) || (fRmax < 0)) {
161 SetShapeBit(kGeoRunTimeShape);
173 SetTubeDimensions(rmin, rmax, dz);
174 if ((fDz < 0) || (fRmin < 0) || (fRmax < 0)) {
175 SetShapeBit(kGeoRunTimeShape);
191 SetDimensions(param);
192 if ((fDz < 0) || (fRmin < 0) || (fRmax < 0))
193 SetShapeBit(kGeoRunTimeShape);
234 Double_t rsq = point[0] * point[0] + point[1] * point[1];
241 norm[0] = norm[1] = 0.;
249 if (norm[0] * dir[0] + norm[1] * dir[1] < 0) {
265 if (norm[0] * dir[0] + norm[1] * dir[1] < 0) {
278 Double_t r2 = point[0] * point[0] + point[1] * point[1];
292 numPoints = 2 * (
n + 1);
307 sz = (
TMath::Sign(dz, dir[2]) - point[2]) / dir[2];
312 Double_t nsq = dir[0] * dir[0] + dir[1] * dir[1];
315 Double_t rsq = point[0] * point[0] + point[1] * point[1];
316 Double_t rdotn = point[0] * dir[0] + point[1] * dir[1];
356 if (iact < 3 && safe) {
360 if ((iact == 1) && (*safe > step))
382 if (point[2] * dir[2] >= 0)
385 xi = point[0] + s * dir[0];
386 yi = point[1] + s * dir[1];
388 if ((rminsq <= r2) && (r2 <= rmaxsq))
392 Double_t rsq = point[0] * point[0] + point[1] * point[1];
394 Double_t nsq = dir[0] * dir[0] + dir[1] * dir[1];
395 Double_t rdotn = point[0] * dir[0] + point[1] * dir[1];
403 in = inz & inrmin & inrmax;
410 if (point[2] * dir[2] < 0)
415 if ((rmaxsq - rsq) < (rsq - rminsq))
433 zi = point[2] + s * dir[2];
448 zi = point[2] + s * dir[2];
460 zi = point[2] + s * dir[2];
477 if (iact < 3 && safe) {
481 if ((iact == 1) && (step <= *safe))
505 Double_t t3 = rsq - (radius * radius);
529 TGeoVolumeMulti *vmulti;
530 TGeoPatternFinder *finder;
536 finder =
new TGeoPatternCylR(voldiv, ndiv,
start, end);
540 for (
id = 0;
id < ndiv;
id++) {
542 vol =
new TGeoVolume(divname, shape, voldiv->
GetMedium());
550 finder =
new TGeoPatternCylPhi(voldiv, ndiv,
start, end);
553 shape =
new TGeoTubeSeg(
fRmin,
fRmax,
fDz, -step / 2, step / 2);
554 vol =
new TGeoVolume(divname, shape, voldiv->
GetMedium());
558 for (
id = 0;
id < ndiv;
id++) {
564 finder =
new TGeoPatternZ(voldiv, ndiv,
start,
start + ndiv * step);
568 vol =
new TGeoVolume(divname, shape, voldiv->
GetMedium());
572 for (
id = 0;
id < ndiv;
id++) {
577 default:
Error(
"Divide",
"In shape %s wrong axis type for division",
GetName());
return nullptr;
588 case 2:
return "PHI";
590 default:
return "UNDEFINED";
629 param[0] *= param[0];
631 param[1] *= param[1];
675 printf(
"*** Shape %s: TGeoTube ***\n",
GetName());
676 printf(
" Rmin = %11.5f\n",
fRmin);
677 printf(
" Rmax = %11.5f\n",
fRmax);
678 printf(
" dz = %11.5f\n",
fDz);
679 printf(
" Bounding box:\n");
700 for (i = 0; i < 4; i++) {
701 for (j = 0; j <
n; j++) {
702 indx = 3 * (i *
n + j);
704 buffer.
fSegs[indx + 1] = i *
n + j;
705 buffer.
fSegs[indx + 2] = i *
n + (j + 1) %
n;
711 for (i = 4; i < 6; i++) {
712 for (j = 0; j <
n; j++) {
713 indx = 3 * (i *
n + j);
714 buffer.
fSegs[indx] =
c + 1;
715 buffer.
fSegs[indx + 1] = (i - 4) *
n + j;
716 buffer.
fSegs[indx + 2] = (i - 2) *
n + j;
722 for (i = 6; i < 8; i++) {
723 for (j = 0; j <
n; j++) {
724 indx = 3 * (i *
n + j);
726 buffer.
fSegs[indx + 1] = 2 * (i - 6) *
n + j;
727 buffer.
fSegs[indx + 2] = (2 * (i - 6) + 1) *
n + j;
733 for (j = 0; j <
n; j++) {
734 indx = 6 * (i *
n + j);
736 buffer.
fPols[indx + 1] = 4;
737 buffer.
fPols[indx + 2] = j;
738 buffer.
fPols[indx + 3] = 4 *
n + (j + 1) %
n;
739 buffer.
fPols[indx + 4] = 2 *
n + j;
740 buffer.
fPols[indx + 5] = 4 *
n + j;
744 for (j = 0; j <
n; j++) {
745 indx = 6 * (i *
n + j);
746 buffer.
fPols[indx] =
c + 1;
747 buffer.
fPols[indx + 1] = 4;
748 buffer.
fPols[indx + 2] =
n + j;
749 buffer.
fPols[indx + 3] = 5 *
n + j;
750 buffer.
fPols[indx + 4] = 3 *
n + j;
751 buffer.
fPols[indx + 5] = 5 *
n + (j + 1) %
n;
755 for (j = 0; j <
n; j++) {
756 indx = 6 * (i *
n + j);
758 buffer.
fPols[indx + 1] = 4;
759 buffer.
fPols[indx + 2] = j;
760 buffer.
fPols[indx + 3] = 6 *
n + j;
761 buffer.
fPols[indx + 4] =
n + j;
762 buffer.
fPols[indx + 5] = 6 *
n + (j + 1) %
n;
766 for (j = 0; j <
n; j++) {
767 indx = 6 * (i *
n + j);
769 buffer.
fPols[indx + 1] = 4;
770 buffer.
fPols[indx + 2] = 2 *
n + j;
771 buffer.
fPols[indx + 3] = 7 *
n + (j + 1) %
n;
772 buffer.
fPols[indx + 4] = 3 *
n + j;
773 buffer.
fPols[indx + 5] = 7 *
n + j;
781 for (i = 0; i < 2; i++) {
782 for (j = 0; j <
n; j++) {
783 indx = 3 * (i *
n + j);
785 buffer.
fSegs[indx + 1] = 2 + i *
n + j;
786 buffer.
fSegs[indx + 2] = 2 + i *
n + (j + 1) %
n;
790 for (j = 0; j <
n; j++) {
791 indx = 3 * (2 *
n + j);
792 buffer.
fSegs[indx] =
c + 1;
793 buffer.
fSegs[indx + 1] = 2 + j;
794 buffer.
fSegs[indx + 2] = 2 +
n + j;
799 for (i = 3; i < 5; i++) {
800 for (j = 0; j <
n; j++) {
801 indx = 3 * (i *
n + j);
803 buffer.
fSegs[indx + 1] = i - 3;
804 buffer.
fSegs[indx + 2] = 2 + (i - 3) *
n + j;
809 for (j = 0; j <
n; j++) {
811 buffer.
fPols[indx] =
c + 1;
812 buffer.
fPols[indx + 1] = 4;
813 buffer.
fPols[indx + 2] = j;
814 buffer.
fPols[indx + 3] = 2 *
n + j;
815 buffer.
fPols[indx + 4] =
n + j;
816 buffer.
fPols[indx + 5] = 2 *
n + (j + 1) %
n;
819 for (j = 0; j <
n; j++) {
820 indx = 6 *
n + 5 * j;
822 buffer.
fPols[indx + 1] = 3;
823 buffer.
fPols[indx + 2] = j;
824 buffer.
fPols[indx + 3] = 3 *
n + (j + 1) %
n;
825 buffer.
fPols[indx + 4] = 3 *
n + j;
828 for (j = 0; j <
n; j++) {
829 indx = 6 *
n + 5 *
n + 5 * j;
831 buffer.
fPols[indx + 1] = 3;
832 buffer.
fPols[indx + 2] =
n + j;
833 buffer.
fPols[indx + 3] = 4 *
n + j;
834 buffer.
fPols[indx + 4] = 4 *
n + (j + 1) %
n;
871 Double_t rsq = point[0] * point[0] + point[1] * point[1];
878 for (
Int_t i = 0; i < 3; i++)
891 Double_t rsq = point[0] * point[0] + point[1] * point[1];
895 saf[0] = dz - point[2];
898 saf[0] = dz + point[2];
910 for (
Int_t i = 0; i < 3; i++)
923 out <<
" rmin = " <<
fRmin <<
";" << std::endl;
924 out <<
" rmax = " <<
fRmax <<
";" << std::endl;
925 out <<
" dz = " <<
fDz <<
";" << std::endl;
926 out <<
" TGeoShape *" <<
GetPointerName() <<
" = new TGeoTube(\"" <<
GetName() <<
"\",rmin,rmax,dz);" << std::endl;
939 Error(
"SetTubeDimensions",
"In shape %s wrong rmin=%g rmax=%g",
GetName(), rmin, rmax);
960 if (!array || npoints <= 0)
968 Int_t outPoints = npoints;
971 outPoints = (npoints + 1) / 2;
972 inPoints = npoints - outPoints;
976 if (nSurfPoints <= 0)
985 if (nGen > nSurfPoints)
988 const Int_t q = nSurfPoints / nGen;
989 const Int_t rem = nSurfPoints % nGen;
994 for (
Int_t ig = 0; ig < nGen; ++ig) {
995 const Int_t m =
q + (ig < rem ? 1 : 0);
999 const Double_t phi = (ig + 0.5) * dphi;
1004 for (
Int_t j = 0; j <
m; ++j) {
1005 if (icrt + 3 > 3 * npoints)
1011 array[icrt++] =
r *
c;
1012 array[icrt++] =
r * s;
1022 if (!fillCyl(outPoints,
fRmax, icrt))
1027 if (!fillCyl(inPoints,
fRmin, icrt))
1052 for (j = 0; j <
n; j++) {
1064 for (j = 0; j <
n; j++) {
1084 for (j = 0; j <
n; j++) {
1115 for (j = 0; j <
n; j++) {
1127 for (j = 0; j <
n; j++) {
1147 for (j = 0; j <
n; j++) {
1169 numPoints = 2 * (
n + 1);
1183 nvert = 2 * (
n + 1);
1203 static TBuffer3DTube buffer;
1218 nbPnts = 2 * (
n + 1);
1222 if (buffer.
SetRawSizes(nbPnts, 3 * nbPnts, nbSegs, 3 * nbSegs, nbPols, 6 * nbPols)) {
1245 for (
Int_t i = 0; i < vecsize; i++)
1256 for (
Int_t i = 0; i < vecsize; i++)
1266 for (
Int_t i = 0; i < vecsize; i++)
1276 for (
Int_t i = 0; i < vecsize; i++)
1287 for (
Int_t i = 0; i < vecsize; i++)
1295 :
TGeoTube(), fPhi1(0.), fPhi2(0.), fS1(0.), fC1(0.), fS2(0.), fC2(0.), fSm(0.), fCm(0.), fCdfi(0.)
1305 :
TGeoTube(rmin, rmax, dz), fPhi1(0.), fPhi2(0.), fS1(0.), fC1(0.), fS2(0.), fC2(0.), fSm(0.), fCm(0.), fCdfi(0.)
1308 SetTubsDimensions(rmin, rmax, dz, phiStart, phiEnd);
1321 SetTubsDimensions(rmin, rmax, dz, phiStart, phiEnd);
1336 SetDimensions(param);
1364 Double_t fio = 0.5 * (phi1 + phi2);
1367 Double_t dfi = 0.5 * (phi2 - phi1);
1454 Double_t rsq = point[0] * point[0] + point[1] * point[1];
1465 norm[0] = norm[1] = 0.;
1473 if (norm[0] * dir[0] + norm[1] * dir[1] < 0) {
1486 Double_t rsq = point[0] * point[0] + point[1] * point[1];
1499 if (norm[0] * dir[0] + norm[1] * dir[1] < 0) {
1522 const Int_t numPoints = 4 *
n;
1538 Double_t rsq = point[0] * point[0] + point[1] * point[1];
1540 Double_t cpsi = point[0] * cm + point[1] * sm;
1549 ddotn =
s1 * dir[0] -
c1 * dir[1];
1552 ddotn = -s2 * dir[0] +
c2 * dir[1];
1555 Double_t sfmin = s2 * point[0] -
c2 * point[1];
1561 xi = point[0] + sfmin * dir[0];
1562 yi = point[1] + sfmin * dir[1];
1563 if (yi * cm - xi * sm < 0)
1567 ddotn = -s2 * dir[0] +
c2 * dir[1];
1570 ddotn =
s1 * dir[0] -
c1 * dir[1];
1579 xi = point[0] + sfmin * dir[0];
1580 yi = point[1] + sfmin * dir[1];
1581 if (yi * cm - xi * sm > 0)
1593 if (iact < 3 && safe) {
1597 if ((iact == 1) && (*safe > step))
1604 return TGeoTubeSeg::DistFromInsideS(point, dir,
fRmin,
fRmax,
fDz,
fC1,
fS1,
fC2,
fS2,
fCm,
fSm,
fCdfi);
1625 if (point[2] * dir[2] >= 0)
1628 xi = point[0] + s * dir[0];
1629 yi = point[1] + s * dir[1];
1630 r2 = xi * xi + yi * yi;
1631 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1639 Double_t rsq = point[0] * point[0] + point[1] * point[1];
1641 Double_t nsq = dir[0] * dir[0] + dir[1] * dir[1];
1642 Double_t rdotn = point[0] * dir[0] + point[1] * dir[1];
1651 cpsi = point[0] * cm + point[1] * sm;
1654 in = inz & inrmin & inrmax & inphi;
1661 if (zi < rmax -
r) {
1664 if (point[2] * dir[2] < 0)
1670 if ((rmaxsq - rsq) < (rsq - rminsq))
1673 if (checkout && (rmax -
r < safphi)) {
1685 if (point[0] *
c1 + point[1] *
s1 > point[0] *
c2 + point[1] * s2) {
1686 un = dir[0] *
s1 - dir[1] *
c1;
1691 un = -dir[0] * s2 + dir[1] *
c2;
1693 s = -point[0] * s2 + point[1] *
c2;
1696 zi = point[2] + s * dir[2];
1698 xi = point[0] + s * dir[0];
1699 yi = point[1] + s * dir[1];
1700 r2 = xi * xi + yi * yi;
1701 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1702 if ((yi * cm - xi * sm) > 0)
1709 un = -dir[0] * s2 + dir[1] *
c2;
1714 un = dir[0] *
s1 - dir[1] *
c1;
1716 s = point[0] *
s1 - point[1] *
c1;
1719 zi = point[2] + s * dir[2];
1721 xi = point[0] + s * dir[0];
1722 yi = point[1] + s * dir[1];
1723 r2 = xi * xi + yi * yi;
1724 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1725 if ((yi * cm - xi * sm) < 0)
1741 zi = point[2] + s * dir[2];
1743 xi = point[0] + s * dir[0];
1744 yi = point[1] + s * dir[1];
1745 if ((xi * cm + yi * sm) >= rmin * cdfi)
1759 zi = point[2] + s * dir[2];
1762 xi = point[0] + s * dir[0];
1763 yi = point[1] + s * dir[1];
1764 if ((xi * cm + yi * sm) >= rmin * cdfi)
1769 s = point[0] *
s1 - point[1] *
c1;
1772 zi = point[2] + s * dir[2];
1774 xi = point[0] + s * dir[0];
1775 yi = point[1] + s * dir[1];
1776 r2 = xi * xi + yi * yi;
1777 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1778 if ((yi * cm - xi * sm) <= 0) {
1786 un = dir[0] * s2 - dir[1] *
c2;
1788 s = (point[1] *
c2 - point[0] * s2) / un;
1789 if (s >= 0 && s < snxt) {
1790 zi = point[2] + s * dir[2];
1792 xi = point[0] + s * dir[0];
1793 yi = point[1] + s * dir[1];
1794 r2 = xi * xi + yi * yi;
1795 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1796 if ((yi * cm - xi * sm) >= 0) {
1812 if (rsq >= rmax * rmax) {
1819 zi = point[2] + s * dir[2];
1821 xi = point[0] + s * dir[0];
1822 yi = point[1] + s * dir[1];
1823 cpsi = xi * cm + yi * sm;
1824 if (cpsi >= rmax * cdfi)
1836 zi = point[2] + s * dir[2];
1838 xi = point[0] + s * dir[0];
1839 yi = point[1] + s * dir[1];
1840 cpsi = xi * cm + yi * sm;
1841 if (cpsi >= rmin * cdfi)
1850 s = point[0] *
s1 - point[1] *
c1;
1853 zi = point[2] + s * dir[2];
1855 xi = point[0] + s * dir[0];
1856 yi = point[1] + s * dir[1];
1857 r2 = xi * xi + yi * yi;
1858 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1859 if ((yi * cm - xi * sm) <= 0) {
1867 un = dir[0] * s2 - dir[1] *
c2;
1869 s = point[1] *
c2 - point[0] * s2;
1872 zi = point[2] + s * dir[2];
1874 xi = point[0] + s * dir[0];
1875 yi = point[1] + s * dir[1];
1876 r2 = xi * xi + yi * yi;
1877 if ((rminsq <= r2) && (r2 <= rmaxsq)) {
1878 if ((yi * cm - xi * sm) >= 0) {
1896 if (iact < 3 && safe) {
1900 if ((iact == 1) && (step <= *safe))
1911 return TGeoTubeSeg::DistFromOutsideS(point, dir,
fRmin,
fRmax,
fDz,
fC1,
fS1,
fC2,
fS2,
fCm,
fSm,
fCdfi);
1927 TGeoVolumeMulti *vmulti;
1928 TGeoPatternFinder *finder;
1935 finder =
new TGeoPatternCylR(voldiv, ndiv,
start, end);
1939 for (
id = 0;
id < ndiv;
id++) {
1941 vol =
new TGeoVolume(divname, shape, voldiv->
GetMedium());
1957 finder =
new TGeoPatternCylPhi(voldiv, ndiv,
start, end);
1961 vol =
new TGeoVolume(divname, shape, voldiv->
GetMedium());
1965 for (
id = 0;
id < ndiv;
id++) {
1971 finder =
new TGeoPatternZ(voldiv, ndiv,
start, end);
1975 vol =
new TGeoVolume(divname, shape, voldiv->
GetMedium());
1979 for (
id = 0;
id < ndiv;
id++) {
1984 default:
Error(
"Divide",
"In shape %s wrong axis type for division",
GetName());
return nullptr;
2023 param[0] *= param[0];
2025 param[1] *= param[1];
2039 Error(
"GetMakeRuntimeShape",
"Invalid mother for shape %s",
GetName());
2049 rmin = ((
TGeoTube *)mother)->GetRmin();
2051 rmax = ((
TGeoTube *)mother)->GetRmax();
2061 printf(
"*** Shape %s: TGeoTubeSeg ***\n",
GetName());
2062 printf(
" Rmin = %11.5f\n",
fRmin);
2063 printf(
" Rmax = %11.5f\n",
fRmax);
2064 printf(
" dz = %11.5f\n",
fDz);
2065 printf(
" phi1 = %11.5f\n",
fPhi1);
2066 printf(
" phi2 = %11.5f\n",
fPhi2);
2067 printf(
" Bounding box:\n");
2081 for (i = 0; i < 4; i++) {
2082 for (j = 1; j <
n; j++) {
2083 buff.
fSegs[(i *
n + j - 1) * 3] =
c;
2084 buff.
fSegs[(i *
n + j - 1) * 3 + 1] = i *
n + j - 1;
2085 buff.
fSegs[(i *
n + j - 1) * 3 + 2] = i *
n + j;
2088 for (i = 4; i < 6; i++) {
2089 for (j = 0; j <
n; j++) {
2090 buff.
fSegs[(i *
n + j) * 3] =
c + 1;
2091 buff.
fSegs[(i *
n + j) * 3 + 1] = (i - 4) *
n + j;
2092 buff.
fSegs[(i *
n + j) * 3 + 2] = (i - 2) *
n + j;
2095 for (i = 6; i < 8; i++) {
2096 for (j = 0; j <
n; j++) {
2097 buff.
fSegs[(i *
n + j) * 3] =
c;
2098 buff.
fSegs[(i *
n + j) * 3 + 1] = 2 * (i - 6) *
n + j;
2099 buff.
fSegs[(i *
n + j) * 3 + 2] = (2 * (i - 6) + 1) *
n + j;
2106 for (j = 0; j <
n - 1; j++) {
2108 buff.
fPols[indx++] = 4;
2109 buff.
fPols[indx++] = (4 + i) *
n + j + 1;
2110 buff.
fPols[indx++] = (2 + i) *
n + j;
2111 buff.
fPols[indx++] = (4 + i) *
n + j;
2112 buff.
fPols[indx++] = i *
n + j;
2115 for (j = 0; j <
n - 1; j++) {
2117 buff.
fPols[indx++] = 4;
2118 buff.
fPols[indx++] = i *
n + j;
2119 buff.
fPols[indx++] = (4 + i) *
n + j;
2120 buff.
fPols[indx++] = (2 + i) *
n + j;
2121 buff.
fPols[indx++] = (4 + i) *
n + j + 1;
2124 for (j = 0; j <
n - 1; j++) {
2125 buff.
fPols[indx++] =
c + i;
2126 buff.
fPols[indx++] = 4;
2127 buff.
fPols[indx++] = (i - 2) * 2 *
n + j;
2128 buff.
fPols[indx++] = (4 + i) *
n + j;
2129 buff.
fPols[indx++] = ((i - 2) * 2 + 1) *
n + j;
2130 buff.
fPols[indx++] = (4 + i) *
n + j + 1;
2133 for (j = 0; j <
n - 1; j++) {
2134 buff.
fPols[indx++] =
c + i;
2135 buff.
fPols[indx++] = 4;
2136 buff.
fPols[indx++] = (4 + i) *
n + j + 1;
2137 buff.
fPols[indx++] = ((i - 2) * 2 + 1) *
n + j;
2138 buff.
fPols[indx++] = (4 + i) *
n + j;
2139 buff.
fPols[indx++] = (i - 2) * 2 *
n + j;
2141 buff.
fPols[indx++] =
c + 2;
2142 buff.
fPols[indx++] = 4;
2143 buff.
fPols[indx++] = 6 *
n;
2144 buff.
fPols[indx++] = 4 *
n;
2145 buff.
fPols[indx++] = 7 *
n;
2146 buff.
fPols[indx++] = 5 *
n;
2147 buff.
fPols[indx++] =
c + 2;
2148 buff.
fPols[indx++] = 4;
2149 buff.
fPols[indx++] = 6 *
n - 1;
2150 buff.
fPols[indx++] = 8 *
n - 1;
2151 buff.
fPols[indx++] = 5 *
n - 1;
2152 buff.
fPols[indx++] = 7 *
n - 1;
2162 Double_t rsq = point[0] * point[0] + point[1] * point[1];
2191 saf[1] =
fRmin - rproj;
2192 saf[2] = rproj -
fRmax;
2198 safe =
TMath::Sqrt(rsq - rproj * rproj + safe * safe);
2199 return (saf[0] < 0) ? safe :
TMath::Sqrt(safe * safe + saf[0] * saf[0]);
2202 return (saf[0] < 0) ? safphi :
TMath::Sqrt(saf[0] * saf[0] + safphi * safphi);
2212 Double_t rsq = point[0] * point[0] + point[1] * point[1];
2217 saf[0] = dz - point[2];
2220 saf[0] = dz + point[2];
2232 if ((phi2d - phi1d) >= 360.)
2243 Double_t fio = 0.5 * (phi1 + phi2);
2246 Double_t cpsi = point[0] * cm + point[1] * sm;
2247 Double_t dfi = 0.5 * (phi2 - phi1);
2267 saf[1] = rmin - rproj;
2268 saf[2] = rproj - rmax;
2270 if ((phi2d - phi1d) >= 360.)
2274 safe =
TMath::Sqrt(rsq - rproj * rproj + safe * safe);
2275 return (saf[0] < 0) ? safe :
TMath::Sqrt(safe * safe + saf[0] * saf[0]);
2278 return (saf[0] < 0) ? safphi :
TMath::Sqrt(saf[0] * saf[0] + safphi * safphi);
2288 out <<
" // Shape: " <<
GetName() <<
" type: " <<
ClassName() << std::endl;
2289 out <<
" rmin = " <<
fRmin <<
";" << std::endl;
2290 out <<
" rmax = " <<
fRmax <<
";" << std::endl;
2291 out <<
" dz = " <<
fDz <<
";" << std::endl;
2292 out <<
" phi1 = " <<
fPhi1 <<
";" << std::endl;
2293 out <<
" phi2 = " <<
fPhi2 <<
";" << std::endl;
2294 out <<
" TGeoShape *" <<
GetPointerName() <<
" = new TGeoTubeSeg(\"" <<
GetName() <<
"\",rmin,rmax,dz,phi1,phi2);"
2339 if (!array || npoints <= 0)
2348 const Double_t dPhiTot = phi2 - phi1;
2351 if (!(dPhiTot > 0.0))
2357 Int_t outPoints = npoints;
2360 outPoints = (npoints + 1) / 2;
2361 inPoints = npoints - outPoints;
2365 if (nSurfPoints <= 0)
2374 if (nGen > nSurfPoints)
2377 const Int_t q = nSurfPoints / nGen;
2378 const Int_t rem = nSurfPoints % nGen;
2383 for (
Int_t ig = 0; ig < nGen; ++ig) {
2384 const Int_t m =
q + (ig < rem ? 1 : 0);
2388 const Double_t phi = phi1 + (ig + 0.5) * dphi;
2393 for (
Int_t j = 0; j <
m; ++j) {
2394 if (icrt + 3 > 3 * npoints)
2400 array[icrt++] =
r *
c;
2401 array[icrt++] =
r * s;
2411 if (!fillCylSeg(outPoints,
fRmax, icrt))
2416 if (!fillCylSeg(inPoints,
fRmin, icrt))
2438 dphi = (phi2 - phi1) / (
n - 1);
2444 for (j = 0; j <
n; j++) {
2454 for (j = 0; j <
n; j++) {
2481 dphi = (phi2 - phi1) / (
n - 1);
2487 for (j = 0; j <
n; j++) {
2497 for (j = 0; j <
n; j++) {
2541 static TBuffer3DTubeSeg buffer;
2556 Int_t nbSegs = 2 * nbPnts;
2557 Int_t nbPols = nbPnts - 2;
2558 if (buffer.
SetRawSizes(nbPnts, 3 * nbPnts, nbSegs, 3 * nbSegs, nbPols, 6 * nbPols)) {
2581 for (
Int_t i = 0; i < vecsize; i++)
2592 for (
Int_t i = 0; i < vecsize; i++)
2602 for (
Int_t i = 0; i < vecsize; i++)
2612 for (
Int_t i = 0; i < vecsize; i++)
2623 for (
Int_t i = 0; i < vecsize; i++)
2648 SetShapeBit(kGeoCtub);
2665 SetShapeBit(kGeoCtub);
2674 SetCtubDimensions(params[0], params[1], params[2], params[3], params[4], params[5], params[6], params[7], params[8],
2675 params[9], params[10]);
2676 SetShapeBit(kGeoCtub);
2699 if ((
fNlow[2] > -(1E-10)) || (
fNhigh[2] < 1E-10)) {
2700 Error(
"ComputeBBox",
"In shape %s wrong definition of cut planes",
GetName());
2714 for (i = 0; i < 2; i++) {
2734 in_range_low =
kTRUE;
2741 for (i = 0; i < 2; i++) {
2761 in_range_hi =
kTRUE;
2800 fDZ = 0.5 * (zmax - zmin);
2801 fOrigin[2] = 0.5 * (zmax + zmin);
2813 Double_t rsq = point[0] * point[0] + point[1] * point[1];
2829 if (norm[0] * dir[0] + norm[1] * dir[1] + norm[2] * dir[2] < 0) {
2838 if (norm[0] * dir[0] + norm[1] * dir[1] + norm[2] * dir[2] < 0) {
2850 if (norm[0] * dir[0] + norm[1] * dir[1] < 0) {
2870 Double_t r2 = point[0] * point[0] + point[1] * point[1];
2930 if (iact < 3 && safe) {
2934 if ((iact == 1) && (step <= *safe))
2944 Double_t rsq = point[0] * point[0] + point[1] * point[1];
2959 xi = point[0] + s * dir[0];
2960 yi = point[1] + s * dir[1];
2961 r2 = xi * xi + yi * yi;
2975 xi = point[0] + s * dir[0];
2976 yi = point[1] + s * dir[1];
2977 r2 = xi * xi + yi * yi;
2989 Double_t nsq = dir[0] * dir[0] + dir[1] * dir[1];
2992 Double_t rdotn = point[0] * dir[0] + point[1] * dir[1];
2995 if (
r >
fRmax && rdotn < 0) {
3000 xi = point[0] + s * dir[0];
3001 yi = point[1] + s * dir[1];
3002 zi = point[2] + s * dir[2];
3022 xi = point[0] + s * dir[0];
3023 yi = point[1] + s * dir[1];
3024 zi = point[2] + s * dir[2];
3042 s = (point[1] *
fC1 - point[0] *
fS1) / un;
3044 xi = point[0] + s * dir[0];
3045 yi = point[1] + s * dir[1];
3046 zi = point[2] + s * dir[2];
3049 r2 = xi * xi + yi * yi;
3051 if ((yi *
fCm - xi *
fSm) <= 0) {
3060 un = dir[0] *
fS2 - dir[1] *
fC2;
3062 s = (point[1] *
fC2 - point[0] *
fS2) / un;
3064 xi = point[0] + s * dir[0];
3065 yi = point[1] + s * dir[1];
3066 zi = point[2] + s * dir[2];
3069 r2 = xi * xi + yi * yi;
3071 if ((yi *
fCm - xi *
fSm) >= 0) {
3089 if (iact < 3 && safe)
3093 if ((iact == 1) && (*safe > step))
3095 Double_t rsq = point[0] * point[0] + point[1] * point[1];
3117 Double_t nsq = dir[0] * dir[0] + dir[1] * dir[1];
3121 Double_t rdotn = point[0] * dir[0] + point[1] * dir[1];
3126 if (
fRmin > 1E-10) {
3158 Warning(
"Divide",
"In shape %s division of a cut tube not implemented",
GetName());
3171 Error(
"GetMakeRuntimeShape",
"Invalid mother for shape %s",
GetName());
3181 rmin = ((
TGeoTube *)mother)->GetRmin();
3183 rmax = ((
TGeoTube *)mother)->GetRmax();
3185 return (
new TGeoCtub(rmin, rmax, dz,
fPhi1,
fPhi2,
fNlow[0],
fNlow[1],
fNlow[2],
fNhigh[0],
fNhigh[1],
fNhigh[2]));
3193 printf(
"*** Shape %s: TGeoCtub ***\n",
GetName());
3194 printf(
" lx = %11.5f\n",
fNlow[0]);
3195 printf(
" ly = %11.5f\n",
fNlow[1]);
3196 printf(
" lz = %11.5f\n",
fNlow[2]);
3197 printf(
" tx = %11.5f\n",
fNhigh[0]);
3198 printf(
" ty = %11.5f\n",
fNhigh[1]);
3199 printf(
" tz = %11.5f\n",
fNhigh[2]);
3210 Double_t rsq = point[0] * point[0] + point[1] * point[1];
3228 for (
Int_t i = 0; i < 4; i++)
3259 out <<
" // Shape: " <<
GetName() <<
" type: " <<
ClassName() << std::endl;
3260 out <<
" rmin = " <<
fRmin <<
";" << std::endl;
3261 out <<
" rmax = " <<
fRmax <<
";" << std::endl;
3262 out <<
" dz = " <<
fDz <<
";" << std::endl;
3263 out <<
" phi1 = " <<
fPhi1 <<
";" << std::endl;
3264 out <<
" phi2 = " <<
fPhi2 <<
";" << std::endl;
3265 out <<
" lx = " <<
fNlow[0] <<
";" << std::endl;
3266 out <<
" ly = " <<
fNlow[1] <<
";" << std::endl;
3267 out <<
" lz = " <<
fNlow[2] <<
";" << std::endl;
3268 out <<
" tx = " <<
fNhigh[0] <<
";" << std::endl;
3269 out <<
" ty = " <<
fNhigh[1] <<
";" << std::endl;
3270 out <<
" tz = " <<
fNhigh[2] <<
";" << std::endl;
3272 <<
"\",rmin,rmax,dz,phi1,phi2,lx,ly,lz,tx,ty,tz);" << std::endl;
3281 SetCtubDimensions(param[0], param[1], param[2], param[3], param[4], param[5], param[6], param[7], param[8], param[9],
3293 if (!array || npoints <= 0)
3304 const Double_t dPhiTot = phi2 - phi1;
3306 if (!(dPhiTot > 0.0))
3312 Int_t outPoints = npoints;
3315 outPoints = (npoints + 1) / 2;
3316 inPoints = npoints - outPoints;
3320 if (nSurfPoints <= 0)
3329 if (nGen > nSurfPoints)
3332 const Int_t q = nSurfPoints / nGen;
3333 const Int_t rem = nSurfPoints % nGen;
3338 for (
Int_t ig = 0; ig < nGen; ++ig) {
3339 const Int_t m =
q + (ig < rem ? 1 : 0);
3343 const Double_t phi = phi1 + (ig + 0.5) * dphi;
3358 for (
Int_t j = 0; j <
m; ++j) {
3359 if (icrt + 3 > 3 * npoints)
3363 const Double_t z = z0 + t * (z1 - z0);
3377 if (!fillCylCut(outPoints,
fRmax, icrt))
3382 if (!fillCylCut(inPoints,
fRmin, icrt))
3404 dphi = (phi2 - phi1) / (
n - 1);
3410 for (j = 0; j <
n; j++) {
3420 for (j = 0; j <
n; j++) {
3447 dphi = (phi2 - phi1) / (
n - 1);
3453 for (j = 0; j <
n; j++) {
3463 for (j = 0; j <
n; j++) {
3481 static TBuffer3DCutTube buffer;
3493 for (
UInt_t i = 0; i < 3; i++) {
3502 Int_t nbSegs = 2 * nbPnts;
3503 Int_t nbPols = nbPnts - 2;
3504 if (buffer.
SetRawSizes(nbPnts, 3 * nbPnts, nbSegs, 3 * nbSegs, nbPols, 6 * nbPols)) {
3527 for (
Int_t i = 0; i < vecsize; i++)
3538 for (
Int_t i = 0; i < vecsize; i++)
3548 for (
Int_t i = 0; i < vecsize; i++)
3558 for (
Int_t i = 0; i < vecsize; i++)
3569 for (
Int_t i = 0; i < vecsize; i++)
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
externTGeoManager * gGeoManager
Double_t fLowPlaneNorm[3]
Double_t fHighPlaneNorm[3]
Generic 3D primitive description class.
Bool_t SectionsValid(UInt_t mask) const
void SetSectionsValid(UInt_t mask)
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const override
Fill the supplied buffer, with sections in desired frame See TBuffer3D.h for explanation of sections,...
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
void InspectShape() const override
void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const override
void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize) override
Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const override
void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const override
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Stub implementation to avoid forcing implementation at this stage.
TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override
void SetDimensions(Double_t *param) override
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
Double_t Capacity() const override
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
Bool_t Contains(const Double_t *point) const override
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
Double_t GetZcoord(Double_t xc, Double_t yc, Double_t zc) const
void InspectShape() const override
void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
void SetPoints(Double_t *points) const override
void SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz)
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void ComputeBBox() override
Geometrical transformation package.
void SetDivIndex(Int_t index)
Base abstract class for all shapes.
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
Int_t GetBasicColor() const
Get the basic color (0-7).
void TransformPoints(Double_t *points, UInt_t NbPoints) const
Tranform a set of points (LocalToMaster).
void SetShapeBit(UInt_t f, Bool_t set)
Equivalent of TObject::SetBit.
static Double_t DistToPhiMin(const Double_t *point, const Double_t *dir, Double_t s1, Double_t c1, Double_t s2, Double_t c2, Double_t sm, Double_t cm, Bool_t in=kTRUE)
compute distance from point (inside phi) to both phi planes. Return minimum.
TGeoShape()
Default constructor.
static Double_t SafetyPhi(const Double_t *point, Bool_t in, Double_t phi1, Double_t phi2)
Static method to compute safety w.r.t a phi corner defined by cosines/sines of the angles phi1,...
static Bool_t IsSameWithinTolerance(Double_t a, Double_t b)
Check if two numbers differ with less than a tolerance.
const char * GetPointerName() const
Provide a pointer name containing uid.
static Bool_t IsInPhiRange(const Double_t *point, Double_t phi1, Double_t phi2)
Static method to check if a point is in the phi range (phi1, phi2) [degrees].
Int_t ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
Returns distance to shape primitive mesh.
static void NormalPhi(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
Static method to compute normal to phi planes.
const char * GetName() const override
Get the shape name.
static Double_t Tolerance()
static Bool_t IsCloseToPhi(Double_t epsil, const Double_t *point, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
True if point is closer than epsil to one of the phi planes defined by c1,s1 or c2,...
Bool_t TestShapeBit(UInt_t f) const
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize) override
void SetPoints(Double_t *points) const override
Double_t Capacity() const override
static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi)
void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const override
void Sizeof3D() const override
Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const override
TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override
void InspectShape() const override
static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t rmin, Double_t rmax, Double_t dz, Double_t c1, Double_t s1, Double_t c2, Double_t s2)
void SetDimensions(Double_t *param) override
void AfterStreamer() override
static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz, Double_t c1, Double_t s1, Double_t c2, Double_t s2, Double_t cm, Double_t sm, Double_t cdfi)
Bool_t Contains(const Double_t *point) const override
void ComputeBBox() override
void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
void GetBoundingCylinder(Double_t *param) const override
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Computes distance from point (px,py) to the object.
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
void SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Int_t GetNmeshVertices() const override
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Stub implementation to avoid forcing implementation at this stage.
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Int_t skipz=0)
void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const override
void SetSegsAndPols(TBuffer3D &buff) const override
Int_t GetNmeshVertices() const override
static void DistToTube(Double_t rsq, Double_t nsq, Double_t rdotn, Double_t radius, Double_t &b, Double_t &delta)
void GetBoundingCylinder(Double_t *param) const override
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const override
void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
void SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz)
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Computes distance from point (px,py) to the object.
static Double_t DistFromInsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz)
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize) override
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void ComputeBBox() override
static Double_t DistFromOutsideS(const Double_t *point, const Double_t *dir, Double_t rmin, Double_t rmax, Double_t dz)
void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
static void ComputeNormalS(const Double_t *point, const Double_t *dir, Double_t *norm, Double_t rmin, Double_t rmax, Double_t dz)
void InspectShape() const override
Bool_t Contains(const Double_t *point) const override
void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const override
void SetSegsAndPols(TBuffer3D &buff) const override
Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const override
void SetPoints(Double_t *points) const override
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
void SetDimensions(Double_t *param) override
Double_t Capacity() const override
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override
void Sizeof3D() const override
TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Stub implementation to avoid forcing implementation at this stage.
const char * GetAxisName(Int_t iaxis) const override
void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const override
static Double_t SafetyS(const Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz=0)
TGeoTube(const TGeoTube &)=delete
void AddVolume(TGeoVolume *vol)
Add a volume with valid shape to the list of volumes.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void AddNodeOffset(TGeoVolume *vol, Int_t copy_no, Double_t offset=0, Option_t *option="")
Add a division node to the list of nodes.
TGeoMedium * GetMedium() const
void SetFinder(TGeoPatternFinder *finder)
Int_t GetNdaughters() const
TObject * At(Int_t idx) const override
Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
Long64_t LocMin(Long64_t n, const T *a)
Returns index of array with the minimum element.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Long64_t LocMax(Long64_t n, const T *a)
Returns index of array with the maximum element.
constexpr Double_t E()
Base of natural log: .
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
constexpr Double_t TwoPi()