Changes for v4.0 of code

Last Update: 31-May-05

Base Fits on L & Pt(meas) instead of VPDL

Prediction histogram does not resemble generated data because of problem with event-by-event σ(vpdl).

Changes to generation of event variables

  1. generate Source
  2. generate ct0
  3. generate Pt(B), K from random sampling of histograms
    (depends on source)
  4. generate σ(L) from random sampling of histogram
    (does not depend on source)
  5. derive L = ct0 Pt(B) / M(src)
Generated Variables
v3.1v3.2 changes
t0 
Pt(B)Pt(meas)
K 
σ(vpdl)σ(L)
Tag 
Tag-smr 
VPDLLxy
VPDL-smr [w/ σ(vpdl)] (1)Lxy-smr [w/ &sigma(L)]
Source 
Notes:
  1. VPDL smearing was previously done using σ(vpdl) calculated with a common M(vpdl).
  2. No need for M(vpdl) in generation - remove it in .cpp, .input.
  3. Include functions for coherent calculation of VPDL and Tag, based on which type of variables are being used in the fits.

Changes to the Likelihood

Need to use L,Pt(meas) in these instead of VPDL(=x).

Changes to chi2 functions

Have to branch prediction functions for chi2 calculation off of those for logL calc's because logL functions use σ(L) for resolution convolution while asymmetry chi2 uses σ(x).
  1. new prediction function based on v3.1 PDFevt
  2. Use average value for σ(vpdl)

Physics Functions

Continue to use the following inputs to physics functions:
  1. VPDL - calculated from L,Pt(meas) and source
  2. K
  3. Tag
  4. σ(vpdl) - calc from σ(L),Pt(meas) and source
This way the same functions can be used for logL and chi2 fits.

Resolution Functions

Should be able to use same functional form for resolution functions - just different inputs depending on type of fit.

Creating prediction histogram from fit results

logL Fits:
  1. Loop over values of Pt(meas) & L
  2. Choose several values of σ(L) by random sampling over the histogram
  3. Update prediction arrays for each source at VPDL-bin corresponding to L,Pt(meas) using PDFevt( L,Pt(meas),σ(L) ) as a weight
  4. Normalize prediction arrays (bin-by-bin) to take into account the fact that each VPDL bin may have been filled a different number of times
  5. Fill source-by-source prediction histograms using prediction arrays
  6. Add all single source predictions together to get total pred histo
  7. Normalize prediction histograms to data (globally, based on total pred)
chi2 Fits:
  1. Loop over values of VPDL
  2. Use ave σ(vpdl) as in fit