Camera in Optix

How can I compute the focal length for camera given screen resolution, field of view and aspect ration?
I need this for the camera_u, camera_v and camera_w parameters in Optix. I saw the sutilCalculateCameraVariables function, but this doesn’t compute the focal length.

You would not be able to do that with these given parameters.
If you described the exact problem you want to solve, that would allow to answer this more precisely.

First, the function and camera UVW parameters you’re looking at are for a pinhole camera which has no focal length.
To calculate a focal length you’d need to have a given sensor size, for example, as used inside a thin lens camera implementation.
The sensor size and focal length is expressed in relation to your scene units (e.g millimeters, centimeters, etc.) not so much in relation to your screen resolution.