detector Derived Type

type, public, abstract :: detector

abstract detector


Components

Type Visibility Attributes Name Initial
type(vector), public :: dir

Surface normal of the detector

integer, public :: layer

Layer ID of the detector

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(recordHitInterface), public, deferred :: record_hit

  • subroutine recordHitInterface(this, hitpoint, history) Prototype

    Arguments

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

Source Code

    type, abstract :: detector
        !> position of the detector
        type(vector)  :: pos
        !> Surface normal of the detector
        type(vector)  :: dir
        !> Layer ID of the detector
        integer :: layer
        !> Boolean, if true store the history of the photon prior to detection.
        logical :: trackHistory
        contains
            
            procedure(recordHitInterface), deferred, public :: record_hit
            procedure(checkHitInterface),  deferred, public :: check_hit
    end type detector