detector1D Derived Type

type, public, abstract, extends(detector) :: detector1D

1D detector type. Records linear information


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

logical, public :: trackHistory

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


Type-Bound Procedures

procedure(checkHitInterface), public, deferred :: check_hit

  • function checkHitInterface(this, hitpoint) Prototype

    Arguments

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

    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, abstract, extends(detector) :: detector1D
        !> Number of bins
        integer       :: nbins
        !> Bin width
        real(kind=wp) :: bin_wid
        !> Bins
        real(kind=wp), allocatable :: data(:)
        contains
        procedure :: record_hit => record_hit_1D_sub
    end type detector1D