84 :
G4CSGSolid(pName), fRmin1(pRmin1), fRmin2(pRmin2),
85 fRmax1(pRmax1), fRmax2(pRmax2), fDz(pDz), fSPhi(0.), fDPhi(0.)
94 std::ostringstream message;
95 message <<
"Invalid Z half-length for Solid: " <<
GetName() <<
G4endl
103 if (((pRmin1>=pRmax1) || (pRmin2>=pRmax2) || (pRmin1<0)) && (pRmin2<0))
105 std::ostringstream message;
106 message <<
"Invalid values of radii for Solid: " <<
GetName() <<
G4endl
107 <<
" pRmin1 = " << pRmin1 <<
", pRmin2 = " << pRmin2
108 <<
", pRmax1 = " << pRmax1 <<
", pRmax2 = " << pRmax2;
112 if( (pRmin1 == 0.0) && (pRmin2 > 0.0) ) { fRmin1 = 1e3*kRadTolerance ; }
113 if( (pRmin2 == 0.0) && (pRmin1 > 0.0) ) { fRmin2 = 1e3*kRadTolerance ; }
117 CheckPhiAngles(pSPhi, pDPhi);
126 :
G4CSGSolid(a), kRadTolerance(0.), kAngTolerance(0.),
127 fRmin1(0.), fRmin2(0.), fRmax1(0.), fRmax2(0.), fDz(0.),
128 fSPhi(0.), fDPhi(0.), sinCPhi(0.), cosCPhi(0.), cosHDPhiOT(0.),
129 cosHDPhiIT(0.), sinSPhi(0.), cosSPhi(0.), sinEPhi(0.), cosEPhi(0.),
147 :
G4CSGSolid(rhs), kRadTolerance(rhs.kRadTolerance),
148 kAngTolerance(rhs.kAngTolerance), fRmin1(rhs.fRmin1), fRmin2(rhs.fRmin2),
149 fRmax1(rhs.fRmax1), fRmax2(rhs.fRmax2), fDz(rhs.fDz), fSPhi(rhs.fSPhi),
150 fDPhi(rhs.fDPhi), sinCPhi(rhs.sinCPhi), cosCPhi(rhs.cosCPhi),
151 cosHDPhiOT(rhs.cosHDPhiOT), cosHDPhiIT(rhs.cosHDPhiIT),
152 sinSPhi(rhs.sinSPhi), cosSPhi(rhs.cosSPhi), sinEPhi(rhs.sinEPhi),
153 cosEPhi(rhs.cosEPhi), fPhiFullCone(rhs.fPhiFullCone)
165 if (
this == &rhs) {
return *
this; }
173 kRadTolerance = rhs.kRadTolerance;
174 kAngTolerance = rhs.kAngTolerance;
175 fRmin1 = rhs.fRmin1; fRmin2 = rhs.fRmin2;
176 fRmax1 = rhs.fRmax1; fRmax2 = rhs.fRmax2;
177 fDz = rhs.fDz; fSPhi = rhs.fSPhi; fDPhi = rhs.fDPhi;
178 sinCPhi = rhs.sinCPhi; cosCPhi = rhs.cosCPhi;
179 cosHDPhiOT = rhs.cosHDPhiOT; cosHDPhiIT = rhs.cosHDPhiIT;
180 sinSPhi = rhs.sinSPhi; cosSPhi = rhs.cosSPhi;
181 sinEPhi = rhs.sinEPhi; cosEPhi = rhs.cosEPhi;
182 fPhiFullCone = rhs.fPhiFullCone;
193 G4double r2, rl, rh, pPhi, tolRMin, tolRMax;
196 static const G4double halfRadTolerance=kRadTolerance*0.5;
197 static const G4double halfAngTolerance=kAngTolerance*0.5;
199 if (std::fabs(p.
z()) > fDz + halfCarTolerance ) {
return in =
kOutside; }
200 else if(std::fabs(p.
z()) >= fDz - halfCarTolerance ) { in =
kSurface; }
203 r2 = p.
x()*p.
x() + p.
y()*p.
y() ;
204 rl = 0.5*(fRmin2*(p.
z() + fDz) + fRmin1*(fDz - p.
z()))/fDz ;
205 rh = 0.5*(fRmax2*(p.
z()+fDz)+fRmax1*(fDz-p.
z()))/fDz;
209 tolRMin = rl - halfRadTolerance;
210 if ( tolRMin < 0 ) { tolRMin = 0; }
211 tolRMax = rh + halfRadTolerance;
213 if ( (r2<tolRMin*tolRMin) || (r2>tolRMax*tolRMax) ) {
return in =
kOutside; }
215 if (rl) { tolRMin = rl + halfRadTolerance; }
216 else { tolRMin = 0.0; }
217 tolRMax = rh - halfRadTolerance;
221 if ( (r2 < tolRMin*tolRMin) || (r2 >= tolRMax*tolRMax) ) { in =
kSurface; }
223 if ( !fPhiFullCone && ((p.
x() != 0.0) || (p.
y() != 0.0)) )
225 pPhi = std::atan2(p.
y(),p.
x()) ;
227 if ( pPhi < fSPhi - halfAngTolerance ) { pPhi += twopi; }
228 else if ( pPhi > fSPhi + fDPhi + halfAngTolerance ) { pPhi -= twopi; }
230 if ( (pPhi < fSPhi - halfAngTolerance) ||
231 (pPhi > fSPhi + fDPhi + halfAngTolerance) ) {
return in =
kOutside; }
235 if ( (pPhi < fSPhi + halfAngTolerance) ||
236 (pPhi > fSPhi + fDPhi - halfAngTolerance) ) { in =
kSurface; }
239 else if ( !fPhiFullCone ) { in =
kSurface; }
267 if ( !pTransform.
IsRotated() && (fDPhi == twopi)
268 && (fRmin1 == 0) && (fRmin2 == 0) )
279 G4double diff1, diff2, delta, maxDiff, newMin, newMax, RMax ;
280 G4double xoff1, xoff2, yoff1, yoff2 ;
283 zMin = zoffset - fDz ;
284 zMax = zoffset + fDz ;
306 RMax = (fRmax2 >= fRmax1) ? zMax : zMin ;
307 xMax = xoffset + (fRmax1 + fRmax2)*0.5 +
308 (RMax - zoffset)*(fRmax2 - fRmax1)/(2*fDz) ;
309 xMin = 2*xoffset-xMax ;
331 yMax = yoffset + (fRmax1 + fRmax2)*0.5 +
332 (RMax - zoffset)*(fRmax2 - fRmax1)/(2*fDz) ;
333 yMin = 2*yoffset-yMax ;
334 RMax = yMax - yoffset ;
358 yoff1 = yoffset - yMin ;
359 yoff2 = yMax - yoffset ;
361 if ((yoff1 >= 0) && (yoff2 >= 0))
370 delta=RMax*RMax-yoff1*yoff1;
371 diff1=(delta>0.) ? std::sqrt(delta) : 0.;
372 delta=RMax*RMax-yoff2*yoff2;
373 diff2=(delta>0.) ? std::sqrt(delta) : 0.;
374 maxDiff = (diff1>diff2) ? diff1:diff2 ;
375 newMin = xoffset - maxDiff ;
376 newMax = xoffset + maxDiff ;
377 pMin = ( newMin < xMin ) ? xMin : newMin ;
378 pMax = ( newMax > xMax) ? xMax : newMax ;
383 xoff1 = xoffset - xMin ;
384 xoff2 = xMax - xoffset ;
386 if ((xoff1 >= 0) && (xoff2 >= 0) )
395 delta=RMax*RMax-xoff1*xoff1;
396 diff1=(delta>0.) ? std::sqrt(delta) : 0.;
397 delta=RMax*RMax-xoff2*xoff2;
398 diff2=(delta>0.) ? std::sqrt(delta) : 0.;
399 maxDiff = (diff1 > diff2) ? diff1:diff2 ;
400 newMin = yoffset - maxDiff ;
401 newMax = yoffset + maxDiff ;
402 pMin = (newMin < yMin) ? yMin : newMin ;
403 pMax = (newMax > yMax) ? yMax : newMax ;
422 G4int i, noEntries, noBetweenSections4 ;
423 G4bool existsAfterClip = false ;
429 noEntries = vertices->size() ;
430 noBetweenSections4 = noEntries-4 ;
432 for ( i = 0 ; i < noEntries ; i += 4 )
436 for ( i = 0 ; i < noBetweenSections4 ; i += 4 )
440 if ( (pMin != kInfinity) || (pMax != -kInfinity) )
442 existsAfterClip = true ;
463 existsAfterClip = true ;
469 return existsAfterClip ;
481 G4int noSurfaces = 0;
484 G4double distSPhi = kInfinity, distEPhi = kInfinity;
485 G4double tanRMin, secRMin, pRMin, widRMin;
486 G4double tanRMax, secRMax, pRMax, widRMax;
489 static const G4double dAngle = 0.5*kAngTolerance;
494 distZ = std::fabs(std::fabs(p.
z()) - fDz);
495 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y());
497 tanRMin = (fRmin2 - fRmin1)*0.5/fDz;
498 secRMin = std::sqrt(1 + tanRMin*tanRMin);
499 pRMin = rho - p.
z()*tanRMin;
500 widRMin = fRmin2 - fDz*tanRMin;
501 distRMin = std::fabs(pRMin - widRMin)/secRMin;
503 tanRMax = (fRmax2 - fRmax1)*0.5/fDz;
504 secRMax = std::sqrt(1+tanRMax*tanRMax);
505 pRMax = rho - p.
z()*tanRMax;
506 widRMax = fRmax2 - fDz*tanRMax;
507 distRMax = std::fabs(pRMax - widRMax)/secRMax;
513 pPhi = std::atan2(p.
y(),p.
x());
515 if (pPhi < fSPhi-delta) { pPhi += twopi; }
516 else if (pPhi > fSPhi+fDPhi+delta) { pPhi -= twopi; }
518 distSPhi = std::fabs( pPhi - fSPhi );
519 distEPhi = std::fabs( pPhi - fSPhi - fDPhi );
521 else if( !(fRmin1) || !(fRmin2) )
527 nPe =
G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi), 0);
531 nR =
G4ThreeVector(p.
x()/rho/secRMax, p.
y()/rho/secRMax, -tanRMax/secRMax);
532 if (fRmin1 || fRmin2)
534 nr =
G4ThreeVector(-p.
x()/rho/secRMin,-p.
y()/rho/secRMin,tanRMin/secRMin);
538 if( distRMax <= delta )
543 if( (fRmin1 || fRmin2) && (distRMin <= delta) )
550 if (distSPhi <= dAngle)
555 if (distEPhi <= dAngle)
564 if ( p.
z() >= 0.) { sumnorm += nZ; }
565 else { sumnorm -= nZ; }
567 if ( noSurfaces == 0 )
570 G4Exception(
"G4Cons::SurfaceNormal(p)",
"GeomSolids1002",
573 norm = ApproxSurfaceNormal(p);
575 else if ( noSurfaces == 1 ) { norm = sumnorm; }
576 else { norm = sumnorm.
unit(); }
591 G4double distZ, distRMin, distRMax, distSPhi, distEPhi, distMin ;
592 G4double tanRMin, secRMin, pRMin, widRMin ;
593 G4double tanRMax, secRMax, pRMax, widRMax ;
595 distZ = std::fabs(std::fabs(p.
z()) - fDz) ;
596 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y()) ;
598 tanRMin = (fRmin2 - fRmin1)*0.5/fDz ;
599 secRMin = std::sqrt(1 + tanRMin*tanRMin) ;
600 pRMin = rho - p.
z()*tanRMin ;
601 widRMin = fRmin2 - fDz*tanRMin ;
602 distRMin = std::fabs(pRMin - widRMin)/secRMin ;
604 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ;
605 secRMax = std::sqrt(1+tanRMax*tanRMax) ;
606 pRMax = rho - p.
z()*tanRMax ;
607 widRMax = fRmax2 - fDz*tanRMax ;
608 distRMax = std::fabs(pRMax - widRMax)/secRMax ;
610 if (distRMin < distRMax)
612 if (distZ < distRMin)
625 if (distZ < distRMax)
636 if ( !fPhiFullCone && rho )
638 phi = std::atan2(p.
y(),p.
x()) ;
640 if (phi < 0) { phi += twopi; }
642 if (fSPhi < 0) { distSPhi = std::fabs(phi - (fSPhi + twopi))*rho; }
643 else { distSPhi = std::fabs(phi - fSPhi)*rho; }
645 distEPhi = std::fabs(phi - fSPhi - fDPhi)*rho ;
649 if (distSPhi < distEPhi)
651 if (distSPhi < distMin) { side = kNSPhi; }
655 if (distEPhi < distMin) { side = kNEPhi; }
676 norm=
G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi), 0) ;
682 "Undefined side for valid surface normal to solid.");
716 const G4double dRmax = 100*std::min(fRmax1,fRmax2);
718 static const G4double halfRadTolerance=kRadTolerance*0.5;
720 G4double tanRMax,secRMax,rMaxAv,rMaxOAv ;
721 G4double tanRMin,secRMin,rMinAv,rMinOAv ;
724 G4double tolORMin,tolORMin2,tolIRMin,tolIRMin2 ;
725 G4double tolORMax2,tolIRMax,tolIRMax2 ;
728 G4double Dist,sd,xi,yi,zi,ri=0.,risec,rhoi2,cosPsi ;
738 tanRMin = (fRmin2 - fRmin1)*0.5/fDz ;
739 secRMin = std::sqrt(1.0 + tanRMin*tanRMin) ;
740 rMinAv = (fRmin1 + fRmin2)*0.5 ;
742 if (rMinAv > halfRadTolerance)
744 rMinOAv = rMinAv - halfRadTolerance ;
750 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ;
751 secRMax = std::sqrt(1.0 + tanRMax*tanRMax) ;
752 rMaxAv = (fRmax1 + fRmax2)*0.5 ;
753 rMaxOAv = rMaxAv + halfRadTolerance ;
757 tolIDz = fDz - halfCarTolerance ;
758 tolODz = fDz + halfCarTolerance ;
760 if (std::fabs(p.
z()) >= tolIDz)
762 if ( p.
z()*v.
z() < 0 )
764 sd = (std::fabs(p.
z()) - fDz)/std::fabs(v.
z()) ;
766 if( sd < 0.0 ) { sd = 0.0; }
768 xi = p.
x() + sd*v.
x() ;
769 yi = p.
y() + sd*v.
y() ;
770 rhoi2 = xi*xi + yi*yi ;
777 tolORMin = fRmin1 - halfRadTolerance*secRMin ;
778 tolIRMin = fRmin1 + halfRadTolerance*secRMin ;
779 tolIRMax = fRmax1 - halfRadTolerance*secRMin ;
780 tolORMax2 = (fRmax1 + halfRadTolerance*secRMax)*
781 (fRmax1 + halfRadTolerance*secRMax) ;
785 tolORMin = fRmin2 - halfRadTolerance*secRMin ;
786 tolIRMin = fRmin2 + halfRadTolerance*secRMin ;
787 tolIRMax = fRmax2 - halfRadTolerance*secRMin ;
788 tolORMax2 = (fRmax2 + halfRadTolerance*secRMax)*
789 (fRmax2 + halfRadTolerance*secRMax) ;
793 tolORMin2 = tolORMin*tolORMin ;
794 tolIRMin2 = tolIRMin*tolIRMin ;
801 if ( tolIRMax > 0 ) { tolIRMax2 = tolIRMax*tolIRMax; }
802 else { tolIRMax2 = 0.0; }
804 if ( (tolIRMin2 <= rhoi2) && (rhoi2 <= tolIRMax2) )
806 if ( !fPhiFullCone && rhoi2 )
810 cosPsi = (xi*cosCPhi + yi*sinCPhi)/std::sqrt(rhoi2) ;
812 if (cosPsi >= cosHDPhiIT) {
return sd; }
845 t1 = 1.0 - v.
z()*v.
z() ;
846 t2 = p.
x()*v.
x() + p.
y()*v.
y() ;
847 t3 = p.
x()*p.
x() + p.
y()*p.
y() ;
848 rin = tanRMin*p.
z() + rMinAv ;
849 rout = tanRMax*p.
z() + rMaxAv ;
854 nt1 = t1 - (tanRMax*v.
z())*(tanRMax*v.
z()) ;
855 nt2 = t2 - tanRMax*v.
z()*rout ;
856 nt3 = t3 - rout*rout ;
858 if (std::fabs(nt1) > kRadTolerance)
863 if ( (nt3 > rout*rout*kRadTolerance*kRadTolerance*secRMax*secRMax)
872 if ((rout < 0) && (nt3 <= 0))
877 if (b>0) { sd = c/(-b-std::sqrt(d)); }
878 else { sd = -b + std::sqrt(d); }
882 if ((b <= 0) && (c >= 0))
884 sd=c/(-b+std::sqrt(d));
890 sd = -b + std::sqrt(d) ;
902 G4double fTerm = sd-std::fmod(sd,dRmax);
905 zi = p.
z() + sd*v.
z() ;
907 if (std::fabs(zi) <= tolODz)
911 if ( fPhiFullCone ) {
return sd; }
914 xi = p.
x() + sd*v.
x() ;
915 yi = p.
y() + sd*v.
y() ;
916 ri = rMaxAv + zi*tanRMax ;
917 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ;
919 if ( cosPsi >= cosHDPhiIT ) {
return sd; }
930 if ( ( t3 > (rin + halfRadTolerance*secRMin)*
931 (rin + halfRadTolerance*secRMin) )
932 && (nt2 < 0) && (d >= 0) && (std::fabs(p.
z()) <= tolIDz) )
939 risec = std::sqrt(xi*xi + yi*yi)*secRMax ;
943 cosPsi = (p.
x()*cosCPhi + p.
y()*sinCPhi)/std::sqrt(t3) ;
944 if ( cosPsi >= cosHDPhiIT )
946 if ( Normal.
dot(v) <= 0 ) {
return 0.0; }
951 if ( Normal.
dot(v) <= 0 ) {
return 0.0; }
958 if ( std::fabs(nt2) > kRadTolerance )
962 if ( sd < 0 ) {
return kInfinity; }
965 zi = p.
z() + sd*v.
z() ;
967 if ((std::fabs(zi) <= tolODz) && (nt2 < 0))
971 if ( fPhiFullCone ) {
return sd; }
974 xi = p.
x() + sd*v.
x() ;
975 yi = p.
y() + sd*v.
y() ;
976 ri = rMaxAv + zi*tanRMax ;
977 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ;
979 if (cosPsi >= cosHDPhiIT) {
return sd; }
1001 nt1 = t1 - (tanRMin*v.
z())*(tanRMin*v.
z()) ;
1002 nt2 = t2 - tanRMin*v.
z()*rin ;
1003 nt3 = t3 - rin*rin ;
1007 if ( nt3 > rin*kRadTolerance*secRMin )
1017 if(b>0){sd = c/( -b-std::sqrt(d));}
1018 else {sd = -b + std::sqrt(d) ;}
1024 G4double fTerm = sd-std::fmod(sd,dRmax);
1027 zi = p.
z() + sd*v.
z() ;
1029 if ( std::fabs(zi) <= tolODz )
1031 if ( !fPhiFullCone )
1033 xi = p.
x() + sd*v.
x() ;
1034 yi = p.
y() + sd*v.
y() ;
1035 ri = rMinAv + zi*tanRMin ;
1036 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ;
1038 if (cosPsi >= cosHDPhiIT)
1040 if ( sd > halfRadTolerance ) { snxt=sd; }
1045 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1046 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin);
1047 if ( Normal.
dot(v) <= 0 ) { snxt = sd; }
1053 if ( sd > halfRadTolerance ) {
return sd; }
1058 xi = p.
x() + sd*v.
x() ;
1059 yi = p.
y() + sd*v.
y() ;
1060 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1061 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin) ;
1062 if ( Normal.
dot(v) <= 0 ) {
return sd; }
1069 else if ( nt3 < -rin*kRadTolerance*secRMin )
1082 if (b>0) { sd = c/(-b-std::sqrt(d)); }
1083 else { sd = -b + std::sqrt(d); }
1084 zi = p.
z() + sd*v.
z() ;
1085 ri = rMinAv + zi*tanRMin ;
1089 if ( (sd >= 0) && (std::fabs(zi) <= tolODz) )
1093 G4double fTerm = sd-std::fmod(sd,dRmax);
1096 if ( !fPhiFullCone )
1098 xi = p.
x() + sd*v.
x() ;
1099 yi = p.
y() + sd*v.
y() ;
1100 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ;
1102 if (cosPsi >= cosHDPhiOT)
1104 if ( sd > halfRadTolerance ) { snxt=sd; }
1109 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1110 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin);
1111 if ( Normal.
dot(v) <= 0 ) { snxt = sd; }
1117 if( sd > halfRadTolerance ) {
return sd; }
1122 xi = p.
x() + sd*v.
x() ;
1123 yi = p.
y() + sd*v.
y() ;
1124 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1125 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin) ;
1126 if ( Normal.
dot(v) <= 0 ) {
return sd; }
1133 if (b>0) { sd = -b - std::sqrt(d); }
1134 else { sd = c/(-b+std::sqrt(d)); }
1135 zi = p.
z() + sd*v.
z() ;
1136 ri = rMinAv + zi*tanRMin ;
1138 if ( (sd >= 0) && (ri > 0) && (std::fabs(zi) <= tolODz) )
1142 G4double fTerm = sd-std::fmod(sd,dRmax);
1145 if ( !fPhiFullCone )
1147 xi = p.
x() + sd*v.
x() ;
1148 yi = p.
y() + sd*v.
y() ;
1149 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ;
1151 if (cosPsi >= cosHDPhiIT)
1153 if ( sd > halfRadTolerance ) { snxt=sd; }
1158 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1159 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin);
1160 if ( Normal.
dot(v) <= 0 ) { snxt = sd; }
1166 if ( sd > halfRadTolerance ) {
return sd; }
1171 xi = p.
x() + sd*v.
x() ;
1172 yi = p.
y() + sd*v.
y() ;
1173 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1174 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin) ;
1175 if ( Normal.
dot(v) <= 0 ) {
return sd; }
1189 if ( std::fabs(p.
z()) <= tolODz )
1195 if ( !fPhiFullCone )
1197 cosPsi = (p.
x()*cosCPhi + p.
y()*sinCPhi)/std::sqrt(t3) ;
1199 if (cosPsi >= cosHDPhiIT) {
return 0.0; }
1201 else {
return 0.0; }
1214 if (b>0) { sd = -b - std::sqrt(d); }
1215 else { sd = c/(-b+std::sqrt(d)); }
1216 zi = p.
z() + sd*v.
z() ;
1217 ri = rMinAv + zi*tanRMin ;
1221 if (b>0) { sd = c/(-b-std::sqrt(d)); }
1222 else { sd = -b + std::sqrt(d); }
1224 zi = p.
z() + sd*v.
z() ;
1226 if ( (sd >= 0) && (std::fabs(zi) <= tolODz) )
1230 G4double fTerm = sd-std::fmod(sd,dRmax);
1233 if ( !fPhiFullCone )
1235 xi = p.
x() + sd*v.
x() ;
1236 yi = p.
y() + sd*v.
y() ;
1237 ri = rMinAv + zi*tanRMin ;
1238 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri ;
1240 if ( cosPsi >= cosHDPhiIT ) { snxt = sd; }
1245 else {
return kInfinity; }
1257 if (b>0) { sd = c/(-b-std::sqrt(d)); }
1258 else { sd = -b + std::sqrt(d) ; }
1259 zi = p.
z() + sd*v.
z() ;
1261 if ( (sd >= 0) && (std::fabs(zi) <= tolODz) )
1265 G4double fTerm = sd-std::fmod(sd,dRmax);
1268 if ( !fPhiFullCone )
1270 xi = p.
x() + sd*v.
x();
1271 yi = p.
y() + sd*v.
y();
1272 ri = rMinAv + zi*tanRMin ;
1273 cosPsi = (xi*cosCPhi + yi*sinCPhi)/ri;
1275 if (cosPsi >= cosHDPhiIT) { snxt = sd; }
1294 if ( !fPhiFullCone )
1298 Comp = v.
x()*sinSPhi - v.
y()*cosSPhi ;
1302 Dist = (p.
y()*cosSPhi - p.
x()*sinSPhi) ;
1304 if (Dist < halfCarTolerance)
1310 if ( sd < 0 ) { sd = 0.0; }
1312 zi = p.
z() + sd*v.
z() ;
1314 if ( std::fabs(zi) <= tolODz )
1316 xi = p.
x() + sd*v.
x() ;
1317 yi = p.
y() + sd*v.
y() ;
1318 rhoi2 = xi*xi + yi*yi ;
1319 tolORMin2 = (rMinOAv + zi*tanRMin)*(rMinOAv + zi*tanRMin) ;
1320 tolORMax2 = (rMaxOAv + zi*tanRMax)*(rMaxOAv + zi*tanRMax) ;
1322 if ( (rhoi2 >= tolORMin2) && (rhoi2 <= tolORMax2) )
1327 if ((yi*cosCPhi - xi*sinCPhi) <= 0 ) { snxt = sd; }
1336 Comp = -(v.
x()*sinEPhi - v.
y()*cosEPhi) ;
1340 Dist = -(p.
y()*cosEPhi - p.
x()*sinEPhi) ;
1341 if (Dist < halfCarTolerance)
1347 if ( sd < 0 ) { sd = 0.0; }
1349 zi = p.
z() + sd*v.
z() ;
1351 if (std::fabs(zi) <= tolODz)
1353 xi = p.
x() + sd*v.
x() ;
1354 yi = p.
y() + sd*v.
y() ;
1355 rhoi2 = xi*xi + yi*yi ;
1356 tolORMin2 = (rMinOAv + zi*tanRMin)*(rMinOAv + zi*tanRMin) ;
1357 tolORMax2 = (rMaxOAv + zi*tanRMax)*(rMaxOAv + zi*tanRMax) ;
1359 if ( (rhoi2 >= tolORMin2) && (rhoi2 <= tolORMax2) )
1364 if ( (yi*cosCPhi - xi*sinCPhi) >= 0.0 ) { snxt = sd; }
1371 if (snxt < halfCarTolerance) { snxt = 0.; }
1385 G4double safe=0.0, rho, safeR1, safeR2, safeZ, safePhi, cosPsi ;
1389 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y()) ;
1390 safeZ = std::fabs(p.
z()) - fDz ;
1392 if ( fRmin1 || fRmin2 )
1394 tanRMin = (fRmin2 - fRmin1)*0.5/fDz ;
1395 secRMin = std::sqrt(1.0 + tanRMin*tanRMin) ;
1396 pRMin = tanRMin*p.
z() + (fRmin1 + fRmin2)*0.5 ;
1397 safeR1 = (pRMin - rho)/secRMin ;
1399 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ;
1400 secRMax = std::sqrt(1.0 + tanRMax*tanRMax) ;
1401 pRMax = tanRMax*p.
z() + (fRmax1 + fRmax2)*0.5 ;
1402 safeR2 = (rho - pRMax)/secRMax ;
1404 if ( safeR1 > safeR2) { safe = safeR1; }
1405 else { safe = safeR2; }
1409 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ;
1410 secRMax = std::sqrt(1.0 + tanRMax*tanRMax) ;
1411 pRMax = tanRMax*p.
z() + (fRmax1 + fRmax2)*0.5 ;
1412 safe = (rho - pRMax)/secRMax ;
1414 if ( safeZ > safe ) { safe = safeZ; }
1416 if ( !fPhiFullCone && rho )
1420 cosPsi = (p.
x()*cosCPhi + p.
y()*sinCPhi)/rho ;
1422 if ( cosPsi < std::cos(fDPhi*0.5) )
1424 if ( (p.
y()*cosCPhi - p.
x()*sinCPhi) <= 0.0 )
1426 safePhi = std::fabs(p.
x()*std::sin(fSPhi)-p.
y()*std::cos(fSPhi));
1430 safePhi = std::fabs(p.
x()*sinEPhi-p.
y()*cosEPhi);
1432 if ( safePhi > safe ) { safe = safePhi; }
1435 if ( safe < 0.0 ) { safe = 0.0; }
1451 ESide side = kNull, sider = kNull, sidephi = kNull;
1454 static const G4double halfRadTolerance=kRadTolerance*0.5;
1455 static const G4double halfAngTolerance=kAngTolerance*0.5;
1459 G4double tanRMax, secRMax, rMaxAv ;
1460 G4double tanRMin, secRMin, rMinAv ;
1462 G4double t1, t2, t3, rout, rin, nt1, nt2, nt3 ;
1467 ESide sidetol = kNull ;
1472 G4double pDistS, compS, pDistE, compE, sphi2, xi, yi, risec, vphi ;
1479 pdist = fDz - p.
z() ;
1481 if (pdist > halfCarTolerance)
1483 snxt = pdist/v.
z() ;
1496 else if ( v.
z() < 0.0 )
1498 pdist = fDz + p.
z() ;
1500 if ( pdist > halfCarTolerance)
1502 snxt = -pdist/v.
z() ;
1538 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ;
1539 secRMax = std::sqrt(1.0 + tanRMax*tanRMax) ;
1540 rMaxAv = (fRmax1 + fRmax2)*0.5 ;
1543 t1 = 1.0 - v.
z()*v.
z() ;
1544 t2 = p.
x()*v.
x() + p.
y()*v.
y() ;
1545 t3 = p.
x()*p.
x() + p.
y()*p.
y() ;
1546 rout = tanRMax*p.
z() + rMaxAv ;
1548 nt1 = t1 - (tanRMax*v.
z())*(tanRMax*v.
z()) ;
1549 nt2 = t2 - tanRMax*v.
z()*rout ;
1550 nt3 = t3 - rout*rout ;
1554 deltaRoi2 = snxt*snxt*t1 + 2*snxt*t2 + t3
1555 - fRmax2*(fRmax2 + kRadTolerance*secRMax);
1557 else if ( v.
z() < 0.0 )
1559 deltaRoi2 = snxt*snxt*t1 + 2*snxt*t2 + t3
1560 - fRmax1*(fRmax1 + kRadTolerance*secRMax);
1567 if ( nt1 && (deltaRoi2 > 0.0) )
1580 if (nt3 > -halfRadTolerance && nt2 >= 0 )
1584 risec = std::sqrt(t3)*secRMax ;
1593 if (b>0) { srd = -b - std::sqrt(d); }
1594 else { srd = c/(-b+std::sqrt(d)) ; }
1596 zi = p.
z() + srd*v.
z() ;
1597 ri = tanRMax*zi + rMaxAv ;
1599 if ((ri >= 0) && (-halfRadTolerance <= srd) && (srd <= halfRadTolerance))
1607 if ( (ri < 0) || (srd < halfRadTolerance) )
1612 if (b>0) { sr2 = c/(-b-std::sqrt(d)); }
1613 else { sr2 = -b + std::sqrt(d); }
1614 zi = p.
z() + sr2*v.
z() ;
1615 ri = tanRMax*zi + rMaxAv ;
1617 if ((ri >= 0) && (sr2 > halfRadTolerance))
1625 if( (-halfRadTolerance <= sr2) && ( sr2 <= halfRadTolerance) )
1644 risec = std::sqrt(t3)*secRMax;
1651 else if ( nt2 && (deltaRoi2 > 0.0) )
1657 risec = std::sqrt(t3)*secRMax;
1673 if ( slentol <= halfCarTolerance )
1684 xi = p.
x() + slentol*v.
x();
1685 yi = p.
y() + slentol*v.
y();
1686 risec = std::sqrt(xi*xi + yi*yi)*secRMax;
1689 if ( Normal.
dot(v) > 0 )
1693 *n = Normal.
unit() ;
1700 slentol = kInfinity ;
1706 if ( fRmin1 || fRmin2 )
1708 tanRMin = (fRmin2 - fRmin1)*0.5/fDz ;
1709 nt1 = t1 - (tanRMin*v.
z())*(tanRMin*v.
z()) ;
1713 secRMin = std::sqrt(1.0 + tanRMin*tanRMin) ;
1714 rMinAv = (fRmin1 + fRmin2)*0.5 ;
1715 rin = tanRMin*p.
z() + rMinAv ;
1716 nt2 = t2 - tanRMin*v.
z()*rin ;
1717 nt3 = t3 - rin*rin ;
1730 if (nt3 < kRadTolerance*(rin + kRadTolerance*0.25))
1734 if (calcNorm) { *validNorm =
false; }
1740 if (b>0) { sr2 = -b - std::sqrt(d); }
1741 else { sr2 = c/(-b+std::sqrt(d)); }
1742 zi = p.
z() + sr2*v.
z() ;
1743 ri = tanRMin*zi + rMinAv ;
1745 if( (ri>=0.0)&&(-halfRadTolerance<=sr2)&&(sr2<=halfRadTolerance) )
1753 if( (ri<0) || (sr2 < halfRadTolerance) )
1755 if (b>0) { sr3 = c/(-b-std::sqrt(d)); }
1756 else { sr3 = -b + std::sqrt(d) ; }
1761 if ( sr3 > halfRadTolerance )
1765 zi = p.
z() + sr3*v.
z() ;
1766 ri = tanRMin*zi + rMinAv ;
1775 else if ( sr3 > -halfRadTolerance )
1783 else if ( (sr2 < srd) && (sr2 > halfCarTolerance) )
1788 else if (sr2 > -halfCarTolerance)
1795 if( slentol <= halfCarTolerance )
1804 xi = p.
x() + slentol*v.
x() ;
1805 yi = p.
y() + slentol*v.
y() ;
1806 if( sidetol==kRMax )
1808 risec = std::sqrt(xi*xi + yi*yi)*secRMax ;
1809 Normal =
G4ThreeVector(xi/risec,yi/risec,-tanRMax/secRMax) ;
1813 risec = std::sqrt(xi*xi + yi*yi)*secRMin ;
1814 Normal =
G4ThreeVector(-xi/risec,-yi/risec,tanRMin/secRMin) ;
1816 if( Normal.
dot(v) > 0 )
1822 *n = Normal.
unit() ;
1832 slentol = kInfinity ;
1844 if ( !fPhiFullCone )
1849 vphi = std::atan2(v.
y(),v.
x()) ;
1851 if ( vphi < fSPhi - halfAngTolerance ) { vphi += twopi; }
1852 else if ( vphi > fSPhi + fDPhi + halfAngTolerance ) { vphi -= twopi; }
1854 if ( p.
x() || p.
y() )
1858 pDistS = p.
x()*sinSPhi - p.
y()*cosSPhi ;
1859 pDistE = -p.
x()*sinEPhi + p.
y()*cosEPhi ;
1863 compS = -sinSPhi*v.
x() + cosSPhi*v.
y() ;
1864 compE = sinEPhi*v.
x() - cosEPhi*v.
y() ;
1868 if( ( (fDPhi <= pi) && ( (pDistS <= halfCarTolerance)
1869 && (pDistE <= halfCarTolerance) ) )
1870 || ( (fDPhi > pi) && !((pDistS > halfCarTolerance)
1871 && (pDistE > halfCarTolerance) ) ) )
1876 sphi = pDistS/compS ;
1877 if (sphi >= -halfCarTolerance)
1879 xi = p.
x() + sphi*v.
x() ;
1880 yi = p.
y() + sphi*v.
y() ;
1889 if ( ( fSPhi-halfAngTolerance <= vphi )
1890 && ( fSPhi+fDPhi+halfAngTolerance >=vphi ) )
1896 if ( (yi*cosCPhi-xi*sinCPhi)>=0 )
1903 if ( pDistS > -halfCarTolerance )
1921 sphi2 = pDistE/compE ;
1925 if ( (sphi2 > -halfCarTolerance) && (sphi2 < sphi) )
1927 xi = p.
x() + sphi2*v.
x() ;
1928 yi = p.
y() + sphi2*v.
y() ;
1937 if(!( (fSPhi-halfAngTolerance <= vphi)
1938 && (fSPhi+fDPhi+halfAngTolerance >= vphi) ) )
1941 if ( pDistE <= -halfCarTolerance ) { sphi = sphi2; }
1942 else { sphi = 0.0; }
1946 if ( yi*cosCPhi-xi*sinCPhi >= 0 )
1951 if ( pDistE <= -halfCarTolerance ) { sphi = sphi2; }
1952 else { sphi = 0.0; }
1967 if ( (fSPhi-halfAngTolerance <= vphi)
1968 && (vphi <= fSPhi+fDPhi+halfAngTolerance) )
1994 xi = p.
x() + snxt*v.
x() ;
1995 yi = p.
y() + snxt*v.
y() ;
1996 risec = std::sqrt(xi*xi + yi*yi)*secRMax ;
2001 *validNorm = false ;
2011 *validNorm = false ;
2022 *validNorm = false ;
2036 std::ostringstream message;
2037 G4int oldprc = message.precision(16) ;
2038 message <<
"Undefined side for valid surface normal to solid."
2041 <<
"p.x() = " << p.
x()/mm <<
" mm" <<
G4endl
2042 <<
"p.y() = " << p.
y()/mm <<
" mm" <<
G4endl
2044 <<
"pho at z = " << std::sqrt( p.
x()*p.
x()+p.
y()*p.
y() )/mm
2046 if( p.
x() != 0. || p.
x() != 0.)
2048 message <<
"point phi = " << std::atan2(p.
y(),p.
x())/degree
2052 <<
"v.x() = " << v.
x() <<
G4endl
2053 <<
"v.y() = " << v.
y() <<
G4endl
2056 <<
"snxt = " << snxt/mm <<
" mm" <<
G4endl ;
2057 message.precision(oldprc) ;
2058 G4Exception(
"G4Cons::DistanceToOut(p,v,..)",
"GeomSolids1002",
2063 if (snxt < halfCarTolerance) { snxt = 0.; }
2074 G4double safe=0.0, rho, safeR1, safeR2, safeZ, safePhi;
2088 G4cout <<
"pho at z = " << std::sqrt( p.
x()*p.
x()+p.
y()*p.
y() )/mm
2090 if( (p.
x() != 0.) || (p.
x() != 0.) )
2092 G4cout <<
"point phi = " << std::atan2(p.
y(),p.
x())/degree
2095 G4cout.precision(oldprc) ;
2096 G4Exception(
"G4Cons::DistanceToOut(p)",
"GeomSolids1002",
2101 rho = std::sqrt(p.
x()*p.
x() + p.
y()*p.
y()) ;
2102 safeZ = fDz - std::fabs(p.
z()) ;
2104 if (fRmin1 || fRmin2)
2106 tanRMin = (fRmin2 - fRmin1)*0.5/fDz ;
2107 secRMin = std::sqrt(1.0 + tanRMin*tanRMin) ;
2108 pRMin = tanRMin*p.
z() + (fRmin1 + fRmin2)*0.5 ;
2109 safeR1 = (rho - pRMin)/secRMin ;
2113 safeR1 = kInfinity ;
2116 tanRMax = (fRmax2 - fRmax1)*0.5/fDz ;
2117 secRMax = std::sqrt(1.0 + tanRMax*tanRMax) ;
2118 pRMax = tanRMax*p.
z() + (fRmax1+fRmax2)*0.5 ;
2119 safeR2 = (pRMax - rho)/secRMax ;
2121 if (safeR1 < safeR2) { safe = safeR1; }
2122 else { safe = safeR2; }
2123 if (safeZ < safe) { safe = safeZ ; }
2131 if ( (p.
y()*cosCPhi - p.
x()*sinCPhi) <= 0 )
2133 safePhi = -(p.
x()*sinSPhi - p.
y()*cosSPhi) ;
2137 safePhi = (p.
x()*sinEPhi - p.
y()*cosEPhi) ;
2139 if (safePhi < safe) { safe = safePhi; }
2141 if ( safe < 0 ) { safe = 0; }
2162 G4double meshAngle, meshRMax1, meshRMax2, crossAngle;
2163 G4double cosCrossAngle, sinCrossAngle, sAngle ;
2164 G4double rMaxX1, rMaxX2, rMaxY1, rMaxY2, rMinX1, rMinX2, rMinY1, rMinY2 ;
2165 G4int crossSection, noCrossSections ;
2179 meshAngle = fDPhi/(noCrossSections - 1) ;
2181 meshRMax1 = fRmax1/std::cos(meshAngle*0.5) ;
2182 meshRMax2 = fRmax2/std::cos(meshAngle*0.5) ;
2187 if ( fPhiFullCone && (fSPhi == 0.0) )
2189 sAngle = -meshAngle*0.5 ;
2199 vertices->reserve(noCrossSections*4) ;
2200 for (crossSection = 0 ; crossSection < noCrossSections ; crossSection++)
2204 crossAngle = sAngle + crossSection*meshAngle ;
2205 cosCrossAngle = std::cos(crossAngle) ;
2206 sinCrossAngle = std::sin(crossAngle) ;
2208 rMaxX1 = meshRMax1*cosCrossAngle ;
2209 rMaxY1 = meshRMax1*sinCrossAngle ;
2210 rMaxX2 = meshRMax2*cosCrossAngle ;
2211 rMaxY2 = meshRMax2*sinCrossAngle ;
2213 rMinX1 = fRmin1*cosCrossAngle ;
2214 rMinY1 = fRmin1*sinCrossAngle ;
2215 rMinX2 = fRmin2*cosCrossAngle ;
2216 rMinY2 = fRmin2*sinCrossAngle ;
2234 "Error in allocation of vertices. Out of memory !");
2255 return new G4Cons(*
this);
2264 G4int oldprc = os.precision(16);
2265 os <<
"-----------------------------------------------------------\n"
2266 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
2267 <<
" ===================================================\n"
2268 <<
" Solid type: G4Cons\n"
2269 <<
" Parameters: \n"
2270 <<
" inside -fDz radius: " << fRmin1/mm <<
" mm \n"
2271 <<
" outside -fDz radius: " << fRmax1/mm <<
" mm \n"
2272 <<
" inside +fDz radius: " << fRmin2/mm <<
" mm \n"
2273 <<
" outside +fDz radius: " << fRmax2/mm <<
" mm \n"
2274 <<
" half length in Z : " << fDz/mm <<
" mm \n"
2275 <<
" starting angle of segment: " << fSPhi/degree <<
" degrees \n"
2276 <<
" delta angle of segment : " << fDPhi/degree <<
" degrees \n"
2277 <<
"-----------------------------------------------------------\n";
2278 os.precision(oldprc);
2293 G4double Aone, Atwo, Athree, Afour, Afive, slin, slout, phi;
2294 G4double zRand, cosu, sinu, rRand1, rRand2, chose, rone, rtwo, qone, qtwo;
2295 rone = (fRmax1-fRmax2)/(2.*fDz);
2296 rtwo = (fRmin1-fRmin2)/(2.*fDz);
2298 if(fRmax1!=fRmax2) { qone = fDz*(fRmax1+fRmax2)/(fRmax1-fRmax2); }
2299 if(fRmin1!=fRmin2) { qtwo = fDz*(fRmin1+fRmin2)/(fRmin1-fRmin2); }
2300 slin = std::sqrt(
sqr(fRmin1-fRmin2)+
sqr(2.*fDz));
2301 slout = std::sqrt(
sqr(fRmax1-fRmax2)+
sqr(2.*fDz));
2302 Aone = 0.5*fDPhi*(fRmax2 + fRmax1)*slout;
2303 Atwo = 0.5*fDPhi*(fRmin2 + fRmin1)*slin;
2304 Athree = 0.5*fDPhi*(fRmax1*fRmax1-fRmin1*fRmin1);
2305 Afour = 0.5*fDPhi*(fRmax2*fRmax2-fRmin2*fRmin2);
2306 Afive = fDz*(fRmax1-fRmin1+fRmax2-fRmin2);
2309 cosu = std::cos(phi); sinu = std::sin(phi);
2313 if ( (fSPhi == 0.) && fPhiFullCone ) { Afive = 0.; }
2316 if( (chose >= 0.) && (chose < Aone) )
2318 if(fRmin1 != fRmin2)
2322 rtwo*sinu*(qtwo-zRand), zRand);
2330 else if( (chose >= Aone) && (chose <= Aone + Atwo) )
2332 if(fRmax1 != fRmax2)
2336 rone*sinu*(qone-zRand), zRand);
2344 else if( (chose >= Aone + Atwo) && (chose < Aone + Atwo + Athree) )
2348 else if( (chose >= Aone + Atwo + Athree)
2349 && (chose < Aone + Atwo + Athree + Afour) )
2353 else if( (chose >= Aone + Atwo + Athree + Afour)
2354 && (chose < Aone + Atwo + Athree + Afour + Afive) )
2357 rRand1 =
RandFlat::shoot(fRmin2-((zRand-fDz)/(2.*fDz))*(fRmin1-fRmin2),
2358 fRmax2-((zRand-fDz)/(2.*fDz))*(fRmax1-fRmax2));
2360 rRand1*std::sin(fSPhi), zRand);
2365 rRand1 =
RandFlat::shoot(fRmin2-((zRand-fDz)/(2.*fDz))*(fRmin1-fRmin2),
2366 fRmax2-((zRand-fDz)/(2.*fDz))*(fRmax1-fRmax2));
2368 rRand1*std::sin(fSPhi+fDPhi), zRand);
2388 G4double RMax = (fRmax2 >= fRmax1) ? fRmax2 : fRmax1 ;
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4ThreeVector > G4ThreeVectorList
G4DLLIMPORT std::ostream G4cout
double dot(const Hep3Vector &) const
G4double GetRadiusInRing(G4double rmin, G4double rmax) const
G4CSGSolid & operator=(const G4CSGSolid &rhs)
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4GeometryType GetEntityType() const
G4Polyhedron * CreatePolyhedron() const
G4Cons(const G4String &pName, G4double pRmin1, G4double pRmax1, G4double pRmin2, G4double pRmax2, G4double pDz, G4double pSPhi, G4double pDPhi)
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4Cons & operator=(const G4Cons &rhs)
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
EInside Inside(const G4ThreeVector &p) const
G4ThreeVector GetPointOnSurface() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4NURBS * CreateNURBS() const
std::ostream & StreamInfo(std::ostream &os) const
G4double GetRadialTolerance() const
static G4GeometryTolerance * GetInstance()
G4double GetAngularTolerance() const
virtual void AddSolid(const G4Box &)=0
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
void ClipBetweenSections(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
void ClipCrossSection(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
G4double GetMinExtent(const EAxis pAxis) const
G4bool IsYLimited() const
G4double GetMinZExtent() const
G4bool IsXLimited() const
G4double GetMaxExtent(const EAxis pAxis) const
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMinYExtent() const
G4double GetMinXExtent() const
G4bool IsZLimited() const
G4double GetMaxXExtent() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
const G4int kMaxMeshSections
const G4int kMinMeshSections
const G4double kMeshAngleDefault