Convert Digital Numbers to Physical values

Hi, friends!
I use the products from Sentinel-2 MSI to gerate and analysis biophysical parameters.
How convert the digital numbers of L1C product to physical values (Bidirectional Reflectance Factor)?


If you use SNAP/S2TBX and open the xml manifest file then it is done automatically.
Otherwise you find a quantification_value in the manfiest. Its value is 10000. Divide the value from the jpeg2000 values by this value.