Recent Changes · Search:

Dispense


Navigation Tips - Dritte


PmWiki

pmwiki.org

edit SideBar

GlobalFits

< Mujpy.Data | Index | Mujpy.FitTypes >


Mujpy provides only asymmetry fits. Global fit are implemented. A jupyter notebook will provide a gui dash user-friendier than musrfit. The standard naming scheme is the collection of two letter acronyms for the components, e.g. msmsbl for a 3 component fit wit two transverse (ms components and a longitudinal bl component. For a complete list see all the methods whose name is just two alphabetical lower case letter in class mumodel in mujpy/mucomponent/mucomponent. See mumodel._available_components_

Eight main types of asymmetry fits are considered, with 2 subtypes (plain or calib), depending on

  • single run vs. suites of runs
  • single group vs. multi groups (typically 2 in GPS, 8 in HIFI and ISIS)
  • sequential fits vs global fits

The eight types are identified uniquely by their suite, model name and model-definition json file (the dashboard). On this page we fix a symbol for each (A1-C2):

  • A1 single run, single group TF, model name mlmg, providing one chi2
  • A20 single run, multi groups sequential, e.g. same for 2 groups, providing two chi2
  • A21 single run, multi groups global, e.g. same for 2 groups, providing one chi2
    • this is the first type of global fit (group global, gg)
    • all Minuit parameters are userpars, listed under ['userpardicts_guess'] in the json dashboard file, with flags '~' or '!'
    • component parameters "flag"s are all "=", assigned to userpars through "function" "p[x]" with index x referring to the index of the internal parameter list (the json order)
    • when groups require distinct assignments use "function_multi" instead of "function"
  • B1 suite of n runs, single group, e.g. ZF model name msbl, providing n chi2
  • B20 sequential suite of n runs, multi groups sequential, e.g. ZF model name for two groups msbl, providing 2n chi2
  • B21 sequential suite of n runs, multi groups global, e.g. ZF model name for two groups msbl, providing n chi2
  • C1 global suite of n runs, single group, e.g. ZF model name msbl, providing one chi2
    • again, all Minuit parameters are userpars with flags '~','!' or '#' for automatic local replica for each run (minfit style)
    • component parameters flags must again be '=', defined by 'function'
    • mufit can be directed to execute the manual dashboard [to be done]
  • C2 suite of runs, multi group, is the integration of C1 and B2.
    • 'function' and 'function_multi' are mutually exclusive
    • 'flag' = '#' cannot have 'function_multi', define two distinct '#' userpars instead! Since C1 has no 'function_multi' and B21, A21 have no '#' this is a general rule.

See the link for examples

Calibration mode yields {$\alpha$}, typically in TF geometry and is available for each of the above fits.


  • Old switchyard choosefit with 16 dofit_specific was bloated and inhomoheneous
  • The new one is just one def dofit_(self,returntup). The key is that mumodel._load_ is offered a slice of the suite of appropriate shape, together with same-shape model function methods. Homogeneous versions of the tools are assigned by if-comprenension

dofit_

  • reassigns the main tools to a single/multigroup/multirun/multirun_multigroup version. The main tools are
    • values, names, ... = int2min_(dashboard)
      • values, errors, names ... are list of inputs for self.lastfit = Minuit(cost,names,*values), self.lastfit.errors = errors, ...
    • methods_keys = int2_method_key_(dashboard): output is [method, [...[key ..]]], where
      • method is a mumodel component instance (e.g.mg), vstacked to produce a model function f with the same shape as asymm (1d, 2d or 3d)
      • with p = list of Minuit parameters, the [inner] list [key(p), ...] produces the mumodel component parameters by handling 'function' strings in the dashboard
      • the external list [of lists] provides mucomponent parameters for the vstacked method
  • defines a single instance of self.lastfit = Minuit(cost,names,*values), errors, limits, etc
  • double loops on krun, kgroup, where -1 means the whole span [:len(suite._the_runs_)] and [:len(suite.groups)], respectively (which works also for len = 1)
    • asymm, asyme = suite.asymmetry_slice(krun,kgroup) (plain fits, for calib see below)
      • Fit mr , mg , sr , sg krun kgroup
      • A1 False,False,False,False -1 -1
      • A20 False,True,False,True -1, loop kgroup
      • A21 False,False,False,True -1,-1
      • B1 True,False,True,False loop krun, -1
      • B20 True,True,True,True loop krun, kgroup
      • B21 True,False,True,True loop krun, -1
      • C1 False,False,True,False -1,-1
      • C2 False,False,True,True -1,-1
    • invokes mumodel._load_(asymm,asyme,returntup,models_keys,multigroup=False,multirun=False) - a singleton asymm dimension means multi False - which
      • reassigns self._add_, invoked by the cost function, to sum functions f from each components of mumodel, with f.shape=asymm.shape
  • check: dofit rewrites alpha in suite.groups[kgroup]['alpha] :w

and suite.grouping[kgroup]è'alpha'], is this correct? Now suite, suite.asymmetry_single, a basic routine for asymmetry, uses grouping['alpha']. A future mudash, upon relaunching a fitmust make sure to refresh the starting point.

  • calib fits act similarly, but loads sliced _yf_,_yb_,_ef_,_eb_ and uses mumodel method _asymmetry_ to allow parameters alpha redefinition (could be done in suite if parameters alpha overwrite suite.grouping - keep pristine groups)

< Mujpy.Data | Index | Mujpy.FitTypes >

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on July 10, 2026, at 10:10 AM