Geant4  10.01
G4Orb.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4Orb.cc 83572 2014-09-01 15:23:27Z gcosmo $
27 //
28 // class G4Orb
29 //
30 // Implementation for G4Orb class
31 //
32 // History:
33 //
34 // 05.04.12 M.Kelsey - GetPointOnSurface() throw flat in cos(theta)
35 // 30.06.04 V.Grichine - bug fixed in DistanceToIn(p,v) on Rmax surface
36 // 20.08.03 V.Grichine - created
37 //
39 
40 #include "G4Orb.hh"
41 
42 #if !defined(G4GEOM_USE_UORB)
43 
44 #include "G4VoxelLimits.hh"
45 #include "G4AffineTransform.hh"
46 #include "G4GeometryTolerance.hh"
47 
48 #include "G4VPVParameterisation.hh"
49 
50 #include "Randomize.hh"
51 
52 #include "meshdefs.hh"
53 
54 #include "G4VGraphicsScene.hh"
55 
56 using namespace CLHEP;
57 
58 // Private enum: Not for external use - used by distanceToOut
59 
60 enum ESide {kNull,kRMax};
61 
62 // used by normal
63 
64 enum ENorm {kNRMax};
65 
66 
68 //
69 // constructor - check positive radius
70 //
71 
72 G4Orb::G4Orb( const G4String& pName, G4double pRmax )
73 : G4CSGSolid(pName), fRmax(pRmax)
74 {
75 
76  const G4double fEpsilon = 2.e-11; // relative tolerance of fRmax
77 
78  G4double kRadTolerance
80 
81  // Check radius
82  //
83  if ( pRmax < 10*kCarTolerance )
84  {
85  G4Exception("G4Orb::G4Orb()", "GeomSolids0002", FatalException,
86  "Invalid radius > 10*kCarTolerance.");
87  }
88  fRmaxTolerance = std::max( kRadTolerance, fEpsilon*fRmax);
89 
90 }
91 
93 //
94 // Fake default constructor - sets only member data and allocates memory
95 // for usage restricted to object persistency.
96 //
97 G4Orb::G4Orb( __void__& a )
98  : G4CSGSolid(a), fRmax(0.), fRmaxTolerance(0.)
99 {
100 }
101 
103 //
104 // Destructor
105 
107 {
108 }
109 
111 //
112 // Copy constructor
113 
114 G4Orb::G4Orb(const G4Orb& rhs)
115  : G4CSGSolid(rhs), fRmax(rhs.fRmax), fRmaxTolerance(rhs.fRmaxTolerance)
116 {
117 }
118 
120 //
121 // Assignment operator
122 
124 {
125  // Check assignment to self
126  //
127  if (this == &rhs) { return *this; }
128 
129  // Copy base class data
130  //
132 
133  // Copy data
134  //
135  fRmax = rhs.fRmax;
137 
138  return *this;
139 }
140 
142 //
143 // Dispatch to parameterisation for replication mechanism dimension
144 // computation & modification.
145 
147  const G4int n,
148  const G4VPhysicalVolume* pRep )
149 {
150  p->ComputeDimensions(*this,n,pRep);
151 }
152 
154 //
155 // Calculate extent under transform and specified limit
156 
158  const G4VoxelLimits& pVoxelLimit,
159  const G4AffineTransform& pTransform,
160  G4double& pMin, G4double& pMax ) const
161 {
162  // Compute x/y/z mins and maxs for bounding box respecting limits,
163  // with early returns if outside limits. Then switch() on pAxis,
164  // and compute exact x and y limit for x/y case
165 
166  G4double xoffset,xMin,xMax;
167  G4double yoffset,yMin,yMax;
168  G4double zoffset,zMin,zMax;
169 
170  G4double diff1,diff2,delta,maxDiff,newMin,newMax;
171  G4double xoff1,xoff2,yoff1,yoff2;
172 
173  xoffset=pTransform.NetTranslation().x();
174  xMin=xoffset-fRmax;
175  xMax=xoffset+fRmax;
176 
177  if (pVoxelLimit.IsXLimited())
178  {
179  if ( (xMin>pVoxelLimit.GetMaxXExtent()+kCarTolerance)
180  || (xMax<pVoxelLimit.GetMinXExtent()-kCarTolerance) )
181  {
182  return false;
183  }
184  else
185  {
186  if (xMin<pVoxelLimit.GetMinXExtent())
187  {
188  xMin=pVoxelLimit.GetMinXExtent();
189  }
190  if (xMax>pVoxelLimit.GetMaxXExtent())
191  {
192  xMax=pVoxelLimit.GetMaxXExtent();
193  }
194  }
195  }
196  yoffset=pTransform.NetTranslation().y();
197  yMin=yoffset-fRmax;
198  yMax=yoffset+fRmax;
199 
200  if (pVoxelLimit.IsYLimited())
201  {
202  if ( (yMin>pVoxelLimit.GetMaxYExtent()+kCarTolerance)
203  || (yMax<pVoxelLimit.GetMinYExtent()-kCarTolerance) )
204  {
205  return false;
206  }
207  else
208  {
209  if (yMin<pVoxelLimit.GetMinYExtent())
210  {
211  yMin=pVoxelLimit.GetMinYExtent();
212  }
213  if (yMax>pVoxelLimit.GetMaxYExtent())
214  {
215  yMax=pVoxelLimit.GetMaxYExtent();
216  }
217  }
218  }
219  zoffset=pTransform.NetTranslation().z();
220  zMin=zoffset-fRmax;
221  zMax=zoffset+fRmax;
222 
223  if (pVoxelLimit.IsZLimited())
224  {
225  if ( (zMin>pVoxelLimit.GetMaxZExtent()+kCarTolerance)
226  || (zMax<pVoxelLimit.GetMinZExtent()-kCarTolerance) )
227  {
228  return false;
229  }
230  else
231  {
232  if (zMin<pVoxelLimit.GetMinZExtent())
233  {
234  zMin=pVoxelLimit.GetMinZExtent();
235  }
236  if (zMax>pVoxelLimit.GetMaxZExtent())
237  {
238  zMax=pVoxelLimit.GetMaxZExtent();
239  }
240  }
241  }
242 
243  // Known to cut sphere
244 
245  switch (pAxis)
246  {
247  case kXAxis:
248  yoff1=yoffset-yMin;
249  yoff2=yMax-yoffset;
250 
251  if ( yoff1 >= 0 && yoff2 >= 0 )
252  {
253  // Y limits cross max/min x => no change
254  //
255  pMin=xMin;
256  pMax=xMax;
257  }
258  else
259  {
260  // Y limits don't cross max/min x => compute max delta x,
261  // hence new mins/maxs
262  //
263  delta=fRmax*fRmax-yoff1*yoff1;
264  diff1=(delta>0.) ? std::sqrt(delta) : 0.;
265  delta=fRmax*fRmax-yoff2*yoff2;
266  diff2=(delta>0.) ? std::sqrt(delta) : 0.;
267  maxDiff=(diff1>diff2) ? diff1:diff2;
268  newMin=xoffset-maxDiff;
269  newMax=xoffset+maxDiff;
270  pMin=(newMin<xMin) ? xMin : newMin;
271  pMax=(newMax>xMax) ? xMax : newMax;
272  }
273  break;
274  case kYAxis:
275  xoff1=xoffset-xMin;
276  xoff2=xMax-xoffset;
277  if (xoff1>=0&&xoff2>=0)
278  {
279  // X limits cross max/min y => no change
280  //
281  pMin=yMin;
282  pMax=yMax;
283  }
284  else
285  {
286  // X limits don't cross max/min y => compute max delta y,
287  // hence new mins/maxs
288  //
289  delta=fRmax*fRmax-xoff1*xoff1;
290  diff1=(delta>0.) ? std::sqrt(delta) : 0.;
291  delta=fRmax*fRmax-xoff2*xoff2;
292  diff2=(delta>0.) ? std::sqrt(delta) : 0.;
293  maxDiff=(diff1>diff2) ? diff1:diff2;
294  newMin=yoffset-maxDiff;
295  newMax=yoffset+maxDiff;
296  pMin=(newMin<yMin) ? yMin : newMin;
297  pMax=(newMax>yMax) ? yMax : newMax;
298  }
299  break;
300  case kZAxis:
301  pMin=zMin;
302  pMax=zMax;
303  break;
304  default:
305  break;
306  }
307  pMin -= fRmaxTolerance;
308  pMax += fRmaxTolerance;
309 
310  return true;
311 
312 }
313 
315 //
316 // Return whether point inside/outside/on surface
317 // Split into radius checks
318 //
319 
321 {
322  G4double rad2,tolRMax;
323  EInside in;
324 
325 
326  rad2 = p.x()*p.x()+p.y()*p.y()+p.z()*p.z();
327 
328  G4double radius = std::sqrt(rad2);
329 
330  // G4double radius = std::sqrt(rad2);
331  // Check radial surface
332  // sets `in'
333 
334  tolRMax = fRmax - fRmaxTolerance*0.5;
335 
336  if ( radius <= tolRMax ) { in = kInside; }
337  else
338  {
339  tolRMax = fRmax + fRmaxTolerance*0.5;
340  if ( radius <= tolRMax ) { in = kSurface; }
341  else { in = kOutside; }
342  }
343  return in;
344 }
345 
347 //
348 // Return unit normal of surface closest to p
349 // - note if point on z axis, ignore phi divided sides
350 // - unsafe if point close to z axis a rmin=0 - no explicit checks
351 
353 {
354  ENorm side = kNRMax;
355  G4ThreeVector norm;
356  G4double radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
357 
358  switch (side)
359  {
360  case kNRMax:
361  norm = G4ThreeVector(p.x()/radius,p.y()/radius,p.z()/radius);
362  break;
363  default: // Should never reach this case ...
364  DumpInfo();
365  G4Exception("G4Orb::SurfaceNormal()", "GeomSolids1002", JustWarning,
366  "Undefined side for valid surface normal to solid.");
367  break;
368  }
369 
370  return norm;
371 }
372 
374 //
375 // Calculate distance to shape from outside, along normalised vector
376 // - return kInfinity if no intersection, or intersection distance <= tolerance
377 //
378 // -> If point is outside outer radius, compute intersection with rmax
379 // - if no intersection return
380 // - if valid phi,theta return intersection Dist
381 
383  const G4ThreeVector& v ) const
384 {
385  G4double snxt = kInfinity; // snxt = default return value
386 
387  G4double radius, pDotV3d; // , tolORMax2, tolIRMax2;
388  G4double c, d2, sd = kInfinity;
389 
390  const G4double dRmax = 100.*fRmax;
391 
392  // General Precalcs
393 
394  radius = std::sqrt(p.x()*p.x() + p.y()*p.y() + p.z()*p.z());
395  pDotV3d = p.x()*v.x() + p.y()*v.y() + p.z()*v.z();
396 
397  // Radial Precalcs
398 
399  // tolORMax2 = (fRmax+fRmaxTolerance*0.5)*(fRmax+fRmaxTolerance*0.5);
400  // tolIRMax2 = (fRmax-fRmaxTolerance*0.5)*(fRmax-fRmaxTolerance*0.5);
401 
402  // Outer spherical shell intersection
403  // - Only if outside tolerant fRmax
404  // - Check for if inside and outer G4Orb heading through solid (-> 0)
405  // - No intersect -> no intersection with G4Orb
406  //
407  // Shell eqn: x^2+y^2+z^2 = RSPH^2
408  //
409  // => (px+svx)^2+(py+svy)^2+(pz+svz)^2=R^2
410  //
411  // => (px^2+py^2+pz^2) +2sd(pxvx+pyvy+pzvz)+sd^2(vx^2+vy^2+vz^2)=R^2
412  // => rad2 +2sd(pDotV3d) +sd^2 =R^2
413  //
414  // => sd=-pDotV3d+-std::sqrt(pDotV3d^2-(rad2-R^2))
415 
416  c = (radius - fRmax)*(radius + fRmax);
417 
418  if( radius > fRmax-fRmaxTolerance*0.5 ) // not inside in terms of Inside(p)
419  {
420  if ( c > fRmaxTolerance*fRmax )
421  {
422  // If outside tolerant boundary of outer G4Orb in terms of c
423  // [ should be std::sqrt(rad2) - fRmax > fRmaxTolerance*0.5 ]
424 
425  d2 = pDotV3d*pDotV3d - c;
426 
427  if ( d2 >= 0 )
428  {
429  sd = -pDotV3d - std::sqrt(d2);
430  if ( sd >= 0 )
431  {
432  if ( sd > dRmax ) // Avoid rounding errors due to precision issues seen on
433  { // 64 bits systems. Split long distances and recompute
434  G4double fTerm = sd - std::fmod(sd,dRmax);
435  sd = fTerm + DistanceToIn(p+fTerm*v,v);
436  }
437  return snxt = sd;
438  }
439  }
440  else // No intersection with G4Orb
441  {
442  return snxt = kInfinity;
443  }
444  }
445  else // not outside in terms of c
446  {
447  if ( c > -fRmaxTolerance*fRmax ) // on surface
448  {
449  d2 = pDotV3d*pDotV3d - c;
450  if ( (d2 < fRmaxTolerance*fRmax) || (pDotV3d >= 0) )
451  {
452  return snxt = kInfinity;
453  }
454  else
455  {
456  return snxt = 0.;
457  }
458  }
459  }
460  }
461 #ifdef G4CSGDEBUG
462  else // inside ???
463  {
464  G4Exception("G4Orb::DistanceToIn(p,v)", "GeomSolids1002",
465  JustWarning, "Point p is inside !?");
466  }
467 #endif
468 
469  return snxt;
470 }
471 
473 //
474 // Calculate distance (<= actual) to closest surface of shape from outside
475 // - Calculate distance to radial plane
476 // - Return 0 if point inside
477 
479 {
480  G4double safe = 0.0,
481  radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
482  safe = radius - fRmax;
483  if( safe < 0 ) { safe = 0.; }
484  return safe;
485 }
486 
488 //
489 // Calculate distance to surface of shape from `inside', allowing for tolerance
490 //
491 
493  const G4ThreeVector& v,
494  const G4bool calcNorm,
495  G4bool *validNorm,
496  G4ThreeVector *n ) const
497 {
498  G4double snxt = kInfinity; // ??? snxt is default return value
499  ESide side = kNull;
500 
501  G4double rad2,pDotV3d;
502  G4double xi,yi,zi; // Intersection point
503  G4double c,d2;
504 
505  rad2 = p.x()*p.x() + p.y()*p.y() + p.z()*p.z();
506  pDotV3d = p.x()*v.x() + p.y()*v.y() + p.z()*v.z();
507 
508  // Radial Intersection from G4Orb::DistanceToIn
509  //
510  // Outer spherical shell intersection
511  // - Only if outside tolerant fRmax
512  // - Check for if inside and outer G4Orb heading through solid (-> 0)
513  // - No intersect -> no intersection with G4Orb
514  //
515  // Shell eqn: x^2+y^2+z^2=RSPH^2
516  //
517  // => (px+svx)^2+(py+svy)^2+(pz+svz)^2=R^2
518  //
519  // => (px^2+py^2+pz^2) +2s(pxvx+pyvy+pzvz)+s^2(vx^2+vy^2+vz^2)=R^2
520  // => rad2 +2s(pDotV3d) +s^2 =R^2
521  //
522  // => s=-pDotV3d+-std::sqrt(pDotV3d^2-(rad2-R^2))
523 
524  const G4double Rmax_plus = fRmax + fRmaxTolerance*0.5;
525  G4double radius = std::sqrt(rad2);
526 
527  if ( radius <= Rmax_plus )
528  {
529  c = (radius - fRmax)*(radius + fRmax);
530 
531  if ( c < fRmaxTolerance*fRmax )
532  {
533  // Within tolerant Outer radius
534  //
535  // The test is
536  // radius - fRmax < 0.5*fRmaxTolerance
537  // => radius < fRmax + 0.5*kRadTol
538  // => rad2 < (fRmax + 0.5*kRadTol)^2
539  // => rad2 < fRmax^2 + 2.*0.5*fRmax*kRadTol + 0.25*kRadTol*kRadTol
540  // => rad2 - fRmax^2 <~ fRmax*kRadTol
541 
542  d2 = pDotV3d*pDotV3d - c;
543 
544  if( ( c > -fRmaxTolerance*fRmax) && // on tolerant surface
545  ( ( pDotV3d >= 0 ) || ( d2 < 0 )) ) // leaving outside from Rmax
546  // not re-entering
547  {
548  if(calcNorm)
549  {
550  *validNorm = true;
551  *n = G4ThreeVector(p.x()/fRmax,p.y()/fRmax,p.z()/fRmax);
552  }
553  return snxt = 0;
554  }
555  else
556  {
557  snxt = -pDotV3d + std::sqrt(d2); // second root since inside Rmax
558  side = kRMax;
559  }
560  }
561  }
562  else // p is outside ???
563  {
564  G4cout << G4endl;
565  DumpInfo();
566  std::ostringstream message;
567  G4int oldprc = message.precision(16);
568  message << "Logic error: snxt = kInfinity ???" << G4endl
569  << "Position:" << G4endl << G4endl
570  << "p.x() = " << p.x()/mm << " mm" << G4endl
571  << "p.y() = " << p.y()/mm << " mm" << G4endl
572  << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
573  << "Rp = "<< std::sqrt( p.x()*p.x()+p.y()*p.y()+p.z()*p.z() )/mm
574  << " mm" << G4endl << G4endl
575  << "Direction:" << G4endl << G4endl
576  << "v.x() = " << v.x() << G4endl
577  << "v.y() = " << v.y() << G4endl
578  << "v.z() = " << v.z() << G4endl << G4endl
579  << "Proposed distance :" << G4endl << G4endl
580  << "snxt = " << snxt/mm << " mm" << G4endl;
581  message.precision(oldprc);
582  G4Exception("G4Orb::DistanceToOut(p,v,..)", "GeomSolids1002",
583  JustWarning, message);
584  }
585  if (calcNorm) // Output switch operator
586  {
587  switch( side )
588  {
589  case kRMax:
590  xi=p.x()+snxt*v.x();
591  yi=p.y()+snxt*v.y();
592  zi=p.z()+snxt*v.z();
593  *n=G4ThreeVector(xi/fRmax,yi/fRmax,zi/fRmax);
594  *validNorm=true;
595  break;
596  default:
597  G4cout << G4endl;
598  DumpInfo();
599  std::ostringstream message;
600  G4int oldprc = message.precision(16);
601  message << "Undefined side for valid surface normal to solid."
602  << G4endl
603  << "Position:" << G4endl << G4endl
604  << "p.x() = " << p.x()/mm << " mm" << G4endl
605  << "p.y() = " << p.y()/mm << " mm" << G4endl
606  << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
607  << "Direction:" << G4endl << G4endl
608  << "v.x() = " << v.x() << G4endl
609  << "v.y() = " << v.y() << G4endl
610  << "v.z() = " << v.z() << G4endl << G4endl
611  << "Proposed distance :" << G4endl << G4endl
612  << "snxt = " << snxt/mm << " mm" << G4endl;
613  message.precision(oldprc);
614  G4Exception("G4Orb::DistanceToOut(p,v,..)","GeomSolids1002",
615  JustWarning, message);
616  break;
617  }
618  }
619  return snxt;
620 }
621 
623 //
624 // Calculate distance (<=actual) to closest surface of shape from inside
625 
627 {
628  G4double safe=0.0,radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
629 
630 #ifdef G4CSGDEBUG
631  if( Inside(p) == kOutside )
632  {
633  G4int oldprc = G4cout.precision(16);
634  G4cout << G4endl;
635  DumpInfo();
636  G4cout << "Position:" << G4endl << G4endl;
637  G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
638  G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
639  G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
640  G4cout.precision(oldprc);
641  G4Exception("G4Orb::DistanceToOut(p)", "GeomSolids1002",
642  JustWarning, "Point p is outside !?" );
643  }
644 #endif
645 
646  safe = fRmax - radius;
647  if ( safe < 0. ) safe = 0.;
648  return safe;
649 }
650 
652 //
653 // G4EntityType
654 
656 {
657  return G4String("G4Orb");
658 }
659 
661 //
662 // Make a clone of the object
663 //
665 {
666  return new G4Orb(*this);
667 }
668 
670 //
671 // Stream object contents to an output stream
672 
673 std::ostream& G4Orb::StreamInfo( std::ostream& os ) const
674 {
675  G4int oldprc = os.precision(16);
676  os << "-----------------------------------------------------------\n"
677  << " *** Dump for solid - " << GetName() << " ***\n"
678  << " ===================================================\n"
679  << " Solid type: G4Orb\n"
680  << " Parameters: \n"
681 
682  << " outer radius: " << fRmax/mm << " mm \n"
683  << "-----------------------------------------------------------\n";
684  os.precision(oldprc);
685 
686  return os;
687 }
688 
690 //
691 // GetPointOnSurface
692 
694 {
695  // generate a random number from zero to 2pi...
696  //
697  G4double phi = RandFlat::shoot(0.,2.*pi);
698  G4double cosphi = std::cos(phi);
699  G4double sinphi = std::sin(phi);
700 
701  // generate a random point uniform in area
702  G4double costheta = RandFlat::shoot(-1.,1.);
703  G4double sintheta = std::sqrt(1.-sqr(costheta));
704 
705  return G4ThreeVector (fRmax*sintheta*cosphi,
706  fRmax*sintheta*sinphi, fRmax*costheta);
707 }
708 
710 //
711 // Methods for visualisation
712 
714 {
715  scene.AddSolid (*this);
716 }
717 
719 {
720  return new G4PolyhedronSphere (0., fRmax, 0., 2*pi, 0., pi);
721 }
722 
723 #endif
G4String GetName() const
ThreeVector shoot(const G4int Ap, const G4int Af)
static const G4double kInfinity
Definition: geomdefs.hh:42
G4Orb & operator=(const G4Orb &rhs)
Definition: G4Orb.cc:123
G4double GetMinYExtent() const
CLHEP::Hep3Vector G4ThreeVector
virtual ~G4Orb()
Definition: G4Orb.cc:106
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
Definition: G4Orb.cc:157
G4bool IsYLimited() const
const G4double pi
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Definition: G4Orb.cc:713
G4ThreeVector NetTranslation() const
Definition: G4Orb.cc:60
G4bool IsXLimited() const
G4double a
Definition: TRTMaterials.hh:39
G4ThreeVector GetPointOnSurface() const
Definition: G4Orb.cc:693
ESide
Definition: G4Orb.hh:136
virtual void AddSolid(const G4Box &)=0
int G4int
Definition: G4Types.hh:78
EInside Inside(const G4ThreeVector &p) const
Definition: G4Orb.cc:320
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Orb.cc:382
void DumpInfo() const
G4Polyhedron * CreatePolyhedron() const
Definition: G4Orb.cc:718
ENorm
Definition: UCons.cc:33
G4Orb(const G4String &pName, G4double pRmax)
Definition: G4Orb.cc:72
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Orb.cc:673
G4double GetMaxXExtent() const
G4double GetMinZExtent() const
G4GLOB_DLL std::ostream G4cout
G4GeometryType GetEntityType() const
Definition: G4Orb.cc:655
G4double GetRadialTolerance() const
bool G4bool
Definition: G4Types.hh:79
Definition: G4Orb.cc:64
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
Definition: G4Orb.cc:146
const G4int n
Definition: G4Orb.hh:61
G4VSolid * Clone() const
Definition: G4Orb.cc:664
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
G4double fRmax
Definition: G4Orb.hh:144
ENorm
Definition: G4Orb.hh:140
G4double GetMinXExtent() const
G4double GetMaxZExtent() const
Definition: G4Orb.cc:60
T max(const T t1, const T t2)
brief Return the largest of the two arguments
EInside
Definition: geomdefs.hh:58
EAxis
Definition: geomdefs.hh:54
G4double fRmaxTolerance
Definition: G4Orb.hh:145
#define G4endl
Definition: G4ios.hh:61
G4double GetMaxYExtent() const
G4double kCarTolerance
Definition: G4VSolid.hh:305
T sqr(const T &x)
Definition: templates.hh:145
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
Definition: G4Orb.cc:492
double G4double
Definition: G4Types.hh:76
static const G4double d2
G4CSGSolid & operator=(const G4CSGSolid &rhs)
Definition: G4CSGSolid.cc:91
G4bool IsZLimited() const
static const double mm
Definition: G4SIunits.hh:102
static G4GeometryTolerance * GetInstance()
ESide
Definition: UCons.cc:29
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Definition: G4Orb.cc:352