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