Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4TwistedBox Class Reference

#include <G4TwistedBox.hh>

Inheritance diagram for G4TwistedBox:
G4VTwistedFaceted G4VSolid

Public Member Functions

virtual void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
 
G4VSolidClone () const
 
virtual void ComputeDimensions (G4VPVParameterisation *, const G4int, const G4VPhysicalVolume *)
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcnorm=false, G4bool *validnorm=nullptr, G4ThreeVector *n=nullptr) const
 
void DumpInfo () const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 
 G4TwistedBox (__void__ &)
 
 G4TwistedBox (const G4String &pName, G4double pPhiTwist, G4double pDx, G4double pDy, G4double pDz)
 
 G4TwistedBox (const G4TwistedBox &rhs)
 
G4double GetAlpha () const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4double GetCubicVolume ()
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
G4double GetDx1 () const
 
G4double GetDx2 () const
 
G4double GetDx3 () const
 
G4double GetDx4 () const
 
G4double GetDy1 () const
 
G4double GetDy2 () const
 
G4double GetDz () const
 
G4GeometryType GetEntityType () const
 
virtual G4VisExtent GetExtent () const
 
G4String GetName () const
 
G4double GetPhi () const
 
G4double GetPhiTwist () const
 
G4ThreeVector GetPointInSolid (G4double z) const
 
G4ThreeVector GetPointOnSurface () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual G4double GetSurfaceArea ()
 
G4double GetTheta () const
 
G4double GetTolerance () const
 
G4double GetTwistAngle () const
 
G4double GetValueA (G4double phi) const
 
G4double GetValueB (G4double phi) const
 
G4double GetValueD (G4double phi) const
 
G4double GetXHalfLength () const
 
G4double GetYHalfLength () const
 
G4double GetZHalfLength () const
 
virtual EInside Inside (const G4ThreeVector &p) const
 
G4TwistedBoxoperator= (const G4TwistedBox &rhs)
 
G4bool operator== (const G4VSolid &s) const
 
void SetName (const G4String &name)
 
std::ostream & StreamInfo (std::ostream &os) const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
G4double Xcoef (G4double u, G4double phi, G4double ftg) const
 
virtual ~G4TwistedBox ()
 

Protected Member Functions

void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) 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
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 

Protected Attributes

G4PolyhedronfpPolyhedron = nullptr
 
G4bool fRebuildPolyhedron = false
 
G4double kCarTolerance
 

Private Member Functions

void ClipPolygonToSimpleLimits (G4ThreeVectorList &pPolygon, G4ThreeVectorList &outputPolygon, const G4VoxelLimits &pVoxelLimit) const
 
void CreateSurfaces ()
 

Private Attributes

G4double fAlph
 
G4double fCubicVolume = 0.0
 
G4double fdeltaX
 
G4double fdeltaY
 
G4double fDx
 
G4double fDx1
 
G4double fDx2
 
G4double fDx3
 
G4double fDx4
 
G4double fDy
 
G4double fDy1
 
G4double fDy2
 
G4double fDz
 
LastValue fLastDistanceToIn
 
LastValueWithDoubleVector fLastDistanceToInWithV
 
LastValue fLastDistanceToOut
 
LastValueWithDoubleVector fLastDistanceToOutWithV
 
LastState fLastInside
 
LastVector fLastNormal
 
G4VTwistSurfacefLowerEndcap
 
G4double fPhi
 
G4double fPhiTwist
 
G4String fshapeName
 
G4VTwistSurfacefSide0
 
G4VTwistSurfacefSide180
 
G4VTwistSurfacefSide270
 
G4VTwistSurfacefSide90
 
G4double fSurfaceArea = 0.0
 
G4double fTAlph
 
G4double fTheta
 
G4VTwistSurfacefUpperEndcap
 

Detailed Description

Definition at line 48 of file G4TwistedBox.hh.

Constructor & Destructor Documentation

◆ G4TwistedBox() [1/3]

G4TwistedBox::G4TwistedBox ( const G4String pName,
G4double  pPhiTwist,
G4double  pDx,
G4double  pDy,
G4double  pDz 
)

Definition at line 38 of file G4TwistedBox.cc.

43 : G4VTwistedFaceted( pName, pPhiTwist,pDz,0.,0.,
44 pDy, pDx, pDx, pDy, pDx, pDx,0. )
45{
46}
G4VTwistedFaceted(const G4String &pname, G4double PhiTwist, G4double pDz, G4double pTheta, G4double pPhi, G4double pDy1, G4double pDx1, G4double pDx2, G4double pDy2, G4double pDx3, G4double pDx4, G4double pAlph)

Referenced by Clone().

◆ ~G4TwistedBox()

G4TwistedBox::~G4TwistedBox ( )
virtual

Definition at line 60 of file G4TwistedBox.cc.

61{
62}

◆ G4TwistedBox() [2/3]

G4TwistedBox::G4TwistedBox ( __void__ &  a)

Definition at line 52 of file G4TwistedBox.cc.

54{
55}

◆ G4TwistedBox() [3/3]

G4TwistedBox::G4TwistedBox ( const G4TwistedBox rhs)

Definition at line 67 of file G4TwistedBox.cc.

69{
71}
G4Polyhedron * fpPolyhedron
virtual G4Polyhedron * GetPolyhedron() const

References G4VTwistedFaceted::fpPolyhedron, and G4VTwistedFaceted::GetPolyhedron().

Member Function Documentation

◆ BoundingLimits()

void G4VTwistedFaceted::BoundingLimits ( G4ThreeVector pMin,
G4ThreeVector pMax 
) const
virtualinherited

Reimplemented from G4VSolid.

Definition at line 292 of file G4VTwistedFaceted.cc.

294{
295 G4double maxRad = std::sqrt(fDx*fDx + fDy*fDy);
296 pMin.set(-maxRad,-maxRad,-fDz);
297 pMax.set( maxRad, maxRad, fDz);
298}
static const G4double pMax
static const G4double pMin
double G4double
Definition: G4Types.hh:83

References G4VTwistedFaceted::fDx, G4VTwistedFaceted::fDy, G4VTwistedFaceted::fDz, pMax, and pMin.

Referenced by G4VTwistedFaceted::CalculateExtent().

◆ CalculateClippedPolygonExtent()

void G4VSolid::CalculateClippedPolygonExtent ( G4ThreeVectorList pPolygon,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis,
G4double pMin,
G4double pMax 
) const
protectedinherited

Definition at line 489 of file G4VSolid.cc.

494{
495 G4int noLeft,i;
496 G4double component;
497
498 ClipPolygon(pPolygon,pVoxelLimit,pAxis);
499 noLeft = pPolygon.size();
500
501 if ( noLeft )
502 {
503 for (i=0; i<noLeft; ++i)
504 {
505 component = pPolygon[i].operator()(pAxis);
506
507 if (component < pMin)
508 {
509 pMin = component;
510 }
511 if (component > pMax)
512 {
513 pMax = component;
514 }
515 }
516 }
517}
int G4int
Definition: G4Types.hh:85
void ClipPolygon(G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
Definition: G4VSolid.cc:539

References G4VSolid::ClipPolygon(), pMax, and pMin.

Referenced by G4VSolid::ClipBetweenSections(), and G4VSolid::ClipCrossSection().

◆ CalculateExtent()

G4bool G4VTwistedFaceted::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pMin,
G4double pMax 
) const
virtualinherited

Implements G4VSolid.

Definition at line 305 of file G4VTwistedFaceted.cc.

310{
311 G4ThreeVector bmin, bmax;
312
313 // Get bounding box
314 BoundingLimits(bmin,bmax);
315
316 // Find extent
317 G4BoundingEnvelope bbox(bmin,bmax);
318 return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
319}
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const

References G4VTwistedFaceted::BoundingLimits(), G4BoundingEnvelope::CalculateExtent(), pMax, and pMin.

◆ ClipBetweenSections()

void G4VSolid::ClipBetweenSections ( G4ThreeVectorList pVertices,
const G4int  pSectionIndex,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis,
G4double pMin,
G4double pMax 
) const
protectedinherited

Definition at line 444 of file G4VSolid.cc.

449{
450 G4ThreeVectorList polygon;
451 polygon.reserve(4);
452 polygon.push_back((*pVertices)[pSectionIndex]);
453 polygon.push_back((*pVertices)[pSectionIndex+4]);
454 polygon.push_back((*pVertices)[pSectionIndex+5]);
455 polygon.push_back((*pVertices)[pSectionIndex+1]);
456 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
457 polygon.clear();
458
459 polygon.push_back((*pVertices)[pSectionIndex+1]);
460 polygon.push_back((*pVertices)[pSectionIndex+5]);
461 polygon.push_back((*pVertices)[pSectionIndex+6]);
462 polygon.push_back((*pVertices)[pSectionIndex+2]);
463 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
464 polygon.clear();
465
466 polygon.push_back((*pVertices)[pSectionIndex+2]);
467 polygon.push_back((*pVertices)[pSectionIndex+6]);
468 polygon.push_back((*pVertices)[pSectionIndex+7]);
469 polygon.push_back((*pVertices)[pSectionIndex+3]);
470 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
471 polygon.clear();
472
473 polygon.push_back((*pVertices)[pSectionIndex+3]);
474 polygon.push_back((*pVertices)[pSectionIndex+7]);
475 polygon.push_back((*pVertices)[pSectionIndex+4]);
476 polygon.push_back((*pVertices)[pSectionIndex]);
477 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
478 return;
479}
std::vector< G4ThreeVector > G4ThreeVectorList
void CalculateClippedPolygonExtent(G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
Definition: G4VSolid.cc:489

References G4VSolid::CalculateClippedPolygonExtent(), pMax, and pMin.

◆ ClipCrossSection()

void G4VSolid::ClipCrossSection ( G4ThreeVectorList pVertices,
const G4int  pSectionIndex,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis,
G4double pMin,
G4double pMax 
) const
protectedinherited

Definition at line 414 of file G4VSolid.cc.

419{
420
421 G4ThreeVectorList polygon;
422 polygon.reserve(4);
423 polygon.push_back((*pVertices)[pSectionIndex]);
424 polygon.push_back((*pVertices)[pSectionIndex+1]);
425 polygon.push_back((*pVertices)[pSectionIndex+2]);
426 polygon.push_back((*pVertices)[pSectionIndex+3]);
427 CalculateClippedPolygonExtent(polygon,pVoxelLimit,pAxis,pMin,pMax);
428 return;
429}

References G4VSolid::CalculateClippedPolygonExtent(), pMax, and pMin.

◆ ClipPolygon()

void G4VSolid::ClipPolygon ( G4ThreeVectorList pPolygon,
const G4VoxelLimits pVoxelLimit,
const EAxis  pAxis 
) const
protectedinherited

Definition at line 539 of file G4VSolid.cc.

542{
543 G4ThreeVectorList outputPolygon;
544
545 if ( pVoxelLimit.IsLimited() )
546 {
547 if (pVoxelLimit.IsXLimited() ) // && pAxis != kXAxis)
548 {
549 G4VoxelLimits simpleLimit1;
550 simpleLimit1.AddLimit(kXAxis,pVoxelLimit.GetMinXExtent(),kInfinity);
551 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
552
553 pPolygon.clear();
554
555 if ( !outputPolygon.size() ) return;
556
557 G4VoxelLimits simpleLimit2;
558 simpleLimit2.AddLimit(kXAxis,-kInfinity,pVoxelLimit.GetMaxXExtent());
559 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
560
561 if ( !pPolygon.size() ) return;
562 else outputPolygon.clear();
563 }
564 if ( pVoxelLimit.IsYLimited() ) // && pAxis != kYAxis)
565 {
566 G4VoxelLimits simpleLimit1;
567 simpleLimit1.AddLimit(kYAxis,pVoxelLimit.GetMinYExtent(),kInfinity);
568 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
569
570 // Must always clear pPolygon - for clip to simpleLimit2 and in case of
571 // early exit
572
573 pPolygon.clear();
574
575 if ( !outputPolygon.size() ) return;
576
577 G4VoxelLimits simpleLimit2;
578 simpleLimit2.AddLimit(kYAxis,-kInfinity,pVoxelLimit.GetMaxYExtent());
579 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
580
581 if ( !pPolygon.size() ) return;
582 else outputPolygon.clear();
583 }
584 if ( pVoxelLimit.IsZLimited() ) // && pAxis != kZAxis)
585 {
586 G4VoxelLimits simpleLimit1;
587 simpleLimit1.AddLimit(kZAxis,pVoxelLimit.GetMinZExtent(),kInfinity);
588 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
589
590 // Must always clear pPolygon - for clip to simpleLimit2 and in case of
591 // early exit
592
593 pPolygon.clear();
594
595 if ( !outputPolygon.size() ) return;
596
597 G4VoxelLimits simpleLimit2;
598 simpleLimit2.AddLimit(kZAxis,-kInfinity,pVoxelLimit.GetMaxZExtent());
599 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
600
601 // Return after final clip - no cleanup
602 }
603 }
604}
void ClipPolygonToSimpleLimits(G4ThreeVectorList &pPolygon, G4ThreeVectorList &outputPolygon, const G4VoxelLimits &pVoxelLimit) const
Definition: G4VSolid.cc:612
G4bool IsYLimited() const
G4double GetMinZExtent() const
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)
G4bool IsXLimited() const
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMinYExtent() const
G4double GetMinXExtent() const
G4bool IsZLimited() const
G4bool IsLimited() const
G4double GetMaxXExtent() const
@ kYAxis
Definition: geomdefs.hh:56
@ kXAxis
Definition: geomdefs.hh:55
@ kZAxis
Definition: geomdefs.hh:57
static const G4double kInfinity
Definition: geomdefs.hh:41

References G4VoxelLimits::AddLimit(), G4VSolid::ClipPolygonToSimpleLimits(), G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), G4VoxelLimits::IsLimited(), G4VoxelLimits::IsXLimited(), G4VoxelLimits::IsYLimited(), G4VoxelLimits::IsZLimited(), kInfinity, kXAxis, kYAxis, and kZAxis.

Referenced by G4VSolid::CalculateClippedPolygonExtent().

◆ ClipPolygonToSimpleLimits()

void G4VSolid::ClipPolygonToSimpleLimits ( G4ThreeVectorList pPolygon,
G4ThreeVectorList outputPolygon,
const G4VoxelLimits pVoxelLimit 
) const
privateinherited

Definition at line 612 of file G4VSolid.cc.

615{
616 G4int i;
617 G4int noVertices=pPolygon.size();
618 G4ThreeVector vEnd,vStart;
619
620 for (i = 0 ; i < noVertices ; ++i )
621 {
622 vStart = pPolygon[i];
623 if ( i == noVertices-1 ) vEnd = pPolygon[0];
624 else vEnd = pPolygon[i+1];
625
626 if ( pVoxelLimit.Inside(vStart) )
627 {
628 if (pVoxelLimit.Inside(vEnd))
629 {
630 // vStart and vEnd inside -> output end point
631 //
632 outputPolygon.push_back(vEnd);
633 }
634 else
635 {
636 // vStart inside, vEnd outside -> output crossing point
637 //
638 pVoxelLimit.ClipToLimits(vStart,vEnd);
639 outputPolygon.push_back(vEnd);
640 }
641 }
642 else
643 {
644 if (pVoxelLimit.Inside(vEnd))
645 {
646 // vStart outside, vEnd inside -> output inside section
647 //
648 pVoxelLimit.ClipToLimits(vStart,vEnd);
649 outputPolygon.push_back(vStart);
650 outputPolygon.push_back(vEnd);
651 }
652 else // Both point outside -> no output
653 {
654 // outputPolygon.push_back(vStart);
655 // outputPolygon.push_back(vEnd);
656 }
657 }
658 }
659}
G4bool ClipToLimits(G4ThreeVector &pStart, G4ThreeVector &pEnd) const
G4bool Inside(const G4ThreeVector &pVec) const

References G4VoxelLimits::ClipToLimits(), and G4VoxelLimits::Inside().

Referenced by G4VSolid::ClipPolygon().

◆ Clone()

G4VSolid * G4TwistedBox::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 123 of file G4TwistedBox.cc.

124{
125 return new G4TwistedBox(*this);
126}
G4TwistedBox(const G4String &pName, G4double pPhiTwist, G4double pDx, G4double pDy, G4double pDz)
Definition: G4TwistedBox.cc:38

References G4TwistedBox().

◆ ComputeDimensions()

void G4VTwistedFaceted::ComputeDimensions ( G4VPVParameterisation ,
const  G4int,
const G4VPhysicalVolume  
)
virtualinherited

Reimplemented from G4VSolid.

Definition at line 279 of file G4VTwistedFaceted.cc.

282{
283 G4Exception("G4VTwistedFaceted::ComputeDimensions()",
284 "GeomSolids0001", FatalException,
285 "G4VTwistedFaceted does not support Parameterisation.");
286}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35

References FatalException, and G4Exception().

◆ CreatePolyhedron()

G4Polyhedron * G4VTwistedFaceted::CreatePolyhedron ( ) const
virtualinherited

Reimplemented from G4VSolid.

Definition at line 1129 of file G4VTwistedFaceted.cc.

1130{
1131 // number of meshes
1132 const G4int k =
1134 std::abs(fPhiTwist) / twopi) + 2;
1135 const G4int n = k;
1136
1137 const G4int nnodes = 4*(k-1)*(n-2) + 2*k*k ;
1138 const G4int nfaces = 4*(k-1)*(n-1) + 2*(k-1)*(k-1) ;
1139
1140 G4Polyhedron* ph = new G4Polyhedron;
1141 typedef G4double G4double3[3];
1142 typedef G4int G4int4[4];
1143 G4double3* xyz = new G4double3[nnodes]; // number of nodes
1144 G4int4* faces = new G4int4[nfaces] ; // number of faces
1145
1146 fLowerEndcap->GetFacets(k,k,xyz,faces,0) ;
1147 fUpperEndcap->GetFacets(k,k,xyz,faces,1) ;
1148 fSide270->GetFacets(k,n,xyz,faces,2) ;
1149 fSide0->GetFacets(k,n,xyz,faces,3) ;
1150 fSide90->GetFacets(k,n,xyz,faces,4) ;
1151 fSide180->GetFacets(k,n,xyz,faces,5) ;
1152
1153 ph->createPolyhedron(nnodes,nfaces,xyz,faces);
1154
1155 return ph;
1156}
static constexpr double twopi
Definition: G4SIunits.hh:56
virtual void GetFacets(G4int m, G4int n, G4double xyz[][3], G4int faces[][4], G4int iside)=0
G4VTwistSurface * fSide180
G4VTwistSurface * fSide0
G4VTwistSurface * fSide90
G4VTwistSurface * fLowerEndcap
G4VTwistSurface * fSide270
G4VTwistSurface * fUpperEndcap
static G4int GetNumberOfRotationSteps()
G4int createPolyhedron(G4int Nnodes, G4int Nfaces, const G4double xyz[][3], const G4int faces[][4])

References HepPolyhedron::createPolyhedron(), G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fPhiTwist, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4VTwistSurface::GetFacets(), HepPolyhedron::GetNumberOfRotationSteps(), CLHEP::detail::n, and twopi.

Referenced by G4VTwistedFaceted::GetPolyhedron().

◆ CreateSurfaces()

void G4VTwistedFaceted::CreateSurfaces ( )
privateinherited

Definition at line 943 of file G4VTwistedFaceted.cc.

944{
945
946 // create 6 surfaces of TwistedTub.
947
948 if ( fDx1 == fDx2 && fDx3 == fDx4 ) // special case : Box
949 {
950 fSide0 = new G4TwistBoxSide("0deg", fPhiTwist, fDz, fTheta, fPhi,
951 fDy1, fDx1, fDx1, fDy2, fDx3, fDx3, fAlph, 0.*deg);
952 fSide180 = new G4TwistBoxSide("180deg", fPhiTwist, fDz, fTheta, fPhi+pi,
953 fDy1, fDx1, fDx1, fDy2, fDx3, fDx3, fAlph, 180.*deg);
954 }
955 else // default general case
956 {
958 fPhi, fDy1, fDx1, fDx2, fDy2, fDx3, fDx4, fAlph, 0.*deg);
960 fPhi+pi, fDy1, fDx2, fDx1, fDy2, fDx4, fDx3, fAlph, 180.*deg);
961 }
962
963 // create parallel sides
964 //
966 fPhi, fDy1, fDx1, fDx2, fDy2, fDx3, fDx4, fAlph, 0.*deg);
968 fPhi+pi, fDy1, fDx2, fDx1, fDy2, fDx4, fDx3, fAlph, 180.*deg);
969
970 // create endcaps
971 //
973 fDz, fAlph, fPhi, fTheta, 1 );
975 fDz, fAlph, fPhi, fTheta, -1 );
976
977 // Set neighbour surfaces
978
985
986}
static constexpr double pi
Definition: G4SIunits.hh:55
static constexpr double deg
Definition: G4SIunits.hh:132
void SetNeighbours(G4VTwistSurface *ax0min, G4VTwistSurface *ax1min, G4VTwistSurface *ax0max, G4VTwistSurface *ax1max)

References deg, G4VTwistedFaceted::fAlph, G4VTwistedFaceted::fDx1, G4VTwistedFaceted::fDx2, G4VTwistedFaceted::fDx3, G4VTwistedFaceted::fDx4, G4VTwistedFaceted::fDy1, G4VTwistedFaceted::fDy2, G4VTwistedFaceted::fDz, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fPhi, G4VTwistedFaceted::fPhiTwist, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fTheta, G4VTwistedFaceted::fUpperEndcap, pi, and G4VTwistSurface::SetNeighbours().

Referenced by G4VTwistedFaceted::G4VTwistedFaceted(), and G4VTwistedFaceted::operator=().

◆ DescribeYourselfTo()

void G4VTwistedFaceted::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtualinherited

Implements G4VSolid.

Definition at line 921 of file G4VTwistedFaceted.cc.

922{
923 scene.AddSolid (*this);
924}
virtual void AddSolid(const G4Box &)=0

References G4VGraphicsScene::AddSolid().

◆ DistanceToIn() [1/2]

G4double G4VTwistedFaceted::DistanceToIn ( const G4ThreeVector p) const
virtualinherited

Implements G4VSolid.

Definition at line 583 of file G4VTwistedFaceted.cc.

584{
585 // DistanceToIn(p):
586 // Calculate distance to surface of shape from `outside',
587 // allowing for tolerance
588 //
589
590 //
591 // checking last value
592 //
593
594 G4ThreeVector* tmpp;
595 G4double* tmpdist;
596 if (fLastDistanceToIn.p == p)
597 {
599 }
600 else
601 {
602 tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToIn.p));
603 tmpdist = const_cast<G4double*>(&(fLastDistanceToIn.value));
604 tmpp->set(p.x(), p.y(), p.z());
605 }
606
607 //
608 // Calculate DistanceToIn(p)
609 //
610
611 EInside currentside = Inside(p);
612
613 switch (currentside)
614 {
615 case (kInside) :
616 {
617 }
618
619 case (kSurface) :
620 {
621 *tmpdist = 0.;
623 }
624
625 case (kOutside) :
626 {
627 // Initialize
628 //
629 G4double distance = kInfinity;
630
631 // Find intersections and choose nearest one
632 //
633 G4VTwistSurface* surfaces[6];
634
635 surfaces[0] = fSide0;
636 surfaces[1] = fSide90 ;
637 surfaces[2] = fSide180 ;
638 surfaces[3] = fSide270 ;
639 surfaces[4] = fLowerEndcap;
640 surfaces[5] = fUpperEndcap;
641
642 G4ThreeVector xx;
643 G4ThreeVector bestxx;
644 for (auto i=0; i< 6; ++i)
645 {
646 G4double tmpdistance = surfaces[i]->DistanceTo(p, xx);
647 if (tmpdistance < distance)
648 {
649 distance = tmpdistance;
650 bestxx = xx;
651 }
652 }
653 *tmpdist = distance;
655 }
656
657 default:
658 {
659 G4Exception("G4VTwistedFaceted::DistanceToIn(p)", "GeomSolids0003",
660 FatalException, "Unknown point location!");
661 }
662 } // switch end
663
664 return 0.;
665}
double z() const
double x() const
double y() const
void set(double x, double y, double z)
virtual G4double DistanceTo(const G4ThreeVector &gp, G4ThreeVector &gxx)
virtual EInside Inside(const G4ThreeVector &p) const
EInside
Definition: geomdefs.hh:67
@ kInside
Definition: geomdefs.hh:70
@ kOutside
Definition: geomdefs.hh:68
@ kSurface
Definition: geomdefs.hh:69

References G4VTwistSurface::DistanceTo(), FatalException, G4VTwistedFaceted::fLastDistanceToIn, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4Exception(), G4VTwistedFaceted::Inside(), kInfinity, kInside, kOutside, kSurface, G4VTwistedFaceted::LastValue::p, CLHEP::Hep3Vector::set(), G4VTwistedFaceted::LastValue::value, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ DistanceToIn() [2/2]

G4double G4VTwistedFaceted::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtualinherited

Implements G4VSolid.

Definition at line 482 of file G4VTwistedFaceted.cc.

484{
485
486 // DistanceToIn (p, v):
487 // Calculate distance to surface of shape from `outside'
488 // along with the v, allowing for tolerance.
489 // The function returns kInfinity if no intersection or
490 // just grazing within tolerance.
491
492 //
493 // checking last value
494 //
495
496 G4ThreeVector* tmpp;
497 G4ThreeVector* tmpv;
498 G4double* tmpdist;
500 {
502 }
503 else
504 {
505 tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToInWithV.p));
506 tmpv = const_cast<G4ThreeVector*>(&(fLastDistanceToInWithV.vec));
507 tmpdist = const_cast<G4double*>(&(fLastDistanceToInWithV.value));
508 tmpp->set(p.x(), p.y(), p.z());
509 tmpv->set(v.x(), v.y(), v.z());
510 }
511
512 //
513 // Calculate DistanceToIn(p,v)
514 //
515
516 EInside currentside = Inside(p);
517
518 if (currentside == kInside)
519 {
520 }
521 else if (currentside == kSurface)
522 {
523 // particle is just on a boundary.
524 // if the particle is entering to the volume, return 0
525 //
527 if (normal*v < 0)
528 {
529 *tmpdist = 0.;
531 }
532 }
533
534 // now, we can take smallest positive distance.
535
536 // Initialize
537 //
538 G4double distance = kInfinity;
539
540 // Find intersections and choose nearest one
541 //
542 G4VTwistSurface *surfaces[6];
543
544 surfaces[0] = fSide0;
545 surfaces[1] = fSide90 ;
546 surfaces[2] = fSide180 ;
547 surfaces[3] = fSide270 ;
548 surfaces[4] = fLowerEndcap;
549 surfaces[5] = fUpperEndcap;
550
551 G4ThreeVector xx;
552 G4ThreeVector bestxx;
553 for (auto i=0; i < 6 ; ++i)
554 {
555#ifdef G4TWISTDEBUG
556 G4cout << G4endl << "surface " << i << ": " << G4endl << G4endl ;
557#endif
558 G4double tmpdistance = surfaces[i]->DistanceToIn(p, v, xx);
559#ifdef G4TWISTDEBUG
560 G4cout << "Solid DistanceToIn : distance = " << tmpdistance << G4endl ;
561 G4cout << "intersection point = " << xx << G4endl ;
562#endif
563 if (tmpdistance < distance)
564 {
565 distance = tmpdistance;
566 bestxx = xx;
567 }
568 }
569
570#ifdef G4TWISTDEBUG
571 G4cout << "best distance = " << distance << G4endl ;
572#endif
573
574 *tmpdist = distance;
575 // timer.Stop();
577}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
virtual G4double DistanceToIn(const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector &gxxbest)
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
LastValueWithDoubleVector fLastDistanceToInWithV
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:79

References G4VTwistSurface::DistanceToIn(), G4VTwistedFaceted::fLastDistanceToIn, G4VTwistedFaceted::fLastDistanceToInWithV, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4cout, G4endl, G4VTwistedFaceted::Inside(), kInfinity, kInside, kSurface, CLHEP::normal(), G4VTwistedFaceted::LastValueWithDoubleVector::p, CLHEP::Hep3Vector::set(), G4VTwistedFaceted::SurfaceNormal(), G4VTwistedFaceted::LastValue::value, G4VTwistedFaceted::LastValueWithDoubleVector::value, G4VTwistedFaceted::LastValueWithDoubleVector::vec, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ DistanceToOut() [1/2]

G4double G4VTwistedFaceted::DistanceToOut ( const G4ThreeVector p) const
virtualinherited

Implements G4VSolid.

Definition at line 779 of file G4VTwistedFaceted.cc.

780{
781 // DistanceToOut(p):
782 // Calculate distance to surface of shape from `inside',
783 // allowing for tolerance
784
785 //
786 // checking last value
787 //
788
789 G4ThreeVector* tmpp;
790 G4double* tmpdist;
791
792 if (fLastDistanceToOut.p == p)
793 {
795 }
796 else
797 {
798 tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToOut.p));
799 tmpdist = const_cast<G4double*>(&(fLastDistanceToOut.value));
800 tmpp->set(p.x(), p.y(), p.z());
801 }
802
803 //
804 // Calculate DistanceToOut(p)
805 //
806
807 EInside currentside = Inside(p);
808 G4double retval = kInfinity;
809
810 switch (currentside)
811 {
812 case (kOutside) :
813 {
814#ifdef G4SPECSDEBUG
815 G4int oldprc = G4cout.precision(16) ;
816 G4cout << G4endl ;
817 DumpInfo();
818 G4cout << "Position:" << G4endl << G4endl ;
819 G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl ;
820 G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl ;
821 G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl ;
822 G4cout.precision(oldprc) ;
823 G4Exception("G4VTwistedFaceted::DistanceToOut(p)", "GeomSolids1002",
824 JustWarning, "Point p is outside !?" );
825#endif
826 break;
827 }
828 case (kSurface) :
829 {
830 *tmpdist = 0.;
831 retval = fLastDistanceToOut.value;
832 break;
833 }
834
835 case (kInside) :
836 {
837 // Initialize
838 //
839 G4double distance = kInfinity;
840
841 // find intersections and choose nearest one
842 //
843 G4VTwistSurface* surfaces[6];
844
845 surfaces[0] = fSide0;
846 surfaces[1] = fSide90 ;
847 surfaces[2] = fSide180 ;
848 surfaces[3] = fSide270 ;
849 surfaces[4] = fLowerEndcap;
850 surfaces[5] = fUpperEndcap;
851
852 G4ThreeVector xx;
853 G4ThreeVector bestxx;
854 for (auto i=0; i<6; ++i)
855 {
856 G4double tmpdistance = surfaces[i]->DistanceTo(p, xx);
857 if (tmpdistance < distance)
858 {
859 distance = tmpdistance;
860 bestxx = xx;
861 }
862 }
863 *tmpdist = distance;
864
865 retval = fLastDistanceToOut.value;
866 break;
867 }
868
869 default :
870 {
871 G4Exception("G4VTwistedFaceted::DistanceToOut(p)", "GeomSolids0003",
872 FatalException, "Unknown point location!");
873 break;
874 }
875 } // switch end
876
877 return retval;
878}
@ JustWarning
static constexpr double mm
Definition: G4SIunits.hh:95
void DumpInfo() const

References G4VTwistSurface::DistanceTo(), G4VSolid::DumpInfo(), FatalException, G4VTwistedFaceted::fLastDistanceToOut, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4cout, G4endl, G4Exception(), G4VTwistedFaceted::Inside(), JustWarning, kInfinity, kInside, kOutside, kSurface, mm, G4VTwistedFaceted::LastValue::p, CLHEP::Hep3Vector::set(), G4VTwistedFaceted::LastValue::value, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ DistanceToOut() [2/2]

G4double G4VTwistedFaceted::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcnorm = false,
G4bool validnorm = nullptr,
G4ThreeVector n = nullptr 
) const
virtualinherited

Implements G4VSolid.

Definition at line 672 of file G4VTwistedFaceted.cc.

677{
678 // DistanceToOut (p, v):
679 // Calculate distance to surface of shape from `inside'
680 // along with the v, allowing for tolerance.
681 // The function returns kInfinity if no intersection or
682 // just grazing within tolerance.
683
684 //
685 // checking last value
686 //
687
688 G4ThreeVector* tmpp;
689 G4ThreeVector* tmpv;
690 G4double* tmpdist;
692 {
694 }
695 else
696 {
697 tmpp = const_cast<G4ThreeVector*>(&(fLastDistanceToOutWithV.p));
698 tmpv = const_cast<G4ThreeVector*>(&(fLastDistanceToOutWithV.vec));
699 tmpdist = const_cast<G4double*>(&(fLastDistanceToOutWithV.value));
700 tmpp->set(p.x(), p.y(), p.z());
701 tmpv->set(v.x(), v.y(), v.z());
702 }
703
704 //
705 // Calculate DistanceToOut(p,v)
706 //
707
708 EInside currentside = Inside(p);
709
710 if (currentside == kOutside)
711 {
712 }
713 else if (currentside == kSurface)
714 {
715 // particle is just on a boundary.
716 // if the particle is exiting from the volume, return 0
717 //
719 G4VTwistSurface *blockedsurface = fLastNormal.surface[0];
720 if (normal*v > 0)
721 {
722 if (calcNorm)
723 {
724 *norm = (blockedsurface->GetNormal(p, true));
725 *validNorm = blockedsurface->IsValidNorm();
726 }
727 *tmpdist = 0.;
728 // timer.Stop();
730 }
731 }
732
733 // now, we can take smallest positive distance.
734
735 // Initialize
736 G4double distance = kInfinity;
737
738 // find intersections and choose nearest one.
739 G4VTwistSurface *surfaces[6];
740
741 surfaces[0] = fSide0;
742 surfaces[1] = fSide90 ;
743 surfaces[2] = fSide180 ;
744 surfaces[3] = fSide270 ;
745 surfaces[4] = fLowerEndcap;
746 surfaces[5] = fUpperEndcap;
747
748 G4int besti = -1;
749 G4ThreeVector xx;
750 G4ThreeVector bestxx;
751 for (auto i=0; i<6 ; ++i)
752 {
753 G4double tmpdistance = surfaces[i]->DistanceToOut(p, v, xx);
754 if (tmpdistance < distance)
755 {
756 distance = tmpdistance;
757 bestxx = xx;
758 besti = i;
759 }
760 }
761
762 if (calcNorm)
763 {
764 if (besti != -1)
765 {
766 *norm = (surfaces[besti]->GetNormal(p, true));
767 *validNorm = surfaces[besti]->IsValidNorm();
768 }
769 }
770
771 *tmpdist = distance;
773}
G4bool IsValidNorm() const
virtual G4double DistanceToOut(const G4ThreeVector &gp, const G4ThreeVector &gv, G4ThreeVector &gxxbest)
virtual G4ThreeVector GetNormal(const G4ThreeVector &xx, G4bool isGlobal)=0
LastValueWithDoubleVector fLastDistanceToOutWithV

References G4VTwistSurface::DistanceToOut(), G4VTwistedFaceted::fLastDistanceToOutWithV, G4VTwistedFaceted::fLastNormal, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4VTwistSurface::GetNormal(), G4VTwistedFaceted::Inside(), G4VTwistSurface::IsValidNorm(), kInfinity, kOutside, kSurface, CLHEP::normal(), G4VTwistedFaceted::LastValueWithDoubleVector::p, CLHEP::Hep3Vector::set(), G4VTwistedFaceted::LastVector::surface, G4VTwistedFaceted::SurfaceNormal(), G4VTwistedFaceted::LastValueWithDoubleVector::value, G4VTwistedFaceted::LastValueWithDoubleVector::vec, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ DumpInfo()

void G4VSolid::DumpInfo ( ) const
inlineinherited

Referenced by G4Cons::ApproxSurfaceNormal(), G4CutTubs::ApproxSurfaceNormal(), G4Sphere::ApproxSurfaceNormal(), G4Torus::ApproxSurfaceNormal(), G4Tubs::ApproxSurfaceNormal(), G4ReflectedSolid::BoundingLimits(), G4DisplacedSolid::BoundingLimits(), G4IntersectionSolid::BoundingLimits(), G4ScaledSolid::BoundingLimits(), G4SubtractionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4Box::BoundingLimits(), G4Cons::BoundingLimits(), G4CutTubs::BoundingLimits(), G4Orb::BoundingLimits(), G4Para::BoundingLimits(), G4Sphere::BoundingLimits(), G4Torus::BoundingLimits(), G4Trap::BoundingLimits(), G4Trd::BoundingLimits(), G4Tubs::BoundingLimits(), G4EllipticalCone::BoundingLimits(), G4ExtrudedSolid::BoundingLimits(), G4GenericPolycone::BoundingLimits(), G4GenericTrap::BoundingLimits(), G4Hype::BoundingLimits(), G4Paraboloid::BoundingLimits(), G4Polycone::BoundingLimits(), G4Polyhedra::BoundingLimits(), G4TessellatedSolid::BoundingLimits(), G4TwistedTubs::BoundingLimits(), G4ParameterisationBoxX::ComputeDimensions(), G4ParameterisationBoxY::ComputeDimensions(), G4ParameterisationBoxZ::ComputeDimensions(), G4ParameterisationConsRho::ComputeDimensions(), G4ParameterisationConsPhi::ComputeDimensions(), G4ParameterisationConsZ::ComputeDimensions(), G4ParameterisationParaX::ComputeDimensions(), G4ParameterisationParaY::ComputeDimensions(), G4ParameterisationParaZ::ComputeDimensions(), G4ParameterisationPolyconeRho::ComputeDimensions(), G4ParameterisationPolyconePhi::ComputeDimensions(), G4ParameterisationPolyconeZ::ComputeDimensions(), G4ParameterisationPolyhedraRho::ComputeDimensions(), G4ParameterisationPolyhedraPhi::ComputeDimensions(), G4ParameterisationPolyhedraZ::ComputeDimensions(), G4ParameterisationTrdX::ComputeDimensions(), G4ParameterisationTrdY::ComputeDimensions(), G4ParameterisationTrdZ::ComputeDimensions(), G4ParameterisationTubsRho::ComputeDimensions(), G4ParameterisationTubsPhi::ComputeDimensions(), G4ParameterisationTubsZ::ComputeDimensions(), G4ReflectedSolid::ComputeDimensions(), G4DisplacedSolid::ComputeDimensions(), G4ScaledSolid::ComputeDimensions(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4DisplacedSolid::CreatePolyhedron(), G4ScaledSolid::CreatePolyhedron(), G4SubtractionSolid::DistanceToIn(), G4Box::DistanceToOut(), G4Orb::DistanceToOut(), G4Para::DistanceToOut(), G4Trap::DistanceToOut(), G4Trd::DistanceToOut(), G4Paraboloid::DistanceToOut(), G4VTwistedFaceted::DistanceToOut(), G4Cons::DistanceToOut(), G4CutTubs::DistanceToOut(), G4Sphere::DistanceToOut(), G4Torus::DistanceToOut(), G4Tubs::DistanceToOut(), G4Ellipsoid::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4EllipticalTube::DistanceToOut(), G4GenericTrap::DistanceToOut(), export_G4VSolid(), G4Polycone::G4Polycone(), G4Polyhedra::G4Polyhedra(), G4BooleanSolid::GetConstituentSolid(), G4NavigationLogger::PostComputeStepLog(), G4Box::SurfaceNormal(), G4Para::SurfaceNormal(), G4Trap::SurfaceNormal(), G4Trd::SurfaceNormal(), G4Ellipsoid::SurfaceNormal(), G4EllipticalCone::SurfaceNormal(), G4EllipticalTube::SurfaceNormal(), G4ExtrudedSolid::SurfaceNormal(), and G4Tet::SurfaceNormal().

◆ EstimateCubicVolume()

G4double G4VSolid::EstimateCubicVolume ( G4int  nStat,
G4double  epsilon 
) const
inherited

Definition at line 203 of file G4VSolid.cc.

204{
205 G4int iInside=0;
206 G4double px,py,pz,minX,maxX,minY,maxY,minZ,maxZ,volume,halfepsilon;
208 EInside in;
209
210 // values needed for CalculateExtent signature
211
212 G4VoxelLimits limit; // Unlimited
213 G4AffineTransform origin;
214
215 // min max extents of pSolid along X,Y,Z
216
217 CalculateExtent(kXAxis,limit,origin,minX,maxX);
218 CalculateExtent(kYAxis,limit,origin,minY,maxY);
219 CalculateExtent(kZAxis,limit,origin,minZ,maxZ);
220
221 // limits
222
223 if(nStat < 100) nStat = 100;
224 if(epsilon > 0.01) epsilon = 0.01;
225 halfepsilon = 0.5*epsilon;
226
227 for(auto i = 0; i < nStat; ++i )
228 {
229 px = minX-halfepsilon+(maxX-minX+epsilon)*G4QuickRand();
230 py = minY-halfepsilon+(maxY-minY+epsilon)*G4QuickRand();
231 pz = minZ-halfepsilon+(maxZ-minZ+epsilon)*G4QuickRand();
232 p = G4ThreeVector(px,py,pz);
233 in = Inside(p);
234 if(in != kOutside) ++iInside;
235 }
236 volume = (maxX-minX+epsilon)*(maxY-minY+epsilon)
237 * (maxZ-minZ+epsilon)*iInside/nStat;
238 return volume;
239}
G4double epsilon(G4double density, G4double temperature)
static const G4int maxZ
G4double G4QuickRand()
Definition: G4QuickRand.hh:34
CLHEP::Hep3Vector G4ThreeVector
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
virtual EInside Inside(const G4ThreeVector &p) const =0

References G4VSolid::CalculateExtent(), epsilon(), G4QuickRand(), G4VSolid::Inside(), kOutside, kXAxis, kYAxis, kZAxis, and maxZ.

Referenced by G4VSolid::GetCubicVolume(), G4BooleanSolid::GetCubicVolume(), and G4VCSGfaceted::GetCubicVolume().

◆ EstimateSurfaceArea()

G4double G4VSolid::EstimateSurfaceArea ( G4int  nStat,
G4double  ell 
) const
inherited

Definition at line 265 of file G4VSolid.cc.

266{
267 static const G4double s2 = 1./std::sqrt(2.);
268 static const G4double s3 = 1./std::sqrt(3.);
269 static const G4ThreeVector directions[64] =
270 {
271 G4ThreeVector( 0, 0, 0), G4ThreeVector( -1, 0, 0), // ( , , ) ( -, , )
272 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +, , ) (-+, , )
273 G4ThreeVector( 0, -1, 0), G4ThreeVector(-s2,-s2, 0), // ( , -, ) ( -, -, )
274 G4ThreeVector( s2, -s2, 0), G4ThreeVector( 0, -1, 0), // ( +, -, ) (-+, -, )
275
276 G4ThreeVector( 0, 1, 0), G4ThreeVector( -s2, s2, 0), // ( , +, ) ( -, +, )
277 G4ThreeVector( s2, s2, 0), G4ThreeVector( 0, 1, 0), // ( +, +, ) (-+, +, )
278 G4ThreeVector( 0, -1, 0), G4ThreeVector( -1, 0, 0), // ( ,-+, ) ( -,-+, )
279 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +,-+, ) (-+,-+, )
280
281 G4ThreeVector( 0, 0, -1), G4ThreeVector(-s2, 0,-s2), // ( , , -) ( -, , -)
282 G4ThreeVector( s2, 0,-s2), G4ThreeVector( 0, 0, -1), // ( +, , -) (-+, , -)
283 G4ThreeVector( 0,-s2,-s2), G4ThreeVector(-s3,-s3,-s3), // ( , -, -) ( -, -, -)
284 G4ThreeVector( s3,-s3,-s3), G4ThreeVector( 0,-s2,-s2), // ( +, -, -) (-+, -, -)
285
286 G4ThreeVector( 0, s2,-s2), G4ThreeVector(-s3, s3,-s3), // ( , +, -) ( -, +, -)
287 G4ThreeVector( s3, s3,-s3), G4ThreeVector( 0, s2,-s2), // ( +, +, -) (-+, +, -)
288 G4ThreeVector( 0, 0, -1), G4ThreeVector(-s2, 0,-s2), // ( ,-+, -) ( -,-+, -)
289 G4ThreeVector( s2, 0,-s2), G4ThreeVector( 0, 0, -1), // ( +,-+, -) (-+,-+, -)
290
291 G4ThreeVector( 0, 0, 1), G4ThreeVector(-s2, 0, s2), // ( , , +) ( -, , +)
292 G4ThreeVector( s2, 0, s2), G4ThreeVector( 0, 0, 1), // ( +, , +) (-+, , +)
293 G4ThreeVector( 0,-s2, s2), G4ThreeVector(-s3,-s3, s3), // ( , -, +) ( -, -, +)
294 G4ThreeVector( s3,-s3, s3), G4ThreeVector( 0,-s2, s2), // ( +, -, +) (-+, -, +)
295
296 G4ThreeVector( 0, s2, s2), G4ThreeVector(-s3, s3, s3), // ( , +, +) ( -, +, +)
297 G4ThreeVector( s3, s3, s3), G4ThreeVector( 0, s2, s2), // ( +, +, +) (-+, +, +)
298 G4ThreeVector( 0, 0, 1), G4ThreeVector(-s2, 0, s2), // ( ,-+, +) ( -,-+, +)
299 G4ThreeVector( s2, 0, s2), G4ThreeVector( 0, 0, 1), // ( +,-+, +) (-+,-+, +)
300
301 G4ThreeVector( 0, 0, -1), G4ThreeVector( -1, 0, 0), // ( , ,-+) ( -, ,-+)
302 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +, ,-+) (-+, ,-+)
303 G4ThreeVector( 0, -1, 0), G4ThreeVector(-s2,-s2, 0), // ( , -,-+) ( -, -,-+)
304 G4ThreeVector( s2, -s2, 0), G4ThreeVector( 0, -1, 0), // ( +, -,-+) (-+, -,-+)
305
306 G4ThreeVector( 0, 1, 0), G4ThreeVector( -s2, s2, 0), // ( , +,-+) ( -, +,-+)
307 G4ThreeVector( s2, s2, 0), G4ThreeVector( 0, 1, 0), // ( +, +,-+) (-+, +,-+)
308 G4ThreeVector( 0, -1, 0), G4ThreeVector( -1, 0, 0), // ( ,-+,-+) ( -,-+,-+)
309 G4ThreeVector( 1, 0, 0), G4ThreeVector( -1, 0, 0), // ( +,-+,-+) (-+,-+,-+)
310 };
311
312 G4ThreeVector bmin, bmax;
313 BoundingLimits(bmin, bmax);
314
315 G4double dX = bmax.x() - bmin.x();
316 G4double dY = bmax.y() - bmin.y();
317 G4double dZ = bmax.z() - bmin.z();
318
319 // Define statistics and shell thickness
320 //
321 G4int npoints = (nstat < 1000) ? 1000 : nstat;
322 G4double coeff = 0.5 / std::cbrt(G4double(npoints));
323 G4double eps = (ell > 0) ? ell : coeff * std::min(std::min(dX, dY), dZ);
324 G4double del = 1.8 * eps; // shold be more than sqrt(3.)
325
326 G4double minX = bmin.x() - eps;
327 G4double minY = bmin.y() - eps;
328 G4double minZ = bmin.z() - eps;
329
330 G4double dd = 2. * eps;
331 dX += dd;
332 dY += dd;
333 dZ += dd;
334
335 // Calculate surface area
336 //
337 G4int icount = 0;
338 for(auto i = 0; i < npoints; ++i)
339 {
340 G4double px = minX + dX*G4QuickRand();
341 G4double py = minY + dY*G4QuickRand();
342 G4double pz = minZ + dZ*G4QuickRand();
343 G4ThreeVector p = G4ThreeVector(px, py, pz);
344 EInside in = Inside(p);
345 G4double dist = 0;
346 if (in == kInside)
347 {
348 if (DistanceToOut(p) >= eps) continue;
349 G4int icase = 0;
350 if (Inside(G4ThreeVector(px-del, py, pz)) != kInside) icase += 1;
351 if (Inside(G4ThreeVector(px+del, py, pz)) != kInside) icase += 2;
352 if (Inside(G4ThreeVector(px, py-del, pz)) != kInside) icase += 4;
353 if (Inside(G4ThreeVector(px, py+del, pz)) != kInside) icase += 8;
354 if (Inside(G4ThreeVector(px, py, pz-del)) != kInside) icase += 16;
355 if (Inside(G4ThreeVector(px, py, pz+del)) != kInside) icase += 32;
356 if (icase == 0) continue;
357 G4ThreeVector v = directions[icase];
358 dist = DistanceToOut(p, v);
359 G4ThreeVector n = SurfaceNormal(p + v*dist);
360 dist *= v.dot(n);
361 }
362 else if (in == kOutside)
363 {
364 if (DistanceToIn(p) >= eps) continue;
365 G4int icase = 0;
366 if (Inside(G4ThreeVector(px-del, py, pz)) != kOutside) icase += 1;
367 if (Inside(G4ThreeVector(px+del, py, pz)) != kOutside) icase += 2;
368 if (Inside(G4ThreeVector(px, py-del, pz)) != kOutside) icase += 4;
369 if (Inside(G4ThreeVector(px, py+del, pz)) != kOutside) icase += 8;
370 if (Inside(G4ThreeVector(px, py, pz-del)) != kOutside) icase += 16;
371 if (Inside(G4ThreeVector(px, py, pz+del)) != kOutside) icase += 32;
372 if (icase == 0) continue;
373 G4ThreeVector v = directions[icase];
374 dist = DistanceToIn(p, v);
375 if (dist == kInfinity) continue;
376 G4ThreeVector n = SurfaceNormal(p + v*dist);
377 dist *= -(v.dot(n));
378 }
379 if (dist < eps) ++icount;
380 }
381 return dX*dY*dZ*icount/npoints/dd;
382}
static const G4double eps
double dot(const Hep3Vector &) const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition: G4VSolid.cc:665
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
T min(const T t1, const T t2)
brief Return the smallest of the two arguments

References G4VSolid::BoundingLimits(), G4VSolid::DistanceToIn(), G4VSolid::DistanceToOut(), CLHEP::Hep3Vector::dot(), eps, G4QuickRand(), G4VSolid::Inside(), kInfinity, kInside, kOutside, G4INCL::Math::min(), CLHEP::detail::n, G4VSolid::SurfaceNormal(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by G4VSolid::GetSurfaceArea(), G4MultiUnion::GetSurfaceArea(), and G4VCSGfaceted::GetSurfaceArea().

◆ GetAlpha()

G4double G4VTwistedFaceted::GetAlpha ( ) const
inlineinherited

Definition at line 121 of file G4VTwistedFaceted.hh.

121{ return fAlph ; }

References G4VTwistedFaceted::fAlph.

Referenced by G4TwistedTrap::GetTiltAngleAlpha().

◆ GetConstituentSolid() [1/2]

G4VSolid * G4VSolid::GetConstituentSolid ( G4int  no)
virtualinherited

Reimplemented in G4BooleanSolid.

Definition at line 170 of file G4VSolid.cc.

171{ return nullptr; }

◆ GetConstituentSolid() [2/2]

const G4VSolid * G4VSolid::GetConstituentSolid ( G4int  no) const
virtualinherited

Reimplemented in G4BooleanSolid.

Definition at line 167 of file G4VSolid.cc.

168{ return nullptr; }

Referenced by G4BooleanSolid::StackPolyhedron().

◆ GetCubicVolume()

G4double G4VTwistedFaceted::GetCubicVolume ( )
inlinevirtualinherited

◆ GetDisplacedSolidPtr() [1/2]

G4DisplacedSolid * G4VSolid::GetDisplacedSolidPtr ( )
virtualinherited

Reimplemented in G4DisplacedSolid.

Definition at line 176 of file G4VSolid.cc.

177{ return nullptr; }

◆ GetDisplacedSolidPtr() [2/2]

const G4DisplacedSolid * G4VSolid::GetDisplacedSolidPtr ( ) const
virtualinherited

Reimplemented in G4DisplacedSolid.

Definition at line 173 of file G4VSolid.cc.

174{ return nullptr; }

◆ GetDx1()

G4double G4VTwistedFaceted::GetDx1 ( ) const
inlineinherited

◆ GetDx2()

G4double G4VTwistedFaceted::GetDx2 ( ) const
inlineinherited

Definition at line 113 of file G4VTwistedFaceted.hh.

113{ return fDx2 ; }

References G4VTwistedFaceted::fDx2.

Referenced by G4TwistedTrap::GetX2HalfLength().

◆ GetDx3()

G4double G4VTwistedFaceted::GetDx3 ( ) const
inlineinherited

Definition at line 114 of file G4VTwistedFaceted.hh.

114{ return fDx3 ; }

References G4VTwistedFaceted::fDx3.

Referenced by G4TwistedTrd::GetX2HalfLength(), and G4TwistedTrap::GetX3HalfLength().

◆ GetDx4()

G4double G4VTwistedFaceted::GetDx4 ( ) const
inlineinherited

Definition at line 115 of file G4VTwistedFaceted.hh.

115{ return fDx4 ; }

References G4VTwistedFaceted::fDx4.

Referenced by G4TwistedTrap::GetX4HalfLength().

◆ GetDy1()

G4double G4VTwistedFaceted::GetDy1 ( ) const
inlineinherited

◆ GetDy2()

G4double G4VTwistedFaceted::GetDy2 ( ) const
inlineinherited

Definition at line 117 of file G4VTwistedFaceted.hh.

117{ return fDy2 ; }

References G4VTwistedFaceted::fDy2.

Referenced by G4TwistedTrap::GetY2HalfLength(), and G4TwistedTrd::GetY2HalfLength().

◆ GetDz()

G4double G4VTwistedFaceted::GetDz ( ) const
inlineinherited

Definition at line 118 of file G4VTwistedFaceted.hh.

118{ return fDz ; }

References G4VTwistedFaceted::fDz.

Referenced by GetZHalfLength(), G4TwistedTrap::GetZHalfLength(), and G4TwistedTrd::GetZHalfLength().

◆ GetEntityType()

G4GeometryType G4TwistedBox::GetEntityType ( ) const
virtual

Reimplemented from G4VTwistedFaceted.

Definition at line 115 of file G4TwistedBox.cc.

116{
117 return G4String("G4TwistedBox");
118}

◆ GetExtent()

G4VisExtent G4VTwistedFaceted::GetExtent ( ) const
virtualinherited

Reimplemented from G4VSolid.

Definition at line 930 of file G4VTwistedFaceted.cc.

931{
932 G4double maxRad = std::sqrt( fDx*fDx + fDy*fDy);
933
934 return G4VisExtent(-maxRad, maxRad ,
935 -maxRad, maxRad ,
936 -fDz, fDz );
937}

References G4VTwistedFaceted::fDx, G4VTwistedFaceted::fDy, and G4VTwistedFaceted::fDz.

◆ GetName()

G4String G4VSolid::GetName ( ) const
inlineinherited

Referenced by G4GMocrenFileSceneHandler::AddDetector(), G4HepRepFileSceneHandler::AddHepRepInstance(), G4GMocrenFileSceneHandler::AddPrimitive(), G4HepRepFileSceneHandler::AddSolid(), G4GMocrenFileSceneHandler::AddSolid(), G4VtkSceneHandler::AddSolid(), G4GDMLWriteSolids::AddSolid(), G4NavigationLogger::AlongComputeStepLog(), G4GDMLWriteSolids::BooleanWrite(), G4ReflectedSolid::BoundingLimits(), G4DisplacedSolid::BoundingLimits(), G4IntersectionSolid::BoundingLimits(), G4ScaledSolid::BoundingLimits(), G4SubtractionSolid::BoundingLimits(), G4UnionSolid::BoundingLimits(), G4Box::BoundingLimits(), G4Cons::BoundingLimits(), G4CutTubs::BoundingLimits(), G4Orb::BoundingLimits(), G4Para::BoundingLimits(), G4Sphere::BoundingLimits(), G4Torus::BoundingLimits(), G4Trap::BoundingLimits(), G4Trd::BoundingLimits(), G4Tubs::BoundingLimits(), G4EllipticalCone::BoundingLimits(), G4ExtrudedSolid::BoundingLimits(), G4GenericPolycone::BoundingLimits(), G4GenericTrap::BoundingLimits(), G4Hype::BoundingLimits(), G4Paraboloid::BoundingLimits(), G4Polycone::BoundingLimits(), G4Polyhedra::BoundingLimits(), G4TessellatedSolid::BoundingLimits(), G4TwistedTubs::BoundingLimits(), G4GDMLWriteSolids::BoxWrite(), G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4NavigationLogger::CheckDaughterEntryPoint(), G4VDivisionParameterisation::CheckNDivAndWidth(), G4VDivisionParameterisation::CheckOffset(), G4GenericTrap::CheckOrder(), G4Para::CheckParameters(), G4Trap::CheckParameters(), G4Trd::CheckParameters(), G4Ellipsoid::CheckParameters(), G4EllipticalTube::CheckParameters(), G4ParameterisationPolyconeRho::CheckParametersValidity(), G4ParameterisationPolyconeZ::CheckParametersValidity(), G4ParameterisationPolyhedraRho::CheckParametersValidity(), G4ParameterisationPolyhedraPhi::CheckParametersValidity(), G4ParameterisationPolyhedraZ::CheckParametersValidity(), G4PhantomParameterisation::CheckVoxelsFillContainer(), G4GenericTrap::ComputeIsTwisted(), G4VoxelNavigation::ComputeSafety(), G4VoxelSafety::ComputeSafety(), G4NavigationLogger::ComputeSafetyLog(), G4ParameterisedNavigation::ComputeStep(), G4ReplicaNavigation::ComputeStep(), G4GDMLWriteSolids::ConeWrite(), G4Polyhedra::Create(), G4GenericPolycone::Create(), G4Polycone::Create(), G4PhysicalVolumeModel::CreateCurrentAttValues(), G4ReflectedSolid::CreatePolyhedron(), G4ReflectionFactory::CreateReflectedLV(), G4GenericTrap::CreateTessellatedSolid(), G4GDMLWriteSolids::CutTubeWrite(), G4SolidStore::DeRegister(), G4PhysicalVolumeModel::DescribeSolid(), G4SubtractionSolid::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4TessellatedSolid::DistanceToIn(), G4Box::DistanceToOut(), G4Orb::DistanceToOut(), G4Para::DistanceToOut(), G4Trap::DistanceToOut(), G4Trd::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4TessellatedSolid::DistanceToOut(), G4Ellipsoid::DistanceToOut(), G4EllipticalTube::DistanceToOut(), G4tgbGeometryDumper::DumpMultiUnionVolume(), G4tgbGeometryDumper::DumpScaledVolume(), G4tgbGeometryDumper::DumpSolid(), G4GDMLWriteSolids::ElconeWrite(), G4GDMLWriteSolids::EllipsoidWrite(), G4GDMLWriteSolids::EltubeWrite(), G4PVDivision::ErrorInAxis(), G4ReplicatedSlice::ErrorInAxis(), export_G4VSolid(), G4Box::G4Box(), G4Cons::G4Cons(), G4CutTubs::G4CutTubs(), G4EllipticalCone::G4EllipticalCone(), G4Hype::G4Hype(), G4Para::G4Para(), G4Paraboloid::G4Paraboloid(), G4Polycone::G4Polycone(), G4Polyhedra::G4Polyhedra(), G4Sphere::G4Sphere(), G4Tet::G4Tet(), G4Trap::G4Trap(), G4Tubs::G4Tubs(), G4VParameterisationCons::G4VParameterisationCons(), G4VParameterisationPara::G4VParameterisationPara(), G4VParameterisationPolycone::G4VParameterisationPolycone(), G4VParameterisationPolyhedra::G4VParameterisationPolyhedra(), G4VParameterisationTrd::G4VParameterisationTrd(), G4VTwistedFaceted::G4VTwistedFaceted(), G4GDMLWriteSolids::GenericPolyconeWrite(), G4GDMLWriteSolids::GenTrapWrite(), G4Navigator::GetGlobalExitNormal(), G4Navigator::GetLocalExitNormal(), G4ITNavigator1::GetLocalExitNormal(), G4ITNavigator2::GetLocalExitNormal(), G4BooleanSolid::GetPointOnSurface(), G4PhantomParameterisation::GetReplicaNo(), G4GDMLWriteSolids::HypeWrite(), G4TessellatedSolid::InsideNoVoxels(), G4TessellatedSolid::InsideVoxels(), G4ITNavigator1::LocateGlobalPointAndSetup(), G4ITNavigator2::LocateGlobalPointAndSetup(), G4Navigator::LocateGlobalPointAndSetup(), G4GenericTrap::MakeDownFacet(), G4Trap::MakePlanes(), G4GenericTrap::MakeUpFacet(), G4GDMLWriteSolids::MultiUnionWrite(), G4GDMLWriteSolids::OrbWrite(), G4GDMLWriteSolids::ParaboloidWrite(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteSolids::ParaWrite(), G4GDMLWriteSolids::PolyconeWrite(), G4GDMLWriteSolids::PolyhedraWrite(), G4NavigationLogger::PostComputeStepLog(), G4NavigationLogger::PreComputeStepLog(), G4NavigationLogger::PrintDaughterLog(), G4PseudoScene::ProcessVolume(), G4SolidStore::Register(), G4tgbVolumeMgr::RegisterMe(), G4NavigationLogger::ReportOutsideMother(), G4ASCIITreeSceneHandler::RequestPrimitives(), G4VSceneHandler::RequestPrimitives(), G4GenericPolycone::Reset(), G4Polyhedra::Reset(), G4VoxelSafety::SafetyForVoxelNode(), G4GDMLWriteSolids::ScaledWrite(), G4Torus::SetAllParameters(), G4Tet::SetBoundingLimits(), G4Polycone::SetOriginalParameters(), G4Polyhedra::SetOriginalParameters(), G4TessellatedSolid::SetSolidClosed(), G4Tet::SetVertices(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), G4Box::SetZHalfLength(), G4GDMLWriteSolids::SphereWrite(), G4BooleanSolid::StackPolyhedron(), G4ReflectedSolid::StreamInfo(), G4BooleanSolid::StreamInfo(), G4DisplacedSolid::StreamInfo(), G4MultiUnion::StreamInfo(), G4ScaledSolid::StreamInfo(), G4Box::StreamInfo(), G4Cons::StreamInfo(), G4CSGSolid::StreamInfo(), G4CutTubs::StreamInfo(), G4Orb::StreamInfo(), G4Para::StreamInfo(), G4Sphere::StreamInfo(), G4Torus::StreamInfo(), G4Trap::StreamInfo(), G4Trd::StreamInfo(), G4Tubs::StreamInfo(), G4Ellipsoid::StreamInfo(), G4EllipticalCone::StreamInfo(), G4EllipticalTube::StreamInfo(), G4ExtrudedSolid::StreamInfo(), G4GenericPolycone::StreamInfo(), G4GenericTrap::StreamInfo(), G4Hype::StreamInfo(), G4Paraboloid::StreamInfo(), G4Polycone::StreamInfo(), G4Polyhedra::StreamInfo(), G4TessellatedSolid::StreamInfo(), G4Tet::StreamInfo(), StreamInfo(), G4TwistedTrap::StreamInfo(), G4TwistedTrd::StreamInfo(), G4TwistedTubs::StreamInfo(), G4VCSGfaceted::StreamInfo(), G4VTwistedFaceted::StreamInfo(), G4GDMLRead::StripNames(), SubstractSolids(), G4UnionSolid::SurfaceNormal(), G4Box::SurfaceNormal(), G4Para::SurfaceNormal(), G4Trap::SurfaceNormal(), G4Trd::SurfaceNormal(), G4Ellipsoid::SurfaceNormal(), G4EllipticalCone::SurfaceNormal(), G4EllipticalTube::SurfaceNormal(), G4ExtrudedSolid::SurfaceNormal(), G4Tet::SurfaceNormal(), G4GDMLWriteSolids::TessellatedWrite(), G4GDMLWriteSolids::TetWrite(), G4GDMLWriteSolids::TorusWrite(), G4GDMLWriteSolids::TrapWrite(), G4GDMLWriteStructure::TraverseVolumeTree(), G4GDMLWriteSolids::TrdWrite(), G4GDMLWriteSolids::TubeWrite(), G4GDMLWriteSolids::TwistedboxWrite(), G4GDMLWriteSolids::TwistedtrapWrite(), G4GDMLWriteSolids::TwistedtrdWrite(), G4GDMLWriteSolids::TwistedtubsWrite(), G4PhysicalVolumeModel::VisitGeometryAndGetVisReps(), and G4GDMLWriteSolids::XtruWrite().

◆ GetPhi()

G4double G4VTwistedFaceted::GetPhi ( ) const
inlineinherited

Definition at line 119 of file G4VTwistedFaceted.hh.

119{ return fPhi ; }

References G4VTwistedFaceted::fPhi.

Referenced by G4TwistedTrap::GetAzimuthalAnglePhi().

◆ GetPhiTwist()

G4double G4TwistedBox::GetPhiTwist ( ) const
inline

◆ GetPointInSolid()

G4ThreeVector G4VTwistedFaceted::GetPointInSolid ( G4double  z) const
inherited

Definition at line 1022 of file G4VTwistedFaceted.cc.

1023{
1024
1025
1026 // this routine is only used for a test
1027 // can be deleted ...
1028
1029 if ( z == fDz ) z -= 0.1*fDz ;
1030 if ( z == -fDz ) z += 0.1*fDz ;
1031
1032 G4double phi = z/(2*fDz)*fPhiTwist ;
1033
1034 return G4ThreeVector(fdeltaX * phi/fPhiTwist, fdeltaY * phi/fPhiTwist, z ) ;
1035}

References G4VTwistedFaceted::fdeltaX, G4VTwistedFaceted::fdeltaY, G4VTwistedFaceted::fDz, and G4VTwistedFaceted::fPhiTwist.

◆ GetPointOnSurface()

G4ThreeVector G4VTwistedFaceted::GetPointOnSurface ( ) const
virtualinherited

Reimplemented from G4VSolid.

Definition at line 1041 of file G4VTwistedFaceted.cc.

1042{
1043
1045 G4double u , umin, umax ; // variable for twisted surfaces
1046 G4double y ; // variable for flat surface (top and bottom)
1047
1048 // Compute the areas. Attention: Only correct for trapezoids
1049 // where the twisting is done along the z-axis. In the general case
1050 // the computed surface area is more difficult. However this simplification
1051 // does not affect the tracking through the solid.
1052
1059
1060#ifdef G4TWISTDEBUG
1061 G4cout << "Surface 0 deg = " << a1 << G4endl ;
1062 G4cout << "Surface 90 deg = " << a2 << G4endl ;
1063 G4cout << "Surface 180 deg = " << a3 << G4endl ;
1064 G4cout << "Surface 270 deg = " << a4 << G4endl ;
1065 G4cout << "Surface Lower = " << a5 << G4endl ;
1066 G4cout << "Surface Upper = " << a6 << G4endl ;
1067#endif
1068
1069 G4double chose = G4RandFlat::shoot(0.,a1 + a2 + a3 + a4 + a5 + a6) ;
1070
1071 if(chose < a1)
1072 {
1073 umin = fSide0->GetBoundaryMin(phi) ;
1074 umax = fSide0->GetBoundaryMax(phi) ;
1075 u = G4RandFlat::shoot(umin,umax) ;
1076
1077 return fSide0->SurfacePoint(phi, u, true) ; // point on 0deg surface
1078 }
1079
1080 else if( (chose >= a1) && (chose < a1 + a2 ) )
1081 {
1082 umin = fSide90->GetBoundaryMin(phi) ;
1083 umax = fSide90->GetBoundaryMax(phi) ;
1084
1085 u = G4RandFlat::shoot(umin,umax) ;
1086
1087 return fSide90->SurfacePoint(phi, u, true); // point on 90deg surface
1088 }
1089 else if( (chose >= a1 + a2 ) && (chose < a1 + a2 + a3 ) )
1090 {
1091 umin = fSide180->GetBoundaryMin(phi) ;
1092 umax = fSide180->GetBoundaryMax(phi) ;
1093 u = G4RandFlat::shoot(umin,umax) ;
1094
1095 return fSide180->SurfacePoint(phi, u, true); // point on 180 deg surface
1096 }
1097 else if( (chose >= a1 + a2 + a3 ) && (chose < a1 + a2 + a3 + a4 ) )
1098 {
1099 umin = fSide270->GetBoundaryMin(phi) ;
1100 umax = fSide270->GetBoundaryMax(phi) ;
1101 u = G4RandFlat::shoot(umin,umax) ;
1102 return fSide270->SurfacePoint(phi, u, true); // point on 270 deg surface
1103 }
1104 else if( (chose >= a1 + a2 + a3 + a4 ) && (chose < a1 + a2 + a3 + a4 + a5 ) )
1105 {
1107 umin = fLowerEndcap->GetBoundaryMin(y) ;
1108 umax = fLowerEndcap->GetBoundaryMax(y) ;
1109 u = G4RandFlat::shoot(umin,umax) ;
1110
1111 return fLowerEndcap->SurfacePoint(u,y,true); // point on lower endcap
1112 }
1113 else
1114 {
1116 umin = fUpperEndcap->GetBoundaryMin(y) ;
1117 umax = fUpperEndcap->GetBoundaryMax(y) ;
1118 u = G4RandFlat::shoot(umin,umax) ;
1119
1120 return fUpperEndcap->SurfacePoint(u,y,true) ; // point on upper endcap
1121
1122 }
1123}
virtual G4double GetBoundaryMin(G4double)=0
virtual G4ThreeVector SurfacePoint(G4double, G4double, G4bool isGlobal=false)=0
virtual G4double GetBoundaryMax(G4double)=0
virtual G4double GetSurfaceArea()=0
ThreeVector shoot(const G4int Ap, const G4int Af)

References G4VTwistedFaceted::fDy1, G4VTwistedFaceted::fDy2, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fPhiTwist, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4cout, G4endl, G4VTwistSurface::GetBoundaryMax(), G4VTwistSurface::GetBoundaryMin(), G4VTwistSurface::GetSurfaceArea(), G4INCL::DeJongSpin::shoot(), and G4VTwistSurface::SurfacePoint().

◆ GetPolyhedron()

G4Polyhedron * G4VTwistedFaceted::GetPolyhedron ( ) const
virtualinherited

◆ GetSurfaceArea()

G4double G4VTwistedFaceted::GetSurfaceArea ( )
inlinevirtualinherited

Reimplemented from G4VSolid.

Definition at line 309 of file G4VTwistedFaceted.hh.

310{
311 if(fSurfaceArea != 0.) ;
313 return fSurfaceArea;
314}
virtual G4double GetSurfaceArea()
Definition: G4VSolid.cc:250

References G4VTwistedFaceted::fSurfaceArea, and G4VSolid::GetSurfaceArea().

◆ GetTheta()

G4double G4VTwistedFaceted::GetTheta ( ) const
inlineinherited

Definition at line 120 of file G4VTwistedFaceted.hh.

120{ return fTheta ; }

References G4VTwistedFaceted::fTheta.

Referenced by G4TwistedTrap::GetPolarAngleTheta().

◆ GetTolerance()

G4double G4VSolid::GetTolerance ( ) const
inlineinherited

◆ GetTwistAngle()

G4double G4VTwistedFaceted::GetTwistAngle ( ) const
inlineinherited

◆ GetValueA()

G4double G4VTwistedFaceted::GetValueA ( G4double  phi) const
inlineinherited

Definition at line 317 of file G4VTwistedFaceted.hh.

318{
319 return ( fDx4 + fDx2 + ( fDx4 - fDx2 ) * ( 2 * phi ) / fPhiTwist ) ;
320}

References G4VTwistedFaceted::fDx2, G4VTwistedFaceted::fDx4, and G4VTwistedFaceted::fPhiTwist.

Referenced by G4VTwistedFaceted::Xcoef().

◆ GetValueB()

G4double G4VTwistedFaceted::GetValueB ( G4double  phi) const
inlineinherited

Definition at line 329 of file G4VTwistedFaceted.hh.

330{
331 return ( fDy2 + fDy1 + ( fDy2 - fDy1 ) * ( 2 * phi ) / fPhiTwist ) ;
332}

References G4VTwistedFaceted::fDy1, G4VTwistedFaceted::fDy2, and G4VTwistedFaceted::fPhiTwist.

Referenced by G4VTwistedFaceted::Inside(), and G4VTwistedFaceted::Xcoef().

◆ GetValueD()

G4double G4VTwistedFaceted::GetValueD ( G4double  phi) const
inlineinherited

Definition at line 323 of file G4VTwistedFaceted.hh.

324{
325 return ( fDx3 + fDx1 + ( fDx3 - fDx1 ) * ( 2 * phi ) / fPhiTwist ) ;
326}

References G4VTwistedFaceted::fDx1, G4VTwistedFaceted::fDx3, and G4VTwistedFaceted::fPhiTwist.

Referenced by G4VTwistedFaceted::Xcoef().

◆ GetXHalfLength()

G4double G4TwistedBox::GetXHalfLength ( ) const
inline

◆ GetYHalfLength()

G4double G4TwistedBox::GetYHalfLength ( ) const
inline

◆ GetZHalfLength()

G4double G4TwistedBox::GetZHalfLength ( ) const
inline

◆ Inside()

EInside G4VTwistedFaceted::Inside ( const G4ThreeVector p) const
virtualinherited

Implements G4VSolid.

Definition at line 325 of file G4VTwistedFaceted.cc.

326{
327
328 G4ThreeVector *tmpp;
329 EInside *tmpin;
330 if (fLastInside.p == p)
331 {
332 return fLastInside.inside;
333 }
334 else
335 {
336 tmpp = const_cast<G4ThreeVector*>(&(fLastInside.p));
337 tmpin = const_cast<EInside*>(&(fLastInside.inside));
338 tmpp->set(p.x(), p.y(), p.z());
339 }
340
341 *tmpin = kOutside ;
342
343 G4double phi = p.z()/(2*fDz) * fPhiTwist ; // rotate the point to z=0
344 G4double cphi = std::cos(-phi) ;
345 G4double sphi = std::sin(-phi) ;
346
347 G4double px = p.x() + fdeltaX * ( -phi/fPhiTwist) ; // shift
348 G4double py = p.y() + fdeltaY * ( -phi/fPhiTwist) ;
349 G4double pz = p.z() ;
350
351 G4double posx = px * cphi - py * sphi ; // rotation
352 G4double posy = px * sphi + py * cphi ;
353 G4double posz = pz ;
354
355 G4double xMin = Xcoef(posy,phi,fTAlph) - 2*Xcoef(posy,phi,0.) ;
356 G4double xMax = Xcoef(posy,phi,fTAlph) ;
357
358 G4double yMax = GetValueB(phi)/2. ; // b(phi)/2 is limit
359 G4double yMin = -yMax ;
360
361#ifdef G4TWISTDEBUG
362
363 G4cout << "inside called: p = " << p << G4endl ;
364 G4cout << "fDx1 = " << fDx1 << G4endl ;
365 G4cout << "fDx2 = " << fDx2 << G4endl ;
366 G4cout << "fDx3 = " << fDx3 << G4endl ;
367 G4cout << "fDx4 = " << fDx4 << G4endl ;
368
369 G4cout << "fDy1 = " << fDy1 << G4endl ;
370 G4cout << "fDy2 = " << fDy2 << G4endl ;
371
372 G4cout << "fDz = " << fDz << G4endl ;
373
374 G4cout << "Tilt angle alpha = " << fAlph << G4endl ;
375 G4cout << "phi,theta = " << fPhi << " , " << fTheta << G4endl ;
376
377 G4cout << "Twist angle = " << fPhiTwist << G4endl ;
378
379 G4cout << "posx = " << posx << G4endl ;
380 G4cout << "posy = " << posy << G4endl ;
381 G4cout << "xMin = " << xMin << G4endl ;
382 G4cout << "xMax = " << xMax << G4endl ;
383 G4cout << "yMin = " << yMin << G4endl ;
384 G4cout << "yMax = " << yMax << G4endl ;
385
386#endif
387
388
389 if ( posx <= xMax - kCarTolerance*0.5
390 && posx >= xMin + kCarTolerance*0.5 )
391 {
392 if ( posy <= yMax - kCarTolerance*0.5
393 && posy >= yMin + kCarTolerance*0.5 )
394 {
395 if (std::fabs(posz) <= fDz - kCarTolerance*0.5 ) *tmpin = kInside ;
396 else if (std::fabs(posz) <= fDz + kCarTolerance*0.5 ) *tmpin = kSurface ;
397 }
398 else if ( posy <= yMax + kCarTolerance*0.5
399 && posy >= yMin - kCarTolerance*0.5 )
400 {
401 if (std::fabs(posz) <= fDz + kCarTolerance*0.5 ) *tmpin = kSurface ;
402 }
403 }
404 else if ( posx <= xMax + kCarTolerance*0.5
405 && posx >= xMin - kCarTolerance*0.5 )
406 {
407 if ( posy <= yMax + kCarTolerance*0.5
408 && posy >= yMin - kCarTolerance*0.5 )
409 {
410 if (std::fabs(posz) <= fDz + kCarTolerance*0.5) *tmpin = kSurface ;
411 }
412 }
413
414#ifdef G4TWISTDEBUG
415 G4cout << "inside = " << fLastInside.inside << G4endl ;
416#endif
417
418 return fLastInside.inside;
419
420}
G4double kCarTolerance
Definition: G4VSolid.hh:299
G4double GetValueB(G4double phi) const
G4double Xcoef(G4double u, G4double phi, G4double ftg) const

References G4VTwistedFaceted::fAlph, G4VTwistedFaceted::fdeltaX, G4VTwistedFaceted::fdeltaY, G4VTwistedFaceted::fDx1, G4VTwistedFaceted::fDx2, G4VTwistedFaceted::fDx3, G4VTwistedFaceted::fDx4, G4VTwistedFaceted::fDy1, G4VTwistedFaceted::fDy2, G4VTwistedFaceted::fDz, G4VTwistedFaceted::fLastInside, G4VTwistedFaceted::fPhi, G4VTwistedFaceted::fPhiTwist, G4VTwistedFaceted::fTAlph, G4VTwistedFaceted::fTheta, G4cout, G4endl, G4VTwistedFaceted::GetValueB(), G4VTwistedFaceted::LastState::inside, G4VSolid::kCarTolerance, kInside, kOutside, kSurface, G4VTwistedFaceted::LastState::p, CLHEP::Hep3Vector::set(), CLHEP::Hep3Vector::x(), G4VTwistedFaceted::Xcoef(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by G4VTwistedFaceted::DistanceToIn(), and G4VTwistedFaceted::DistanceToOut().

◆ operator=()

G4TwistedBox & G4TwistedBox::operator= ( const G4TwistedBox rhs)

Definition at line 76 of file G4TwistedBox.cc.

77{
78 // Check assignment to self
79 //
80 if (this == &rhs) { return *this; }
81
82 // Copy base class data
83 //
86
87 return *this;
88}
G4VTwistedFaceted & operator=(const G4VTwistedFaceted &rhs)

References G4VTwistedFaceted::fpPolyhedron, G4VTwistedFaceted::GetPolyhedron(), and G4VTwistedFaceted::operator=().

◆ operator==()

G4bool G4VSolid::operator== ( const G4VSolid s) const
inlineinherited

◆ SetName()

void G4VSolid::SetName ( const G4String name)
inherited

Definition at line 127 of file G4VSolid.cc.

128{
131}
void SetMapValid(G4bool val)
Definition: G4SolidStore.hh:76
static G4SolidStore * GetInstance()
G4String fshapeName
Definition: G4VSolid.hh:312
const char * name(G4int ptype)

References G4VSolid::fshapeName, G4SolidStore::GetInstance(), G4InuclParticleNames::name(), and G4SolidStore::SetMapValid().

Referenced by export_G4VSolid(), G4MultiUnion::G4MultiUnion(), and G4GDMLRead::StripNames().

◆ StreamInfo()

std::ostream & G4TwistedBox::StreamInfo ( std::ostream &  os) const
virtual

Reimplemented from G4VTwistedFaceted.

Definition at line 93 of file G4TwistedBox.cc.

94{
95 //
96 // Stream object contents to an output stream
97 //
98 os << "-----------------------------------------------------------\n"
99 << " *** Dump for solid - " << GetName() << " ***\n"
100 << " ===================================================\n"
101 << " Solid type: G4TwistedBox\n"
102 << " Parameters: \n"
103 << " pDx = " << GetXHalfLength()/cm << " cm" << G4endl
104 << " pDy = " << GetYHalfLength()/cm << " cm" << G4endl
105 << " pDz = " << GetZHalfLength()/cm << " cm" << G4endl
106 << " pPhiTwist = " << GetPhiTwist()/degree << " deg" << G4endl
107 << "-----------------------------------------------------------\n";
108
109 return os;
110}
static constexpr double degree
Definition: G4SIunits.hh:124
static constexpr double cm
Definition: G4SIunits.hh:99
G4double GetPhiTwist() const
Definition: G4TwistedBox.hh:65
G4double GetXHalfLength() const
Definition: G4TwistedBox.hh:62
G4double GetZHalfLength() const
Definition: G4TwistedBox.hh:64
G4double GetYHalfLength() const
Definition: G4TwistedBox.hh:63
G4String GetName() const

References cm, degree, G4endl, G4VSolid::GetName(), GetPhiTwist(), GetXHalfLength(), GetYHalfLength(), and GetZHalfLength().

◆ SurfaceNormal()

G4ThreeVector G4VTwistedFaceted::SurfaceNormal ( const G4ThreeVector p) const
virtualinherited

Implements G4VSolid.

Definition at line 426 of file G4VTwistedFaceted.cc.

427{
428 //
429 // return the normal unit vector to the Hyperbolical Surface at a point
430 // p on (or nearly on) the surface
431 //
432 // Which of the three or four surfaces are we closest to?
433 //
434
435 if (fLastNormal.p == p)
436 {
437 return fLastNormal.vec;
438 }
439
440 G4ThreeVector* tmpp = const_cast<G4ThreeVector*>(&(fLastNormal.p));
441 G4ThreeVector* tmpnormal = const_cast<G4ThreeVector*>(&(fLastNormal.vec));
442 G4VTwistSurface** tmpsurface
443 = const_cast<G4VTwistSurface**>(fLastNormal.surface);
444 tmpp->set(p.x(), p.y(), p.z());
445
446 G4double distance = kInfinity;
447
448 G4VTwistSurface* surfaces[6];
449
450 surfaces[0] = fSide0 ;
451 surfaces[1] = fSide90 ;
452 surfaces[2] = fSide180 ;
453 surfaces[3] = fSide270 ;
454 surfaces[4] = fLowerEndcap;
455 surfaces[5] = fUpperEndcap;
456
457 G4ThreeVector xx;
458 G4ThreeVector bestxx;
459 G4int i;
460 G4int besti = -1;
461 for (i=0; i< 6; i++)
462 {
463 G4double tmpdistance = surfaces[i]->DistanceTo(p, xx);
464 if (tmpdistance < distance)
465 {
466 distance = tmpdistance;
467 bestxx = xx;
468 besti = i;
469 }
470 }
471
472 tmpsurface[0] = surfaces[besti];
473 *tmpnormal = tmpsurface[0]->GetNormal(bestxx, true);
474
475 return fLastNormal.vec;
476}

References G4VTwistSurface::DistanceTo(), G4VTwistedFaceted::fLastNormal, G4VTwistedFaceted::fLowerEndcap, G4VTwistedFaceted::fSide0, G4VTwistedFaceted::fSide180, G4VTwistedFaceted::fSide270, G4VTwistedFaceted::fSide90, G4VTwistedFaceted::fUpperEndcap, G4VTwistSurface::GetNormal(), kInfinity, G4VTwistedFaceted::LastVector::p, CLHEP::Hep3Vector::set(), G4VTwistedFaceted::LastVector::surface, G4VTwistedFaceted::LastVector::vec, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by G4VTwistedFaceted::DistanceToIn(), and G4VTwistedFaceted::DistanceToOut().

◆ Xcoef()

G4double G4VTwistedFaceted::Xcoef ( G4double  u,
G4double  phi,
G4double  ftg 
) const
inlineinherited

Definition at line 335 of file G4VTwistedFaceted.hh.

336{
337 return GetValueA(phi)/2. + (GetValueD(phi)-GetValueA(phi))/4.
338 - u*( ( GetValueD(phi)-GetValueA(phi) ) / ( 2 * GetValueB(phi) ) - ftg );
339}
G4double GetValueD(G4double phi) const
G4double GetValueA(G4double phi) const

References G4VTwistedFaceted::GetValueA(), G4VTwistedFaceted::GetValueB(), and G4VTwistedFaceted::GetValueD().

Referenced by G4VTwistedFaceted::Inside().

Field Documentation

◆ fAlph

G4double G4VTwistedFaceted::fAlph
privateinherited

◆ fCubicVolume

G4double G4VTwistedFaceted::fCubicVolume = 0.0
privateinherited

◆ fdeltaX

G4double G4VTwistedFaceted::fdeltaX
privateinherited

◆ fdeltaY

G4double G4VTwistedFaceted::fdeltaY
privateinherited

◆ fDx

G4double G4VTwistedFaceted::fDx
privateinherited

◆ fDx1

G4double G4VTwistedFaceted::fDx1
privateinherited

◆ fDx2

G4double G4VTwistedFaceted::fDx2
privateinherited

◆ fDx3

G4double G4VTwistedFaceted::fDx3
privateinherited

◆ fDx4

G4double G4VTwistedFaceted::fDx4
privateinherited

◆ fDy

G4double G4VTwistedFaceted::fDy
privateinherited

◆ fDy1

G4double G4VTwistedFaceted::fDy1
privateinherited

◆ fDy2

G4double G4VTwistedFaceted::fDy2
privateinherited

◆ fDz

G4double G4VTwistedFaceted::fDz
privateinherited

◆ fLastDistanceToIn

LastValue G4VTwistedFaceted::fLastDistanceToIn
privateinherited

◆ fLastDistanceToInWithV

LastValueWithDoubleVector G4VTwistedFaceted::fLastDistanceToInWithV
privateinherited

◆ fLastDistanceToOut

LastValue G4VTwistedFaceted::fLastDistanceToOut
privateinherited

◆ fLastDistanceToOutWithV

LastValueWithDoubleVector G4VTwistedFaceted::fLastDistanceToOutWithV
privateinherited

◆ fLastInside

LastState G4VTwistedFaceted::fLastInside
privateinherited

◆ fLastNormal

LastVector G4VTwistedFaceted::fLastNormal
privateinherited

◆ fLowerEndcap

G4VTwistSurface* G4VTwistedFaceted::fLowerEndcap
privateinherited

◆ fPhi

G4double G4VTwistedFaceted::fPhi
privateinherited

◆ fPhiTwist

G4double G4VTwistedFaceted::fPhiTwist
privateinherited

◆ fpPolyhedron

G4Polyhedron* G4VTwistedFaceted::fpPolyhedron = nullptr
mutableprotectedinherited

◆ fRebuildPolyhedron

G4bool G4VTwistedFaceted::fRebuildPolyhedron = false
mutableprotectedinherited

◆ fshapeName

G4String G4VSolid::fshapeName
privateinherited

Definition at line 312 of file G4VSolid.hh.

Referenced by G4VSolid::operator=(), and G4VSolid::SetName().

◆ fSide0

G4VTwistSurface* G4VTwistedFaceted::fSide0
privateinherited

◆ fSide180

G4VTwistSurface* G4VTwistedFaceted::fSide180
privateinherited

◆ fSide270

G4VTwistSurface* G4VTwistedFaceted::fSide270
privateinherited

◆ fSide90

G4VTwistSurface* G4VTwistedFaceted::fSide90
privateinherited

◆ fSurfaceArea

G4double G4VTwistedFaceted::fSurfaceArea = 0.0
privateinherited

◆ fTAlph

G4double G4VTwistedFaceted::fTAlph
privateinherited

◆ fTheta

G4double G4VTwistedFaceted::fTheta
privateinherited

◆ fUpperEndcap

G4VTwistSurface* G4VTwistedFaceted::fUpperEndcap
privateinherited

◆ kCarTolerance

G4double G4VSolid::kCarTolerance
protectedinherited

Definition at line 299 of file G4VSolid.hh.

Referenced by G4TessellatedSolid::AddFacet(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4Tet::CheckDegeneracy(), G4Para::CheckParameters(), G4Trd::CheckParameters(), G4Ellipsoid::CheckParameters(), G4EllipticalTube::CheckParameters(), G4GenericTrap::ComputeIsTwisted(), G4Polyhedra::Create(), G4GenericPolycone::Create(), G4Polycone::Create(), G4CutTubs::CreatePolyhedron(), G4TessellatedSolid::CreateVertexList(), G4VCSGfaceted::DistanceTo(), G4Sphere::DistanceToIn(), G4Ellipsoid::DistanceToIn(), G4Hype::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4VCSGfaceted::DistanceToIn(), G4TessellatedSolid::DistanceToInCore(), G4Cons::DistanceToOut(), G4CutTubs::DistanceToOut(), G4Sphere::DistanceToOut(), G4Torus::DistanceToOut(), G4Tubs::DistanceToOut(), G4GenericTrap::DistanceToOut(), G4Hype::DistanceToOut(), G4Paraboloid::DistanceToOut(), G4VCSGfaceted::DistanceToOut(), G4TessellatedSolid::DistanceToOutCandidates(), G4TessellatedSolid::DistanceToOutCore(), G4TessellatedSolid::DistanceToOutNoVoxels(), G4GenericTrap::DistToPlane(), G4GenericTrap::DistToTriangle(), G4Box::G4Box(), G4Cons::G4Cons(), G4CutTubs::G4CutTubs(), G4EllipticalCone::G4EllipticalCone(), G4ExtrudedSolid::G4ExtrudedSolid(), G4GenericTrap::G4GenericTrap(), G4Hype::G4Hype(), G4Para::G4Para(), G4Sphere::G4Sphere(), G4Tet::G4Tet(), G4Trap::G4Trap(), G4Tubs::G4Tubs(), G4UnionSolid::G4UnionSolid(), G4VSolid::G4VSolid(), G4VTwistedFaceted::G4VTwistedFaceted(), G4GenericPolycone::GetPointOnSurface(), G4Polycone::GetPointOnSurface(), G4UnionSolid::Init(), G4Orb::Initialize(), G4TessellatedSolid::Initialize(), G4SubtractionSolid::Inside(), G4Hype::Inside(), G4Paraboloid::Inside(), G4VCSGfaceted::Inside(), G4VTwistedFaceted::Inside(), G4TessellatedSolid::InsideNoVoxels(), G4GenericTrap::InsidePolygone(), G4TessellatedSolid::InsideVoxels(), G4CutTubs::IsCrossingCutPlanes(), G4GenericTrap::IsSegCrossingZ(), G4Trap::MakePlane(), G4GenericTrap::NormalToPlane(), G4VSolid::operator=(), G4TessellatedSolid::SafetyFromInside(), G4TessellatedSolid::SafetyFromOutside(), G4Torus::SetAllParameters(), G4Polycone::SetOriginalParameters(), G4Polyhedra::SetOriginalParameters(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), G4Box::SetZHalfLength(), G4Torus::SurfaceNormal(), G4GenericTrap::SurfaceNormal(), and G4Paraboloid::SurfaceNormal().


The documentation for this class was generated from the following files: