LbMCSubmit usage guide

YAML files

Full Stage 0 YAML schema

Top-level Stage 0 YAML schema

Field

Type

Description

name

str

The name of the request (e.g. the analysis that it’s for).

inform

list[str]

Usernames or email addresses to send status updates to.

WG

str

Abbreviated name of the Working Group that the request belongs to. See here for a list of valid values.

samples

list[dict]

Specification of which samples to produce. See the separate YAML schema for samples.

sim-version

str

Which Sim version to use (e.g. 09l for Sim09l).

comment *

str

A human-readable comment.

file-format * **

str

(Default: MDST)

generation * **

dict

See separate generation schema

fast-mc * **

dict

See separate fast MC schema

stripping * **

dict

See separate stripping schema

The samples field

Field

Type

Description

event-types

list[int] or dict[int, int]

List of event types to produce, or a dict where the keys are event types and the values are number of events.

data-types

list[int]

Which data types (i.e. years) to use.

num-events

int or str

Number of events to produce per polarity, event-type and data-type. Can use SI Suffices (k, M) for readability.

magnet-polarities *

list[str]

Which magnet polarities to use. Valid options are MagUp or MagDown. Default is both.

num-test-events *

int

Number of events to produce in the automatic CI tests (Default: 10).

retention-rate *

float

For filtered requests: retention rate of the filtering (Default: 1.0).

collision-types *

list[str]

(Default: pp for proton-proton collisions).

smog *

bool

Whether this is a SMOG request (Default: false).

priority *

str

Sets the priority of the request on DIRAC. Valid options are "1a", "1b", "2a", "2b". (Default: "2a").

pileup-nu *

str

Optional flag to override the default pileup for a given sim version. (Default: "").

The generation field

Field

Type

Description

production-tool *

str

(Default: Pythia8 for p-p collisions, else Epos).

decay-tool *

str

(Default: EvtGen).

material-tool *

str

(Default: Geant4).

The fast-mc field

Field

Type

Description

redecay

bool or dict

Either true for ReDecay with default options, or a dict with the keys mode (a str) and num-redecays (an int).

splitsim

bool or dict

Either true for SplitSim with default options, or a dict with the key mode (a str) where currently the only option is "extend-z".

The stripping field

Field

Type

Description

version *

str

Which Stripping version to use (Default: depends on the year and collision type).

data-pkgs *

list[str]

Which data packages to use e.g. the WGConfig package containing the filtering script (Default: depends on the Stripping version).

filtering-script *

str

The path to the filtering script, prefixed by the appropriate environment variable for the data package it resides in. You can use {version} and {year} as named wildcards that will be filled in from the Stripping version and data-type, respectively: e.g. $BNOCCONFIGOPTS/Bs_Kst0Kst0_{year}.py NB: mutually exclusive with filter.

output-name *

str

The filename produced by the filtering script (Default: ALLSTREAMS.{file-format}).

filter *

dict

Use this if you want LbMCSubmit to generate an ad-hoc filtering script that filters on a set of line names or lines matching a regular expression. A dict with the keys lines (list[str] or str) and analysis-name (str), where the analysis-name determines the output filename, unless output-name is specified. (Default: empty dict). NB: mutually exclusive with filtering-script.

* optional

** can be used either at the top level or per sample

The different stages

Internally, LbMCSubmit applies request specifications in “stages” of increasing detail. These are numbered 0 to 6, where stage 6 contains the full request specification that is digested by LHCbDIRAC.

sim-version: 09
name: Ds2KKpi
inform:
  - auser
  - firstname.surname@cern.ch
WG: Charm

samples:
  - event-types:
      - 23103005
      - 23103006
    data-types:
      - 2012
      - 2016
    num-events: 100_000

Submission from the command line

Caution

Submitting directly from the command line will bypass the automatic checks run in the GitLab CI, and the requests will not appear in the web app. This should only be done under advice from experts.

Submitting a request from the command line can be done using the LHCbDIRAC command dirac-production-request-submit with a stage 6 YAML file. Remember to have a valid Grid proxy.

$ lb-mc my_request.stage0.yaml my_request.stage6.yaml
$ lhcb-proxy-init
$ lb-dirac dirac-production-request-submit my_request.stage6.yaml --submit

The full usage notes are below:

Usage:
  dirac-production-request-submit [options] ... yaml_path

Options:
  -   --submit                 : Actually create steps and submit productions
  -   --create-filetypes       : Create missing file types
  -   --output-json=           : Write the production IDs to a JSON file

Arguments:
  yaml_path:  Path to the YAML file containing productions to submit