Module helixfit_kinks_mod

module helixfit_kinks_mod

        ! Uses
    use precision_mod
    use namelist_mod
    use helixfit_common_mod
    use helixfit_fitpar_mod
    use helixfit_hits_mod
    use helixfit_track_mod

        ! Subroutines and functions
    public subroutine clearKinks (kinks)
    public subroutine printKinks (hits, kinks)
    public subroutine setupKinks (hits, lastPlane, doTargetLoss, kinks)
    public subroutine addKinks (hits, lastplane, kinks, fitpar)

end module helixfit_kinks_mod

Description of Subroutines and Functions

clearKinks

public subroutine clearKinks (kinks)
    type (kinks_type), INTENT(out) :: kinks
end subroutine clearKinks

printKinks

public subroutine printKinks (hits, kinks)
    type (hits_type), INTENT(in) :: hits
    type (kinks_type), INTENT(in) :: kinks
end subroutine printKinks

setupKinks

public subroutine setupKinks (hits, lastPlane, doTargetLoss, kinks)
    type (hits_type), INTENT(in) :: hits
            
 Description: setup kinks for the detector

 Arguments:
    integer, INTENT(in) :: lastPlane
    logical, INTENT(in) :: doTargetLoss
             enable energy loss in the target
    type (kinks_type), INTENT(inout) :: kinks
    ! Calls: Layout0, Layout3
end subroutine setupKinks

addKinks

public subroutine addKinks (hits, lastplane, kinks, fitpar)
    type (hits_type), INTENT(in) :: hits
            
 Description: add fit parameters for valid kinks
    integer, INTENT(in) :: lastplane
    type (kinks_type), INTENT(inout) :: kinks
    type (fitpar_type), INTENT(inout) :: fitpar
    ! Calls: addKinkPar, die
end subroutine addKinks