From 4ca9ed265158522c07a8c3109172c2a38e76b903 Mon Sep 17 00:00:00 2001 From: Klaus Rabbertz <klaus.rabbertz@cern.ch> Date: Mon, 28 Aug 2023 21:42:03 +0200 Subject: [PATCH] Numerous changes to fix issues from transition to NNLOJET modules2; added actual luigi/law configs as templates; added CMS7TeV dijet setup as example runcard and steering --- 2jetfc.fnl2412eff-fc-v2.run | 111 ++++++++ ...dules2_rev6591_bridge-0.0.46-WiP_202307.sh | 48 ++++ analysis/tasks/Absolute.py | 2 +- analysis/tasks/AddStatunc.py | 4 +- analysis/tasks/CopyRewarmup.py | 18 +- analysis/tasks/CopyTables.py | 2 +- analysis/tasks/CopyWarmup.py | 17 +- analysis/tasks/FastProd.py | 18 +- analysis/tasks/FastWarm.py | 2 +- analysis/tasks/FnloCppreadFinal.py | 2 +- analysis/tasks/MergeFastProd.py | 2 +- analysis/tasks/MergedGridClosure.py | 2 +- analysis/tasks/MultiGridClosure.py | 2 +- analysis/tasks/PlotRuntime.py | 2 +- analysis/tasks/PlotVegasGrids.py | 18 +- analysis/tasks/Recombine.py | 2 +- analysis/tasks/Rewarmup.py | 1 + analysis/tasks/SingleGridClosure.py | 2 +- analysis/tasks/Warmup.py | 13 +- analysis/util.py | 16 +- law.cfg.template | 19 +- luigi.cfg.template | 183 ++++++------ setup_law_c7_v2.sh | 67 +++++ steeringfiles/2jet.fnl2412eff-fc.str | 269 ++++++++++++++++++ steeringfiles/SteerModify.str | 17 +- 25 files changed, 667 insertions(+), 172 deletions(-) create mode 100644 2jetfc.fnl2412eff-fc-v2.run create mode 100644 analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-0.0.46-WiP_202307.sh create mode 100644 setup_law_c7_v2.sh create mode 100644 steeringfiles/2jet.fnl2412eff-fc.str diff --git a/2jetfc.fnl2412eff-fc-v2.run b/2jetfc.fnl2412eff-fc-v2.run new file mode 100644 index 0000000..68121d4 --- /dev/null +++ b/2jetfc.fnl2412eff-fc-v2.run @@ -0,0 +1,111 @@ +!###############################################! +!## ##! +!## _ ___ ____ ____ ____________ ##! +!## / |/ / |/ / / / __ \__ / / __/_ __/ ##! +!## / / / /__/ /_/ / // / _/ / / ##! +!## /_/|_/_/|_/____/\____/\___/___/ /_/ ##! +!## ##! +!## RUNCARD ##! +!###############################################! + + +PROCESS 2jetfc + collider = pp + sqrts = 7000 + jet = antikt[0.7] + jet_exclusive = .false. ! inclusive or exclusive Njet + jet_recomb = V4 ! recombination scheme: V4 is 4-vector addition + decay_type = 0 ! 0 no decay? +END_PROCESS + + +RUN @CHANNEL@-CMS7-ak07 ! job name + PDF = NNPDF31_nnlo_as_0118[0] ! PDFset[member] + tcut = 1d-8 ! y0, appears in filenames of warmup + iseed = @SEED@ ! seed index + cache_kinematics = .true. ! normally true + reset_vegas_grid = .true. + lips_reduce = .true. ! optimisation for identical particles in FS; normally true + angular_average = .false. ! azimuthal rotation; only relevant for NNLO; use RR false; R, RV true; rest: true + multi_channel = .true. ! color sampling; true means faster, but less precise; must be consistent between warmup & production + @RUNMODE@ = @EVENTS@[@ITERATIONS@] ! Normally #iterations is 1 for production +END_RUN + + +PARAMETERS + MASS[H] = 125 + WIDTH[H] = 0.004029643852 + MASS[Z] = 91.1876 + WIDTH[Z] = 2.4952 + MASS[W] = 80.398 + WIDTH[W] = 2.1054 + MASS[t] = 173.2 + WIDTH[t] = 1.41 + MASS[b] = 4.18 + MASS[c] = 1.275 + MASS[tau] = 1.777 +END_PARAMETERS + + +@UNIT_PHASE@ + + +SELECTORS + select ptj1 min = 60.0 + select ptj2 min = 30.0 + select abs_yj1 max = 2.5 + select abs_yj2 max = 2.5 + select m12 min = 197.0 max = 5058.0 + select max_abs_y_j12 min = 0.0 max = 2.5 + select njets min = 2 +END_SELECTORS + + +HISTOGRAMS + + m12 > fnl2412eff-fc-v2_ym0_m12 [197.0,296.0,419.0,565.0,740.0,944.0,1181.0,1455.0,1770.0,2132.0,2546.0,3019.0,3416.0,4010.0] grid=fnl2412eff-fc-v2_ym0_m12.fast ! output_type = 1 (like modules 1, default 0 means no channel breakdown), normally 0 now for modules 2 + HISTOGRAM_SELECTORS + select max_abs_y_j12 min=0.0 max=0.5 + END_HISTOGRAM_SELECTORS + + m12 > fnl2412eff-fc-v2_ym1_m12 [270.0,386.0,526.0,693.0,890.0,1118.0,1383.0,1687.0,2037.0,2438.0,2895.0,3416.0,4010.0] grid=fnl2412eff-fc-v2_ym1_m12.fast + HISTOGRAM_SELECTORS + select max_abs_y_j12 min=0.5 max=1.0 + END_HISTOGRAM_SELECTORS + + m12 > fnl2412eff-fc-v2_ym2_m12 [419.0,565.0,740.0,944.0,1181.0,1455.0,1770.0,2132.0,2546.0,3147.0,3854.0,4509.0] grid=fnl2412eff-fc-v2_ym2_m12.fast + HISTOGRAM_SELECTORS + select max_abs_y_j12 min=1.0 max=1.5 + END_HISTOGRAM_SELECTORS + + m12 > fnl2412eff-fc-v2_ym3_m12 [565.0,740.0,944.0,1181.0,1455.0,1770.0,2132.0,2546.0,3019.0,3558.0,5058.0] grid=fnl2412eff-fc-v2_ym3_m12.fast + HISTOGRAM_SELECTORS + select max_abs_y_j12 min=1.5 max=2.0 + END_HISTOGRAM_SELECTORS + + m12 > fnl2412eff-fc-v2_ym4_m12 [1000.0,1246.0,1530.0,1856.0,2231.0,2659.0,3147.0,3704.0,5058.0] grid=fnl2412eff-fc-v2_ym4_m12.fast + HISTOGRAM_SELECTORS + select max_abs_y_j12 min=2.0 max=2.5 + END_HISTOGRAM_SELECTORS + +END_HISTOGRAMS + + +SCALES +!7-scale setup + muf = 1.0 * m12 mur = 1.0 * m12 + muf = 0.5 * m12 mur = 0.5 * m12 + muf = 2.0 * m12 mur = 2.0 * m12 + muf = 1.0 * m12 mur = 0.5 * m12 + muf = 1.0 * m12 mur = 2.0 * m12 + muf = 0.5 * m12 mur = 1.0 * m12 + muf = 2.0 * m12 mur = 1.0 * m12 +END_SCALES + + +REWEIGHT m12**4 + + +CHANNELS + @CHANNEL@ ! LO, R, V, RRa, RRb, RV, VV ! no region entry anymore! No coloured particle in FS (W,Z,H) --> RR; +END_CHANNELS diff --git a/analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-0.0.46-WiP_202307.sh b/analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-0.0.46-WiP_202307.sh new file mode 100644 index 0000000..329692b --- /dev/null +++ b/analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-0.0.46-WiP_202307.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +# Bootstrap file for batch jobs that is sent with all jobs and +# automatically called by the law remote job wrapper script to find the +# setup.sh file of this example which sets up software and some environment +# variables. The "{{analysis_path}}" variable is defined in the workflow +# base tasks in analysis/framework.py. + +action() { + + # law + luigi env variables + local base="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + export LAW_HOME="$base/.law" + export LAW_CONFIG_FILE="$base/law.cfg" + export LUIGI_CONFIG_PATH="$base/luigi.cfg" + export ANALYSIS_PATH="$base" + export ANALYSIS_DATA_PATH="$ANALYSIS_PATH/data" + + # luigi + law + export PATH="$base/law/bin:$base/luigi/bin:$PATH" + export PYTHONPATH="$base/law:$base/luigi:$base/six:$base/python-dateutil-2.8.2:$base:$PYTHONPATH" + + # lcg software stack with python3 and gcc11 (use the same one as for cvmfs install of NNLOJET & APPLfast) + source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos7-gcc11-opt/setup.sh + + # grid storage interface with gfal2, if required + # C7 with python3 + source /cvmfs/grid.cern.ch/centos7-ui-200122/etc/profile.d/setup-c7-ui-python3-example.sh + + # NNLOJET + APPLfast (cvmfs) + applfastpath="/cvmfs/etp.kit.edu/fastnnlo-2888_bridge-0.0.46-WiP_202307_lcg102-c7-gcc11" + #applfastpath="/eos/theory/project/applfast/local" + # LCG not needed here since source'd already above! + # NNLOJET & APPLfast + source $applfastpath/src/fnlosrc_source.sh + # Rivet + source $applfastpath/src/rivetenv.sh + # If fastNLO version of grid install in /cvmfs/etp.kit.edu not new enough for evaluation, + # then use local install for plotting etc, but keep scripts of NNLOJET in PATH + #export PATH="$applfastpath/src/NNLOJET_rev6591/driver/bin:$PATH" + + #export PYTHONPATH="$PWD:$PYTHONPATH" ??? + + tar -xzf analysis*.tar.gz + rm analysis*.tar.gz + +} +action diff --git a/analysis/tasks/Absolute.py b/analysis/tasks/Absolute.py index 4b0e2b0..27db345 100644 --- a/analysis/tasks/Absolute.py +++ b/analysis/tasks/Absolute.py @@ -28,7 +28,7 @@ class Absolute(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") ) observables = luigi.ListParameter() diff --git a/analysis/tasks/AddStatunc.py b/analysis/tasks/AddStatunc.py index 88ef250..9a97666 100644 --- a/analysis/tasks/AddStatunc.py +++ b/analysis/tasks/AddStatunc.py @@ -30,8 +30,8 @@ class AddStatunc(Task, law.LocalWorkflow): observables = luigi.ListParameter() rivetid = luigi.Parameter() histoids = luigi.ListParameter() - binsizefactors = luigi.ListParameter(default='0') - multcoefffactors = luigi.ListParameter(default='0') + binsizefactors = luigi.ListParameter(default=['0']) + multcoefffactors = luigi.ListParameter(default=['0']) def create_branch_map(self): """Branch data dicts. Each branch should correspond to exactly one output.""" diff --git a/analysis/tasks/CopyRewarmup.py b/analysis/tasks/CopyRewarmup.py index cb4ba7e..36af88b 100644 --- a/analysis/tasks/CopyRewarmup.py +++ b/analysis/tasks/CopyRewarmup.py @@ -26,20 +26,20 @@ class CopyRewarmup(Task, TarballExtractionMixin, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) - jobnameext = luigi.Parameter() cutoff = luigi.Parameter() - kinetags = luigi.DictParameter() def create_branch_map(self): """Branch data dicts. Each branch should correspond to exactly one output.""" - return { - i : {'index': i, 'channel': channel, - 'kinetag': self.kinetags[channel]} - for i, channel in enumerate(self.channels) - } + branchmap = {} + for i, channel in enumerate(self.channels): + branchmap[i] = { + 'index': i, + 'channel': channel + } + return branchmap def workflow_requires(self): if self.force: @@ -57,7 +57,7 @@ class CopyRewarmup(Task, TarballExtractionMixin, law.LocalWorkflow): out_dir, self.warm_dir, 'rewarmup', self.name, self.process, self.branch_data['channel'], - self.jobnameext, self.cutoff, self.branch_data['kinetag'] + self.jobnameext, self.cutoff, self.branch_data['channel'] ) ) diff --git a/analysis/tasks/CopyTables.py b/analysis/tasks/CopyTables.py index 693e8b4..8a350df 100644 --- a/analysis/tasks/CopyTables.py +++ b/analysis/tasks/CopyTables.py @@ -26,7 +26,7 @@ class CopyTables(Task, TarballExtractionMixin, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) def create_branch_map(self): diff --git a/analysis/tasks/CopyWarmup.py b/analysis/tasks/CopyWarmup.py index 44993b5..407133e 100644 --- a/analysis/tasks/CopyWarmup.py +++ b/analysis/tasks/CopyWarmup.py @@ -26,19 +26,20 @@ class CopyWarmup(Task, TarballExtractionMixin, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) jobnameext = luigi.Parameter() cutoff = luigi.Parameter() - kinetags = luigi.DictParameter() def create_branch_map(self): """Branch data dicts. Each branch should correspond to exactly one output.""" - return { - i : {'index': i, 'channel': channel, - 'kinetag': self.kinetags[channel]} - for i, channel in enumerate(self.channels) - } + branchmap = {} + for i, channel in enumerate(self.channels): + branchmap[i] = { + 'index': i, + 'channel': channel + } + return branchmap def workflow_requires(self): if self.force: @@ -56,7 +57,7 @@ class CopyWarmup(Task, TarballExtractionMixin, law.LocalWorkflow): out_dir, self.warm_dir, 'warmup', self.name, self.process, self.branch_data['channel'], - self.jobnameext, self.cutoff, self.branch_data['kinetag'], + self.jobnameext, self.cutoff, self.branch_data['channel'], ) ) diff --git a/analysis/tasks/FastProd.py b/analysis/tasks/FastProd.py index 1d3d5bd..7001d11 100644 --- a/analysis/tasks/FastProd.py +++ b/analysis/tasks/FastProd.py @@ -33,11 +33,14 @@ class FastProd(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) + starting_seeds = SpaceSeparatedListParameter(cls=luigi.IntParameter) fastprod_events = SpaceSeparatedListParameter(cls=luigi.IntParameter) fastprod_jobs = SpaceSeparatedListParameter(cls=luigi.IntParameter) - starting_seeds = SpaceSeparatedListParameter(cls=luigi.IntParameter) + + NNLOJET_RUNMODE = 'production' + NNLOJET_UNITPHASE = '! UNIT_PHASE' def create_branch_map(self): """Branch data dicts. Each branch should correspond to exactly one output.""" @@ -54,10 +57,6 @@ class FastProd(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow i += 1 return branchmap - # TODO: Remove warmup dependency? - # It is preferable to have production jobs fail for missing warmups than - # having such warmups reproduced on-the-fly for either a long time or - # with very low precision. def workflow_requires(self): return {'warmup': Warmup(), 'fastwarm': MergeFastWarm()} @@ -156,12 +155,11 @@ class FastProd(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow runcard = createRuncard( open(self.base_runcard, 'r').read(), { 'channel': self.branch_data['channel'], - 'events': self.branch_data['events'], 'seed': self.branch_data['seed'], 'iterations': '1', - 'warmup': '0', - 'production': '.true.', - 'unit_phase': '' + 'events': self.branch_data['events'], + 'runmode': self.NNLOJET_RUNMODE, + 'unit_phase': self.NNLOJET_UNITPHASE } ) f.write(runcard) diff --git a/analysis/tasks/FastWarm.py b/analysis/tasks/FastWarm.py index 64c5f6f..b867ea1 100644 --- a/analysis/tasks/FastWarm.py +++ b/analysis/tasks/FastWarm.py @@ -32,7 +32,7 @@ class FastWarm(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) starting_seeds = SpaceSeparatedListParameter(cls=luigi.IntParameter) fastwarm_events = SpaceSeparatedListParameter(cls=luigi.IntParameter) diff --git a/analysis/tasks/FnloCppreadFinal.py b/analysis/tasks/FnloCppreadFinal.py index 3a116a0..11dad95 100644 --- a/analysis/tasks/FnloCppreadFinal.py +++ b/analysis/tasks/FnloCppreadFinal.py @@ -26,7 +26,7 @@ class FnloCppreadFinal(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") ) observables = luigi.ListParameter() diff --git a/analysis/tasks/MergeFastProd.py b/analysis/tasks/MergeFastProd.py index 2239d15..dc74e53 100644 --- a/analysis/tasks/MergeFastProd.py +++ b/analysis/tasks/MergeFastProd.py @@ -36,7 +36,7 @@ class MergeFastProd(Task, HTCondorWorkflow, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) weightorder = luigi.Parameter() observables = luigi.ListParameter() diff --git a/analysis/tasks/MergedGridClosure.py b/analysis/tasks/MergedGridClosure.py index e4f88ef..8bed77d 100644 --- a/analysis/tasks/MergedGridClosure.py +++ b/analysis/tasks/MergedGridClosure.py @@ -28,7 +28,7 @@ class MergedGridClosure(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=allchannels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") ) observables = luigi.ListParameter() diff --git a/analysis/tasks/MultiGridClosure.py b/analysis/tasks/MultiGridClosure.py index f023c3a..41d1e6c 100644 --- a/analysis/tasks/MultiGridClosure.py +++ b/analysis/tasks/MultiGridClosure.py @@ -31,7 +31,7 @@ class MultiGridClosure(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) observables = luigi.ListParameter() scalecombs = SpaceSeparatedListParameter() diff --git a/analysis/tasks/PlotRuntime.py b/analysis/tasks/PlotRuntime.py index 55aa12e..b422ddf 100644 --- a/analysis/tasks/PlotRuntime.py +++ b/analysis/tasks/PlotRuntime.py @@ -30,7 +30,7 @@ class PlotRuntime(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) jobnameext = luigi.Parameter() diff --git a/analysis/tasks/PlotVegasGrids.py b/analysis/tasks/PlotVegasGrids.py index 9ad3524..778d88c 100644 --- a/analysis/tasks/PlotVegasGrids.py +++ b/analysis/tasks/PlotVegasGrids.py @@ -31,12 +31,11 @@ class PlotVegasGrids(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) cutoff = luigi.Parameter() jobnameext = luigi.Parameter() - kinetags = luigi.DictParameter() # gnuplot might NOT report errors properly (return code > 0)! # ==> scan stdout for these strings to check if an error occurred @@ -46,10 +45,13 @@ class PlotVegasGrids(Task, law.LocalWorkflow): def create_branch_map(self): """Branch data dicts. Each branch should correspond to exactly one output.""" - return { - i : {'index': i, 'channel': ch, 'kinetag': self.kinetags[ch]} - for i, ch in enumerate(self.channels) - } + branchmap = {} + for i, channel in enumerate(self.channels): + branchmap[i] = { + 'index': i, + 'channel': channel + } + return branchmap def workflow_requires(self): if self.force: @@ -69,7 +71,7 @@ class PlotVegasGrids(Task, law.LocalWorkflow): out_dir, self.plots_dir, self.name, self.__class__.__name__, self.process, self.branch_data['channel'], self.jobnameext, - self.cutoff, self.branch_data['kinetag'] + self.cutoff, self.branch_data['channel'] ) ) @@ -81,7 +83,7 @@ class PlotVegasGrids(Task, law.LocalWorkflow): gridpath = '{}/{}/{}'.format(self.warm_dir, 'warmup', self.name) gridfile = '{}.{}-{}.{}.{}_iterations.txt'.format( self.process, self.branch_data['channel'], self.jobnameext, - self.cutoff, self.branch_data['kinetag'] + self.cutoff, self.branch_data['channel'] ) logger.debug("Input VEGAS grid path: %s/%s", gridpath, gridfile) diff --git a/analysis/tasks/Recombine.py b/analysis/tasks/Recombine.py index fdbb7a7..9d0c811 100644 --- a/analysis/tasks/Recombine.py +++ b/analysis/tasks/Recombine.py @@ -27,7 +27,7 @@ class Recombine(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV", "NLO", "NLO_only", "NNLO", "NNLO_only") ) observables = luigi.ListParameter() diff --git a/analysis/tasks/Rewarmup.py b/analysis/tasks/Rewarmup.py index 5196475..ff22d3a 100644 --- a/analysis/tasks/Rewarmup.py +++ b/analysis/tasks/Rewarmup.py @@ -7,6 +7,7 @@ class Rewarmup(Warmup): # behavior identical to `Warmup`, but registers `Warmup` as a # dependency and continues an existing warmup run + # TODO: Needed? Howto ensure that iterations are added? NNLOJET_WARMUP_FLAG = '2' def workflow_requires(self): diff --git a/analysis/tasks/SingleGridClosure.py b/analysis/tasks/SingleGridClosure.py index b0937e2..bd70008 100644 --- a/analysis/tasks/SingleGridClosure.py +++ b/analysis/tasks/SingleGridClosure.py @@ -32,7 +32,7 @@ class SingleGridClosure(Task, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) observables = luigi.ListParameter() diff --git a/analysis/tasks/Warmup.py b/analysis/tasks/Warmup.py index ca27a6c..07c800e 100644 --- a/analysis/tasks/Warmup.py +++ b/analysis/tasks/Warmup.py @@ -29,7 +29,7 @@ class Warmup(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow): channels = SpaceSeparatedListParameter( default=default_channels, cls=luigi.Parameter, - choices=("LO", "R", "V", "RRa", "RRb", "RV", "VV") + choices=("LO", "R", "V", "RR", "RRa", "RRb", "RV", "VV") ) starting_seed = luigi.IntParameter() warmup_events = SpaceSeparatedListParameter(cls=luigi.IntParameter) @@ -47,15 +47,16 @@ class Warmup(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow): def create_branch_map(self): """Branch data dicts. Each branch should correspond to exactly one output.""" - return { - i : { + branchmap = {} + for i, channel in enumerate(self.channels): + branchmap[i] = { + 'index': i, 'channel': channel, + 'seed': i + self.starting_seed, 'events': self.warmup_events[i], 'iterations': self.warmup_iterations[i], - 'seed': i + self.starting_seed, } - for i, channel in enumerate(self.channels) - } + return branchmap def workflow_requires(self): return {} diff --git a/analysis/util.py b/analysis/util.py index 46c8af8..87e7f07 100644 --- a/analysis/util.py +++ b/analysis/util.py @@ -48,24 +48,10 @@ def log_maybe_raise(level, *args, raise_cls=None, logger=None): def createRuncard(baseRuncard, params): - if (params['channel'] == 'RRa'): - channel = 'RR' - region = 'a' - elif (params['channel'] == 'RRb'): - channel = 'RR' - region = 'b' - else: - channel = params['channel'] - region = 'all' - - # '@WARMUP@': params['warmup'], - # '@PRODUCTION@': params['production'], substitutions = { - '@FULLCHANNEL@': params['channel'], - '@CHANNEL@': channel, - '@REGION@': region, '@RUNMODE@': params['runmode'], '@UNIT_PHASE@': params['unit_phase'], + '@CHANNEL@': params['channel'], '@SEED@': params['seed'], '@EVENTS@': params['events'], '@ITERATIONS@': params['iterations'] diff --git a/law.cfg.template b/law.cfg.template index c80761e..32bc855 100644 --- a/law.cfg.template +++ b/law.cfg.template @@ -1,3 +1,13 @@ +# Cedric +#[target] +#default_wlcg_fs = nrg_tasks +# +#[nrg_tasks] +#base = root://cmsxrootd-kit.gridka.de//store/user/cverstege/ZJet_analysis +#use_cache = True +#cache_root = /tmp/cverstege/ +#cache_max_size = 5 + [modules] analysis.tasks @@ -15,14 +25,15 @@ gfal_transfer_nbstreams = 1 # GridKa #base = srm://cmssrm-kit.gridka.de:8443/srm/managerv2?SFN=/pnfs/gridka.de/cms/disk-only/store/user/USERNAME/YOURPATH #base = gsiftp://cmssrm-kit.gridka.de:2811//pnfs/gridka.de/cms/disk-only/store/user/USERNAME/YOURPATH +base = srm://cmssrm-kit.gridka.de:8443/srm/managerv2?SFN=/pnfs/gridka.de/cms/disk-only/store/user/krabbert/law-analysis +#base = davs://cmswebdav-kit.gridka.de:2880/pnfs/gridka.de/cms/disk-only/store/user/krabbert/law-analysis +#base = root://cmsxrootd-kit.gridka.de//store/user/krabbert/law-analysis # DESY -#base = srm://dcache-se-cms.desy.de:8443/srm/managerv2?SFN=/pnfs/desy.de/cms/tier2/store/user/USERNAME/YOURPATH +#base = srm://dcache-se-cms.desy.de:8443/srm/managerv2?SFN=/pnfs/desy.de/cms/tier2/store/user/krabbert/law-analysis [logging] -# Set task verbosity (ERROR, WARNING, INFO, DEBUG) - gfal2 = WARNING -law = INFO +law = WARNING analysis.framework = INFO analysis.util = INFO diff --git a/luigi.cfg.template b/luigi.cfg.template index 0d093ee..4e26ec3 100644 --- a/luigi.cfg.template +++ b/luigi.cfg.template @@ -16,28 +16,28 @@ wait_interval = 20 max_reschedules = 1 [DEFAULT] +# Switch my debugging on/off (not yet implemented in most tasks) +#my_debug = True + # Name of your analysis -name = fnl2452btest +name = fnl2412eff-fc-v2 # If known, set proper Rivet_Id for data comparison plots -rivetid = ATLAS_2014_I1268975 -# Rescale x-axis in GeV to TeV as in Rivet analysis -#xrescale = 0.001 -# Rescale manually v25 grids instead +rivetid = CMS_2013_I1208923 # NNLOJET process and job name (the jobname is $channel-$jobnameext), and technical cutoff with leading 'y' -process = 2jet -jobnameext = ATLAS7-ak06 -cutoff = y.1e-7 +process = 2jetfc +jobnameext = CMS7-ak07 +cutoff = y1.00E-08 -# NNLOJET channels (append "a", "b" for RR region flag) +# NNLOJET channels # Complete LIST to be used in production; serves to create dictionary with settings per channel; settings must have same lengths! allchannels = ["LO", "R", "V", "RRa", "RRb", "RV", "VV"] # Default space-separated list of channels to be used in specific tasks; can be used as command line option. -# Replaced by default argument of Luigi parameter -# channels = LO R V RRa RRb RV VV -# Dictionary for association of channel - kinematics tag of NNLOJET integration -kinetags = {"LO": "vBa", "R": "vRa", "V": "vBa", "RRa": "RRa", "RRb": "RRb", "RV": "vRa", "VV": "vBa"} +# With coloured particles in final state (jets): 7 channels +channels = LO R V RRa RRb RV VV +# No coloured particle in final state (W,Z,H): 6 channels +# channels = LO R V RR RV VV # Grid merging setup as defined in combine.ini; check compatibility final_tables = { @@ -50,37 +50,29 @@ final_tables = { # List of all observables (APPLfast grid names for NNLOJET histograms) observables = [ - "fnl2452btest_ys0_m12", - "fnl2452btest_ys1_m12", - "fnl2452btest_ys2_m12", - "fnl2452btest_ys3_m12", - "fnl2452btest_ys4_m12", - "fnl2452btest_ys5_m12" + "fnl2412eff-fc-v2_ym0_m12", + "fnl2412eff-fc-v2_ym1_m12", + "fnl2412eff-fc-v2_ym2_m12", + "fnl2412eff-fc-v2_ym3_m12", + "fnl2412eff-fc-v2_ym4_m12" ] # Default htcondor job submission configuration (modifiable for each task) +htcondor_accounting_group = cms.jet +htcondor_requirements = (TARGET.ProvidesCPU==true) htcondor_remote_job = True +#htcondor_user_proxy = /tmp/x509up_u12010 +htcondor_user_proxy = /home/rabbertz/.globus/x509_proxy +# Time in seconds +htcondor_walltime = 84000 htcondor_request_cpus = 1 htcondor_use_cpus = 1 +# For all cores in total htcondor_request_memory = 4096 -# Disk usage on WN (def = 2000000) -#htcondor_request_disk = 2000000 -# Time in seconds -htcondor_walltime = 84000 -# ETP -batchlocation = ETP -htcondor_accounting_group = cms.jet -#htcondor_accounting_group = cms -htcondor_user_proxy = /tmp/x509up_u12010 -htcondor_docker_image = mschnepf/slc6-condocker htcondor_universe = docker -htcondor_requirements = (TARGET.ProvidesCPU==true) -htcondor_remote_storage = True -# CERN -#batchlocation = CERN -#htcondor_user_proxy = /afs/cern.ch/user/k/krabbert/tmp/x509up_u7747 -#htcondor_universe = vanilla -#htcondor_remote_storage = False +htcondor_docker_image = mschnepf/slc7-condocker +# Disk usage on WN (def = 1000000) +htcondor_request_disk = 2000000 # Create log files in htcondor jobs transfer_logs = True @@ -92,11 +84,11 @@ tolerance = 0 only_missing = True # Do not resubmit automatically (default is 5); important for debugging! -retries = 3 +#retries = 3 +retries = 0 # Bootstrap file to be sourced at beginning of htcondor jobs -bootstrap_file = bootstrap_NNLOJET_rev5918_bridge-0.0.46.sh -#bootstrap_file = bootstrap_lxplus_NNLOJET_rev5918_bridge-0.0.46.sh +bootstrap_file = bootstrap_NNLOJET_modules2_rev6591_bridge-0.0.46-WiP_202307.sh # Local directories, defaults are 'grids', 'plots', 'tags', 'warmups' # - unpacking and merging of grids in local directories $merge_dir/$name/[$channel|Combined] @@ -121,13 +113,13 @@ scaleindex = 0 # Central plus scale variations, cf. NNLOJET run file & nnlobridge setup # None: --> 1; fixed-scale: --> 7; flex-scale low pT: --> -6; flex-scale high pT: --> -12 # Either one number for all or one per observable -scalecombs = -12 +scalecombs = 1 1 1 1 1 ascode = LHAPDF norm = no # Included in analysis.tar.gz # Path to base runcard file -base_runcard = 2jet.fnl2452btest.run +base_runcard = 2jetfc.fnl2412eff-fc-v2.run # Local directory with all steering files steer_dir = steeringfiles @@ -139,8 +131,7 @@ steer_dir = steeringfiles # produced @ grid storage under Warmup # Override some defaults for this task -bootstrap_file = bootstrap_NNLOJET_rev5918_multicore.sh -#bootstrap_file = bootstrap_lxplus_NNLOJET_rev5918_multicore.sh +# bootstrap_file = # htcondor config # If BWFORCLUSTER is too full #htcondor_requirements = (TARGET.ProvidesCPU==true) @@ -150,16 +141,16 @@ htcondor_use_cpus = 1 #htcondor_requirements = (TARGET.CloudSite=="topas") #htcondor_request_cpus = 42 #htcondor_use_cpus = 28 -#htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") +htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") #htcondor_request_cpus = 20 #htcondor_use_cpus = 20 -# for all cores in total NOT ON LXLUS, REQUEST MORE CPUs +# for all cores in total #htcondor_request_memory = 8000 # Uncomment the following line to have only channels changing with jet size R to complement other analysis #channels = R RRa RRb RV # NNLOJET event count and integration steps for every channel -# For warmup counted upwards to 1, ..., 7 +# MUST be of the same length as channels! starting_seed = 0 # 1st test setup, <~ 5 minutes @@ -169,16 +160,15 @@ starting_seed = 0 warmup_events = 10000 10000 10000 1000 1000 1000 1000 warmup_iterations = 3 3 3 3 3 3 3 # time in seconds -htcondor_walltime = 1200 -# LXPLUS ESPRESSO 20 min +htcondor_walltime = 3600 # Make warmup unusable without explicit editing to avoid reproducing 'lost' warmups on-the-fly! # Such jobs would either run for a long time or be of very low quality. # With seeds starting below zero, NNLOJET reports an error, but unfortunately with return code=0. # This is captured in the Warmup task. -#starting_seed = -99 +#starting_seed = -9 -# Real warmup is from Joao Pires at git@gitlab.com:ayh/dijet_fits.git: results/ATLAS-dijet-7TeV-mu-mjj/NNLOJET_v1 +# Real warmup is from Joao Pires at git@gitlab.com:ayh/dijet_fits.git: results/CMS-dijet-7TeV-mu-mjj/NNLOJET_v1 [CopyWarmup] # untar'ed to local storage under $warm_dir/warmup/$name @@ -205,20 +195,19 @@ htcondor_walltime = 1200 # produced @ grid storage under Rewarmup # Override some defaults for this task -bootstrap_file = bootstrap_NNLOJET_rev5918_multicore.sh -#bootstrap_file = bootstrap_lxplus_NNLOJET_rev5918_multicore.sh +# bootstrap_file = # htcondor config #htcondor_requirements = (TARGET.CloudSite=="blade") -#htcondor_request_cpus = 2 -#htcondor_use_cpus = 2 +htcondor_request_cpus = 1 +htcondor_use_cpus = 1 #htcondor_requirements = (TARGET.CloudSite=="topas") #htcondor_request_cpus = 42 #htcondor_use_cpus = 28 -#htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") +htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") #htcondor_request_cpus = 20 #htcondor_use_cpus = 20 # for all cores in total -#htcondor_request_memory = 8000 +htcondor_request_memory = 8000 # Uncomment the following line to have only channels changing with jet size R to complement other analysis #channels = R RRa RRb RV @@ -231,7 +220,7 @@ starting_seed = 10 warmup_events = 1000 1000 1000 1000 1000 1000 1000 warmup_iterations = 3 3 3 3 3 3 3 # time in seconds -htcondor_walltime = 3600 +htcondor_walltime = 1800 # No rewarmup was run! @@ -252,7 +241,7 @@ htcondor_request_memory = 2000 # If BWFORCLUSTER is too full #htcondor_requirements = (TARGET.ProvidesCPU==true) # If ETP blades are too slow -#htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") +htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") # Everything fast #htcondor_requirements = ((TARGET.CloudSite=="BWFORCLUSTER")||(TARGET.CloudSite=="schnepf")||(TARGET.CloudSite=="topas")) # Up to 6h @@ -264,12 +253,14 @@ htcondor_request_memory = 2000 starting_seeds = 1000 2000 3000 4000 5000 6000 7000 # 1st test setup, <~ 5 minutes -fastwarm_events = 800000 200000 400000 50000 800000 200000 400000 +fastwarm_events = 800 200 400 50 800 200 400 +#fastwarm_events = 800000 200000 400000 50000 800000 200000 400000 +#fastwarm_jobs = 1 1 1 1 1 1 1 fastwarm_jobs = 2 2 2 2 2 2 2 # time in seconds -htcondor_walltime = 1800 +htcondor_walltime = 180 -# 2nd test setup, <~ 20-30 minutes (13.2, 15.1, 11.6, 12.5, 17.0, 17.9, 11.5 min) +# 2nd test setup, <~ 20-30 minutes (11.4, 14.5, 10.5, 11.7, 12.0, 14.1, 8.5 min) #fastwarm_events = 5000000 2000000 4000000 500000 5000000 2000000 4000000 #fastwarm_jobs = 2 2 2 2 2 2 2 # time in seconds @@ -279,7 +270,9 @@ htcondor_walltime = 1800 #fastwarm_events = 250000000 90000000 250000000 25000000 250000000 100000000 300000000 #fastwarm_jobs = 20 20 20 20 20 20 20 # time in seconds -#htcondor_walltime = 86400 +#htcondor_walltime = 84000 + +# Only test setup run; reuse merged fast warmup from fnl2412e [CopyFastWarm] # untar'ed to local storage under $warm_dir/fastwarm/$name @@ -290,6 +283,8 @@ htcondor_walltime = 1800 [MergeFastWarm] # produced @ grid storage under MergeFastWarm +# Reuse merged fast warmup from fnl2412e for fix- and flex-scale tables + [CopyMergeFastWarm] # untar'ed to local storage under $warm_dir/mergefastwarm/$name @@ -301,16 +296,16 @@ htcondor_walltime = 1800 # override some defaults for this task # accept as complete at 95% acceptance = 0.95 -# htcondor config -htcondor_request_memory = 4000 # If BWFORCLUSTER is too full #htcondor_requirements = (TARGET.ProvidesCPU==true) #htcondor_requirements = (TARGET.Cloudsite=="blade") #htcondor_requirements = (TARGET.CloudSite=="topas") # If ETP blades are too slow -#htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") +htcondor_requirements = (TARGET.CloudSite=="BWFORCLUSTER") # Everything fast -htcondor_requirements = ((TARGET.CloudSite=="BWFORCLUSTER")||(TARGET.CloudSite=="schnepf")||(TARGET.CloudSite=="topas")) +#htcondor_requirements = ((TARGET.CloudSite=="BWFORCLUSTER")||(TARGET.CloudSite=="schnepf")||(TARGET.CloudSite=="topas")) +#htcondor_request_memory = 7500 +htcondor_request_memory = 4000 # Uncomment the following line to have only channels changing with jet size R to complement other analysis #channels = R RRa RRb RV @@ -318,24 +313,26 @@ htcondor_requirements = ((TARGET.CloudSite=="BWFORCLUSTER")||(TARGET.CloudSite== # NNLOJET seeds, event count, and number of jobs for each channel starting_seeds = 10000 20000 30000 40000 50000 60000 70000 -# 1st test setup, ~20 min (12.6, 13.6, 11.4, 19.8, 23.6, 13.8, 13.4 min) -fastprod_events = 4000000 220000 500000 330 4200 3100 100000 +# 1st test setup, ~20 min (14.2, 14.0, 12.0, 18.5, 21.8, 14.8, 14.1 min) +fastprod_events = 4000000 220000 500000 3300 4200 3100 100000 #fastprod_jobs = 1 1 1 1 1 1 1 +fastprod_jobs = 2 2 2 2 2 2 2 # time in seconds htcondor_walltime = 1800 -# 2nd test setup, ~3-5 h (4.1, 3.7, 3.7, 4.1, 3.8, 3.7, 3.5 h) +# 2nd test setup, ~3-5 h (4.9, 3.7, 4.0, 3.9, 3.5, 4.2, 3.7 h) #fastprod_events = 80000000 3500000 10000000 40000 400000 50000 1600000 -fastprod_jobs = 3 3 3 3 3 3 3 +#fastprod_jobs = 3 3 3 3 3 3 3 # time in seconds #htcondor_walltime = 40000 -# Final setup, ~23 h (21.5, 20.0, 21.6, 21.6, 20.1, 21.6, 20.8 h) -#fastprod_events = 425000000 20000000 60000000 220000 2200000 300000 10000000 -#fastprod_jobs = 50 100 50 100 100 100 100 -#fastprod_events = 425000000 22000000 60000000 234000 2500000 318000 11000000 -#fastprod_jobs = 50 100 50 1000 1000 1000 100 -#htcondor_walltime = 84000 +# Final setup, ~22 h (21.8, 21.0, 21.0, 21.3, 20.9, 21.2, 20.9 h) +#fastprod_events = 360000000 20000000 55000000 225000 2500000 260000 9500000 +#fastprod_jobs = 100 100 100 100 100 100 500 +#fastprod_jobs = 100 100 100 200 100 200 500 +#fastprod_events = 360000000 20000000 55000000 245000 2500000 280000 9500000 +#fastprod_jobs = 100 100 100 1200 100 1200 500 +#htcondor_walltime = 86000 [CopyTables] # copied to local storage under $merge_dir/$name/CHANNEL, see above @@ -377,7 +374,10 @@ force = True # produced @ local storage under $merge_dir/$name/Combined # Always consumes only one worker, but uses multiple threads inside the script by NNLOJET as set below by number of cores -# Path to combine.ini config; check compatibility of available channels to desired order +# Always needs all channels up to some order LO, NLO, or NNLO +channels = LO R V RRa RRb RV VV + +# Path to combine.ini config; check compatibility to desired order combine_ini = combine.ini # Update of only part of the contributions #combine_ini = combine-Real.ini @@ -391,9 +391,9 @@ cores = 20 # Produces the files for adding stat. uncertainties to the grids; profits from multiple workers # Needs all input channels up to some order plus combined channels as defined in combine_ini -#channels = LO R V RRa RRb RV VV NLO NLO_only NNLO NNLO_only +channels = LO R V RRa RRb RV VV NLO NLO_only NNLO NNLO_only -# Path to combine.ini config; check compatibility of available channels to desired order +# Path to combine.ini config; check compatibility to desired order combine_ini = combine.ini # Update of only part of the contributions #combine_ini = combine-Real.ini @@ -407,6 +407,9 @@ cores = 20 htcondor_requirements = (TARGET.ProvidesEkpResources==true) +# Always needs all channels up to some order LO, NLO, or NNLO +channels = LO R V RRa RRb RV VV + # Up to LO only #channels = LO # Up to NLO only @@ -423,10 +426,7 @@ workflow = local [MergeFinal] # produced @ local storage under $merge_dir/$name/Combined/Final -# Up to LO only -#channels = LO -# Up to NLO only -#channels = LO R V +# Channels are set via final_tables dictionary [AddStatunc] # produced @ local storage under $merge_dir/$name/Combined/Final @@ -439,18 +439,13 @@ orders = [ "LO", "NLO", "NNLO" ] # Rivet_Id must have been defined in default section. # Make sure SteerModify.str contains a scenario description with RIVET_ID= # Then provide here the histogram identifiers for data comparison plots if possible -histoids = ["d02-x01-y01", "d02-x01-y02", "d02-x01-y03", "d02-x01-y04", "d02-x01-y05", "d02-x01-y06" ] -# It is also possible to write a few per-grid steerfile parameters from here, see task code -#binsizefactors = ["0.5", "0.5", "0.5", "0.5", "0.5", "0.5"] -#multcoefffactors = ["2", "2", "2", "2", "2", "2"] +histoids = ["d02-x01-y01", "d02-x01-y02", "d02-x01-y03", "d02-x01-y04", "d02-x01-y05", "d02-x01-y01", "d02-x01-y02", "d02-x01-y03", "d02-x01-y04", "d02-x01-y05" ] [FnloCppreadFinal] # produced @ local storage under $merge_dir/$name/Combined/Final -# Up to LO only -#channels = LO -# Up to NLO only -#channels = LO R V +# Needs all input channels up to some order plus combined channels as defined in combine_ini +channels = LO R V RRa RRb RV VV NLO NLO_only NNLO NNLO_only ####################### # New plotting setup! # @@ -509,6 +504,9 @@ force = True # produced @ local storage under $plots_dir # Requires FnloCppreadFinal to have run +# Needs all input channels up to some order plus combined channels as defined in combine_ini +channels = LO R V RRa RRb RV VV NLO NLO_only NNLO NNLO_only + # Up to NLO only #channels = LO R V @@ -528,6 +526,9 @@ orders = [ "NNLO" ] [Absolute] # produced @ local storage under $plots_dir +# Needs all input channels up to some order plus combined channels as defined in combine_ini +channels = LO R V RRa RRb RV VV NLO NLO_only NNLO NNLO_only + # Up to NLO only #channels = LO R V diff --git a/setup_law_c7_v2.sh b/setup_law_c7_v2.sh new file mode 100644 index 0000000..c528cc6 --- /dev/null +++ b/setup_law_c7_v2.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +action() { + + # law + luigi env variables + local base="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + export LAW_HOME="$base/.law" + export LAW_CONFIG_FILE="$base/law.cfg" + export LUIGI_CONFIG_PATH="$base/luigi.cfg" + export ANALYSIS_PATH="$base" + export ANALYSIS_DATA_PATH="$ANALYSIS_PATH/data" + + # luigi + law + export PATH="$base/law/bin:$base/luigi/bin:$PATH" + export PYTHONPATH="$base/law:$base/luigi:$base/six:$base/python-dateutil-2.8.2:$base:$PYTHONPATH" + + # lcg software stack with python3 and gcc11 (use the same one as for cvmfs install of NNLOJET & APPLfast) + source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos7-gcc11-opt/setup.sh + + # grid storage interface with gfal2, if required + # SLC6 + # source /cvmfs/grid.cern.ch/emi3ui-latest/etc/profile.d/setup-ui-example.sh + # C7 + # source /cvmfs/grid.cern.ch/umd-c7ui-latest/etc/profile.d/setup-c7-ui-example.sh + # C7 with python3 + source /cvmfs/grid.cern.ch/centos7-ui-200122/etc/profile.d/setup-c7-ui-python3-example.sh + # + # Proxy location on afs required by lxplus if using grid storage + # export X509_USER_PROXY=/afs/cern.ch/user/k/krabbert/tmp/x509up_u7747 + + # fastNLO tools (perl and python scripts) + # Required to merge fastwarm results or for plotting (needs python3, matplotlib3, numpy, scipy) + # Add local paths to git checkout, e.g. + gitpath="/storage/9/rabbertz/git/fastNLO" + #gitpath="/eos/theory/project/applfast/git/fastNLO" + export PATH="$gitpath/tools:$gitpath/tools/plotting:$PATH" + + # NNLOJET + APPLfast (cvmfs) + applfastpath="/cvmfs/etp.kit.edu/fastnnlo-2888_bridge-0.0.46-WiP_202307_lcg102-c7-gcc11" + #applfastpath="/eos/theory/project/applfast/local" + # LCG not needed here since source'd already above! + # NNLOJET & APPLfast + source $applfastpath/src/fnlosrc_source.sh + # Rivet + source $applfastpath/src/rivetenv.sh + # If fastNLO version of grid install in /cvmfs/etp.kit.edu not new enough for evaluation, + # then use local install for plotting etc, but keep scripts of NNLOJET in PATH + #export PATH="$applfastpath/src/NNLOJET_rev6591/driver/bin:$PATH" + + # Output path for local production output on lxplus; not required when using grid storage + #export ANALYSIS_OUTPUT_PATH="$applfastpath/output" + + # fastNLO installation (local) + # If grid install is too old or uses fastNLO extension compiled with python2 + # !!! Does not work on systems of ETP portals or lxplus with Centos7! + # --> Either use your more modern Desktop PC e.g. with Ubuntu and properly set PATH and PYTHONPATH + # --> or use install with lcg software stack from /cvmfs/sft.cern.ch/lcg/views + # Here, lcg environment and PATH, PYTHONPATH are set from local installation file + #fnlopath="/storage/9/rabbertz/local.lcg102-c8" + #fnlopath="/eos/theory/project/applfast/local.py3" + #source $fnlopath/src/lcg102_source.sh # LCG software stack + #source $fnlopath/src/fnlosrc_source.sh # fastNLO + #source $fnlopath/src/rivetenv.sh # Rivet + + source "$( law completion )" +} +action diff --git a/steeringfiles/2jet.fnl2412eff-fc.str b/steeringfiles/2jet.fnl2412eff-fc.str new file mode 100644 index 0000000..d577c88 --- /dev/null +++ b/steeringfiles/2jet.fnl2412eff-fc.str @@ -0,0 +1,269 @@ +# -*-sh-*- +# ==================================================================== # +# +# A steering file for creating a fastNLO table/grid (with NNLOJET) +# This is an example for a global steering for ALL tables/grids of a scenario +# +# The grid production is performed in three steps: +# I. A warmup run for NNLOJET to perform essential integrations +# See NNLOJET for details. fastNLO is not used or called at this stage. +# II. A warmup run for fastNLO that determines the accessed phase space +# in momentum fraction x and process scale mu_r, mu_f. +# Only a few fastNLO settings are used here, see below. +# The output is written into a warmup file named after the +# the NNLOJET process name, e.g. 'ZJ', the NNLOJET job name, e.g. +# 'LO-CMS13-ak07', and the NNLOJET grid name, e.g. +# ptz > ZJtriple_yb0_ystar0_ptz [30, 100, 200, 300, 400, 1000] grid = ZJtriple_yb0_ystar0_ptz.fast +# NNLOJET histo fastNLO grid +# ==> ZJ.LO-CMS13-ak07.ZJtriple_yb0_ystar0_ptz.wrm +# This warmup file stores some settings for fastNLO in addition to +# the accessed phase space (with number of events per bin!) for +# each order of NNLOJET run (LO, R, V, RRa, RRb, RV, VV). +# For a later combination ALL production runs in step III below +# MUST use the SAME warmup file. The latter should be the largest +# accessed phase space as combined from any order in NNLOJET! +# ==> the expected filename for this unique warmup file is +# ZJ.ZJtriple_yb0_ystar0_ptz.wrm +# without the job name info. +# III. Many production runs filling fastNLO grids for various orders +# of a process from NNLOJET that later must be combined. +# See NNLOJET for details. +# Most fastNLO settings are taken into account here. +# +# This steering file has to be used in combination with a NNLOJET +# run card, where most of the essential seetings like the +# observable and its binning are defined. +# Modifications or additional settings respect the following hierarchy: +# 1. From the interface package nnlo-bridge default settings for +# fastNLO with NNLOJET are made and information from NNLOJET is +# passed to fastNLO. +# 2. A steering file named after the NNLOJET grid name for fastNLO, +# e.g. from the example above +# ==> ZJ.ZJtriple_yb0_ystar0_ptz.str +# can be used to set steer parameters individually for each fastNLO grid. +# Settings from step 1 can be overwritten. Be careful not to make +# changes inconsistent with what is defined in the NNLOJET run card +# or what is mandatory for the interface to work! +# 3a. In production runs the previously derived warmup file is read. +# 3b. A global steering file named after only the first part of +# the NNLOJET grid name for fastNLO, 'ZJtriple', which is also used +# as fastNLO scenario name, +# ==> ZJ.ZJtriple.str +# can be used to set steer parameters globally for all fastNLO grids. +# Settings from step 2 are not overwritten, but lead to warnings. +# 4. In principal, parameters can also be set on the command line, but +# this has not been tested yet. +# +# Special remarks on scale settings: +# ---------------------------------- +# Lacking sufficient scale choice information from NNLOJET the following +# settings are assumed for flexible-scale tables that allow two central +# scale choices to be stored simultaneously: +# DIS pp +# - the 1st scale set for muf defines scale1 scale2 +# - the 1st scale set for mur defines scale2 scale1 +# To check the closure between NNLOJET and fastNLO the proper +# ASYMMETRIC central scale choice must be used when evaluating a +# fastNLO grid with fnlo-tk-cppread, either scale12 or scale21. +# +# It is recommended to set ScaleDescriptionScale1 and +# ScaleDescriptionScale2 accordingly. +# +# If multiple entries per event are requested using NNLOJET COMPOSITE +# histos AND a scale definition varying with each entry is desired, +# then one central scale, e.g. ptmax=ptj1, must be defined for both +# muf and mur, and the InclusiveJets flag must be set in the fastNLO +# steering file. +# In that case the following definitions hold depending on the +# nnlo-bridge code version: +# +# BRIDGE 0.0.40: +# (requires additional fixed-scale combinations of +# muf = 2.718281828459045 mur = 2.718281828459045 +# muf = 4.481689070338065 mur = 4.481689070338065 +# muf = 4.481689070338065 mur = 2.718281828459045 +# muf = 2.718281828459045 mur = 4.481689070338065 +# muf = 12.18249396070347 mur = 2.718281828459045 +# muf = 2.718281828459045 mur = 12.18249396070347 +# in the SCALES section of the NNLOJET run card.) +# +# DIS pp +# - the 1st scale set for muf&mur defines scale1 scale2 +# - the stored observable defines scale2 scale1 +# To check the closure between NNLOJET and fastNLO the proper +# SYMMETRIC central scale choice must be used when evaluating a +# fastNLO grid with fnlo-tk-cppread, either scale1 or scale2. +# +# BRIDGE 0.0.46: +# (requires additional fixed-scale combinations of +# muf = 90.0171313005 mur = 90.0171313005 +# muf = 54.5981500331 mur = 54.5981500331 +# muf = 148.4131591026 mur = 148.4131591026 +# muf = 54.5981500331 mur = 90.0171313005 +# muf = 90.0171313005 mur = 54.5981500331 +# muf = 148.4131591026 mur = 90.0171313005 +# in the SCALES section of the NNLOJET run card.) +# +# DIS(?) pp +# - the 1st scale set for muf&mur defines scale1 scale2=mu/obs(!) +# - the stored observable defines scale2 scale1 +# To check the closure between NNLOJET and fastNLO the proper +# SYMMETRIC central scale choice must be used when evaluating a +# fastNLO grid with fnlo-tk-cppread, i.e. for pp scale1*scale2. +# +# ==================================================================== # + +# ==================================================================== # +# +# Scenario specific settings +# +# Either set individually for each fastNLO grid or globally for all +# +# ==================================================================== # + +# -------------------------------------------------------------------- # +# Settings to be modified already for Warmup +# (These are stored in the warmup file!) +# -------------------------------------------------------------------- # +#CheckScaleLimitsAgainstBins true # (def.=true) Set limits for scale nodes to bin borders, if possible. Good if scale equals the binned observable. + # Scales and scale factors must be set in the NNLOJET run card +ScaleDescriptionScale1 "m12_[GeV]" # (def.='scale1') Reset the 1st scale name and unit, e.g. "<pT_1,2>_[GeV]" (Note: The 1st scale must always be in units of [GeV]!) +ScaleDescriptionScale2 "m12_[GeV]" # (def.='scale2') Reset the 2nd scale name and unit (ONLY for flexible-scale tables) +#DifferentialDimension 1 # (must be 1) So far the interface to NNLOJET supports only 1-dim histograms. DO NOT CHANGE! +DimensionLabels { # Labels (symbol and unit) for the measurement dimension (from outer to inner "loop") + "m12_[GeV]" # The default following the example above would be: "ptz" +} +#DimensionIsDifferential { # (must be 2) Specify for each dimension whether +# 2 # 0 : the cross section is NOT differential, i.e. there are two bin borders, +#} # but NO division (normalization) by bin width + # 1 : the cross section is point-wise differential, i.e. only one point is given + # 2 : the cross section is bin-wise differential, i.e. there are two bin borders + # Since NNLOJET provides bin-wise differential distributions use option 2. DO NOT CHANGE! + +# -------------------------------------------------------------------- # +# Description of scenario +# +# (Write each line of description in quotation marks) +# -------------------------------------------------------------------- # +ScenarioName fnl2412eff-fc # (def.=NNLOJET process name) No white space allowed here! + # Here: Either one description for all +ScenarioDescription { # Replace generic one-line text by desired (multi-line) description + "d2sigma-dijet_dMjj_dy_max_[pb_GeV]" + "CMS_Collaboration" + "Dijet_Mass_m12_ym0-ym4" + "anti-kT_R=0.7" + "CMS-PAPER-QCD-11-004, arXiv:1212.6660, Phys. Rev. D 87 (2013) 112002." + "RIVET_ID=CMS_2013_I1208923/D06-x01-y01,SPIRES_ID=9901922,INSPIRE_RECORD=1208923" + "THEORY_LABEL=NNLOJET modules2 FC" + "provided by:" + "fastNLO_2.3.1" + "If you use this table, please cite:" + " D. Britzger, T. Kluge, K. Rabbertz, F. Stober, M. Wobisch, arXiv:1109.1310" +} +PublicationUnits 12 # (def.=12) Cross section unit to be used for output (negative power of 10, e.g. 12->pb, 15->fb) + # For comparison, e.g. via Rivet, should correspond to published data cross sections + +# -------------------------------------------------------------------- # +# Cuts +# -------------------------------------------------------------------- # +# To bet set via NNLOJET run card + +# -------------------------------------------------------------------- # +# Observable normalization +# -------------------------------------------------------------------- # +#CalculateBinSize true # (def.=true) Calculate bin width from lower and upper bin boundaries +#BinSizeFactor 1. # (def.=1.) Possibility to provide additional normalization factor, e.g. of 2. for bins in |y| +#BinSize { x1 x2 x3 ... } # (def. not set) If 'CalculateBinSize' is 'false' provide table with bin widths 'by hand' for normalization + +# -------------------------------------------------------------------- # +# Observable binning +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Use either 'SingleDifferentialBinning' or +# 'DoubleDifferentialBinning' or +# 'TripleDifferentialBinning' +# in accord with 'DifferentialDimension' above +# -------------------------------------------------------------------- # +# To bet set via the NNLOJET run card + +# ==================================================================== # +# +# Process specific and therefore at least partially theory-code +# dependent settings +# +# ==================================================================== # +# To bet set directly from NNLOJET interface and via the NNLOJET run card + +# ==================================================================== # +# +# A few special settings only used with NNLOJET so far +# +# ==================================================================== # +#InclusiveJets true # (def.=false) Flag to vary the mur, muf scale per entry, not just per event +# # Must be set in accordance with NNLOJET run card! +# # Only possible with flexible-scale grids + +# ==================================================================== # +# +# General fastNLO settings +# +# ==================================================================== # +GlobalVerbosity INFO # (def.=WARNING) Global output verbosity of fastNLO toolkit, + # (and of user scenario code if implemented). + # Possible values are: DEBUG, MANUAL, INFO, WARNING, ERROR, SILENT +FlexibleScaleTable true # (def.=false) Create table fully flexible in mu_f (larger size), true, or + # table with fixed number of mu_f scale factors +CacheType 0 # For now switch off caching feature +#CacheMax 30 +#CacheCompare 10 + +# ==================================================================== # +# +# Specific fastNLO settings (normally do not need to be changed) +# Only change when you know what you are doing ...! +# +# ==================================================================== # +#OutputFilename fastNLO.tab # Overwrites default filename of fastNLO output table, e.g. ZJ.LO-CMS13.vBa.ZJtriple_yb0_ystar0_ptz.s92394.tab.gz +#OutputPrecision 8 # (def.=8) Number of decimal digits to store in output table +#OutputCompression true # (def.=true) Write out fastNLO table/grid in gzipped format (requires zlib) +#CacheType 0 +#CacheMax 30 +#CacheCompare 10 +#ScaleVariationFactors { # (def.=1.0 0.5 2.0) Must be set in accordance with NNLOJET run card! Factorization scale variations (only needed for fixed-scale tables) +# 1.0 0.5 2.0 # List of scale factors must include factor '1.0' +#} # Scale factors will be ordered according to fastNLO convention: (1, min, ... , max) +#ReadBinningFromSteering false # (must be true) Specify where the binning is defined. +#ApplyPDFReweighting true # (def.=true) Apply reweighting of PDFs for an optimized interpolation + +# -------------------------------------------------------------------- # +# Choose fastNLO interpolation kernels and distance measures +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Currently implemented interpolation kernels +# Catmull +# Lagrange +# OneNode +# Linear +# +# Currently implemented distance measures +# linear +# loglog025 eq. to (log(log(4*x))) +# log10 +# sqrtlog10 eq. to sqrt(log_10(x)) +# +# For a constant scale like M_Z use e.g. +# Mu1_Kernel OneNode +# Mu1_DistanceMeasure "log10" +# Mu1_NNodes 1 +# -------------------------------------------------------------------- # +#X_Kernel Lagrange # (def.= pp: Lagrange; DIS: Catmull) +#X_DistanceMeasure sqrtlog10 # (def.= pp: sqrtlog10; DIS: log10) +#X_NNodes 20 # (def.= pp: 20; DIS: 18) +#X_NNodeCounting NodesPerBin # (def.=NodesPerBin) + +#Mu1_Kernel Lagrange # (def.=Lagrange) +#Mu1_DistanceMeasure "loglog025" # (def.=loglog025) +#Mu1_NNodes 6 # (def.=6) + +# Scale2 not used for fixed-scale tables +Mu2_Kernel OneNode # (def.=Lagrange) +Mu2_DistanceMeasure "loglog025" # (def.=loglog025) +Mu2_NNodes 1 # (def.=6) diff --git a/steeringfiles/SteerModify.str b/steeringfiles/SteerModify.str index 15cb4bc..6264473 100644 --- a/steeringfiles/SteerModify.str +++ b/steeringfiles/SteerModify.str @@ -26,15 +26,14 @@ Itabversion 25000 # Change table version (Expert option!) # Modify parameters of the table scenario # Leave value empty for no modification # -------------------------------------------- -Ipublunits 3 # Adapt units to the ones published in HepData AttachScDescription false # Append to (true) or replace (false) existing scenario description ScDescript { - "d2sigma-dpTjet_dy_[mb_GeV]" - "ALICE_Collaboration" - "Inclusive_jet_pT_y0" - "anti-kT_R=0.4" - "arXiv:1909.09718; Phys. Rev. C 101 (2020) 3." - "RIVET_ID=,INSPIRE_RECORD=1755387" + "d2sigma-dijet_dm12_dym_[pb_GeV]" + "CMS_Collaboration" + "Dijet_m12_ym0-4" + "anti-kT_R=0.7" + "CMS-PAPER-QCD-11-004, arXiv:1212.6660, Phys. Rev. D87, 112002 (2013)." + "RIVET_ID=,INSPIRE_RECORD=1208923" "THEORY_LABEL=NNLOJET" "provided by:" "fastNLO_2.5.0" @@ -52,8 +51,8 @@ ScDescript { #-------------------------------------------------------------------- CodeDescript { "NNLOJET_rev5918, please cite: T. Gehrmann et al., PoS RADCOR2017, 074 (2018), arXiv:1801.06415." - "Inclusive jet production, please cite: J. Currie et al., Phys. Rev. Lett. 118, 072002 (2017), arXiv:1611.01460." - "Inclusive jet scale choice, please cite: J. Currie et al., JHEP 10, 155 (2018), arXiv:1807.03692." + "Dijet production, please cite: J. Currie et al., Phys. Rev. Lett. 119, 152001 (2017), arXiv:1705.10271." + "Dijet scale choice, please cite: A. Gehrmann-de Ridder et al., Phys. Rev. Lett. 123, 102001 (2019), arXiv:1905.09047." "APPLfast interface, please cite: D. Britzger et al., Eur. Phys. J. C79, 845 (2019), arXiv:1906.05303." } -- GitLab