anchor.diff:      end if
       cdb_cFamily(j) = famID
   
  +    call cdb_getCollType(cdb_cName(j), collType)
  +    cdb_famType(famID) = collType
  +
       matID = collmat_getCollMatID(cdb_cMaterial(j))
       if(matID > 0) then
         cdb_cMaterialID(j) = matID
  
positive.code:   write(dbNew,"(a)") "# Automatically converted collimator DB from old format file '"//trim(cdb_fileName)//"'"
    write(dbNew,"(a)") "# Families"
    do j=1,cdb_nFam
      write(dbNew,"(a,1x,a16,1x,f13.6)") "NSIG_FAM",cdb_famName(j),cdb_famNSig(j)
    end do
    write(dbNew,"(a)") "#"
    write(dbNew,"(a)") "# Collimators"
  
negative.code: 
  ! ================================================================================================ !
  !  V.K. Berglyd Olsen, BE-ABP-HSS
  !  Created: 2019-10-07
  !  Updated: 2019-10-07
  !  Checks the type of the collimator based on LHC naming convention (for support with old format)
  ! ================================================================================================ !
  subroutine cdb_getCollType(inElem, collType)
  
    use string_tools
  
    character(len=mNameLen), intent(in)  :: inElem
    integer,                 intent(out) :: collType
  
    character(len=mNameLen) elemName
  
    collType = cdb_typOther
    elemName = chr_toLower(inElem)
  
    if(elemName(1:3) == "tcp") then
      collType = cdb_typPrimary
    else if(elemName(1:3) == "tcs") then
      collType = cdb_typSecondary
    else if(elemName(1:3) == "tcl" .or. elemName(1:3) == "tct" .or. &
            elemName(1:3) == "tcd" .or. elemName(1:3) == "tdi") then
      collType = cdb_typTertiary
    end if
  
  end subroutine cdb_getCollType
  
  ! ================================================================================================ !
  !  V.K. Berglyd Olsen, BE-ABP-HSS
  !  Created: 2019-09-02
  !  Updated: 2019-09-02
  !  Checks for one sided collimators from old input block and DB using the COLL block flag and
  