Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-18 07:06:13

0001 #!/usr/bin/env python3
0002 # SPDX-License-Identifier: LGPL-3.0-or-later
0003 # Copyright (C) 2024 Shujie Li
0004 
0005 import os
0006 import argparse
0007 
0008 import acts
0009 
0010 import epic
0011 from geometry import runGeometry
0012 
0013 if "__main__" == __name__:
0014     p = argparse.ArgumentParser(
0015         description="Script to generate geometry-map.json for ePIC geometry"
0016     )
0017     p.add_argument(
0018         "-i",
0019         "--xmlFile",
0020         default=(
0021             os.environ.get("DETECTOR_PATH", "")
0022             + "/"
0023             + os.environ.get("DETECTOR_CONFIG", "")
0024             + ".xml"
0025         ),
0026         help="Input xml file containing ePIC geometry",
0027     )
0028     args = p.parse_args()
0029 
0030     detector, trackingGeometry, decorators = epic.getDetector(args.xmlFile)
0031 
0032     runGeometry(
0033         trackingGeometry,
0034         decorators,
0035         outputDir=os.getcwd(),
0036         outputObj=False,
0037         outputCsv=False,
0038         outputJson=True,
0039         outputRoot=True,
0040     )