Back to home page

EIC code displayed by LXR

 
 

    


Warning, /snippets/JetsAndHF/JetValidation/Snakefile is written in an unsupported language. File is not indexed.

0001 # =============================================================================
0002 # @file    Snakefile
0003 # @authors Derek Anderson (derek.murphy.anderson@protonmail.com)
0004 # -----------------------------------------------------------------------------
0005 # @brief Snakefile for executing snakemake workflow. General
0006 #   workflow is:
0007 #     1. Generate relevant shell scripts to run in eic-shell
0008 #     2. Generate nsplit filelists to process in parallel
0009 #     3. For each filelist, run MakeJetValidationHists.C
0010 #     4. hadd outputs from step 3 and run MakeJetValidationPlots.C
0011 #        on merged output
0012 # =============================================================================
0013 
0014 configfile: "config.yml"
0015 
0016 rule all:
0017     input:
0018         f"run/plots/matchedJetResolutionVsEta.epic{config['campaign']}_{config['dataset']}.png"
0019 
0020 rule jets_scripts:
0021     output:
0022         rucio=f"run/scripts/do_rucio.epic{config['campaign']}_{config['dataset']}.sh",
0023         plots=f"run/scripts/do_plots.epic{config['campaign']}_{config['dataset']}.sh",
0024         hists=[f"run/scripts/do_hists.split_{split:0{config['length']}}.epic{config['campaign']}_{config['dataset']}.sh" for split in range(config['nsplit'])],
0025     shell:
0026         "python MakeRunScripts.py -d {config[did]} -c {config[campaign]} -a {config[dataset]} -s {config[nsplit]} -l {config[length]}"
0027 
0028 rule jets_lists:
0029     input:
0030         script=f"run/scripts/do_rucio.epic{config['campaign']}_{config['dataset']}.sh",
0031     output:
0032         files=[f"run/lists/files.split_{split:0{config['length']}}.epic{config['campaign']}_{config['dataset']}.list" for split in range(config['nsplit'])],
0033     shell:
0034         "{config[shell]} -- {input.script}"
0035 
0036 rule jets_hists:
0037     input:
0038         splits=f"run/lists/files.split_{{split}}.epic{config['campaign']}_{config['dataset']}.list",
0039     output:
0040         hists=f"run/hists/hists.split_{{split}}.epic{config['campaign']}_{config['dataset']}.root",
0041     shell:
0042         "{config[shell]} -- run/scripts/do_hists.split_{wildcards.split}.epic{config[campaign]}_{config[dataset]}.sh"
0043 
0044 rule jets_plots:
0045     input:
0046         script=f"run/scripts/do_plots.epic{config['campaign']}_{config['dataset']}.sh",
0047         hists=[f"run/hists/hists.split_{split:0{config['length']}}.epic{config['campaign']}_{config['dataset']}.root" for split in range(config['nsplit'])],
0048     output:
0049         plots=f"run/plots/matchedJetResolutionVsEta.epic{config['campaign']}_{config['dataset']}.png",
0050     shell:
0051         "{config[shell]} -- {input.script}"