Skip to content

Commit

Permalink
Use workflow.source_path
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Dec 26, 2023
1 parent f66f1f2 commit 7cb9685
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions benchmarks/barrel_ecal/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DETECTOR_PATH = os.environ["DETECTOR_PATH"]

rule emcal_barrel_particles_gen:
input:
script="benchmarks/barrel_ecal/scripts/emcal_barrel_particles_gen.cxx",
script=workflow.source_path("benchmarks/barrel_ecal/scripts/emcal_barrel_particles_gen.cxx"),
params:
JUGGLER_N_EVENTS = 100,
output:
Expand Down Expand Up @@ -67,7 +67,7 @@ ln {input} {output}

rule emcal_barrel_particles_analysis:
input:
script="benchmarks/barrel_ecal/scripts/emcal_barrel_particles_analysis.cxx",
script=workflow.source_path("benchmarks/barrel_ecal/scripts/emcal_barrel_particles_analysis.cxx"),
sim="{DETECTOR_CONFIG}/sim_output/sim_emcal_barrel_{PARTICLE}.edm4hep.root",
wildcard_constraints:
PARTICLE="(electron|photon|piplus|piminus)", # avoid clash with "pions"
Expand All @@ -94,7 +94,7 @@ root -l -b -q '../{input.script}+("{wildcards.PARTICLE}", true)'

rule emcal_barrel_pions_analysis:
input:
script="benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx",
script=workflow.source_path("benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx"),
sim="{DETECTOR_CONFIG}/sim_output/sim_emcal_barrel_piplus_energies5.0_5.0.edm4hep.root",
output:
expand(
Expand All @@ -111,7 +111,7 @@ root -l -b -q '../{input.script}+("../{input.sim}")'

rule emcal_barrel_pi0_analysis:
input:
script="benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx",
script=workflow.source_path("benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx"),
sim="{DETECTOR_CONFIG}/sim_output/sim_emcal_barrel_pi0_energies5.0_5.0.edm4hep.root",
fsam="{DETECTOR_CONFIG}/results/emcal_barrel_electron_calibration.json",
output:
Expand Down Expand Up @@ -143,7 +143,7 @@ rule emcal_energy_scan:

rule emcal_barrel_particles_energy_scan_analysis:
input:
script="benchmarks/barrel_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx",
script=workflow.source_path("benchmarks/barrel_ecal/scripts/emcal_barrel_energy_scan_analysis.cxx"),
scan_points="{DETECTOR_CONFIG}/sim_output/emcal_barrel_energy_scan_points_{PARTICLE}.txt",
output:
"{DETECTOR_CONFIG}/results/energy_scan/emcal_barrel_{PARTICLE}_fsam_scan.png",
Expand All @@ -162,7 +162,7 @@ root -l -b -q '../{input.script}+("{wildcards.PARTICLE}")'

rule emcal_barrel_pion_rejection_analysis:
input:
script="benchmarks/barrel_ecal/scripts/emcal_barrel_pion_rejection_analysis.cxx",
script=workflow.source_path("benchmarks/barrel_ecal/scripts/emcal_barrel_pion_rejection_analysis.cxx"),
electron="{DETECTOR_CONFIG}/sim_output/sim_emcal_barrel_electron_energies1.0_18.0.edm4hep.root",
piminus="{DETECTOR_CONFIG}/sim_output/sim_emcal_barrel_piminus_energies1.0_18.0.edm4hep.root",
output:
Expand Down

0 comments on commit 7cb9685

Please sign in to comment.