4.4. Tools which will provide you help#

4.4.1. b2help-modules: List available basf2 modules and ask about their details#

This returns either all available modules within basf2 or returns specific information about a module when requested.

Usage:

b2help-modules will return the full list of available modules. b2help-modules PACKAGE will return a list of modules associated with the given PACKAGE name. b2help-modules MODULENAME will return specific information about the module with the name MODULENAME.

usage: b2help-modules [-h] [module]

Required Arguments

module

Get information specific to the requested module.

4.4.2. b2help-particles: List particles used in the event generator#

Utility to list and search the particle data known to the Belle II Software.

Just calling this program will print a list of all known particles which can be searched by name and mass using command line arguments

usage: b2help-particles [-h] [--min-mass MIN] [--max-mass MAX]
                        [--include-width N] [--regex] [-s {pdg,name,mass}]
                        [-r] [--pdg PDG]
                        [NAME]

Required Arguments

NAME

Optional name to search for in particles

options

--min-mass

Minimum mass for all particles to print

--max-mass

Maximum mass for all particles to print

--include-width

When searching for particles by mass this argument can be given to include all particles which fulfill the mass search within (mass +- N*width)

--regex

If given the name will be interpreted as a python regular expression

-s, --sort

Possible choices: pdg, name, mass

sort the list by the given value

-r, --reverse

reverse sorting if given

--pdg

If given show particles with the given PDG Code

4.4.3. b2help-recommendation: Tool to print analysis recommendations#

Outputs recommendation for data/MC corrections and systematics, use tags to navigate.

usage: b2help-recommendation [-h] (-mc {MC15,MC16} | -l LOCALFILE)
                             [-t TAGS [TAGS ...]] [-gt GLOBALTAG]
                             [-f {rst,color_rst}] [-p PAYLOAD]
                             [--n_tag_columns N_TAG_COLUMNS] [--no-pager] [-c]

options

-mc, --mccampaign

Possible choices: MC15, MC16

Show recommendations for this MC campaign and the corresponding data processing

-l, --localfile

If one wants to check a json file locally.

-t, --tags

Filter tools by specific tags. The ‘all’ tag allows to show all information.

-gt, --globaltag

Global tag name, if one wants to check another recommendation

-f, --format

Possible choices: rst, color_rst

Output format

-p, --payload

Payload name, if one wants to check another recommendation

--n_tag_columns

Number of columns for tag printing

--no-pager

Disable output scrolling, which is done by Pager

-c, --convert

For developers. Convert the localfile to a payload.

4.4.4. b2help-variables: List available variables in the analysis package#

This command returns a description of the variables which are available in the Analysis package of basf2.

  • To display all available variables,

    b2help-variables

  • To get a description of specific variables,

    b2help-variables --variables M Mbc isSignal

  • To get only the data type of the variables,

    b2help-variables --variables M Mbc isSignal --only_type

usage: b2help-variables [-h] [--no-pager]
                        [--variables VARIABLES [VARIABLES ...]] [--only_type]

options

--no-pager

Use a pager to show output or print to terminal.

--variables

Input variables to be displayed.

--only_type

Show only the data type of the variable. This option requires the variable names with the --variables option.

4.4.5. b2help-print-fei-mode-names: List available FEI modes for a given particle#

This command returns a ordered list of available FEI channels.

  • To display all available channels for B+ hadronic,

    b2help-print-fei-mode-names B+ -had

  • To display all available channels for B0 hadronic,

    b2help-print-fei-mode-names B0 -had

  • To display all available channels for B+ semileptonic,

    b2help-print-fei-mode-names B+ -sl

  • To display all available channels for B0 semileptonic,

    b2help-print-fei-mode-names B0 -sl

It works for daughter particles as well, such as D0, D+, etc.

usage: b2help-print-fei-mode-names [-h] (--hadronic | --semileptonic)
                                   [--no-enum]
                                   particle

Required Arguments

particle

Particle name

options

--hadronic, -had

Use only hadronic mode names

--semileptonic, -sl

Use only semileptonic mode names

--no-enum

Do not print numbers of the modes

4.4.6. b2help-eventtype: List decfiles used in the event generator#

Utility to search for decfiles which include given decay string.

Note

Currently this script only works on full releases but not on light releases, since it requires the decfile directory. Charge conjugate mode cannot be found if it is not explicitly written. Sub-decay is not supported.

Warning

Particle name including a prime (e.g. eta') induces an error and it cannot be found. This is a known issue.

usage: b2help-eventtype [-h] decay_string

Required Arguments

decay_string

Decay string to search for the EventType and decfiles. Please use single-/double-quotation to give a decay string (e.g. ‘B+ -> K+ e+ e-‘). Otherwise, an arrow (->) is recognized as redirection.

4.4.7. b2help-decay: Tool to find decays in decay files#

Script that provides decay file information.

Use cases:

  1. Print out the signal decay file. For example, b2help-decay print 1141540100.dec with or without file extension.

  2. Find the signal decay file. For example, b2help-decay find K_S0 J/psi B0 outputs the list of decay files that contain K_S0, J/psi, and B0. One can print out the decay file information by b2help-decay print <decay_file_name>.

  3. Find the signal decay line in BELLE2_DECAY.DEC. For example, b2help-decay find K_S0 J/psi -m B0 -b outputs the list of decay lines that contain K_S0, J/psi coming from mother particle B0. Particle multiplicity is considered but charge conjugation is not.

usage: b2help-decay [-h] {print,find} ...

Required Arguments

command

Possible choices: print, find

Sub-commands:#

print#

Print out a signal decay file

b2help-decay print [-h] signal

Required Arguments

signal

Name of the decay file

find#

Find a signal decay file or a decay inside DECAY_BELLE2.DEC

b2help-decay find [-h] [-m MOTHER] [-b] daughters [daughters ...]

Required Arguments

daughters

Names of the daughter particles

options

-m, --mother

Name of the mother particle

-b, --decay_belle2

Search for decay in the DECAY_BELLE2.DEC

4.4.8. b2help-print-mcparticles: Print the MCParticles in the input mdst file#

This command prints the MCParticles of the input mdst file and outputs an ntuple including __MCDecayString__. Default output file name is ntuple.root.

You can use any of basf2’s options, e.g. -o, -n, and --skip-events. Specifically, -i is required to select the input mdst file.

usage: b2help-print-mcparticles [-h] [-i INPUT]

Required Arguments

-i INPUT, --input INPUT

input mdst file name

Optional Arguments

-h, --help

show this help message and exit