Skip to main content

Framework used to handle fits to data and simulation

Project description

[TOC]

Fitter

This project is meant to automate:

  • Building of models
  • Fits to MC
  • Fits to data
  • Creation of validation plots, tables, etc
  • Application of constraints
  • Obtention of fitting information, specially:
    • Mass scales, resolutions
    • Signal yields for resonant and rare modes

And be used as an input for:

  • Systematics evaluation
  • Extraction of $R_K$ and $R_K^*$
  • Calibrations

Ideally with minimal changes for new observables. The class is organized as in the diagram below:

project diagram

This project makes heavy use of caching through the Cache class and thus:

  • It allows for fast reruns
  • It allows for the fitters to also be used to retrieve parameters

Usage

For fits to data do:

fit_rx_data -c rare/electron -q central -C 0.5 -P 0.5

to use the configuration in src/fitter_data/rare/electron/data.yaml with an MVA working point of 0.5 for the combinatorial and part reco BDTs.

This should:

  • Apply the selection on the MC and data
  • Fit the MC
  • Use the MC to create components for the fit to the data
  • Fit the data and save everything

To do the same from a python script do:

from dmu.generic        import utilities  as gut
from rx_selection       import selection  as sel
from fitter.data_fitter import DataFitter

cfg = gut.load_conf(
    package='fitter_data',
    fpath  ='rare/electron/data.yaml')

with sel.custom_selection(d_sel={
        'nobr0' : 'nbrem != 0',
        'bdt'   : 'mva_cmb > 0.60 && mva_prc > 0.40'}):
    ftr = DataFitter(
        sample = 'DATA_24_*',
        trigger= 'Hlt2RD_BuToKpEE_MVA',
        project= 'rx',
        q2bin  = 'central',
        cfg    = cfg)
    obj = ftr.run()

where obj is a DictConf (from the omegaconf project) dictionary where the parameters and errors can be accessed as:

val = obj['name']['value']
err = obj['name']['error']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rx_fitter-1.1.dev351.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rx_fitter-1.1.dev351-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file rx_fitter-1.1.dev351.tar.gz.

File metadata

  • Download URL: rx_fitter-1.1.dev351.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rx_fitter-1.1.dev351.tar.gz
Algorithm Hash digest
SHA256 021198f56d4283f7e87f8b6815dd0426a70fdf44c2d541186b7273483213b88f
MD5 2daa7cdffc15e80392ab50d3067944b4
BLAKE2b-256 42d8f0f338f104b5d01f529b806e112e23ed4962a4598e723adf78bbb0f8b4ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for rx_fitter-1.1.dev351.tar.gz:

Publisher: publish.yaml on RX-Run3/rx-fitter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rx_fitter-1.1.dev351-py3-none-any.whl.

File metadata

  • Download URL: rx_fitter-1.1.dev351-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rx_fitter-1.1.dev351-py3-none-any.whl
Algorithm Hash digest
SHA256 4843e4ff14f6aa00417612974b7977c5be901c6fded74e811d85cb6f4d5992f2
MD5 05a028b53fabf6379bf4856ec7c5ae5a
BLAKE2b-256 c2a9cfb7174ec43e8f9d047865ffb364e5f99ae79190d7423279d2ac73886ec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rx_fitter-1.1.dev351-py3-none-any.whl:

Publisher: publish.yaml on RX-Run3/rx-fitter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page