anchor.diff:    fitTilt(1,:) = angle1(:)
     fitTilt(2,:) = angle2(:)
   
  -  jaw_collData(jaw_nCollData)%nSlices   = nSlices
  -  jaw_collData(jaw_nCollData)%fitLength = cLength/real(nSlices,fPrec)
  -  jaw_collData(jaw_nCollData)%fitData   = fitData
  -  jaw_collData(jaw_nCollData)%fitTilt   = fitTilt
  -
  -  sliceID = jaw_nCollData
  +  jaw_sliceData(jaw_nSliceData)%nSlices   = nSlices
  +  jaw_sliceData(jaw_nSliceData)%fitLength = cLength/real(nSlices,fPrec)
  +  jaw_sliceData(jaw_nSliceData)%fitData   = fitData
  +  jaw_sliceData(jaw_nSliceData)%fitTilt   = fitTilt
  +
  +  sliceID = jaw_nSliceData
   
     write(lout,"(a,i0,a)") "COLLJAW> Collimator "//trim(collName)//" sliced in ",nSlices," slices"
   
  
positive.code: ! ================================================================================================ !
  integer function jaw_getSliceCount(sliceID)
    integer, intent(in) :: sliceID
    jaw_getSliceCount = jaw_collData(sliceID)%nSlices
  end function jaw_getSliceCount
  
  end module coll_jawfit
  
negative.code:     logical                       :: reCentre     = .false. ! Recentre the collimator to new minimum
    end type type_fitParams
  
    type, private :: type_sliceParams
      integer                       :: nSlices      = 0       ! The number of slices
      real(kind=fPrec)              :: fitLength    = zero    ! Slice length
      real(kind=fPrec), allocatable :: fitData(:,:)           ! Slice data
      real(kind=fPrec), allocatable :: fitTilt(:,:)           ! Slice tilt
    end type type_sliceParams
  
    type(type_fitParams),  allocatable, private, save :: jaw_fitData(:)  ! List of jaw fit parameters
    type(type_sliceParams), allocatable, private, save :: jaw_sliceData(:) ! List of collimator fit slices
    integer,                            private, save :: jaw_nFitData  = 0  ! Count of jaw_fitData
    integer,                            private, save :: jaw_nSliceData = 0  ! Count of jaw_sliceData
  
  contains
  
  