I am working on magento 2.2.6

I am using file Vendor/magento/module-catalog/Helper/Product/View.php

In this, I am trying to get root category name or ID of product using product id in function initProductLayout()...

HOw to get this?