Background: We aimed to compare the segmentation accuracy of heart substructure on contrast enhanced CT by deep neural network combined with different loss functions.Methods: We collected 35 thoracic tumor patients admitted to the Department of Radiation Oncology of Yunnan Cancer Hospital. Organ-at-risks (OARs) were defined as 10 organs of cardiac substructures (pericardium, heart, left atrium, left ventricle, right atrium, right ventricle, left main stem, left anterior descending Branch, left circumflex branch, right coronary artery), and use the OARs manually outlined by radiation oncologists on enhanced localization CT as the gold standard. The automatic segmentation results of GDL U-Net, WCEGDL U-Net, ELL U-Net, and GDL V-Net are compared with the gold standard. DSC, JC, HD, VD are used as quantitative evaluation indicators. Results: The segmentation DSC of the pericardium, heart, atrium, and ventricle of the DCNN with different loss functions all reached above 0.87. WCEGDL U-Net segmented the pericardium with DSC of 0.961 and 95% HD of 3.449mm; The segmentation DSC of the heart by ELL U-Net reached 0.965, and the 95% HD was 3.477mm; GDL U-Net segmentation of left atrium and right ventricle is better, DSC is 0.896 (95% HD: 3.429mm), 0.912 (95% HD: 4.242mm);GDL V-Net has better segmentation performance for right atrium and left ventricle, with DSC of 0.881 (95% HD: 3.904mm) and 0.940 (95% HD: 2.821mm). Conclusions: The DCNN proposed in this study have achieved better segmentation effects on the pericardium, heart and four chambers in cardiac substructure segmentation.