nctMu26DimitrincncHist.SetBinError(binNum, error)
    nctMu26BwExponcncHist.SetBinContent(binNum, xsec)
    nctMu26BwExponcncHist.SetBinError(binNum, error)
    nctMu26RelBwExponcncHist.SetBinContent(binNum, xsec)
    nctMu26RelBwExponcncHist.SetBinError(binNum, error)
    nctMu26PerExpoBwncncHist.SetBinContent(binNum, xsec)
    nctMu26PerExpoBwncncHist.SetBinError(binNum, error)
    nctMu26PerExpoRelBwncncHist.SetBinContent(binNum, xsec)
    nctMu26PerExpoRelBwncncHist.SetBinError(binNum, error)
    nctMu26DimitriRelBwncncHist.SetBinContent(binNum, xsec)
    nctMu26DimitriRelBwncncHist.SetBinError(binNum, error)
    nctMu26ModDimitriRelBwncncHist.SetBinContent(binNum, xsec)
    nctMu26ModDimitriRelBwncncHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctMu26ExponcncHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26ChebyshevncncHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26DimitrincncHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26BwExponcncHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26RelBwExponcncHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26PerExpoBwncncHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26PerExpoRelBwncncHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26DimitriRelBwncncHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26ModDimitriRelBwncncHist, root.kBlack,
                      root.kFullDotLarge)
   nctPhotonDimitriFullHist.SetBinError(binNum, error)
   nctPhotonBwExpoFullHist.SetBinContent(binNum, xsec)
   nctPhotonBwExpoFullHist.SetBinError(binNum, error)
   nctPhotonRelBwExpoFullHist.SetBinContent(binNum, xsec)
   nctPhotonRelBwExpoFullHist.SetBinError(binNum, error)
   nctPhotonPerExpoBwFullHist.SetBinContent(binNum, xsec)
   nctPhotonPerExpoBwFullHist.SetBinError(binNum, error)
   nctPhotonPerExpoRelBwFullHist.SetBinContent(binNum, xsec)
   nctPhotonPerExpoRelBwFullHist.SetBinError(binNum, error)
   nctPhotonDimitriRelBwFullHist.SetBinContent(binNum, xsec)
   nctPhotonDimitriRelBwFullHist.SetBinError(binNum, error)
   nctPhotonModDimitriRelBwFullHist.SetBinContent(binNum, xsec)
   nctPhotonModDimitriRelBwFullHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctPhotonExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonChebyshevFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonDimitriFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonBwExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonRelBwExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonPerExpoBwFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonPerExpoRelBwFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonDimitriRelBwFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctPhotonModDimitriRelBwFullHist, root.kBlack, root.kFullDotLarge)

#==================================================================================
# Fit the Histograms //////////////////////////////////////////////////////////////
#==================================================================================

# initial values of fit parameters
parameters = numpy.array([0.0711, 4688, 0.0787])
Exemple #3
0
    nctMu26for110to310DimitriFullHist.SetBinError(binNum, error)
    nctMu26for110to310BwExpoFullHist.SetBinContent(binNum, xsec)
    nctMu26for110to310BwExpoFullHist.SetBinError(binNum, error)
    nctMu26for110to310RelBwExpoFullHist.SetBinContent(binNum, xsec)
    nctMu26for110to310RelBwExpoFullHist.SetBinError(binNum, error)
    nctMu26for110to310PerExpoBwFullHist.SetBinContent(binNum, xsec)
    nctMu26for110to310PerExpoBwFullHist.SetBinError(binNum, error)
    nctMu26for110to310PerExpoRelBwFullHist.SetBinContent(binNum, xsec)
    nctMu26for110to310PerExpoRelBwFullHist.SetBinError(binNum, error)
    nctMu26for110to310DimitriRelBwFullHist.SetBinContent(binNum, xsec)
    nctMu26for110to310DimitriRelBwFullHist.SetBinError(binNum, error)
    nctMu26for110to310ModDimitriRelBwFullHist.SetBinContent(binNum, xsec)
    nctMu26for110to310ModDimitriRelBwFullHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctMu26for110to310ExpoFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310ChebyshevFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310BernsteinFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310DimitriFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310BwExpoFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310RelBwExpoFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310PerExpoBwFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310PerExpoRelBwFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310DimitriRelBwFullHist, root.kBlack,
    nctMu26for110to310Dimitri1jetHist.SetBinError(binNum, error)
    nctMu26for110to310BwExpo1jetHist.SetBinContent(binNum, xsec)
    nctMu26for110to310BwExpo1jetHist.SetBinError(binNum, error)
    nctMu26for110to310RelBwExpo1jetHist.SetBinContent(binNum, xsec)
    nctMu26for110to310RelBwExpo1jetHist.SetBinError(binNum, error)
    nctMu26for110to310PerExpoBw1jetHist.SetBinContent(binNum, xsec)
    nctMu26for110to310PerExpoBw1jetHist.SetBinError(binNum, error)
    nctMu26for110to310PerExpoRelBw1jetHist.SetBinContent(binNum, xsec)
    nctMu26for110to310PerExpoRelBw1jetHist.SetBinError(binNum, error)
    nctMu26for110to310DimitriRelBw1jetHist.SetBinContent(binNum, xsec)
    nctMu26for110to310DimitriRelBw1jetHist.SetBinError(binNum, error)
    nctMu26for110to310ModDimitriRelBw1jetHist.SetBinContent(binNum, xsec)
    nctMu26for110to310ModDimitriRelBw1jetHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctMu26for110to310Expo1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310Chebyshev1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310Dimitri1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310BwExpo1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310RelBwExpo1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310PerExpoBw1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310PerExpoRelBw1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310DimitriRelBw1jetHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26for110to310ModDimitriRelBw1jetHist, root.kBlack,
Exemple #5
0
   nctMu26nnloDimitriccHist.SetBinError(binNum, error)
   nctMu26nnloBwExpoccHist.SetBinContent(binNum, xsec)
   nctMu26nnloBwExpoccHist.SetBinError(binNum, error)
   nctMu26nnloRelBwExpoccHist.SetBinContent(binNum, xsec)
   nctMu26nnloRelBwExpoccHist.SetBinError(binNum, error)
   nctMu26nnloPerExpoBwccHist.SetBinContent(binNum, xsec)
   nctMu26nnloPerExpoBwccHist.SetBinError(binNum, error)
   nctMu26nnloPerExpoRelBwccHist.SetBinContent(binNum, xsec)
   nctMu26nnloPerExpoRelBwccHist.SetBinError(binNum, error)
   nctMu26nnloDimitriRelBwccHist.SetBinContent(binNum, xsec)
   nctMu26nnloDimitriRelBwccHist.SetBinError(binNum, error)
   nctMu26nnloModDimitriRelBwccHist.SetBinContent(binNum, xsec)
   nctMu26nnloModDimitriRelBwccHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctMu26nnloExpoccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloChebyshevccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloDimitriccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloBwExpoccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloRelBwExpoccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloPerExpoBwccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloPerExpoRelBwccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloDimitriRelBwccHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloModDimitriRelBwccHist, root.kBlack, root.kFullDotLarge)

#==================================================================================
# Fit the Histograms //////////////////////////////////////////////////////////////
#==================================================================================

# initial values of fit parameters
parameters = numpy.array([0.0711, 4688, 0.0787])
# make root histogram variables
nctPhotonFullHist = root.TH1F("nctPhotonFullHist",
                              "Cross Section for NLO CT Full with FSR", 50,
                              110, 160)
settings.setHistTitles(nctPhotonFullHist, "Dimuon Mass [GeV/c^{2}]",
                       "Cross Section")

# fill the histograms
for num, xsec in zip(range(len(nctPhotonFull)), nctPhotonFull):
    # bin numbers start at 1
    binNum = num + 1
    nctPhotonFullHist.SetBinContent(binNum, xsec)

# adjust histogram settings
settings.setDataPoint(nctPhotonFullHist, root.kBlack, root.kFullDotLarge)

#==================================================================================
# Fit the Histograms //////////////////////////////////////////////////////////////
#==================================================================================

# specify number of fit parameters
#parameters = numpy.array([0.3, -1, -2, 0.5])
parameters = numpy.array([1, 110, 0.01])

# fit with root
#fit.fitTH1(nctPhotonFullHist, 110, 160, parameters, pdf.dimitripdf, "R", root.kRed)
fitfunc = fit.fitTH1(nctPhotonFullHist, 110, 160, parameters, pdf.expopdf, "R",
                     root.kRed)

#==================================================================================
    nctMu26nnloDimitriFullHist.SetBinError(binNum, error)
    nctMu26nnloBwExpoFullHist.SetBinContent(binNum, xsec)
    nctMu26nnloBwExpoFullHist.SetBinError(binNum, error)
    nctMu26nnloRelBwExpoFullHist.SetBinContent(binNum, xsec)
    nctMu26nnloRelBwExpoFullHist.SetBinError(binNum, error)
    nctMu26nnloPerExpoBwFullHist.SetBinContent(binNum, xsec)
    nctMu26nnloPerExpoBwFullHist.SetBinError(binNum, error)
    nctMu26nnloPerExpoRelBwFullHist.SetBinContent(binNum, xsec)
    nctMu26nnloPerExpoRelBwFullHist.SetBinError(binNum, error)
    nctMu26nnloDimitriRelBwFullHist.SetBinContent(binNum, xsec)
    nctMu26nnloDimitriRelBwFullHist.SetBinError(binNum, error)
    nctMu26nnloModDimitriRelBwFullHist.SetBinContent(binNum, xsec)
    nctMu26nnloModDimitriRelBwFullHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctMu26nnloExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloChebyshevFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloBernsteinFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloDimitriFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloBwExpoFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloRelBwExpoFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloPerExpoBwFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloPerExpoRelBwFullHist, root.kBlack,
                      root.kFullDotLarge)
settings.setDataPoint(nctMu26nnloDimitriRelBwFullHist, root.kBlack,
   nctMu26DimitriFullHist.SetBinError(binNum, error)
   nctMu26BwExpoFullHist.SetBinContent(binNum, xsec)
   nctMu26BwExpoFullHist.SetBinError(binNum, error)
   nctMu26RelBwExpoFullHist.SetBinContent(binNum, xsec)
   nctMu26RelBwExpoFullHist.SetBinError(binNum, error)
   nctMu26PerExpoBwFullHist.SetBinContent(binNum, xsec)
   nctMu26PerExpoBwFullHist.SetBinError(binNum, error)
   nctMu26PerExpoRelBwFullHist.SetBinContent(binNum, xsec)
   nctMu26PerExpoRelBwFullHist.SetBinError(binNum, error)
   nctMu26DimitriRelBwFullHist.SetBinContent(binNum, xsec)
   nctMu26DimitriRelBwFullHist.SetBinError(binNum, error)
   nctMu26ModDimitriRelBwFullHist.SetBinContent(binNum, xsec)
   nctMu26ModDimitriRelBwFullHist.SetBinError(binNum, error)

# adjust histogram settings
settings.setDataPoint(nctMu26ExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26ChebyshevFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26BernsteinFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26DimitriFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26BwExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26RelBwExpoFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26PerExpoBwFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26PerExpoRelBwFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26DimitriRelBwFullHist, root.kBlack, root.kFullDotLarge)
settings.setDataPoint(nctMu26ModDimitriRelBwFullHist, root.kBlack, root.kFullDotLarge)

#==================================================================================
# Fit the Histograms //////////////////////////////////////////////////////////////
#==================================================================================

# initial values of fit parameters