Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Tweak full_chain_odd.py #3035

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions Examples/Scripts/Python/full_chain_odd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env python3
import os, argparse, pathlib, acts, acts.examples

import os
import argparse
import pathlib

import acts
import acts.examples
from acts.examples.simulation import (
addParticleGun,
MomentumConfig,
Expand Down Expand Up @@ -29,12 +35,20 @@
)
from common import getOpenDataDetectorDirectory
from acts.examples.odd import getOpenDataDetector
import acts.examples.edm4hep

parser = argparse.ArgumentParser(description="Full chain with the OpenDataDetector")

parser.add_argument("--events", "-n", help="Number of events", type=int, default=100)
u = acts.UnitConstants


parser = argparse.ArgumentParser(description="Full chain with the OpenDataDetector")
parser.add_argument(
"--output",
"-o",
help="Output directory",
type=pathlib.Path,
default=pathlib.Path.cwd() / "odd_output",
)
parser.add_argument("--events", "-n", help="Number of events", type=int, default=100)
parser.add_argument("--skip", "-s", help="Number of events", type=int, default=0)
parser.add_argument("--edm4hep", help="Use edm4hep inputs", type=pathlib.Path)
parser.add_argument(
Expand All @@ -58,13 +72,12 @@

args = vars(parser.parse_args())

outputDir = args["output"]
ttbar = args["ttbar"]
g4_simulation = args["geant4"]
ambiguity_MLSolver = args["MLSolver"]
seedFilter_ML = args["MLSeedFilter"]
u = acts.UnitConstants
geoDir = getOpenDataDetectorDirectory()
outputDir = pathlib.Path.cwd() / "odd_output"
# acts.examples.dump_args_calls(locals()) # show python binding calls

oddMaterialMap = geoDir / "data/odd-material-maps.root"
Expand All @@ -86,6 +99,8 @@
)

if args["edm4hep"]:
import acts.examples.edm4hep

edm4hepReader = acts.examples.edm4hep.EDM4hepReader(
inputPath=str(args["edm4hep"]),
inputSimHits=[
Expand Down
Loading