Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:23:54

0001 import sys
0002 import sympy
0003 
0004 from detray_sympy.common import name_expr
0005 from detray_sympy.output import write_out_file
0006 from detray_sympy.codegen import gen_cxx_code
0007 
0008 if __name__ == "__main__":
0009     if len(sys.argv) > 1:
0010         output = sys.argv[1]
0011     else:
0012         output = None
0013 
0014     C = sympy.MatrixSymbol("C", 6, 6).as_explicit().as_mutable()
0015 
0016     J_full = sympy.MatrixSymbol("J_full", 6, 6).as_explicit().as_mutable()
0017     tmp = sympy.eye(6)
0018     tmp[0:4, 0:5] = J_full[0:4, 0:5]
0019     tmp[5:6, 0:5] = J_full[5:6, 0:5]
0020     J_full = tmp
0021 
0022     input_name_exprs = [name_expr("C", C), name_expr("J_full", J_full)]
0023     output_name_exprs = [name_expr("new_C", J_full * C * J_full.T)]
0024     code = gen_cxx_code(
0025         "transport_covariance_to_bound_impl",
0026         input_name_exprs,
0027         output_name_exprs,
0028         run_cse=True,
0029     )
0030 
0031     write_out_file(code, output)