Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 102528 2017-02-08 13:37:51Z gcosmo $
27 //
28 // class G4Orb
29 //
30 // Implementation for G4Orb class
31 //
32 // History:
33 //
34 // 27.10.16 E.Tcherniaev - added Extent(), reimplemented CalculateExtent()
35 // 05.04.12 M.Kelsey - GetPointOnSurface() throw flat in cos(theta)
36 // 30.06.04 V.Grichine - bug fixed in DistanceToIn(p,v) on Rmax surface
37 // 20.08.03 V.Grichine - created
38 //
40 
41 #include "G4Orb.hh"
42 
43 #if !defined(G4GEOM_USE_UORB)
44 
45 #include "G4TwoVector.hh"
46 #include "G4VoxelLimits.hh"
47 #include "G4AffineTransform.hh"
48 #include "G4GeometryTolerance.hh"
49 #include "G4BoundingEnvelope.hh"
50 
51 #include "G4VPVParameterisation.hh"
52 
53 #include "Randomize.hh"
54 
55 #include "meshdefs.hh"
56 
57 #include "G4VGraphicsScene.hh"
58 
59 using namespace CLHEP;
60 
61 // Private enum: Not for external use - used by distanceToOut
62 
63 enum ESide {kNull,kRMax};
64 
65 // used by normal
66 
67 enum ENorm {kNRMax};
68 
69 
71 //
72 // constructor - check positive radius
73 //
74 
75 G4Orb::G4Orb( const G4String& pName, G4double pRmax )
76 : G4CSGSolid(pName), fRmax(pRmax)
77 {
78 
79  const G4double fEpsilon = 2.e-11; // relative tolerance of fRmax
80 
81  G4double kRadTolerance
83 
84  // Check radius
85  //
86  if ( pRmax < 10*kCarTolerance )
87  {
88  G4Exception("G4Orb::G4Orb()", "GeomSolids0002", FatalException,
89  "Invalid radius < 10*kCarTolerance.");
90  }
91  fRmaxTolerance = std::max( kRadTolerance, fEpsilon*fRmax);
92 
93 }
94 
96 //
97 // Fake default constructor - sets only member data and allocates memory
98 // for usage restricted to object persistency.
99 //
100 G4Orb::G4Orb( __void__& a )
101  : G4CSGSolid(a), fRmax(0.), fRmaxTolerance(0.)
102 {
103 }
104 
106 //
107 // Destructor
108 
110 {
111 }
112 
114 //
115 // Copy constructor
116 
117 G4Orb::G4Orb(const G4Orb& rhs)
118  : G4CSGSolid(rhs), fRmax(rhs.fRmax), fRmaxTolerance(rhs.fRmaxTolerance)
119 {
120 }
121 
123 //
124 // Assignment operator
125 
127 {
128  // Check assignment to self
129  //
130  if (this == &rhs) { return *this; }
131 
132  // Copy base class data
133  //
135 
136  // Copy data
137  //
138  fRmax = rhs.fRmax;
139  fRmaxTolerance = rhs.fRmaxTolerance;
140 
141  return *this;
142 }
143 
145 //
146 // Dispatch to parameterisation for replication mechanism dimension
147 // computation & modification.
148 
150  const G4int n,
151  const G4VPhysicalVolume* pRep )
152 {
153  p->ComputeDimensions(*this,n,pRep);
154 }
155 
157 //
158 // Get bounding box
159 
160 void G4Orb::Extent(G4ThreeVector& pMin, G4ThreeVector& pMax) const
161 {
162  G4double radius = GetRadius();
163  pMin.set(-radius,-radius,-radius);
164  pMax.set( radius, radius, radius);
165 
166  // Check correctness of the bounding box
167  //
168  if (pMin.x() >= pMax.x() || pMin.y() >= pMax.y() || pMin.z() >= pMax.z())
169  {
170  std::ostringstream message;
171  message << "Bad bounding box (min >= max) for solid: "
172  << GetName() << " !"
173  << "\npMin = " << pMin
174  << "\npMax = " << pMax;
175  G4Exception("G4Orb::Extent()", "GeomMgt0001", JustWarning, message);
176  DumpInfo();
177  }
178 }
179 
181 //
182 // Calculate extent under transform and specified limit
183 
185  const G4VoxelLimits& pVoxelLimit,
186  const G4AffineTransform& pTransform,
187  G4double& pMin, G4double& pMax) const
188 {
189  G4ThreeVector bmin, bmax;
190  G4bool exist;
191 
192  // Get bounding box
193  Extent(bmin,bmax);
194 
195  // Check bounding box
196  G4BoundingEnvelope bbox(bmin,bmax);
197 #ifdef G4BBOX_EXTENT
198  if (true) return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
199 #endif
200  if (bbox.BoundingBoxVsVoxelLimits(pAxis,pVoxelLimit,pTransform,pMin,pMax))
201  {
202  return exist = (pMin < pMax) ? true : false;
203  }
204 
205  // Find bounding envelope and calculate extent
206  //
207  static const G4int NTHETA = 8; // number of steps along Theta
208  static const G4int NPHI = 16; // number of steps along Phi
209  static const G4double sinHalfTheta = std::sin(halfpi/NTHETA);
210  static const G4double cosHalfTheta = std::cos(halfpi/NTHETA);
211  static const G4double sinHalfPhi = std::sin(pi/NPHI);
212  static const G4double cosHalfPhi = std::cos(pi/NPHI);
213  static const G4double sinStepTheta = 2.*sinHalfTheta*cosHalfTheta;
214  static const G4double cosStepTheta = 1. - 2.*sinHalfTheta*sinHalfTheta;
215  static const G4double sinStepPhi = 2.*sinHalfPhi*cosHalfPhi;
216  static const G4double cosStepPhi = 1. - 2.*sinHalfPhi*sinHalfPhi;
217 
218  G4double radius = GetRadius();
219  G4double rtheta = radius/cosHalfTheta;
220  G4double rphi = rtheta/cosHalfPhi;
221 
222  // set reference circle
223  G4TwoVector xy[NPHI];
224  G4double sinCurPhi = sinHalfPhi;
225  G4double cosCurPhi = cosHalfPhi;
226  for (G4int k=0; k<NPHI; ++k)
227  {
228  xy[k].set(cosCurPhi,sinCurPhi);
229  G4double sinTmpPhi = sinCurPhi;
230  sinCurPhi = sinCurPhi*cosStepPhi + cosCurPhi*sinStepPhi;
231  cosCurPhi = cosCurPhi*cosStepPhi - sinTmpPhi*sinStepPhi;
232  }
233 
234  // set bounding circles
235  G4ThreeVectorList circles[NTHETA];
236  for (G4int i=0; i<NTHETA; ++i) circles[i].resize(NPHI);
237 
238  G4double sinCurTheta = sinHalfTheta;
239  G4double cosCurTheta = cosHalfTheta;
240  for (G4int i=0; i<NTHETA; ++i)
241  {
242  G4double z = rtheta*cosCurTheta;
243  G4double rho = rphi*sinCurTheta;
244  for (G4int k=0; k<NPHI; ++k)
245  {
246  circles[i][k].set(rho*xy[k].x(),rho*xy[k].y(),z);
247  }
248  G4double sinTmpTheta = sinCurTheta;
249  sinCurTheta = sinCurTheta*cosStepTheta + cosCurTheta*sinStepTheta;
250  cosCurTheta = cosCurTheta*cosStepTheta - sinTmpTheta*sinStepTheta;
251  }
252 
253  // set envelope and calculate extent
254  std::vector<const G4ThreeVectorList *> polygons;
255  polygons.resize(NTHETA);
256  for (G4int i=0; i<NTHETA; ++i) polygons[i] = &circles[i];
257 
258  G4BoundingEnvelope benv(bmin,bmax,polygons);
259  exist = benv.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
260  return exist;
261 }
262 
264 //
265 // Return whether point inside/outside/on surface
266 // Split into radius checks
267 //
268 
270 {
271  G4double rad2,tolRMax;
272  EInside in;
273 
274 
275  rad2 = p.x()*p.x()+p.y()*p.y()+p.z()*p.z();
276 
277  G4double radius = std::sqrt(rad2);
278 
279  // G4double radius = std::sqrt(rad2);
280  // Check radial surface
281  // sets `in'
282 
283  tolRMax = fRmax - fRmaxTolerance*0.5;
284 
285  if ( radius <= tolRMax ) { in = kInside; }
286  else
287  {
288  tolRMax = fRmax + fRmaxTolerance*0.5;
289  if ( radius <= tolRMax ) { in = kSurface; }
290  else { in = kOutside; }
291  }
292  return in;
293 }
294 
296 //
297 // Return unit normal of surface closest to p
298 
300 {
301  G4double radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
302  return G4ThreeVector(p.x()/radius,p.y()/radius,p.z()/radius);
303 }
304 
306 //
307 // Calculate distance to shape from outside, along normalised vector
308 // - return kInfinity if no intersection, or intersection distance <= tolerance
309 //
310 // -> If point is outside outer radius, compute intersection with rmax
311 // - if no intersection return
312 // - if valid phi,theta return intersection Dist
313 
315  const G4ThreeVector& v ) const
316 {
317  G4double snxt = kInfinity; // snxt = default return value
318 
319  G4double radius, pDotV3d; // , tolORMax2, tolIRMax2;
320  G4double c, d2, sd = kInfinity;
321 
322  const G4double dRmax = 100.*fRmax;
323 
324  // General Precalcs
325 
326  radius = std::sqrt(p.x()*p.x() + p.y()*p.y() + p.z()*p.z());
327  pDotV3d = p.x()*v.x() + p.y()*v.y() + p.z()*v.z();
328 
329  // Radial Precalcs
330 
331  // tolORMax2 = (fRmax+fRmaxTolerance*0.5)*(fRmax+fRmaxTolerance*0.5);
332  // tolIRMax2 = (fRmax-fRmaxTolerance*0.5)*(fRmax-fRmaxTolerance*0.5);
333 
334  // Outer spherical shell intersection
335  // - Only if outside tolerant fRmax
336  // - Check for if inside and outer G4Orb heading through solid (-> 0)
337  // - No intersect -> no intersection with G4Orb
338  //
339  // Shell eqn: x^2+y^2+z^2 = RSPH^2
340  //
341  // => (px+svx)^2+(py+svy)^2+(pz+svz)^2=R^2
342  //
343  // => (px^2+py^2+pz^2) +2sd(pxvx+pyvy+pzvz)+sd^2(vx^2+vy^2+vz^2)=R^2
344  // => rad2 +2sd(pDotV3d) +sd^2 =R^2
345  //
346  // => sd=-pDotV3d+-std::sqrt(pDotV3d^2-(rad2-R^2))
347 
348  c = (radius - fRmax)*(radius + fRmax);
349 
350  if( radius > fRmax-fRmaxTolerance*0.5 ) // not inside in terms of Inside(p)
351  {
352  if ( c > fRmaxTolerance*fRmax )
353  {
354  // If outside tolerant boundary of outer G4Orb in terms of c
355  // [ should be std::sqrt(rad2) - fRmax > fRmaxTolerance*0.5 ]
356 
357  d2 = pDotV3d*pDotV3d - c;
358 
359  if ( d2 >= 0 )
360  {
361  sd = -pDotV3d - std::sqrt(d2);
362  if ( sd >= 0 )
363  {
364  if ( sd > dRmax ) // Avoid rounding errors due to precision issues seen on
365  { // 64 bits systems. Split long distances and recompute
366  G4double fTerm = sd - std::fmod(sd,dRmax);
367  sd = fTerm + DistanceToIn(p+fTerm*v,v);
368  }
369  return snxt = sd;
370  }
371  }
372  else // No intersection with G4Orb
373  {
374  return snxt = kInfinity;
375  }
376  }
377  else // not outside in terms of c
378  {
379  if ( c > -fRmaxTolerance*fRmax ) // on surface
380  {
381  d2 = pDotV3d*pDotV3d - c;
382  if ( (d2 < fRmaxTolerance*fRmax) || (pDotV3d >= 0) )
383  {
384  return snxt = kInfinity;
385  }
386  else
387  {
388  return snxt = 0.;
389  }
390  }
391  }
392  }
393 #ifdef G4CSGDEBUG
394  else // inside ???
395  {
396  G4Exception("G4Orb::DistanceToIn(p,v)", "GeomSolids1002",
397  JustWarning, "Point p is inside !?");
398  }
399 #endif
400 
401  return snxt;
402 }
403 
405 //
406 // Calculate distance (<= actual) to closest surface of shape from outside
407 // - Calculate distance to radial plane
408 // - Return 0 if point inside
409 
411 {
412  G4double safe = 0.0,
413  radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
414  safe = radius - fRmax;
415  if( safe < 0 ) { safe = 0.; }
416  return safe;
417 }
418 
420 //
421 // Calculate distance to surface of shape from `inside', allowing for tolerance
422 //
423 
425  const G4ThreeVector& v,
426  const G4bool calcNorm,
427  G4bool *validNorm,
428  G4ThreeVector *n ) const
429 {
430  G4double snxt = kInfinity; // ??? snxt is default return value
431  ESide side = kNull;
432 
433  G4double rad2,pDotV3d;
434  G4double xi,yi,zi; // Intersection point
435  G4double c,d2;
436 
437  rad2 = p.x()*p.x() + p.y()*p.y() + p.z()*p.z();
438  pDotV3d = p.x()*v.x() + p.y()*v.y() + p.z()*v.z();
439 
440  // Radial Intersection from G4Orb::DistanceToIn
441  //
442  // Outer spherical shell intersection
443  // - Only if outside tolerant fRmax
444  // - Check for if inside and outer G4Orb heading through solid (-> 0)
445  // - No intersect -> no intersection with G4Orb
446  //
447  // Shell eqn: x^2+y^2+z^2=RSPH^2
448  //
449  // => (px+svx)^2+(py+svy)^2+(pz+svz)^2=R^2
450  //
451  // => (px^2+py^2+pz^2) +2s(pxvx+pyvy+pzvz)+s^2(vx^2+vy^2+vz^2)=R^2
452  // => rad2 +2s(pDotV3d) +s^2 =R^2
453  //
454  // => s=-pDotV3d+-std::sqrt(pDotV3d^2-(rad2-R^2))
455 
456  const G4double Rmax_plus = fRmax + fRmaxTolerance*0.5;
457  G4double radius = std::sqrt(rad2);
458 
459  if ( radius <= Rmax_plus )
460  {
461  c = (radius - fRmax)*(radius + fRmax);
462 
463  if ( c < fRmaxTolerance*fRmax )
464  {
465  // Within tolerant Outer radius
466  //
467  // The test is
468  // radius - fRmax < 0.5*fRmaxTolerance
469  // => radius < fRmax + 0.5*kRadTol
470  // => rad2 < (fRmax + 0.5*kRadTol)^2
471  // => rad2 < fRmax^2 + 2.*0.5*fRmax*kRadTol + 0.25*kRadTol*kRadTol
472  // => rad2 - fRmax^2 <~ fRmax*kRadTol
473 
474  d2 = pDotV3d*pDotV3d - c;
475 
476  if( ( c > -fRmaxTolerance*fRmax) && // on tolerant surface
477  ( ( pDotV3d >= 0 ) || ( d2 < 0 )) ) // leaving outside from Rmax
478  // not re-entering
479  {
480  if(calcNorm)
481  {
482  *validNorm = true;
483  *n = G4ThreeVector(p.x()/fRmax,p.y()/fRmax,p.z()/fRmax);
484  }
485  return snxt = 0;
486  }
487  else
488  {
489  snxt = -pDotV3d + std::sqrt(d2); // second root since inside Rmax
490  side = kRMax;
491  }
492  }
493  }
494  else // p is outside ???
495  {
496  G4cout << G4endl;
497  DumpInfo();
498  std::ostringstream message;
499  G4int oldprc = message.precision(16);
500  message << "Logic error: snxt = kInfinity ???" << G4endl
501  << "Position:" << G4endl << G4endl
502  << "p.x() = " << p.x()/mm << " mm" << G4endl
503  << "p.y() = " << p.y()/mm << " mm" << G4endl
504  << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
505  << "Rp = "<< std::sqrt( p.x()*p.x()+p.y()*p.y()+p.z()*p.z() )/mm
506  << " mm" << G4endl << G4endl
507  << "Direction:" << G4endl << G4endl
508  << "v.x() = " << v.x() << G4endl
509  << "v.y() = " << v.y() << G4endl
510  << "v.z() = " << v.z() << G4endl << G4endl
511  << "Proposed distance :" << G4endl << G4endl
512  << "snxt = " << snxt/mm << " mm" << G4endl;
513  message.precision(oldprc);
514  G4Exception("G4Orb::DistanceToOut(p,v,..)", "GeomSolids1002",
515  JustWarning, message);
516  }
517  if (calcNorm) // Output switch operator
518  {
519  switch( side )
520  {
521  case kRMax:
522  xi=p.x()+snxt*v.x();
523  yi=p.y()+snxt*v.y();
524  zi=p.z()+snxt*v.z();
525  *n=G4ThreeVector(xi/fRmax,yi/fRmax,zi/fRmax);
526  *validNorm=true;
527  break;
528  default:
529  G4cout << G4endl;
530  DumpInfo();
531  std::ostringstream message;
532  G4int oldprc = message.precision(16);
533  message << "Undefined side for valid surface normal to solid."
534  << G4endl
535  << "Position:" << G4endl << G4endl
536  << "p.x() = " << p.x()/mm << " mm" << G4endl
537  << "p.y() = " << p.y()/mm << " mm" << G4endl
538  << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
539  << "Direction:" << G4endl << G4endl
540  << "v.x() = " << v.x() << G4endl
541  << "v.y() = " << v.y() << G4endl
542  << "v.z() = " << v.z() << G4endl << G4endl
543  << "Proposed distance :" << G4endl << G4endl
544  << "snxt = " << snxt/mm << " mm" << G4endl;
545  message.precision(oldprc);
546  G4Exception("G4Orb::DistanceToOut(p,v,..)","GeomSolids1002",
547  JustWarning, message);
548  break;
549  }
550  }
551  return snxt;
552 }
553 
555 //
556 // Calculate distance (<=actual) to closest surface of shape from inside
557 
559 {
560  G4double safe=0.0,radius = std::sqrt(p.x()*p.x()+p.y()*p.y()+p.z()*p.z());
561 
562 #ifdef G4CSGDEBUG
563  if( Inside(p) == kOutside )
564  {
565  G4int oldprc = G4cout.precision(16);
566  G4cout << G4endl;
567  DumpInfo();
568  G4cout << "Position:" << G4endl << G4endl;
569  G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
570  G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
571  G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
572  G4cout.precision(oldprc);
573  G4Exception("G4Orb::DistanceToOut(p)", "GeomSolids1002",
574  JustWarning, "Point p is outside !?" );
575  }
576 #endif
577 
578  safe = fRmax - radius;
579  if ( safe < 0. ) safe = 0.;
580  return safe;
581 }
582 
584 //
585 // G4EntityType
586 
588 {
589  return G4String("G4Orb");
590 }
591 
593 //
594 // Make a clone of the object
595 //
597 {
598  return new G4Orb(*this);
599 }
600 
602 //
603 // Stream object contents to an output stream
604 
605 std::ostream& G4Orb::StreamInfo( std::ostream& os ) const
606 {
607  G4int oldprc = os.precision(16);
608  os << "-----------------------------------------------------------\n"
609  << " *** Dump for solid - " << GetName() << " ***\n"
610  << " ===================================================\n"
611  << " Solid type: G4Orb\n"
612  << " Parameters: \n"
613 
614  << " outer radius: " << fRmax/mm << " mm \n"
615  << "-----------------------------------------------------------\n";
616  os.precision(oldprc);
617 
618  return os;
619 }
620 
622 //
623 // GetPointOnSurface
624 
626 {
627  // generate a random number from zero to 2pi...
628  //
629  G4double phi = G4RandFlat::shoot(0.,2.*pi);
630  G4double cosphi = std::cos(phi);
631  G4double sinphi = std::sin(phi);
632 
633  // generate a random point uniform in area
634  G4double costheta = G4RandFlat::shoot(-1.,1.);
635  G4double sintheta = std::sqrt(1.-sqr(costheta));
636 
637  return G4ThreeVector (fRmax*sintheta*cosphi,
638  fRmax*sintheta*sinphi, fRmax*costheta);
639 }
640 
642 //
643 // Methods for visualisation
644 
646 {
647  scene.AddSolid (*this);
648 }
649 
651 {
652  return new G4PolyhedronSphere (0., fRmax, 0., 2*pi, 0., pi);
653 }
654 
655 #endif
void set(double x, double y, double z)
G4String GetName() const
ThreeVector shoot(const G4int Ap, const G4int Af)
void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition: G4Orb.cc:160
static constexpr double mm
Definition: G4SIunits.hh:115
static const G4double kInfinity
Definition: geomdefs.hh:42
G4Orb & operator=(const G4Orb &rhs)
Definition: G4Orb.cc:126
CLHEP::Hep3Vector G4ThreeVector
virtual ~G4Orb()
Definition: G4Orb.cc:109
double x() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
Definition: G4Orb.cc:184
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
const char * p
Definition: xmltok.h:285
static const G4double d2
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Definition: G4Orb.cc:645
tuple x
Definition: test.py:50
G4ThreeVector GetPointOnSurface() const
Definition: G4Orb.cc:625
ESide
Definition: G4Orb.hh:139
virtual void AddSolid(const G4Box &)=0
int G4int
Definition: G4Types.hh:78
EInside Inside(const G4ThreeVector &p) const
Definition: G4Orb.cc:269
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Definition: G4Orb.cc:314
double z() const
Definition: G4Cons.cc:76
void DumpInfo() const
G4Polyhedron * CreatePolyhedron() const
Definition: G4Orb.cc:650
ENorm
Definition: G4Cons.cc:80
G4double GetRadius() const
G4Orb(const G4String &pName, G4double pRmax)
Definition: G4Orb.cc:75
std::ostream & StreamInfo(std::ostream &os) const
Definition: G4Orb.cc:605
G4GLOB_DLL std::ostream G4cout
G4GeometryType GetEntityType() const
Definition: G4Orb.cc:587
void set(double x, double y)
G4double GetRadialTolerance() const
bool G4bool
Definition: G4Types.hh:79
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
Definition: G4Orb.cc:149
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4bool BoundingBoxVsVoxelLimits(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
const G4int n
std::vector< G4ThreeVector > G4ThreeVectorList
Definition: G4Orb.hh:61
tuple v
Definition: test.py:18
G4VSolid * Clone() const
Definition: G4Orb.cc:596
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
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
tuple z
Definition: test.py:28
#define G4endl
Definition: G4ios.hh:61
G4double kCarTolerance
Definition: G4VSolid.hh:307
static constexpr double pi
Definition: G4SIunits.hh:75
static constexpr double halfpi
Definition: G4SIunits.hh:77
ESide
Definition: G4Cons.cc:76
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:424
Definition: G4Cons.cc:76
double G4double
Definition: G4Types.hh:76
tuple c
Definition: test.py:13
G4CSGSolid & operator=(const G4CSGSolid &rhs)
Definition: G4CSGSolid.cc:91
Definition: G4Cons.cc:80
static G4GeometryTolerance * GetInstance()
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Definition: G4Orb.cc:299