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.dev350.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.dev350-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rx_fitter-1.1.dev350.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.dev350.tar.gz
Algorithm Hash digest
SHA256 edd14147c4c0cacec0dbbb8342f9c5e6d790fc1e78abb9d108493dbcb94c046b
MD5 09c8ff9b11425d6fb28b246939cc9d6a
BLAKE2b-256 24e6baa1cc220926191b77af2209587a008df34fc8d8cbb32bbc1069d0f69b85

See more details on using hashes here.

Provenance

The following attestation bundles were made for rx_fitter-1.1.dev350.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.dev350-py3-none-any.whl.

File metadata

  • Download URL: rx_fitter-1.1.dev350-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.dev350-py3-none-any.whl
Algorithm Hash digest
SHA256 01f3b8a965347283f752de95e3c564e75297273676f77398e750899c4852eccc
MD5 f9f4947278c214ed2e4cee61fb90edac
BLAKE2b-256 69f2dfe488e393ceb7c30e32dc1f09d5f4b4f2e2d32e41868fba3e304ff55b32

See more details on using hashes here.

Provenance

The following attestation bundles were made for rx_fitter-1.1.dev350-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