EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
A circle shape perpendicular to source particles. More...
#include <egs_circle_perpendicular.h>
Public Member Functions | |
EGS_CirclePerpendicularShape (EGS_Float Xo, EGS_Float Yo, EGS_Float R, EGS_Float R_i=0, const string &Name="", EGS_ObjectFactory *f=0) | |
Conctruct a circle with midpoint given by Xo and Yo, radius R and innder radius R_i. | |
EGS_Vector | getPoint (EGS_RandomGenerator *rndm) |
void | getPointSourceDirection (const EGS_Vector &Xo, EGS_RandomGenerator *rndm, EGS_Vector &u, EGS_Float &wt) |
Public Member Functions inherited from EGS_SurfaceShape | |
EGS_SurfaceShape (const string &Name="", EGS_ObjectFactory *f=0) | |
Construct a surface shape named Name. | |
~EGS_SurfaceShape () | |
Destructor. Does nothing. | |
bool | supportsDirectionMethod () const |
Always returns true. Shapes derived from this class must implement the getPoint() method to return points on a given surface. | |
EGS_Float | area () const |
Returns the area of this surface shape. | |
Public Member Functions inherited from EGS_BaseShape | |
EGS_BaseShape (const string &Name="", EGS_ObjectFactory *f=0) | |
Construct a shape named Name. | |
virtual | ~EGS_BaseShape () |
Destructor. Deletes T if it is not null . | |
virtual EGS_Vector | getRandomPoint (EGS_RandomGenerator *rndm) |
Returns a random 3D vector. More... | |
void | setTransformation (EGS_Input *inp) |
Set the transformation attached to this shape. More... | |
void | setTransformation (EGS_AffineTransform *t) |
Set the transformation attached to this shape. More... | |
const EGS_AffineTransform * | getTransform () const |
Get a pointer to the affine transformation attached to this shape. | |
Public Member Functions inherited from EGS_Object | |
EGS_Object (const string &Name="", EGS_ObjectFactory *f=0) | |
Create an EGS_Object named Name belonging to the object factory f. More... | |
EGS_Object (EGS_Input *inp, EGS_ObjectFactory *f=0) | |
Create an EGS_Object from the information pointed to by inp that belongs to object factory f. More... | |
const string & | getObjectName () const |
Get the object name. | |
void | setObjectName (const string &Name) |
Set the object name to Name. | |
const string & | getObjectType () const |
Get the object type. | |
virtual EGS_Object * | createObject (EGS_Input *inp) |
Create an object from the infromation pointed to by inp. More... | |
void | setName (EGS_Input *inp) |
Set the name of the object from the information provided by inp. More... | |
int | ref () |
Increase the reference count to this object. | |
int | deref () |
Decrease the reference count to this object. | |
void | setFactory (EGS_ObjectFactory *f) |
Set the factory to which the object belongs. More... | |
Protected Attributes | |
EGS_Float | xo |
EGS_Float | yo |
EGS_Float | ro |
EGS_Float | dr |
Protected Attributes inherited from EGS_SurfaceShape | |
EGS_Float | A |
Protected Attributes inherited from EGS_BaseShape | |
EGS_AffineTransform * | T |
The affine transformation attached to the shape. | |
Protected Attributes inherited from EGS_Object | |
string | name |
The object name. | |
string | otype |
The object type. | |
int | nref |
Number of references to the object. | |
EGS_ObjectFactory * | factory |
The factory this object belongs to. | |
Additional Inherited Members | |
Static Public Member Functions inherited from EGS_BaseShape | |
static EGS_BaseShape * | createShape (EGS_Input *inp) |
Create a shape from the information pointed to by inp. More... | |
static EGS_BaseShape * | getShape (const string &Name) |
Get a pointer to the shape named Name. More... | |
Static Public Member Functions inherited from EGS_Object | |
static string | getUniqueName (const EGS_Object *o=0) |
Create and return a unique object name. More... | |
static void | deleteObject (EGS_Object *o) |
Delete an object. More... | |
A circle shape perpendicular to source particles.
This shape is specified via
:start shape: library = egs_circle_perpendicular radius = the circle radius midpoint = Ox, Oy (optional) inner radius = the inner radius (optional) :stop shape:
and delivers points uniformly distributed within a circle. The surface of this circle is always perpendicular to a ray based on the source particle position, when this shape is used as the target in a source that calls the getPointSourceDirection() function. For example, in a collimated source when a source shape and target shape are defined, the special properties of this circle only apply when it is used as the target shape. Otherwise, it behaves like an egs_circle .
For each source particle, when getPointSourceDirection() is called, the circle shape is rotated so that the circle surface is perpendicular to the vector between the source particle location and the origin of the circle. In effect this means that the source particles see a sphere instead of a circle, except that for a given particle, the possible target locations are on the surface of a circle rather than within a sphere.
If you place a transformation block inside this shape, to perform an affine transformation , only the translation part of the transformation will be applied. Rotations will be un-done when the surface is rotated to be perpendicular to the source particle.
If an inner radius is specified, the points will be within the ring between the inner radius
and the radius
. Points within a circle in planes other than the xy-plane at z=0 can be obtained by attaching an affine transformation to the circle shape.
Definition at line 109 of file egs_circle_perpendicular.h.