In [1]:
import sys
sys.path.append('../../FourVector')
sys.path.append('../project')

from FourVector import FourVector
from ThreeVector import ThreeVector

from FutureColliderTools import SmearVertex, GetCorrectedMass, GetMissingMass2, GetQ2
from FutureColliderDataLoader import LoadData_KMuNu, LoadData_DsMuNu
from FutureColliderVariables import *
from FutureColliderFitter import FutureFitter

import numpy as np
import ROOT

ROOT.enableJSVis()
ROOT.gStyle.SetOptStat(0)


Welcome to JupyROOT 6.08/02

Perform and plot a $B_s \rightarrow D_s^- \mu^+ \nu_{\mu}$ fit at LHCb resolution

In the plot the lines are before Beeston Barlow, the points are after


In [2]:
Fitter = FutureFitter("../output/Data_Histograms_1.0_LHCb.root", "MCORR_Data_DsMuNu",  "../output/Source_Histograms_DsMu_1.0_LHCb_Merged.root", False)
Fitter.Fit()

c1 = ROOT.TCanvas("c1", "c1", 900,900)

Fitter.Plot(c1)

c1.Draw()

c1.Print("ExampleFit_DsMuNu.pdf")


 **********
 **    1 **SET PRINT           0
 **********
 **********
 **    2 **SET NOGRAD
 **********
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 frac0        3.50000e-02  1.00000e-02    0.00000e+00  1.00000e+01
     2 frac1        2.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
     3 frac2        7.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
     4 frac3        7.00000e-02  1.00000e-02    0.00000e+00  1.00000e+01
     5 frac4        2.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
 **********
 **    3 **SET ERR         0.5
 **********
 **********
 **    4 **SET PRINT           0
 **********
 **********
 **    5 **SET STR           1
 **********
 **********
 **    6 **MIGRAD        1625        0.01
 **********
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.
 FCN=-6.82576e+06 FROM MIGRAD    STATUS=FAILED        387 CALLS         388 TOTAL
                     EDM=0.00277098    STRATEGY= 1      ERR MATRIX APPROXIMATE
  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  frac0        2.78104e-02   2.83757e-03   5.78240e-03   4.65810e-02
   2  frac1        4.24588e-02   4.57972e-03   6.83791e-03  -4.36683e-01
   3  frac2        5.89955e-01   1.98009e-02   2.67815e-03   2.58000e+00
   4  frac3        5.87163e-02   1.26713e-02   7.39141e-03  -1.93087e+00
   5  frac4        2.81068e-01   1.52062e-02   3.73002e-03  -4.92934e-01
                               ERR DEF= 0.5
+------------------+----------+-----------+
|     Template     | Fraction | Error [%] |
+------------------+----------+-----------+
|   13774000_Tau   |  0.027   |    10.2   |
| Combinatorial_Ds |  0.042   |   10.78   |
| 13774000_Dsstar  |  0.589   |    3.35   |
|  13774000_Ds01   |  0.058   |   21.58   |
|   13774000_Ds    |  0.281   |    5.41   |
+------------------+----------+-----------+
Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 
Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 
Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 
Warning in <TFractionFitter::Fit>: Abnormal termination of minimization.
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Info in <TCanvas::Print>: pdf file ExampleFit_DsMuNu.pdf has been created

Perform and plot a $B_s \rightarrow K^- \mu^+ \nu_{\mu}$ fit at LHCb resolution

In the plot the lines are before Beeston Barlow, the points are after


In [3]:
Fitter = FutureFitter("../output/Data_Histograms_1.0_LHCb.root", "MCORR_Data_KMuNu",  "../output/Source_Histograms_KMu_1.0_LHCb_Merged.root", True)
Fitter.Fit()

c1 = ROOT.TCanvas("c1", "c1", 900,900)

Fitter.Plot(c1)

c1.Draw()

c1.Print("ExampleFit_KMuNu.pdf")


 **********
 **    7 **SET PRINT           0
 **********
 **********
 **    8 **SET NOGRAD
 **********
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 frac0        2.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
     2 frac1        2.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
     3 frac2        2.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
     4 frac3        1.00000e-01  1.00000e-02    0.00000e+00  1.00000e+01
     5 frac4        6.50000e-02  1.00000e-02    0.00000e+00  1.00000e+01
 **********
 **    9 **SET ERR         0.5
 **********
 **********
 **   10 **SET PRINT           0
 **********
 **********
 **   11 **SET STR           1
 **********
 **********
 **   12 **MIGRAD        1625        0.01
 **********
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MINUIT WARNING IN MIGRAD  
 ============== Negative diagonal element 3 in Error Matrix
 MINUIT WARNING IN MIGRAD  
 ============== Negative diagonal element 4 in Error Matrix
 MINUIT WARNING IN MIGRAD  
 ============== 1.00014 added to diagonal of error matrix
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 FCN=-1.97027e+06 FROM MIGRAD    STATUS=CONVERGED     434 CALLS         435 TOTAL
                     EDM=9.49424e-06    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  frac0        1.67801e-01   1.48426e-02   2.04184e-03  -8.87720e-01
   2  frac1        1.58418e-01   2.16662e-02   2.61412e-03  -6.67730e-01
   3  frac2        5.67599e-01   4.63406e-02   1.62799e-03  -6.66898e-01
   4  frac3        4.24720e-02   3.51679e-02   5.33595e-03  -1.22002e-01
   5  frac4        6.37030e-02   6.02188e-03   2.95278e-03  -5.46894e-01
                               ERR DEF= 0.5
+------------------+----------+-----------+
|     Template     | Fraction | Error [%] |
+------------------+----------+-----------+
|     13512010     |  0.167   |    8.84   |
|     13512400     |  0.158   |   13.67   |
| 13774000_DsX_Tau |  0.567   |    8.16   |
|  13774000_Ds01   |  0.042   |    82.8   |
| Combinatorial_K  |  0.063   |    9.45   |
+------------------+----------+-----------+
Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 
Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TH1F::Sumw2>: Sum of squares of weights structure already created
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1
Info in <TCanvas::Print>: pdf file ExampleFit_KMuNu.pdf has been created

In [ ]:


In [ ]:


In [ ]:


In [ ]: