Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::orangeinp::Cone Class Referencefinal

A closed cone along the Z axis centered on the origin. More...

#include <IntersectRegion.hh>

Inheritance diagram for celeritas::orangeinp::Cone:
Inheritance graph
[legend]

Public Member Functions

 Cone (Real2 const &radii, real_type halfheight)
 Construct with Z half-height and lo, hi radii.
 
void build (IntersectSurfaceBuilder &) const final
 Build surfaces. More...
 
void output (JsonPimpl *) const final
 Write output to the given JSON object.
 
bool encloses (Cone const &other) const
 Whether this encloses another cone.
 
Real2 const & radii () const
 Lower and upper radii.
 
real_type halfheight () const
 Half-height along Z.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::orangeinp::IntersectRegionInterface
 IntersectRegionInterface ()=default
 
virtual ~IntersectRegionInterface ()=default
 
 CELER_DEFAULT_COPY_MOVE (IntersectRegionInterface)
 

Detailed Description

A closed cone along the Z axis centered on the origin.

A quadric cone technically defines two opposing cones that touch at a single vanishing point, but this cone is required to be truncated so that the vanishing point is on our outside the cone.

The midpoint along the Z axis of the cone is the origin. A cone is not allowed to have equal radii: for that, use a cylinder. However, it may have a single radius of zero, which puts the vanishing point on one end of the cone.

This intersect region, along with the Cylinder, is a base component of the G4Polycone (PCON).

Member Function Documentation

◆ build()

void celeritas::orangeinp::Cone::build ( IntersectSurfaceBuilder insert_surface) const
finalvirtual

Build surfaces.

The inner bounding box of a cone is determined with the following procedure:

  • Represent a radial slice of the cone as a right triangle with base b (aka the higher radius) and height h (translated vanishing point)
  • An interior bounding box (along the xy diagonal cut!) will satisfy r = b - tangent * z
  • Maximize the area of that box to obtain r = b / 2, i.e. z = h / 2
  • Truncate z so that it's not outside of the half-height
  • Project that radial slice onto the xz plane by multiplying 1/sqrt(2)

Implements celeritas::orangeinp::IntersectRegionInterface.


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