Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:09:09

0001 #!/usr/bin/env python3
0002 import tempfile
0003 from pathlib import Path
0004 import shutil
0005 
0006 import acts
0007 from truth_tracking_gx2f import runTruthTrackingGx2f
0008 
0009 from physmon_common import makeSetup
0010 
0011 setup = makeSetup()
0012 
0013 with tempfile.TemporaryDirectory() as temp:
0014     s = acts.examples.Sequencer(
0015         events=10000,
0016         numThreads=-1,
0017         logLevel=acts.logging.INFO,
0018     )
0019 
0020     tp = Path(temp)
0021     runTruthTrackingGx2f(
0022         trackingGeometry=setup.trackingGeometry,
0023         field=setup.field,
0024         outputDir=tp,
0025         digiConfigFile=setup.digiConfig,
0026         s=s,
0027     )
0028 
0029     s.run()
0030     del s
0031 
0032     perf_file = tp / "performance_gx2f.root"
0033     assert perf_file.exists(), "Performance file not found"
0034     shutil.copy(perf_file, setup.outdir / "performance_gx2f.root")