circle_dect Derived Type

type, public, extends(detector1D) :: circle_dect

Circle 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 :: radius

Radius of detector

logical, public :: trackHistory

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


Constructor

public interface circle_dect

  • private function init_circle_dect(pos, dir, layer, radius, nbins, maxval, trackHistory) result(out)

    Initalise Circle 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) :: radius

    Radius of the detector

    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(circle_dect)


Type-Bound Procedures

procedure, public :: check_hit => check_hit_circle

  • private function check_hit_circle(this, hitpoint)

    Check if a hitpoint is in the circle

    Arguments

    Type IntentOptional Attributes Name
    class(circle_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) :: circle_dect
        !> Radius of detector
        real(kind=wp) :: radius
    contains
        procedure :: check_hit  => check_hit_circle
    end type circle_dect