Minimum distance measure in CarMaker simulations via Python Api

We are doing some automated CarMaker simulations using Python api.

At the end of each simulation, we would like to have some measure on how close (minimum distance measure) the Ego vehicle was with any other car in the simulation. This is to identify potential near miss cases. Is it possible to get those data from log or via some api calls?

Thanks! Any help is greatly appreciated!