YAML Configuration Sub-Keys#

Note

Keys marked with an asterisk are optional and can be omitted.

input#

bk_query#

Key

Type

Meaning

bk_query

string

The bookkeeping location of the desired input data.

n_test_lfns*

int

The number of files to use as input to test jobs. Only to be used for samples with very few output candidates.

dq_flags*

sequence of strings

What quality of data to use. This can be set to any of BAD, OK, UNCHECKED or EXPRESS_OK (only for Runs 1 & 2). Multiple can be used at once by writing them as a sequence of values.

runs*

sequence of integers

A sequence of data taking runs to use as input. This can either be written as a typical sequence or as A:B where runs from A to B inclusive will be used.

input_plugin*

string

The input plugin setting, either default or by-run. default==default

keep_running*

bool

Whether to keep running on new data as it comes in. default==False

smog2_state*

string

Gas injected in SMOG2, possible choices are: [Hydrogen, Deuterium, Helium, Nitrogen, Oxygen, Neon, Argon, Krypton, Xenon]. 2 possible states: <Name>, <Name>Unstable or both. The word Unstable is appended if the gas injected pressure is not stable.

Here is a full example showing a bk_query input using all optional keys:

job_name:
  input:
    bk_query: /some/MagUp/bookkeeping/path.DST
    n_test_lfns: 3
    dq_flags:
      - BAD
      - OK
    runs:
      - 269370
      - 269371
      - 269372
      # equivalent to 269370:269372
    input_plugin: by-run
    keep_running: True
    smog2_state:
      - Argon
      - ArgonUnstable

job_name#

Key

Type

Meaning

job_name

string

The name of the job whose output should be the input of this job.

filetype*

string

The file type of the input file, for when your input job has multiple output files.

Here is a full example showing a job_name input using all optional keys:

strip_job:
  bk_query: /some/MagUp/bookkeeping/path.DST
  options: strip.py

tuple_job:
  input:
    job_name: strip_job
    filetype: DST
  options: tuple.py

transform_ids#

Key

Type

Meaning

transform_ids

sequence of integers

A sequence of transformation IDs to use as input file sources.

filetype

string

The file type of the input file, for when your input job has multiple output files.

n_test_lfns*

int

The number of files to use as input to test jobs. Only to be used for samples with very few output candidates.

dq_flags*

sequence of strings

What quality of data to use. This can be set to any of BAD, OK, UNCHECKED or EXPRESS_OK (only for Runs 1 & 2). Multiple can be used at once by writing them as a sequence of values.

runs*

sequence of integers

A sequence of data taking runs to use as input. This can either be written as a typical sequence or as A:B where runs from A to B inclusive will be used.

Here is a full example showing a transform_ids input using all optional keys:

job_name:
  input:
    transform_ids:
      - 1234
      - 5678
    filetype: DST
    n_test_lfns: 3
    dq_flags:
      - BAD
      - OK
    runs:
      - 269370
      - 269371
      - 269372
      # equivalent to 269370:269372

checks#

range: create a 1D histogram#

Key

Type

Meaning

tree_pattern

string

The name of the TTree to use. This is a regex and can use wildcards. default==r"(.*/DecayTree)|(.*/MCDecayTree)"

expression

string

The name of a branch (or a combination of branch names) to evaluate and plot as a histogram.

limits

dict

Takes two keys: min and max, the values of which must both be floats. These define the min and max values of the horizontal histogram axis.

blind_ranges*

list or dict

Defines ranges to blind, i.e., ranges for which entries will not be included in the histogram. This uses similar min/max key syntax as the limits option uses. You can either provide a single range, or a list of ranges.

exp_mean*

float

Expected mean value of the 1D distribution. This is an optional parameter. If provided, it is compared with the observed value and their agreement within the provided mean_tolerance is checked.

exp_std*

float

Expected value for the standard deviation of the 1D distribution. This is an optional parameter. If provided, it is compared with the observed value and their agreement within the provided std_tolerance is checked.

mean_tolerance*

float

Maximum shift tolerated between expected and observed mean values. This is an optional parameter and it has to be provided only if also exp_mean is provided.

std_tolerance*

float

Maximum shift tolerated between expected and observed values of standard deviation. This is an optional parameter and it has to be provided only if also exp_std is provided.

n_bins*

int

Number of bins to use in the histogram, default==50.

Here is a full example showing a range check using all optional keys:

checks:
  Bd_DTF_M:
    type: range
    tree_pattern: TupleDstToD0pi_D0ToKK/DecayTree
    expression: 'Bd_constB0PV_M'
    limits:
      min: 5000
      max: 6000
    blind_ranges:
      - min: 5200
        max: 5400
      - min: 5600
        max: 5800
    exp_mean: 5279.65
    exp_std:  30.0
    mean_tolerance: 0.12
    std_tolerance: 10
    n_bins: 100

range_bkg_subtracted: create a 1D histogram with background subtracted#

Key

Type

Meaning

tree_pattern

string

The name of the TTree to use. This is a regex and can use wildcards. default==r"(.*/DecayTree)|(.*/MCDecayTree)"

expression

string

The name of a branch (or a combination of branch names) to evaluate and plot on the horizontal histogram axis.

limits

dict

Takes two keys: min and max, the values of which must both be floats. These define the min and max values of the horizontal histogram axis.

expr_for_subtraction

string

The name of a control variable (branch or a combination of branch names) to be used to perform the background subtraction.

mean_sig

float

Expected mean value of the expr_for_subtraction variable. The signal window will be centered around this value.

background_shift

float

Shift, w.r.t the mean_sig value, used to define the two background regions.

background_window

float

Size of the background windows.

signal_window

float

Size of the signal window.

blind_ranges *

list or dict

Defines ranges to blind, ie. ranges for which entries will not be included in the histogram. This uses similar min/max key syntax as the limits option uses. You can either provide a single range, or a list of ranges.

n_bins*

int

Number of bins to use in the histograms, default==50.

Here is a full example showing a range_bkg_subtracted check using all optional keys:

checks:
  D_PT:
    type: range_bkg_subtracted
    tree_pattern: TupleDstToD0pi_D0ToKK/DecayTree
    expression: D0_PT
    limits:
        min: 0.0
        max: 500000.0
    expr_for_subtraction: D0_MM
    mean_sig: 1865.0
    background_shift: 30.0
    background_window: 10.0
    signal_window: 20.0
    blind_ranges:
        min: 10000.0
        max: 30000.0
    n_bins: 50

range_nd: create a 2D or 3D histogram#

Key

Type

Meaning

tree_pattern

string

The name of the TTree to use. This can use wildcards.

expressions

dict

Keys are the axes of the histograms, (in order) x, y, and z. Values for each are the expression for that axis, using the same syntax as expression for range checks. The z axis is optional.

limits

dict

Keys are the axes of the histograms, (in order) x, y, and z. Values for each are a dictionary for max/min values for that axis, using the same syntax as limits for range checks. The z axis is optional.

blind_ranges*

list

A list of dictionaries defining ranges that will be blinded. For each entry, the keys are the axes of the histograms, (in order) x, y, and z, and the values for each are a dictionary for max/min values for that axis, using the same syntax as limits for range checks. The z axis is optional.

n_bins*

dict

Keys are the axes of the histograms, (in order) x, y, and z. Values for each are an integer defining the number of bins to use in that axis of the histogram. The default number of bins for each axis is 50. The z axis is optional.

Here is a full example showing a range_nd check using all optional keys:

checks:
  momenta:
    type: range_nd
    expressions:
        x: H1_PX
        y: H2_PX
        z: H2_PY
    limits:
        x:
            min: 0.0
            max: 500000.0
        y:
            min: 0.0
            max: 500000.0
        z:
            min: 0.0
            max: 500000.0
    blind_ranges:
        x:
            min: 10000.0
            max: 30000.0
        y:
            min: 10000.0
            max: 30000.0
        z:
            min: 10000.0
            max: 30000.0
    n_bins:
        x: 50
        y: 50
        z: 50
    tree_pattern: TupleDstToD0pi_D0ToKK/DecayTree

num_entries: require a minimum number of entries in a TTree#

Key

Type

Meaning

tree_pattern

string

The name of the TTree to use. This can use wildcards.

count

int

The minimum number of entries required.

Here is a full example showing a num_entries check:

checks:
  num_entries:
    type: num_entries
    count: 1000
    tree_pattern: TupleDstToD0pi_D0ToKK/DecayTree

num_entries_per_invpb: require a minimum number of entries per pb^-1 in a TTree#

Key

Type

Meaning

tree_pattern

string

The name of the TTree to use. This can use wildcards.

count_per_invpb

int

The minimum number of entries per pb^-1 required.

lumi_pattern*

string

Regex used to identify the object inside the ntuple containing luminosity information. Default value is (.*/LumiTuple).

Here is a full example showing a num_entries_per_invpb check using all optional keys:

checks:
  num_entries_per_invpb:
    type: num_entries_per_invpb
    count_per_invpb: 1000
    tree_pattern: TupleDstToD0pi_D0ToKK/DecayTree
    lumi_pattern: LumiTuple

branches_exist: require a set of branches to exist in a TTree#

Key

Type

Meaning

tree_pattern

string

The name of the TTree to use. This can use wildcards.

branches

sequence of strings

A list of branch names to check for.

Here is a full example showing a branches_exist check:

checks:
  branches_exist:
    type: branches_exist
    branches:
      - H1_PX
      - H1_PY
      - H1_PZ
      - H2_PX
      - H2_PY
      - H2_PZ
    tree_pattern: TupleDstToD0pi_D0ToKK/DecayTree