I would like to know how does a company (say Philips or Siemens) register private DICOM tags?
I mean:
There is no official "registry" of private DICOM tags, but publishing your private tags in the DICOM conformance statement is good practice.
To avoid collisions, each private tag belongs to a private creator name. The private creator usually contains the company name (or an abbreviation of it) and contains enough information to be able to relate it to a specific vendor, device and/or software. While there is no standard how it shall look, in practice this avoids collisions of private tags. So, while there is no guaranteed global uniqueness of private tags, in practice the combination of private group, private creator and tag offset ensures a reasonable distinction of different private tags.
Private creators are contained in tags with the element number from 0x10 to 0xff, so theoretically up to 240 private creators can co-exist for any private group. The private tag element number is always an offset (from 0x00 to 0xff), which is combined with the corresponding private creator tag, so for example the private tag (0041,0020) for a private creator located at (0041,0011) has the actual tag number (0041,1120). This is described in detail in PS3.5, section 7.8 in the DICOM standard.
So, to define your own private tags, you actually have to define a private creator name (prepend it with your company/organization name to ensure uniqueness), and than you can use all 256 possible tags in that private block. You don't have to check for the availability of the tags, just have to ensure a unique private creator that is used for these tags. A private tag is identified by the (odd) group number, the private creator and the tag element offset.
Reading and writing private tags using a DICOM toolkit usually demands that the private creator is given together with the group and the element offset to avoid any ambiguity. You can define your private tags in any allowed private group (e.g. odd groups >= 9), and your private creator will be written to the next free private creator tag, like this:
(0041,0010) SIEMENS XYZ
(0041,0011) ACME LTD XXX
(0041,0012) MY COMAPANY, MY PROD
(0041,1000) some SIEMENS private tag
(0041,1001) another SIEMENS private tag
...
(0041,1100) some ACME private tag
(0041,1101) another ACME private tag
...
(0041,1200) your own private tag
(0041,1201) another of your own private tags
If your DICOM framework does not handle this for you, you have to look for the first free private creator tag yourself, write your private creator in that tag, and use the corresponding tag range for your private tags. Of course, this is only relevant if you change existing DICOM files which already may contain some private tags.
Note that DICOM toolkits like DCMTK or pydicom usually contain a number of well-known private tags (together with their private creators), that have been collected from DICOM conformance statements and similar information.