annulus_dect Derived Type

type, public, extends(detector1D) :: annulus_dect

Annuluar detector


Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: bin_wid

Bin width

real(kind=wp), public, allocatable :: data(:)

Bins

type(vector), public :: dir

Surface normal of the detector

integer, public :: layer

Layer ID of the detector

integer, public :: nbins

Number of bins

type(vector), public :: pos

position of the detector

real(kind=wp), public :: r1

Inner radius

real(kind=wp), public :: r2

Outer radius

logical, public :: trackHistory

Boolean, if true store the history of the photon prior to detection.


Constructor

public interface annulus_dect

  • private function init_annulus_dect(pos, dir, layer, r1, r2, nbins, maxval, trackHistory) result(out)

    Initalise Annular detector

    Arguments

    Type IntentOptional Attributes Name
    type(vector), intent(in) :: pos

    Centre of detector

    type(vector), intent(in) :: dir

    Normal of the detector

    integer, intent(in) :: layer

    Layer ID

    real(kind=wp), intent(in) :: r1

    Inner radius

    real(kind=wp), intent(in) :: r2

    Outer radius

    integer, intent(in) :: nbins

    Number of bins in the detector

    real(kind=wp), intent(in) :: maxval

    Maximum value to store in bins

    logical, intent(in) :: trackHistory

    Boolean on if to store photon's history prior to hitting the detector.

    Return Value type(annulus_dect)


Type-Bound Procedures

procedure, public :: check_hit => check_hit_annulus

  • private function check_hit_annulus(this, hitpoint)

    Check if a hitpoint is in the annulus

    Arguments

    Type IntentOptional Attributes Name
    class(annulus_dect), intent(inout) :: this
    type(hit_t), intent(in) :: hitpoint

    Hitpoint to check

    Return Value logical

procedure, public :: record_hit => record_hit_1D_sub

  • private subroutine record_hit_1D_sub(this, hitpoint, history)

    check if a hit is on the detector and record it if so

    Arguments

    Type IntentOptional Attributes Name
    class(detector1D), intent(inout) :: this
    type(hit_t), intent(in) :: hitpoint

    Interaction information

    type(history_stack_t), intent(inout) :: history

    Photon packet history

Source Code

    type, extends(detector1D) :: annulus_dect
        !> Inner radius
        real(kind=wp) :: r1
        !> Outer radius
        real(kind=wp) :: r2
        contains
        procedure :: check_hit => check_hit_annulus
    end type annulus_dect