Skip to content
Snippets Groups Projects
Commit 0b6ddfeb authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

benchmarks/backgrounds: stream from XRootD

parent 089930a9
No related branches found
No related tags found
No related merge requests found
...@@ -2,44 +2,13 @@ import os ...@@ -2,44 +2,13 @@ import os
import shutil import shutil
rule backgrounds_get_beam_gas_electron:
input:
provider.remote(remote_path("EPIC/EVGEN/BACKGROUNDS/BEAMGAS/electron/GETaLM1.0.0-1.0/10GeV/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.hepmc3.tree.root")),
output:
"input/backgrounds/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.hepmc3.tree.root",
run:
shutil.move(input[0], output[0])
rule backgrounds_get_beam_gas_proton:
input:
provider.remote(remote_path("EPIC/EVGEN/BACKGROUNDS/BEAMGAS/proton/pythia8.306-1.0/100GeV/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.hepmc3.tree.root")),
output:
"input/backgrounds/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.hepmc3.tree.root",
run:
shutil.move(input[0], output[0])
rule backgrounds_get_DIS:
input:
provider.remote(remote_path("EPIC/EVGEN/DIS/NC/{BEAM}/minQ2={MINQ2}/pythia8NCDIS_{BEAM}_minQ2={MINQ2}_{SUFFIX}.hepmc3.tree.root")),
wildcard_constraints:
BEAM="\d+x\d+",
MINQ2="\d+",
output:
"input/backgrounds/pythia8NCDIS_{BEAM}_minQ2={MINQ2}_{SUFFIX}.hepmc3.tree.root",
run:
shutil.move(input[0], output[0])
rule backgrounds_sim: rule backgrounds_sim:
input: input:
hepmc="input/backgrounds/{NAME}.hepmc3.tree.root",
warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root", warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root",
output: output:
"sim_output/{DETECTOR_CONFIG}/backgrounds/{NAME}.edm4hep.root", "sim_output/{DETECTOR_CONFIG}/backgrounds/{PATH}.edm4hep.root",
log: log:
"sim_output/{DETECTOR_CONFIG}/backgrounds/{NAME}.edm4hep.root.log", "sim_output/{DETECTOR_CONFIG}/backgrounds/{PATH}.edm4hep.root.log",
params: params:
N_EVENTS=100 N_EVENTS=100
shell: shell:
...@@ -51,7 +20,7 @@ ddsim \ ...@@ -51,7 +20,7 @@ ddsim \
-v WARNING \ -v WARNING \
--numberOfEvents {params.N_EVENTS} \ --numberOfEvents {params.N_EVENTS} \
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \ --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
--inputFiles {input.hepmc} \ --inputFiles root://dtn-eic.jlab.org//work/eic2/{wildcards.PATH}.hepmc3.tree.root \
--outputFile {output} --outputFile {output}
""" """
...@@ -62,11 +31,9 @@ rule backgrounds_ecal_backwards: ...@@ -62,11 +31,9 @@ rule backgrounds_ecal_backwards:
input: input:
matplotlibrc=".matplotlibrc", matplotlibrc=".matplotlibrc",
script="benchmarks/backgrounds/ecal_backwards.py", script="benchmarks/backgrounds/ecal_backwards.py",
electron_beam_gas_gen="input/backgrounds/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.hepmc3.tree.root", electron_beam_gas_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/electron/GETaLM1.0.0-1.0/10GeV/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.edm4hep.root",
electron_beam_gas_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.edm4hep.root", physics_signal_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/EPIC/EVGEN/DIS/NC/10x100/minQ2=1/pythia8NCDIS_10x100_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1.edm4hep.root",
physics_signal_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/pythia8NCDIS_10x100_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1.edm4hep.root", proton_beam_gas_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/proton/pythia8.306-1.0/100GeV/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.edm4hep.root",
proton_beam_gas_gen="input/backgrounds/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.hepmc3.tree.root",
proton_beam_gas_sim="sim_output/" + DETECTOR_CONFIG + "/backgrounds/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.edm4hep.root",
output: output:
directory("results/backgrounds/backwards_ecal") directory("results/backgrounds/backwards_ecal")
threads: workflow.cores threads: workflow.cores
...@@ -87,10 +54,10 @@ dask worker tcp://$DASK_SCHEDULER --nworkers {threads} --nthreads 1 & ...@@ -87,10 +54,10 @@ dask worker tcp://$DASK_SCHEDULER --nworkers {threads} --nthreads 1 &
WORKER_PID=$! WORKER_PID=$!
env \ env \
MATPLOTLIBRC={input.matplotlibrc} \ MATPLOTLIBRC={input.matplotlibrc} \
ELECTRON_BEAM_GAS_GEN=$(realpath {input.electron_beam_gas_gen}) \ ELECTRON_BEAM_GAS_GEN=root://dtn-eic.jlab.org//work/eic2/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/electron/GETaLM1.0.0-1.0/10GeV/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.hepmc3.tree.root \
ELECTRON_BEAM_GAS_SIM=$(realpath {input.electron_beam_gas_sim}) \ ELECTRON_BEAM_GAS_SIM=$(realpath {input.electron_beam_gas_sim}) \
PHYSICS_PROCESS_SIM=$(realpath {input.physics_signal_sim}) \ PHYSICS_PROCESS_SIM=$(realpath {input.physics_signal_sim}) \
PROTON_BEAM_GAS_GEN=$(realpath {input.proton_beam_gas_gen}) \ PROTON_BEAM_GAS_GEN=root://dtn-eic.jlab.org//work/eic2/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/proton/pythia8.306-1.0/100GeV/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.hepmc3.tree.root \
PROTON_BEAM_GAS_SIM=$(realpath {input.proton_beam_gas_sim}) \ PROTON_BEAM_GAS_SIM=$(realpath {input.proton_beam_gas_sim}) \
OUTPUT_DIR={output} \ OUTPUT_DIR={output} \
python {input.script} python {input.script}
......
...@@ -6,9 +6,9 @@ sim:backgrounds: ...@@ -6,9 +6,9 @@ sim:backgrounds:
- ln -s $LOCAL_DATA_PATH/input input - ln -s $LOCAL_DATA_PATH/input input
- | - |
snakemake --cores 2 \ snakemake --cores 2 \
sim_output/$DETECTOR_CONFIG/backgrounds/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.edm4hep.root \ sim_output/$DETECTOR_CONFIG/backgrounds/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/electron/GETaLM1.0.0-1.0/10GeV/GETaLM1.0.0-1.0_ElectronBeamGas_10GeV_foam_emin10keV_run001.edm4hep.root \
sim_output/$DETECTOR_CONFIG/backgrounds/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.edm4hep.root \ sim_output/$DETECTOR_CONFIG/backgrounds/EPIC/EVGEN/DIS/NC/10x100/minQ2=1/pythia8NCDIS_10x100_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1.edm4hep.root \
sim_output/$DETECTOR_CONFIG/backgrounds/pythia8NCDIS_10x100_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1.edm4hep.root sim_output/$DETECTOR_CONFIG/backgrounds/EPIC/EVGEN/BACKGROUNDS/BEAMGAS/proton/pythia8.306-1.0/100GeV/pythia8.306-1.0_ProtonBeamGas_100GeV_run001.edm4hep.root
bench:backgrounds_emcal_backwards: bench:backgrounds_emcal_backwards:
extends: .det_benchmark extends: .det_benchmark
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment