finished calculation based on B-matrix of reflectivity