Toy MC Fitting Documentation

Last Update: 09-Feb-06

Index

  1. Likelihood writeup
  2. PDF Definitions for Predictions used in logL and chi2 Fits
  3. Resolution & Physics Function Variables
  4. Resolution & Physics Functions
  5. K-Factor Deconvolution
  6. Fit Driver Input File

Function Variables

All resolution and physics functions are passed the same variables as an array. Aliases are defined in include/fit_funcs.cpp Precise definitions of what should be used for each of these variables is given here.

alias Lxy Var's VPDL Var's Comments
Resolution Function Variables
res_ind_dx Lxy: meas-true VPDL: meas-true  
res_ind_err σ(Lxy) σ(VPDL) either event-by-event sigma or the narrowest of multi-Gaussian sigma's
Physics Function Variables
phys_ind_x Lxy VPDL assumed to be corrected for M(src)
phys_ind_k K-Fact K-Fact  
phys_ind_tag Tag Tag 0=unmixed, 1=mixed
phys_ind_err σ(Lxy) σ(VPDL) only used for comb. bgrd
phys_ind_ptm Pt(meas) ---  
phys_ind_mass Mass --- for use in VPDL calc


Resolution & Physics Functions

The Prototype for both Resolution and Fit Functions has the form:
typedef Data_t ( *pFitFunc )( Data_t* var, Data_t* par );

These are defined in include/fit_funcs.cpp

Function Definitions & Parameters

ID
alias
Function Name Params
Resolution Functions (Lxy or VPDL)
100
UseResNo
none
do not use resolution
none
101
UseResG1Evt
fGauss1_evt
single Gaussian
  1. scale fact for &sigm;(Lxy/VPDL)
102
UseResG2Evt
fGauss2_evt
double Gaussian
  1. fraction of sigma(2)
  2. sigma(2)
  3. sigma scale fact
Physics Functions for both logL and chi2 Fits
PDF returned = f(Lxy=0) * H(Ptm) or f(VPDL=0)
3
UsePhys0t
fPhys_0Life
0-lifetime bgrd for fits using true var's
f(x) = 1/δ (0<=x<δ)
f(x) = 0 (otherwise)
  1. P(mix): prob to appear in mix sample
  2. δ: bin width --> Integral = 1
    - set automatically in Fit_Info constructor
Physics Functions for logL Fits: Lxy,Ptm,err(Lxy)
PDF returned = f(Lxy,Ptm,[err(Lxy)]) * H(Ptm)
1
UseLogLMix
fPhys_Mix
unmix/mix PDF vs Lxy,Ptm,σ(Lxy)
  1. τ
  2. Δm
  3. P(mis-tag)
2
UseLogLExp
fPhys_Exp
exponential decay
  1. τ
  2. P(mix): prob to appear in mix sample
4
UseLogL0tG1
fPhys_0Life_G1
0-lifetime using single Gauss in Lxy
for use with comb bgrd
Note: P(mix) should include effects of P(mis-tag)
  1. scale fact for σ(Lxy)
  2. P(mix): prob to appear in mix sample
Physics Functions for chi2 Fits
PDF returned = f(VPDL,[err(VPDL)])
11
UseChi2Mix
fPhys_Mix
unmix/mix PDF vs VPDL
as above
14
UseChi20tG1
fPhys_0Life_G1
0-lifetime using single Gauss in VPDL
for use with comb bgrd
  1. scale fact for σ(VPDL)
  2. P(mix): prob to appear in mix sample

K-Factor Deconvolution

K-Factor deconvolution driver variables are defined in include/mix_fit.hpp and used in the generation and fit driver input files in input/data/*.input

The true value of ct0 will be used in the fits (Usect0) if: _use_true_data = 1 and no convolution (K-fact or resolution) is requested for any of the sources.

ID alias Meaning
0 UseNoKfact Do not use a K-Factor
1 UseHistKfact Generate or convolute using the K-Factor histogram found in the following file name
2 UseAveKfact Use an average K-factor when constructing t0 from the VPDL. The value of <K> is input as the next variable.
3 UseTrueKfact removed in v6.3 of code - 14-Sep-05
Use Pt(B) instead of Pt(meas) when calculating the VPDL. This allows to use Lxy(meas) and Pt(B) when constructing t0.


Fit Driver Input File

Default filename: (input/data/fit.input)

Variable Description and Values
Global Fit Variables
_use_fit_var Variables to use in Fits
0 = use Lxy, Pt(meas), σ(Lxy): evt-by-evt logL only
1 = use VPDL, σ(VPDL) (or <σ(VPDL)>) - added 10-Sep-05
2 = use ct0 (ind_t0) - added 26-Jul-05
_use_true_mix Use True/Smeared Mixing Tag in Fits
0 = use smeared mixing tag (ind_mix_smr)
1 = use true mixing tag (ind_mix)
_use_true_lxy Use True/Smeared Lxy/VPDL/ct0 in Fits
0 = use smeared variable (ind_lxy_smr)
1 = use true variable (ind_lxy)
2 = use ct0 (ind_t0) - added 26-Jul-05 - removed 10-Sep-05
_use_true_ptb Use Pt(meas) or Pt(B) in Fits
0 = use Pt(meas) in ind_ptm
1 = use Pt(B) in ind_ptm
added to v6.3 code - 14-Sep-05