Geometry kernels

Arm (GArm)

class mcramp.geom.GArm(idx=0, ctx=None)[source]

Geometry kernel for Arm component - does not store a real intersection.

Parameters:
None

Notes

None

Methods

None  

Banana (GBanana)

class mcramp.geom.GBanana(radius=0, height=0, mintheta=0, maxtheta=0, idx=0, ctx=None)[source]

Geometry kernel for ‘banana’ geometry. Intersects with the interior of the banana, i.e. first intersection must be at negative time for scattering to occur.

Parameters:
radius : float

The radius of the banana

height : float

The height of the banana

mintheta : float

The minimum valid intersection angle with the banana

maxtheta : float

The maximum valid intersection angle with the banana

Notes

Intersection 1 :
Negative time intersection with the portion of the banana behind the neutron trajectory.
Intersection 2 :
Positive time intersection with the portion of the banana ahead of the neutron trajectory.

Methods

None  

Box (GBox)

class mcramp.geom.GBox(width=0, height=0, depth=0, idx=0, ctx=None)[source]

Geometry kernel for ‘box’ geometry. Intersects with the exterior of the box, i.e. first intersection must be at positive time for scattering to occur.

Parameters:
width : float

The width of the box

height : float

The height of the box

depth : float

The depth of the box

Notes

Intersection 1 :
First point of intersection with the box geometry - ‘entering’ box.
Intersection 2 :
Second point of intersection with the box geometry - ‘exiting’ box.

Methods

None  

Cylinder Exterior (GCylinderExt)

class mcramp.geom.GCylinderExt(radius=0, height=0, idx=0, ctx=None)[source]

Geometry kernel for cylinder geometry. Intersects with the exterior of the cylinder, i.e. first intersection must be at positive time for scattering to occur.

Parameters:
radius : float

The radius of the cylinder

height : float

The height of the cylinder

Notes

Intersection 1 :
Negative time intersection with the portion of the banana behind the neutron trajectory.
Intersection 2 :
Positive time intersection with the portion of the banana ahead of the neutron trajectory.

Methods

None  

Mesh (GMesh)

class mcramp.geom.GMesh(filename='', interior=False, idx=0, ctx=None)[source]

Geometry kernel for ‘mesh’ geometry.

Parameters:
filename: str

Name of STL file specifying mesh vertices

interior: bool

Does this kernel correspond to the ‘interior’ of a component? Used for multiple scattering in multi mode. EXPERIMENTAL

Notes

Intersection 1 :
First point of intersection with the mesh, ‘entering’ mesh.
Intersection 2 :
Second point of intersection with the mesh, ‘exiting’ mesh.

Works even for non-convex meshes!

Methods

None  

Plane (GPlane)

class mcramp.geom.GPlane(width=0, height=0, idx=0, orientation='xy', ctx=None)[source]

Geometry kernel for ‘plane’ geometry.

Parameters:
width : float

The width of the plane

height : float

The height of the plane

orientation : {“xy”, “yz”}

The orientation of the plane. “xy” gives a plane normal to the z axis, “yz” gives a plane normal to the x axis.

Notes

Intersection 1 :
Point of intersection with the plane
Intersection 2 :
Same as Intersection 1.

Methods

None  

Sphere (GSphere)

class mcramp.geom.GSphere(radius=0, idx=0, ctx=None)[source]

Geometry kernel for ‘sphere’ geometry. Intersects with the exterior of the sphere, i.e. first intersection time must be positive for scattering to occur.

Parameters:
radius : float

The radius of the sphere

Notes

Intersection 1 :
First point of intersection with the sphere geometry - ‘entering’ sphere.
Intersection 2 :
Second point of intersection with the sphere geometry - ‘exiting’ sphere.

Methods

None  

Sphere Interior (GSphereInt)

class mcramp.geom.GSphereInt(radius=0, idx=0, ctx=None)[source]

Geometry kernel for ‘sphere’ geometry. Intersects with the interior of the sphere, i.e. first intersection time must be negative for scattering to occur.

Parameters:
radius : float

The radius of the sphere

Notes

Intersection 1 & 2 :
Second point of intersection with the sphere geometry - ‘exiting’ sphere.

Methods

None