Geant4  10.00.p02
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 81636 2014-06-04 09:06:08Z 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 {
118 }
119 
121 //
122 // Assignment operator
123 
125 {
126  // Check assignment to self
127  //
128  if (this == &rhs) { return *this; }
129 
130  // Copy base class data
131  //
133 
134  // Copy data
135  //
136  fRmax = rhs.fRmax;
139 
140  return *this;
141 }
142 
144 //
145 // Dispatch to parameterisation for replication mechanism dimension
146 // computation & modification.
147 
149  const G4int n,
150  const G4VPhysicalVolume* pRep )
151 {
152  p->ComputeDimensions(*this,n,pRep);
153 }
154 
156 //
157 // Calculate extent under transform and specified limit
158 
160  const G4VoxelLimits& pVoxelLimit,
161  const G4AffineTransform& pTransform,
162  G4double& pMin, G4double& pMax ) const
163 {
164  // Compute x/y/z mins and maxs for bounding box respecting limits,
165  // with early returns if outside limits. Then switch() on pAxis,
166  // and compute exact x and y limit for x/y case
167 
168  G4double xoffset,xMin,xMax;
169  G4double yoffset,yMin,yMax;
170  G4double zoffset,zMin,zMax;
171 
172  G4double diff1,diff2,delta,maxDiff,newMin,newMax;
173  G4double xoff1,xoff2,yoff1,yoff2;
174 
175  xoffset=pTransform.NetTranslation().x();
176  xMin=xoffset-fRmax;
177  xMax=xoffset+fRmax;
178 
179  if (pVoxelLimit.IsXLimited())
180  {
181  if ( (xMin>pVoxelLimit.GetMaxXExtent()+kCarTolerance)
182  || (xMax<pVoxelLimit.GetMinXExtent()-kCarTolerance) )
183  {
184  return false;
185  }
186  else
187  {
188  if (xMin<pVoxelLimit.GetMinXExtent())
189  {
190  xMin=pVoxelLimit.GetMinXExtent();
191  }
192  if (xMax>pVoxelLimit.GetMaxXExtent())
193  {
194  xMax=pVoxelLimit.GetMaxXExtent();
195  }
196  }
197  }
198  yoffset=pTransform.NetTranslation().y();
199  yMin=yoffset-fRmax;
200  yMax=yoffset+fRmax;
201 
202  if (pVoxelLimit.IsYLimited())
203  {
204  if ( (yMin>pVoxelLimit.GetMaxYExtent()+kCarTolerance)
205  || (yMax<pVoxelLimit.GetMinYExtent()-kCarTolerance) )
206  {
207  return false;
208  }
209  else
210  {
211  if (yMin<pVoxelLimit.GetMinYExtent())
212  {
213  yMin=pVoxelLimit.GetMinYExtent();
214  }
215  if (yMax>pVoxelLimit.GetMaxYExtent())
216  {
217  yMax=pVoxelLimit.GetMaxYExtent();
218  }
219  }
220  }
221  zoffset=pTransform.NetTranslation().z();
222  zMin=zoffset-fRmax;
223  zMax=zoffset+fRmax;
224 
225  if (pVoxelLimit.IsZLimited())
226  {
227  if ( (zMin>pVoxelLimit.GetMaxZExtent()+kCarTolerance)
228  || (zMax<pVoxelLimit.GetMinZExtent()-kCarTolerance) )
229  {
230  return false;
231  }
232  else
233  {
234  if (zMin<pVoxelLimit.GetMinZExtent())
235  {
236  zMin=pVoxelLimit.GetMinZExtent();
237  }
238  if (zMax>pVoxelLimit.GetMaxZExtent())
239  {
240  zMax=pVoxelLimit.GetMaxZExtent();
241  }
242  }
243  }
244 
245  // Known to cut sphere
246 
247  switch (pAxis)
248  {
249  case kXAxis:
250  yoff1=yoffset-yMin;
251  yoff2=yMax-yoffset;
252 
253  if ( yoff1 >= 0 && yoff2 >= 0 )
254  {
255  // Y limits cross max/min x => no change
256  //
257  pMin=xMin;
258  pMax=xMax;
259  }
260  else
261  {
262  // Y limits don't cross max/min x => compute max delta x,
263  // hence new mins/maxs
264  //
265  delta=fRmax*fRmax-yoff1*yoff1;
266  diff1=(delta>0.) ? std::sqrt(delta) : 0.;
267  delta=fRmax*fRmax-yoff2*yoff2;
268  diff2=(delta>0.) ? std::sqrt(delta) : 0.;
269  maxDiff=(diff1>diff2) ? diff1:diff2;
270  newMin=xoffset-maxDiff;
271  newMax=xoffset+maxDiff;
272  pMin=(newMin<xMin) ? xMin : newMin;
273  pMax=(newMax>xMax) ? xMax : newMax;
274  }
275  break;
276  case kYAxis:
277  xoff1=xoffset-xMin;
278  xoff2=xMax-xoffset;
279  if (xoff1>=0&&xoff2>=0)
280  {
281  // X limits cross max/min y => no change
282  //
283  pMin=yMin;
284  pMax=yMax;
285  }
286  else
287  {
288  // X limits don't cross max/min y => compute max delta y,
289  // hence new mins/maxs
290  //
291  delta=fRmax*fRmax-xoff1*xoff1;
292  diff1=(delta>0.) ? std::sqrt(delta) : 0.;
293  delta=fRmax*fRmax-xoff2*xoff2;
294  diff2=(delta>0.) ? std::sqrt(delta) : 0.;
295  maxDiff=(diff1>diff2) ? diff1:diff2;
296  newMin=yoffset-maxDiff;
297  newMax=yoffset+maxDiff;
298  pMin=(newMin<yMin) ? yMin : newMin;
299  pMax=(newMax>yMax) ? yMax : newMax;
300  }
301  break;
302  case kZAxis:
303  pMin=zMin;
304  pMax=zMax;
305  break;
306  default:
307  break;
308  }
309  pMin -= fRmaxTolerance;
310  pMax += fRmaxTolerance;
311 
312  return true;
313 
314 }
315 
317 //
318 // Return whether point inside/outside/on surface
319 // Split into radius checks
320 //
321 
323 {
324  G4double rad2,tolRMax;
325  EInside in;
326 
327 
328  rad2 = p.x()*p.x()+p.y()*p.y()+p.z()*p.z();
329 
330  G4double radius = std::sqrt(rad2);
331 
332  // G4double radius = std::sqrt(rad2);
333  // Check radial surface
334  // sets `in'
335 
336  tolRMax = fRmax - fRmaxTolerance*0.5;
337 
338  if ( radius <= tolRMax ) { in = kInside; }
339  else
340  {
341  tolRMax = fRmax + fRmaxTolerance*0.5;
342  if ( radius <= tolRMax ) { in = kSurface; }
343  else { in = kOutside; }
344  }
345  return in;
346 }
347 
349 //
350 // Return unit normal of surface closest to p
351 // - note if point on z axis, ignore phi divided sides
352 // - unsafe if point close to z axis a rmin=0 - no explicit checks
353 
355 {
356  ENorm side = kNRMax;
357  G4ThreeVector norm;
358  G4double radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
359 
360  switch (side)
361  {
362  case kNRMax:
363  norm = G4ThreeVector(p.x()/radius,p.y()/radius,p.z()/radius);
364  break;
365  default: // Should never reach this case ...
366  DumpInfo();
367  G4Exception("G4Orb::SurfaceNormal()", "GeomSolids1002", JustWarning,
368  "Undefined side for valid surface normal to solid.");
369  break;
370  }
371 
372  return norm;
373 }
374 
376 //
377 // Calculate distance to shape from outside, along normalised vector
378 // - return kInfinity if no intersection, or intersection distance <= tolerance
379 //
380 // -> If point is outside outer radius, compute intersection with rmax
381 // - if no intersection return
382 // - if valid phi,theta return intersection Dist
383 
385  const G4ThreeVector& v ) const
386 {
387  G4double snxt = kInfinity; // snxt = default return value
388 
389  G4double radius, pDotV3d; // , tolORMax2, tolIRMax2;
390  G4double c, d2, sd = kInfinity;
391 
392  const G4double dRmax = 100.*fRmax;
393 
394  // General Precalcs
395 
396  radius = std::sqrt(p.x()*p.x() + p.y()*p.y() + p.z()*p.z());
397  pDotV3d = p.x()*v.x() + p.y()*v.y() + p.z()*v.z();
398 
399  // Radial Precalcs
400 
401  // tolORMax2 = (fRmax+fRmaxTolerance*0.5)*(fRmax+fRmaxTolerance*0.5);
402  // tolIRMax2 = (fRmax-fRmaxTolerance*0.5)*(fRmax-fRmaxTolerance*0.5);
403 
404  // Outer spherical shell intersection
405  // - Only if outside tolerant fRmax
406  // - Check for if inside and outer G4Orb heading through solid (-> 0)
407  // - No intersect -> no intersection with G4Orb
408  //
409  // Shell eqn: x^2+y^2+z^2 = RSPH^2
410  //
411  // => (px+svx)^2+(py+svy)^2+(pz+svz)^2=R^2
412  //
413  // => (px^2+py^2+pz^2) +2sd(pxvx+pyvy+pzvz)+sd^2(vx^2+vy^2+vz^2)=R^2
414  // => rad2 +2sd(pDotV3d) +sd^2 =R^2
415  //
416  // => sd=-pDotV3d+-std::sqrt(pDotV3d^2-(rad2-R^2))
417 
418  c = (radius - fRmax)*(radius + fRmax);
419 
420  if( radius > fRmax-fRmaxTolerance*0.5 ) // not inside in terms of Inside(p)
421  {
422  if ( c > fRmaxTolerance*fRmax )
423  {
424  // If outside tolerant boundary of outer G4Orb in terms of c
425  // [ should be std::sqrt(rad2) - fRmax > fRmaxTolerance*0.5 ]
426 
427  d2 = pDotV3d*pDotV3d - c;
428 
429  if ( d2 >= 0 )
430  {
431  sd = -pDotV3d - std::sqrt(d2);
432  if ( sd >= 0 )
433  {
434  if ( sd > dRmax ) // Avoid rounding errors due to precision issues seen on
435  { // 64 bits systems. Split long distances and recompute
436  G4double fTerm = sd - std::fmod(sd,dRmax);
437  sd = fTerm + DistanceToIn(p+fTerm*v,v);
438  }
439  return snxt = sd;
440  }
441  }
442  else // No intersection with G4Orb
443  {
444  return snxt = kInfinity;
445  }
446  }
447  else // not outside in terms of c
448  {
449  if ( c > -fRmaxTolerance*fRmax ) // on surface
450  {
451  d2 = pDotV3d*pDotV3d - c;
452  if ( (d2 < fRmaxTolerance*fRmax) || (pDotV3d >= 0) )
453  {
454  return snxt = kInfinity;
455  }
456  else
457  {
458  return snxt = 0.;
459  }
460  }
461  }
462  }
463 #ifdef G4CSGDEBUG
464  else // inside ???
465  {
466  G4Exception("G4Orb::DistanceToIn(p,v)", "GeomSolids1002",
467  JustWarning, "Point p is inside !?");
468  }
469 #endif
470 
471  return snxt;
472 }
473 
475 //
476 // Calculate distance (<= actual) to closest surface of shape from outside
477 // - Calculate distance to radial plane
478 // - Return 0 if point inside
479 
481 {
482  G4double safe = 0.0,
483  radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
484  safe = radius - fRmax;
485  if( safe < 0 ) { safe = 0.; }
486  return safe;
487 }
488 
490 //
491 // Calculate distance to surface of shape from `inside', allowing for tolerance
492 //
493 
495  const G4ThreeVector& v,
496  const G4bool calcNorm,
497  G4bool *validNorm,
498  G4ThreeVector *n ) const
499 {
500  G4double snxt = kInfinity; // ??? snxt is default return value
501  ESide side = kNull;
502 
503  G4double rad2,pDotV3d;
504  G4double xi,yi,zi; // Intersection point
505  G4double c,d2;
506 
507  rad2 = p.x()*p.x() + p.y()*p.y() + p.z()*p.z();
508  pDotV3d = p.x()*v.x() + p.y()*v.y() + p.z()*v.z();
509 
510  // Radial Intersection from G4Orb::DistanceToIn
511  //
512  // Outer spherical shell intersection
513  // - Only if outside tolerant fRmax
514  // - Check for if inside and outer G4Orb heading through solid (-> 0)
515  // - No intersect -> no intersection with G4Orb
516  //
517  // Shell eqn: x^2+y^2+z^2=RSPH^2
518  //
519  // => (px+svx)^2+(py+svy)^2+(pz+svz)^2=R^2
520  //
521  // => (px^2+py^2+pz^2) +2s(pxvx+pyvy+pzvz)+s^2(vx^2+vy^2+vz^2)=R^2
522  // => rad2 +2s(pDotV3d) +s^2 =R^2
523  //
524  // => s=-pDotV3d+-std::sqrt(pDotV3d^2-(rad2-R^2))
525 
526  const G4double Rmax_plus = fRmax + fRmaxTolerance*0.5;
527  G4double radius = std::sqrt(rad2);
528 
529  if ( radius <= Rmax_plus )
530  {
531  c = (radius - fRmax)*(radius + fRmax);
532 
533  if ( c < fRmaxTolerance*fRmax )
534  {
535  // Within tolerant Outer radius
536  //
537  // The test is
538  // radius - fRmax < 0.5*fRmaxTolerance
539  // => radius < fRmax + 0.5*kRadTol
540  // => rad2 < (fRmax + 0.5*kRadTol)^2
541  // => rad2 < fRmax^2 + 2.*0.5*fRmax*kRadTol + 0.25*kRadTol*kRadTol
542  // => rad2 - fRmax^2 <~ fRmax*kRadTol
543 
544  d2 = pDotV3d*pDotV3d - c;
545 
546  if( ( c > -fRmaxTolerance*fRmax) && // on tolerant surface
547  ( ( pDotV3d >= 0 ) || ( d2 < 0 )) ) // leaving outside from Rmax
548  // not re-entering
549  {
550  if(calcNorm)
551  {
552  *validNorm = true;
553  *n = G4ThreeVector(p.x()/fRmax,p.y()/fRmax,p.z()/fRmax);
554  }
555  return snxt = 0;
556  }
557  else
558  {
559  snxt = -pDotV3d + std::sqrt(d2); // second root since inside Rmax
560  side = kRMax;
561  }
562  }
563  }
564  else // p is outside ???
565  {
566  G4cout << G4endl;
567  DumpInfo();
568  std::ostringstream message;
569  G4int oldprc = message.precision(16);
570  message << "Logic error: snxt = kInfinity ???" << G4endl
571  << "Position:" << G4endl << G4endl
572  << "p.x() = " << p.x()/mm << " mm" << G4endl
573  << "p.y() = " << p.y()/mm << " mm" << G4endl
574  << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
575  << "Rp = "<< std::sqrt( p.x()*p.x()+p.y()*p.y()+p.z()*p.z() )/mm
576  << " mm" << G4endl << G4endl
577  << "Direction:" << G4endl << G4endl
578  << "v.x() = " << v.x() << G4endl
579  << "v.y() = " << v.y() << G4endl
580  << "v.z() = " << v.z() << G4endl << G4endl
581  << "Proposed distance :" << G4endl << G4endl
582  << "snxt = " << snxt/mm << " mm" << G4endl;
583  message.precision(oldprc);
584  G4Exception("G4Orb::DistanceToOut(p,v,..)", "GeomSolids1002",
585  JustWarning, message);
586  }
587  if (calcNorm) // Output switch operator
588  {
589  switch( side )
590  {
591  case kRMax:
592  xi=p.x()+snxt*v.x();
593  yi=p.y()+snxt*v.y();
594  zi=p.z()+snxt*v.z();
595  *n=G4ThreeVector(xi/fRmax,yi/fRmax,zi/fRmax);
596  *validNorm=true;
597  break;
598  default:
599  G4cout << G4endl;
600  DumpInfo();
601  std::ostringstream message;
602  G4int oldprc = message.precision(16);
603  message << "Undefined side for valid surface normal to solid."
604  << G4endl
605  << "Position:" << G4endl << G4endl
606  << "p.x() = " << p.x()/mm << " mm" << G4endl
607  << "p.y() = " << p.y()/mm << " mm" << G4endl
608  << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
609  << "Direction:" << G4endl << G4endl
610  << "v.x() = " << v.x() << G4endl
611  << "v.y() = " << v.y() << G4endl
612  << "v.z() = " << v.z() << G4endl << G4endl
613  << "Proposed distance :" << G4endl << G4endl
614  << "snxt = " << snxt/mm << " mm" << G4endl;
615  message.precision(oldprc);
616  G4Exception("G4Orb::DistanceToOut(p,v,..)","GeomSolids1002",
617  JustWarning, message);
618  break;
619  }
620  }
621  return snxt;
622 }
623 
625 //
626 // Calculate distance (<=actual) to closest surface of shape from inside
627 
629 {
630  G4double safe=0.0,radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
631 
632 #ifdef G4CSGDEBUG
633  if( Inside(p) == kOutside )
634  {
635  G4int oldprc = G4cout.precision(16);
636  G4cout << G4endl;
637  DumpInfo();
638  G4cout << "Position:" << G4endl << G4endl;
639  G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
640  G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
641  G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
642  G4cout.precision(oldprc);
643  G4Exception("G4Orb::DistanceToOut(p)", "GeomSolids1002",
644  JustWarning, "Point p is outside !?" );
645  }
646 #endif
647 
648  safe = fRmax - radius;
649  if ( safe < 0. ) safe = 0.;
650  return safe;
651 }
652 
654 //
655 // G4EntityType
656 
658 {
659  return G4String("G4Orb");
660 }
661 
663 //
664 // Make a clone of the object
665 //
667 {
668  return new G4Orb(*this);
669 }
670 
672 //
673 // Stream object contents to an output stream
674 
675 std::ostream& G4Orb::StreamInfo( std::ostream& os ) const
676 {
677  G4int oldprc = os.precision(16);
678  os << "-----------------------------------------------------------\n"
679  << " *** Dump for solid - " << GetName() << " ***\n"
680  << " ===================================================\n"
681  << " Solid type: G4Orb\n"
682  << " Parameters: \n"
683 
684  << " outer radius: " << fRmax/mm << " mm \n"
685  << "-----------------------------------------------------------\n";
686  os.precision(oldprc);
687 
688  return os;
689 }
690 
692 //
693 // GetPointOnSurface
694 
696 {
697  // generate a random number from zero to 2pi...
698  //
699  G4double phi = RandFlat::shoot(0.,2.*pi);
700  G4double cosphi = std::cos(phi);
701  G4double sinphi = std::sin(phi);
702 
703  // generate a random point uniform in area
704  G4double costheta = RandFlat::shoot(-1.,1.);
705  G4double sintheta = std::sqrt(1.-sqr(costheta));
706 
707  return G4ThreeVector (fRmax*sintheta*cosphi,
708  fRmax*sintheta*sinphi, fRmax*costheta);
709 }
710 
712 //
713 // Methods for visualisation
714 
716 {
717  scene.AddSolid (*this);
718 }
719 
721 {
722  return new G4PolyhedronSphere (0., fRmax, 0., 2*pi, 0., pi);
723 }
724 
725 #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:124
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:159
G4bool IsYLimited() const
const G4double pi
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Definition: G4Orb.cc:715
G4ThreeVector NetTranslation() const
Definition: G4Orb.cc:60
G4bool IsXLimited() const
G4double a
Definition: TRTMaterials.hh:39
G4ThreeVector GetPointOnSurface() const
Definition: G4Orb.cc:695
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:322
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Orb.cc:384
void DumpInfo() const
G4Polyhedron * CreatePolyhedron() const
Definition: G4Orb.cc:720
ENorm
Definition: G4Cons.cc:71
G4Orb(const G4String &pName, G4double pRmax)
Definition: G4Orb.cc:72
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Orb.cc:675
G4double GetMaxXExtent() const
G4double GetMinZExtent() const
G4GLOB_DLL std::ostream G4cout
G4GeometryType GetEntityType() const
Definition: G4Orb.cc:657
G4Polyhedron * fpPolyhedron
Definition: G4CSGSolid.hh:80
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:148
virtual G4Polyhedron * GetPolyhedron() const
Definition: G4CSGSolid.cc:124
const G4int n
Definition: G4Orb.hh:61
G4VSolid * Clone() const
Definition: G4Orb.cc:666
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
ESide
Definition: G4Cons.cc:67
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:494
double G4double
Definition: G4Types.hh:76
static const G4double d2
G4CSGSolid & operator=(const G4CSGSolid &rhs)
Definition: G4CSGSolid.cc:82
G4bool IsZLimited() const
static const double mm
Definition: G4SIunits.hh:102
static G4GeometryTolerance * GetInstance()
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Definition: G4Orb.cc:354