43 #if !defined(G4GEOM_USE_UCTUBS)
59 using namespace CLHEP;
71 :
G4CSGSolid(pName), fRMin(pRMin), fRMax(pRMax), fDz(pDz), fSPhi(0), fDPhi(0)
83 message <<
"Negative Z half-length (" << pDz <<
") in solid: " <<
GetName();
86 if ( (pRMin >= pRMax) || (pRMin < 0) )
89 message <<
"Invalid values for radii in solid: " <<
GetName()
91 <<
" pRMin = " << pRMin <<
", pRMax = " << pRMax;
102 if ( ( !pLowNorm.
x()) && ( !pLowNorm.
y())
103 && ( !pHighNorm.
x()) && (!pHighNorm.
y()) )
106 message <<
"Inexisting Low/High Normal to Z plane or Parallel to Z."
108 <<
"Normals to Z plane are (" << pLowNorm <<
" and "
109 << pHighNorm <<
") in solid: " <<
GetName();
110 G4Exception(
"G4CutTubs::G4CutTubs()",
"GeomSolids1001",
116 if (pLowNorm.
mag2() == 0.) { pLowNorm.
setZ(-1.); }
117 if (pHighNorm.
mag2()== 0.) { pHighNorm.
setZ(1.); }
122 if (pLowNorm.
mag2() != 1.) { pLowNorm = pLowNorm.
unit(); }
123 if (pHighNorm.
mag2()!= 1.) { pHighNorm = pHighNorm.
unit(); }
127 if( (pLowNorm.
mag2() != 0.) && (pHighNorm.
mag2()!= 0. ) )
129 if( ( pLowNorm.
z()>= 0. ) || ( pHighNorm.
z() <= 0.))
132 message <<
"Invalid Low or High Normal to Z plane; "
133 "has to point outside Solid." <<
G4endl
134 <<
"Invalid Norm to Z plane (" << pLowNorm <<
" or "
135 << pHighNorm <<
") in solid: " <<
GetName();
136 G4Exception(
"G4CutTubs::G4CutTubs()",
"GeomSolids0002",
166 :
G4CSGSolid(a), kRadTolerance(0.), kAngTolerance(0.),
167 fRMin(0.), fRMax(0.), fDz(0.), fSPhi(0.), fDPhi(0.),
168 sinCPhi(0.), cosCPhi(0.), cosHDPhiOT(0.), cosHDPhiIT(0.),
169 sinSPhi(0.), cosSPhi(0.), sinEPhi(0.), cosEPhi(0.),
170 fPhiFullCutTube(false),
171 halfCarTolerance(0.), halfRadTolerance(0.), halfAngTolerance(0.),
190 kRadTolerance(rhs.kRadTolerance), kAngTolerance(rhs.kAngTolerance),
191 fRMin(rhs.fRMin), fRMax(rhs.fRMax), fDz(rhs.fDz),
192 fSPhi(rhs.fSPhi), fDPhi(rhs.fDPhi),
193 sinCPhi(rhs.sinCPhi), cosCPhi(rhs.cosCPhi),
194 cosHDPhiOT(rhs.cosHDPhiOT), cosHDPhiIT(rhs.cosHDPhiIT),
195 sinSPhi(rhs.sinSPhi), cosSPhi(rhs.cosSPhi),
196 sinEPhi(rhs.sinEPhi), cosEPhi(rhs.cosEPhi),
197 fPhiFullCutTube(rhs.fPhiFullCutTube),
198 halfCarTolerance(rhs.halfCarTolerance),
199 halfRadTolerance(rhs.halfRadTolerance),
200 halfAngTolerance(rhs.halfAngTolerance),
201 fLowNorm(rhs.fLowNorm), fHighNorm(rhs.fHighNorm)
213 if (
this == &rhs) {
return *
this; }
254 G4double mag, topx, topy, dists, diste;
261 mag = std::sqrt(norm.
x()*norm.
x() + norm.
y()*norm.
y());
262 topx = (mag == 0) ? 0 : -rmax*norm.
x()/mag;
263 topy = (mag == 0) ? 0 : -rmax*norm.
y()/mag;
264 dists = sinSphi*topx - cosSphi*topy;
265 diste = -sinEphi*topx + cosEphi*topy;
269 if (dists > 0 && diste > 0)iftop =
false;
274 if (dists <= 0 && diste <= 0) iftop =
true;
278 zmin = -(norm.
x()*topx + norm.
y()*topy)/norm.
z() - dz;
282 G4double z1 = -rmin*(norm.
x()*cosSphi + norm.
y()*sinSphi)/norm.
z() - dz;
283 G4double z2 = -rmin*(norm.
x()*cosEphi + norm.
y()*sinEphi)/norm.
z() - dz;
284 G4double z3 = -rmax*(norm.
x()*cosSphi + norm.
y()*sinSphi)/norm.
z() - dz;
285 G4double z4 = -rmax*(norm.
x()*cosEphi + norm.
y()*sinEphi)/norm.
z() - dz;
293 mag = std::sqrt(norm.
x()*norm.
x() + norm.
y()*norm.
y());
294 topx = (mag == 0) ? 0 : -rmax*norm.
x()/mag;
295 topy = (mag == 0) ? 0 : -rmax*norm.
y()/mag;
296 dists = sinSphi*topx - cosSphi*topy;
297 diste = -sinEphi*topx + cosEphi*topy;
301 if (dists > 0 && diste > 0) iftop =
false;
306 if (dists <= 0 && diste <= 0) iftop =
true;
310 zmax = -(norm.
x()*topx + norm.
y()*topy)/norm.
z() + dz;
314 G4double z1 = -rmin*(norm.
x()*cosSphi + norm.
y()*sinSphi)/norm.
z() + dz;
315 G4double z2 = -rmin*(norm.
x()*cosEphi + norm.
y()*sinEphi)/norm.
z() + dz;
316 G4double z3 = -rmax*(norm.
x()*cosSphi + norm.
y()*sinSphi)/norm.
z() + dz;
317 G4double z4 = -rmax*(norm.
x()*cosEphi + norm.
y()*sinEphi)/norm.
z() + dz;
330 pMin.
set(vmin.
x(),vmin.
y(), zmin);
331 pMax.
set(vmax.
x(),vmax.
y(), zmax);
335 pMin.
set(-rmax,-rmax, zmin);
336 pMax.
set( rmax, rmax, zmax);
341 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
344 message <<
"Bad bounding box (min >= max) for solid: "
346 <<
"\npMin = " << pMin
347 <<
"\npMax = " << pMax;
348 G4Exception(
"G4CutTubs::BoundingLimits()",
"GeomMgt0001",
373 if (
true)
return bbox.
CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
377 return exist = (pMin < pMax) ?
true :
false;
389 const G4int NSTEPS = 24;
391 G4int ksteps = (dphi <= astep) ? 1 : (
G4int)((dphi-
deg)/astep) + 1;
394 G4double sinHalf = std::sin(0.5*ang);
395 G4double cosHalf = std::cos(0.5*ang);
396 G4double sinStep = 2.*sinHalf*cosHalf;
397 G4double cosStep = 1. - 2.*sinHalf*sinHalf;
402 if (rmin == 0 && dphi ==
twopi)
408 for (
G4int k=0; k<NSTEPS; ++k)
410 baseA[k].set(rext*cosCur,rext*sinCur,zmin);
411 baseB[k].set(rext*cosCur,rext*sinCur,zmax);
414 sinCur = sinCur*cosStep + cosCur*sinStep;
415 cosCur = cosCur*cosStep - sinTmp*sinStep;
417 std::vector<const G4ThreeVectorList *> polygons(2);
418 polygons[0] = &baseA;
419 polygons[1] = &baseB;
429 G4double sinCur = sinStart*cosHalf + cosStart*sinHalf;
430 G4double cosCur = cosStart*cosHalf - sinStart*sinHalf;
434 for (
G4int k=0; k<ksteps+2; ++k) pols[k].resize(4);
435 pols[0][0].set(rmin*cosStart,rmin*sinStart,zmax);
436 pols[0][1].set(rmin*cosStart,rmin*sinStart,zmin);
437 pols[0][2].set(rmax*cosStart,rmax*sinStart,zmin);
438 pols[0][3].set(rmax*cosStart,rmax*sinStart,zmax);
439 for (
G4int k=1; k<ksteps+1; ++k)
441 pols[k][0].set(rmin*cosCur,rmin*sinCur,zmax);
442 pols[k][1].set(rmin*cosCur,rmin*sinCur,zmin);
443 pols[k][2].set(rext*cosCur,rext*sinCur,zmin);
444 pols[k][3].set(rext*cosCur,rext*sinCur,zmax);
447 sinCur = sinCur*cosStep + cosCur*sinStep;
448 cosCur = cosCur*cosStep - sinTmp*sinStep;
450 pols[ksteps+1][0].set(rmin*cosEnd,rmin*sinEnd,zmax);
451 pols[ksteps+1][1].set(rmin*cosEnd,rmin*sinEnd,zmin);
452 pols[ksteps+1][2].set(rmax*cosEnd,rmax*sinEnd,zmin);
453 pols[ksteps+1][3].set(rmax*cosEnd,rmax*sinEnd,zmax);
456 std::vector<const G4ThreeVectorList *> polygons;
457 polygons.resize(ksteps+2);
458 for (
G4int k=0; k<ksteps+2; ++k) polygons[k] = &pols[k];
490 if ( tolRMin < 0 ) { tolRMin = 0; }
492 if (r2 < tolRMin*tolRMin || r2 > tolRMax*tolRMax) {
return kOutside; }
511 if ((phi0 >= sphi && phi0 <= ephi) ||
512 (phi1 >= sphi && phi1 <= ephi) ||
513 (phi2 >= sphi && phi2 <= ephi)) in =
kSurface;
518 if ((phi0 >= sphi && phi0 <= ephi) ||
519 (phi1 >= sphi && phi1 <= ephi) ||
520 (phi2 >= sphi && phi2 <= ephi)) in =
kInside;
534 else { tolRMin = 0; }
536 if (((r2 <= tolRMin*tolRMin) || (r2 >= tolRMax*tolRMax)) &&
553 G4int noSurfaces = 0;
555 G4double distZLow,distZHigh, distRMin, distRMax;
563 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y());
565 distRMin = std::fabs(rho -
fRMin);
566 distRMax = std::fabs(rho -
fRMax);
570 distZLow =std::fabs((p+vZ).dot(
fLowNorm));
574 distZHigh = std::fabs((p-vZ).dot(
fHighNorm));
580 pPhi = std::atan2(p.
y(),p.
x());
585 distSPhi = std::fabs(pPhi -
fSPhi);
631 if ( noSurfaces == 0 )
634 G4Exception(
"G4CutTubs::SurfaceNormal(p)",
"GeomSolids1002",
637 G4cout<<
"G4CutTubs::SN ( "<<p.
x()<<
", "<<p.
y()<<
", "<<p.
z()<<
" ); "
639 G4cout.precision(oldprc) ;
643 else if ( noSurfaces == 1 ) { norm = sumnorm; }
644 else { norm = sumnorm.
unit(); }
662 G4double distRMin, distRMax, distSPhi, distEPhi, distMin ;
665 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y()) ;
667 distRMin = std::fabs(rho -
fRMin) ;
668 distRMax = std::fabs(rho -
fRMax) ;
672 distZLow =std::fabs((p+vZ).dot(
fLowNorm));
676 distZHigh = std::fabs((p-vZ).dot(
fHighNorm));
679 if (distRMin < distRMax)
681 if ( distZ < distRMin )
694 if ( distZ < distRMax )
707 phi = std::atan2(p.
y(),p.
x()) ;
709 if ( phi < 0 ) { phi +=
twopi; }
713 distSPhi = std::fabs(phi - (
fSPhi +
twopi))*rho ;
717 distSPhi = std::fabs(phi -
fSPhi)*rho ;
719 distEPhi = std::fabs(phi -
fSPhi -
fDPhi)*rho ;
721 if (distSPhi < distEPhi)
723 if ( distSPhi < distMin )
730 if ( distEPhi < distMin )
750 if ( distZHigh > distZLow ) { norm =
fHighNorm ; }
769 "Undefined side for valid surface normal to solid.");
809 G4double Dist, sd=0, xi, yi, zi, rho2, inum, iden, cosPsi, Comp,calf ;
843 if(sd < 0.0) { sd = 0.0; }
845 xi = p.
x() + sd*v.
x() ;
846 yi = p.
y() + sd*v.
y() ;
847 rho2 = xi*xi + yi*yi ;
851 if ((tolIRMin2 <= rho2) && (rho2 <= tolIRMax2))
858 iden = std::sqrt(rho2) ;
883 sd = -distZHigh/calf;
885 if(sd < 0.0) { sd = 0.0; }
887 xi = p.
x() + sd*v.
x() ;
888 yi = p.
y() + sd*v.
y() ;
889 rho2 = xi*xi + yi*yi ;
893 if ((tolIRMin2 <= rho2) && (rho2 <= tolIRMax2))
900 iden = std::sqrt(rho2) ;
931 t1 = 1.0 - v.
z()*v.
z() ;
932 t2 = p.
x()*v.
x() + p.
y()*v.
y() ;
933 t3 = p.
x()*p.
x() + p.
y()*p.
y() ;
939 if ((t3 >= tolORMax2) && (t2<0))
948 sd = c/(-b+std::sqrt(d));
953 G4double fTerm = sd-std::fmod(sd,dRmax);
958 zi = p.
z() + sd*v.
z() ;
959 xi = p.
x() + sd*v.
x() ;
960 yi = p.
y() + sd*v.
y() ;
975 xi = p.
x() + sd*v.
x() ;
976 yi = p.
y() + sd*v.
y() ;
989 if ((t3 > tolIRMin2) && (t2 < 0)
997 iden = std::sqrt(t3) ;
1018 snxt = c/(-b+std::sqrt(d));
1038 c = t3 - fRMax*
fRMax;
1049 snxt= c/(-b+std::sqrt(d));
1072 sd =( b > 0. )? c/(-b - std::sqrt(d)) : (-b + std::sqrt(d));
1077 if (sd < 0.0) { sd = 0.0; }
1080 G4double fTerm = sd-std::fmod(sd,dRmax);
1083 zi = p.
z() + sd*v.
z() ;
1084 xi = p.
x() + sd*v.
x() ;
1085 yi = p.
y() + sd*v.
y() ;
1141 if ( sd < 0 ) { sd = 0.0; }
1142 zi = p.
z() + sd*v.
z() ;
1143 xi = p.
x() + sd*v.
x() ;
1144 yi = p.
y() + sd*v.
y() ;
1151 rho2 = xi*xi + yi*yi ;
1152 if ( ( (rho2 >= tolIRMin2) && (rho2 <= tolIRMax2) )
1153 || ( (rho2 > tolORMin2) && (rho2 < tolIRMin2)
1156 || ( (rho2 > tolIRMax2) && (rho2 < tolORMax2)
1185 if ( sd < 0 ) { sd = 0; }
1186 zi = p.
z() + sd*v.
z() ;
1187 xi = p.
x() + sd*v.
x() ;
1188 yi = p.
y() + sd*v.
y() ;
1195 xi = p.
x() + sd*v.
x() ;
1196 yi = p.
y() + sd*v.
y() ;
1197 rho2 = xi*xi + yi*yi ;
1198 if ( ( (rho2 >= tolIRMin2) && (rho2 <= tolIRMax2) )
1199 || ( (rho2 > tolORMin2) && (rho2 < tolIRMin2)
1202 || ( (rho2 > tolIRMax2) && (rho2 < tolORMax2)
1253 G4double safRMin,safRMax,safZLow,safZHigh,safePhi,safe,rho,cosPsi;
1258 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y()) ;
1260 safRMin =
fRMin- rho ;
1261 safRMax = rho -
fRMax ;
1275 if ( safRMin > safe ) { safe = safRMin; }
1276 if ( safRMax> safe ) { safe = safRMax; }
1286 if ( cosPsi < std::cos(
fDPhi*0.5) )
1298 if ( safePhi > safe ) { safe = safePhi; }
1301 if ( safe < 0 ) { safe = 0; }
1322 G4double distZLow,distZHigh,calfH,calfL;
1327 G4double pDistS, compS, pDistE, compE, sphi2, xi, yi, vphi, roi2 ;
1347 snxt = -distZHigh/calfH ;
1365 sz = -distZLow/calfL ;
1382 if((calfH<=0)&&(calfL<=0))
1398 t1 = 1.0 - v.
z()*v.
z() ;
1399 t2 = p.
x()*v.
x() + p.
y()*v.
y() ;
1400 t3 = p.
x()*p.
x() + p.
y()*p.
y() ;
1403 else { roi2 = snxt*snxt*t1 + 2*snxt*t2 + t3; }
1423 if( d2 >= 0 ) { srd = c/( -b - std::sqrt(d2)); }
1442 roMin2 = t3 - t2*t2/
t1 ;
1458 srd = c/(-b+std::sqrt(d2));
1463 if ( calcNorm ) { *validNorm =
false; }
1474 srd = -b + std::sqrt(d2) ;
1498 srd = -b + std::sqrt(d2) ;
1520 vphi = std::atan2(v.
y(),v.
x()) ;
1526 if ( p.
x() || p.
y() )
1549 sphi = pDistS/compS ;
1553 xi = p.
x() + sphi*v.
x() ;
1554 yi = p.
y() + sphi*v.
y() ;
1594 sphi2 = pDistE/compE ;
1600 xi = p.
x() + sphi2*v.
x() ;
1601 yi = p.
y() + sphi2*v.
y() ;
1612 else { sphi = 0.0 ; }
1623 else { sphi = 0.0 ; }
1669 xi = p.
x() + snxt*v.
x() ;
1670 yi = p.
y() + snxt*v.
y() ;
1676 *validNorm = false ;
1687 *validNorm = false ;
1699 *validNorm = false ;
1717 G4int oldprc = message.precision(16);
1718 message <<
"Undefined side for valid surface normal to solid."
1720 <<
"Position:" << G4endl << G4endl
1721 <<
"p.x() = " << p.
x()/
mm <<
" mm" << G4endl
1722 <<
"p.y() = " << p.
y()/
mm <<
" mm" << G4endl
1723 <<
"p.z() = " << p.
z()/
mm <<
" mm" << G4endl << G4endl
1724 <<
"Direction:" << G4endl << G4endl
1725 <<
"v.x() = " << v.
x() << G4endl
1726 <<
"v.y() = " << v.
y() << G4endl
1727 <<
"v.z() = " << v.
z() << G4endl << G4endl
1728 <<
"Proposed distance :" << G4endl << G4endl
1729 <<
"snxt = " << snxt/
mm <<
" mm" <<
G4endl ;
1730 message.precision(oldprc) ;
1731 G4Exception(
"G4CutTubs::DistanceToOut(p,v,..)",
"GeomSolids1002",
1746 G4double safRMin,safRMax,safZLow,safZHigh,safePhi,safe,rho;
1749 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y()) ;
1751 safRMin = rho -
fRMin ;
1752 safRMax =
fRMax - rho ;
1758 safZLow = std::fabs((p+vZ).dot(
fLowNorm));
1762 safZHigh = std::fabs((p-vZ).dot(
fHighNorm));
1765 if ( safRMin < safe ) { safe = safRMin; }
1766 if ( safRMax< safe ) { safe = safRMax; }
1780 if (safePhi < safe) { safe = safePhi ; }
1782 if ( safe < 0 ) { safe = 0; }
1811 G4int oldprc = os.precision(16);
1812 os <<
"-----------------------------------------------------------\n"
1813 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
1814 <<
" ===================================================\n"
1815 <<
" Solid type: G4CutTubs\n"
1816 <<
" Parameters: \n"
1817 <<
" inner radius : " <<
fRMin/
mm <<
" mm \n"
1818 <<
" outer radius : " <<
fRMax/
mm <<
" mm \n"
1819 <<
" half length Z: " <<
fDz/
mm <<
" mm \n"
1820 <<
" starting phi : " <<
fSPhi/
degree <<
" degrees \n"
1821 <<
" delta phi : " <<
fDPhi/
degree <<
" degrees \n"
1822 <<
" low Norm : " <<
fLowNorm <<
" \n"
1824 <<
"-----------------------------------------------------------\n";
1825 os.precision(oldprc);
1836 G4double xRand, yRand, zRand, phi, cosphi, sinphi, chose,
1837 aOne, aTwo, aThr, aFou;
1846 cosphi = std::cos(phi);
1847 sinphi = std::sin(phi);
1855 if( (chose >=0) && (chose < aOne) )
1857 xRand = fRMax*cosphi;
1858 yRand = fRMax*sinphi;
1863 else if( (chose >= aOne) && (chose < aOne + aTwo) )
1865 xRand = fRMin*cosphi;
1866 yRand = fRMin*sinphi;
1871 else if( (chose >= aOne + aTwo) && (chose < aOne + aTwo + aThr) )
1873 xRand = rRand*cosphi;
1874 yRand = rRand*sinphi;
1878 else if( (chose >= aOne + aTwo + aThr) && (chose < aOne + aTwo + 2.*aThr) )
1880 xRand = rRand*cosphi;
1881 yRand = rRand*sinphi;
1885 else if( (chose >= aOne + aTwo + 2.*aThr)
1886 && (chose < aOne + aTwo + 2.*aThr + aFou) )
1888 xRand = rRand*std::cos(
fSPhi);
1889 yRand = rRand*std::sin(
fSPhi);
1916 typedef G4int G4int4[4];
1922 G4double3* xyz =
new G4double3[
nn];
1923 G4int4* faces =
new G4int4[nf] ;
1946 for(
G4int i=0;i<nf;i++)
1951 faces[i][k]=iNodes[k];
1953 for(
G4int k=n;k<4;k++)
1975 G4double zXLow1,zXLow2,zYLow1,zYLow2;
1976 G4double zXHigh1,zXHigh2,zYHigh1,zYHigh2;
1986 if ( (zXLow1>zXHigh1) ||(zXLow2>zXHigh2)
1987 || (zYLow1>zYHigh1) ||(zYLow2>zYHigh2)) {
return true; }
2028 G4bool in_range_low =
false;
2029 G4bool in_range_hi =
false;
2034 if (phiLow<0) { phiLow+=
twopi; }
2036 if (ddp<0) { ddp +=
twopi; }
2039 xc =
fRMin*std::cos(phiLow);
2040 yc =
fRMin*std::sin(phiLow);
2042 xc =
fRMax*std::cos(phiLow);
2043 yc =
fRMax*std::sin(phiLow);
2045 if (in_range_low) { zmin =
std::min(zmin, z1); }
2047 in_range_low =
true;
2054 if (phiHigh<0) { phiHigh+=
twopi; }
2056 if (ddp<0) { ddp +=
twopi; }
2059 xc =
fRMin*std::cos(phiHigh);
2060 yc =
fRMin*std::sin(phiHigh);
2062 xc =
fRMax*std::cos(phiHigh);
2063 yc =
fRMax*std::sin(phiHigh);
2065 if (in_range_hi) { zmax =
std::min(zmax, z1); }
2096 for (i = 1; i < 4; i++)
2098 if(z[i] < z[i-1])z1=z[i];
2110 for (i = 1; i < 4; i++)
2112 if(z[4+i] > z[4+i-1]) { z1=z[4+i]; }
2115 if (in_range_hi) { zmax =
std::max(zmax, z1); }
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4double GetSinEndPhi() const
G4Point3D GetVertex(G4int index) const
void set(double x, double y, double z)
G4bool IsCrossingCutPlanes() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4Polyhedron * CreatePolyhedron() const
G4int createPolyhedron(G4int Nnodes, G4int Nfaces, const G4double xyz[][3], const G4int faces[][4])
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
virtual void AddSolid(const G4Box &)=0
static const G4double kInfinity
void DescribeYourselfTo(G4VGraphicsScene &scene) const
static constexpr double mm
G4double GetOuterRadius() const
G4CSGSolid & operator=(const G4CSGSolid &rhs)
void message(RunManager *runmanager)
G4double GetRadiusInRing(G4double rmin, G4double rmax) const
G4double GetAngularTolerance() const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
double dot(const Hep3Vector &) const
G4double GetRadialTolerance() const
G4CutTubs & operator=(const G4CutTubs &rhs)
G4double GetCosStartPhi() const
G4double GetSinStartPhi() const
G4ThreeVector GetLowNorm() const
G4double halfCarTolerance
G4double GetCutZ(const G4ThreeVector &p) const
G4bool BoundingBoxVsVoxelLimits(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
std::vector< G4ThreeVector > G4ThreeVectorList
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
void GetFacet(G4int iFace, G4int &n, G4int *iNodes, G4int *edgeFlags=0, G4int *iFaces=0) const
static constexpr double deg
static constexpr double twopi
G4ThreeVector GetPointOnSurface() const
G4double GetInnerRadius() const
ThreeVector shoot(const G4int Ap, const G4int Af)
std::ostream & StreamInfo(std::ostream &os) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double halfAngTolerance
G4CutTubs(const G4String &pName, G4double pRMin, G4double pRMax, G4double pDz, G4double pSPhi, G4double pDPhi, G4ThreeVector pLowNorm, G4ThreeVector pHighNorm)
EInside Inside(const G4ThreeVector &p) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4int GetNoVertices() const
G4GeometryType GetEntityType() const
G4double halfRadTolerance
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector &p) const
G4double GetCosEndPhi() const
G4ThreeVector GetHighNorm() const
static constexpr double degree
G4GLOB_DLL std::ostream G4cout
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
static G4GeometryTolerance * GetInstance()
static constexpr double pi
G4double GetDeltaPhiAngle() const
G4int GetNoFacets() const
void GetMaxMinZ(G4double &zmin, G4double &zmax) const
void CheckPhiAngles(G4double sPhi, G4double dPhi)
G4double GetZHalfLength() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments