From 6a7e673bca68ac9867aa11fcd5969df086c014ec Mon Sep 17 00:00:00 2001 From: Wouter Deconinck <wdconinc@gmail.com> Date: Mon, 26 Jun 2023 21:16:31 +0000 Subject: [PATCH] fix: use positional arguments in hepmc3.GenEvent constructor --- benchmarks/clustering/scripts/gen_particles.py | 2 +- benchmarks/ecal/scripts/gen_particles.py | 2 +- benchmarks/imaging_ecal/scripts/gen_particles.py | 2 +- benchmarks/imaging_shower_ML/scripts/gen_particles.py | 2 +- benchmarks/rich/scripts/rich_data_gen.py | 2 +- benchmarks/tracking/scripts/gen_particles.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmarks/clustering/scripts/gen_particles.py b/benchmarks/clustering/scripts/gen_particles.py index 620bf0aa..2dc50606 100644 --- a/benchmarks/clustering/scripts/gen_particles.py +++ b/benchmarks/clustering/scripts/gen_particles.py @@ -21,7 +21,7 @@ PARTICLES = { def gen_event(p, theta, phi, pid, mass): - evt = hm.GenEvent(momentum_unit=hm.Units.MomentumUnit.GEV, length_unit=hm.Units.LengthUnit.MM) + evt = hm.GenEvent(hm.Units.MomentumUnit.GEV, hm.Units.LengthUnit.MM) # final state state = 1 e0 = np.sqrt(p*p + mass*mass) diff --git a/benchmarks/ecal/scripts/gen_particles.py b/benchmarks/ecal/scripts/gen_particles.py index 620bf0aa..2dc50606 100644 --- a/benchmarks/ecal/scripts/gen_particles.py +++ b/benchmarks/ecal/scripts/gen_particles.py @@ -21,7 +21,7 @@ PARTICLES = { def gen_event(p, theta, phi, pid, mass): - evt = hm.GenEvent(momentum_unit=hm.Units.MomentumUnit.GEV, length_unit=hm.Units.LengthUnit.MM) + evt = hm.GenEvent(hm.Units.MomentumUnit.GEV, hm.Units.LengthUnit.MM) # final state state = 1 e0 = np.sqrt(p*p + mass*mass) diff --git a/benchmarks/imaging_ecal/scripts/gen_particles.py b/benchmarks/imaging_ecal/scripts/gen_particles.py index a357b752..22b37a4d 100644 --- a/benchmarks/imaging_ecal/scripts/gen_particles.py +++ b/benchmarks/imaging_ecal/scripts/gen_particles.py @@ -22,7 +22,7 @@ PARTICLES = { # p in GeV, angle in degree, vertex in mm def gen_event(prange=(8, 100), arange=(0, 20), phrange=(0., 360.), parts=[(p, m) for p, m in PARTICLES.values()]): - evt = hm.GenEvent(momentum_unit=hm.Units.MomentumUnit.GEV, length_unit=hm.Units.LengthUnit.MM) + evt = hm.GenEvent(hm.Units.MomentumUnit.GEV, hm.Units.LengthUnit.MM) pid, mass = parts[np.random.randint(len(parts))] # final state diff --git a/benchmarks/imaging_shower_ML/scripts/gen_particles.py b/benchmarks/imaging_shower_ML/scripts/gen_particles.py index 372b2c82..4e143a40 100644 --- a/benchmarks/imaging_shower_ML/scripts/gen_particles.py +++ b/benchmarks/imaging_shower_ML/scripts/gen_particles.py @@ -22,7 +22,7 @@ PARTICLES = { def gen_event(p, theta, phi, pid, mass): - evt = hm.GenEvent(momentum_unit=hm.Units.MomentumUnit.GEV, length_unit=hm.Units.LengthUnit.MM) + evt = hm.GenEvent(hm.Units.MomentumUnit.GEV, hm.Units.LengthUnit.MM) # final state state = 1 e0 = np.sqrt(p*p + mass*mass) diff --git a/benchmarks/rich/scripts/rich_data_gen.py b/benchmarks/rich/scripts/rich_data_gen.py index c609a888..f3d48016 100644 --- a/benchmarks/rich/scripts/rich_data_gen.py +++ b/benchmarks/rich/scripts/rich_data_gen.py @@ -20,7 +20,7 @@ PARTICLES = [ # p in GeV, angle in degree, vertex in mm def gen_event(prange=(8, 100), arange=(0, 20)): - evt = hm.GenEvent(momentum_unit=hm.Units.MomentumUnit.GEV, length_unit=hm.Units.LengthUnit.MM) + evt = hm.GenEvent(hm.Units.MomentumUnit.GEV, hm.Units.LengthUnit.MM) pid, mass = PARTICLES[np.random.randint(len(PARTICLES))] # final state diff --git a/benchmarks/tracking/scripts/gen_particles.py b/benchmarks/tracking/scripts/gen_particles.py index 3b86efca..afdbb02a 100644 --- a/benchmarks/tracking/scripts/gen_particles.py +++ b/benchmarks/tracking/scripts/gen_particles.py @@ -21,7 +21,7 @@ PARTICLES = { def gen_event(p, theta, phi, pid, mass): - evt = hm.GenEvent(momentum_unit=hm.Units.MomentumUnit.GEV, length_unit=hm.Units.LengthUnit.MM) + evt = hm.GenEvent(hm.Units.MomentumUnit.GEV, hm.Units.LengthUnit.MM) # final state state = 1 e0 = np.sqrt(p*p + mass*mass) -- GitLab