From 9311f81699a090bd733cefee42226eaa20c09a23 Mon Sep 17 00:00:00 2001 From: Tooba Ali <alit1@myumanitoba.ca> Date: Mon, 24 Oct 2022 17:09:55 +0000 Subject: [PATCH] truth reconstruction in single events --- benchmarks/dis/analysis/truth_reconstruction.py | 5 +---- benchmarks/single/analyze.sh | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/benchmarks/dis/analysis/truth_reconstruction.py b/benchmarks/dis/analysis/truth_reconstruction.py index 8b072820..b985155e 100644 --- a/benchmarks/dis/analysis/truth_reconstruction.py +++ b/benchmarks/dis/analysis/truth_reconstruction.py @@ -15,8 +15,7 @@ parser.add_argument('--ebeam', type=float, help='Electron beam energy.') parser.add_argument('--pbeam', type=float, help='Proton (or ion) beam energy.') parser.add_argument('--minq2', type=float, help='Minimum four-momentum transfer squared Q2.') parser.add_argument('--nevents', type=float, help='Number of events to process.') -parser.add_argument('-o', dest='outdir', default='results/dis/', help='Output directory.') -parser.add_argument('--name_tag', type=str, help='Single events juggler file name tag') +parser.add_argument('-o', dest='outdir', default='results/', help='Output directory.') parser.add_argument('--benchmark_tag', type=str, help='Single or dis benchmarks') args = parser.parse_args() kwargs = vars(args) @@ -27,14 +26,12 @@ minq2 = int(args.minq2) k = int(args.ebeam) p = int(args.pbeam) Nevents = int(args.nevents) -tag = args.name_tag benchmark_tag = args.benchmark_tag r_path = dis_path = 'dis/%gon%g/minQ2=%g/truth_reconstruction/' single_path = 'single/truth_reconstruction/' if benchmark_tag == 'single': r_path = single_path - config = tag for array in ur.iterate(rec_file + ':events',['MCParticles/MCParticles.generatorStatus', 'MCParticles/MCParticles.mass', diff --git a/benchmarks/single/analyze.sh b/benchmarks/single/analyze.sh index 547ec8bc..08c96cd9 100644 --- a/benchmarks/single/analyze.sh +++ b/benchmarks/single/analyze.sh @@ -9,3 +9,9 @@ if [[ "$?" -ne "0" ]] ; then echo "ERROR analysis failed" exit 1 fi + +python benchmarks/dis/analysis/truth_reconstruction.py --rec_file ${JUGGLER_REC_FILE} --config ${JUGGLER_FILE_NAME_TAG} --nevents ${JUGGLER_N_EVENTS} --benchmark_tag ${BENCHMARK_TAG} +if [[ "$?" -ne "0" ]] ; then + echo "ERROR running truth_reconstruction script" + exit 1 +fi -- GitLab