anchor.diff:    logical,          intent(inout) :: iErr
   
     character(len=:), allocatable   :: lnSplit(:)
  -  real(kind=fPrec) nSigIn(23)
  +  real(kind=fPrec) nSigIn(23), rTmp
     integer nSplit, famID
     logical spErr, fErr
   
  
positive.code:     call cdb_addFamily("tcryo",nSigIn(23),famID,fErr)
  
    case(6)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), n_slices,   iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), smin_slices,iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), smax_slices,iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), recenter1,  iErr)
      if(nSplit > 4)  call chr_cast(lnSPlit(5), recenter2,  iErr)
  
    case(7)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), fit1_1,iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), fit1_2,iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), fit1_3,iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), fit1_4,iErr)
      if(nSplit > 4)  call chr_cast(lnSPlit(5), fit1_5,iErr)
      if(nSplit > 5)  call chr_cast(lnSPlit(6), fit1_6,iErr)
      if(nSplit > 6)  call chr_cast(lnSPlit(7), ssf1,  iErr)
  
    case(8)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), fit2_1,iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), fit2_2,iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), fit2_3,iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), fit2_4,iErr)
      if(nSplit > 4)  call chr_cast(lnSPlit(5), fit2_5,iErr)
      if(nSplit > 5)  call chr_cast(lnSPlit(6), fit2_6,iErr)
      if(nSplit > 6)  call chr_cast(lnSPlit(7), ssf2,  iErr)
  
    case(9)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), emitnx0_dist,   iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), emitny0_dist,   iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), emitnx0_collgap,iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), emitny0_collgap,iErr)
  
    case(10)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), do_select,        iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), do_nominal,       iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), rnd_seed,         iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), dowrite_dist,     iErr)
      if(nSplit > 4)  name_sel = lnSPlit(5)
      if(nSplit > 5)  call chr_cast(lnSPlit(6), do_oneside,       iErr)
      if(nSplit > 6)  call chr_cast(lnSPlit(7), dowrite_impact,   iErr)
      if(nSplit > 7)  call chr_cast(lnSPlit(8), dowrite_secondary,iErr)
      if(nSplit > 8)  call chr_cast(lnSPlit(9), dowrite_amplitude,iErr)
  
    case(11)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), xbeat,     iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), xbeatphase,iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), ybeat,     iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), ybeatphase,iErr)
  
    case(12)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), c_rmstilt_prim,   iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), c_rmstilt_sec,    iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), c_systilt_prim,   iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), c_systilt_sec,    iErr)
      if(nSplit > 4)  call chr_cast(lnSPlit(5), c_rmsoffset_prim, iErr)
      if(nSplit > 5)  call chr_cast(lnSPlit(6), c_rmsoffset_sec,  iErr)
      if(nSplit > 6)  call chr_cast(lnSPlit(7), c_sysoffset_prim, iErr)
      if(nSplit > 7)  call chr_cast(lnSPlit(8), c_sysoffset_sec,  iErr)
      if(nSplit > 8)  call chr_cast(lnSPlit(9), c_offsettilt_seed,iErr)
      if(nSplit > 9)  call chr_cast(lnSPlit(10),c_rmserror_gap,   iErr)
      if(nSplit > 10) call chr_cast(lnSPlit(11),do_mingap,        iErr)
  
    case(13)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), radial,iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), nr,    iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), ndr,   iErr)
  
    case(14)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), driftsx,         iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), driftsy,         iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), cut_input,       iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), systilt_antisymm,iErr)
  
    case(15)
      if(nSplit > 0)  call chr_cast(lnSPlit(1), ipencil,      iErr)
      if(nSplit > 1)  call chr_cast(lnSPlit(2), pencil_offset,iErr)
      if(nSplit > 2)  call chr_cast(lnSPlit(3), pencil_rmsx,  iErr)
      if(nSplit > 3)  call chr_cast(lnSPlit(4), pencil_rmsy,  iErr)
      if(nSplit > 4)  call chr_cast(lnSPlit(5), pencil_distr, iErr)
  #ifdef G4COLLIMAT
      if(ipencil > 0) then
        write(lout,"(a)") "COLL> ERROR Pencil distribution not supported with geant4"
  
negative.code:   remity_dist    = emitny0_dist*gammar
    remitx_collgap = emitnx0_collgap*gammar
    remity_collgap = emitny0_collgap*gammar
  
    if(myenom == zero) then
      write(lout,"(a)") "COLL> ERROR Beam energy cannot be zero"
      call prror
    end if
  
  end subroutine collimate_postInput
  
  