Beispiel #1
0
        histo_.Scale(1. / 0.92)
        histo_.Scale(1. / 0.94)
    HISTOS.append(histo_)

    DICTNB = {}
    GRFD = extract_histo_or_error(CASE, ANA_MB, mb, YEAR_NUMBER,
                                  "gFcCorrConservative", PATHLC)
    ERRORNB = []
    EYHIGH = GRFD.GetEYhigh()
    EYLOW = GRFD.GetEYlow()
    YVAL = GRFD.GetY()
    for i in range(histo_.GetNbinsX()):
        ERRORNB.append([0, 0, EYLOW[i + 1], EYHIGH[i + 1], YVAL[i + 1]])
    DICTNB["feeddown_NB"] = ERRORNB

    errs = Errors(histo_.GetNbinsX())
    errs.read(ERROR_FILES[mb], DICTNB)
    ERRS.append(errs)
    ERRS_GR_TOT.append(Errors.make_root_asymm(histo_, errs.get_total_for_spectra_plot(), \
                                              const_x_err=0.3))
    ERRS_GR_FD.append(Errors.make_root_asymm(histo_, errs.get_total_for_spectra_plot(True), \
                                             const_x_err=0.3))
    ERRS_GR_WOFD.append(Errors.make_root_asymm(histo_, errs.get_total_for_spectra_plot(False), \
                                               const_x_err=0.3))
    ERRS_GR_TOT[mb].SetName("gr_TotSyst_%d" % mb)
    ERRS_GR_FD[mb].SetName("gr_FDSyst_%d" % mb)
    ERRS_GR_WOFD[mb].SetName("gr_TotSyst_woFD_%d" % mb)

# Save globally in Lc directory
SAVE_PATH = make_standard_save_path(
    CASE, f"CorrectedYieldPerEvent_{ANA_MB}_1999_19_1029_3059")
Beispiel #2
0
        print("NOTE: Scaling MB with 1./0.92 (kINT7 trigger eff.) and 1./0.94 (nEvents for 1-999)")
        histo_.Scale(1./0.92)
        histo_.Scale(1./0.94)
    HISTOS.append(histo_)

    DICTNB = {}
    GRFD = extract_histo_or_error(CASE, ANA_MB, mb, YEAR_NUMBER, "gFcConservative")
    ERRORNB = []
    EYHIGH = GRFD.GetEYhigh()
    EYLOW = GRFD.GetEYlow()
    YVAL = GRFD.GetY()
    for i in range(histo_.GetNbinsX()):
        ERRORNB.append([0, 0, EYLOW[i+1], EYHIGH[i+1], YVAL[i+1]])
    DICTNB["feeddown_NB"] = ERRORNB

    errs = Errors(histo_.GetNbinsX())
    errs.read(ERROR_FILES[mb], DICTNB)
    ERRS.append(errs)
    ERRS_GR_TOT.append(Errors.make_root_asymm(histo_, errs.get_total_for_spectra_plot(), \
                                              const_x_err=0.3))
    ERRS_GR_FD.append(Errors.make_root_asymm(histo_, errs.get_total_for_spectra_plot(True), \
                                             const_x_err=0.3))
    ERRS_GR_WOFD.append(Errors.make_root_asymm(histo_, errs.get_total_for_spectra_plot(False), \
                                               const_x_err=0.3))
    ERRS_GR_TOT[mb].SetName("gr_TotSyst_%d" % mb)
    ERRS_GR_FD[mb].SetName("gr_FDSyst_%d" % mb)
    ERRS_GR_WOFD[mb].SetName("gr_TotSyst_woFD_%d" % mb)

# Save globally in Ds directory
SAVE_PATH = make_standard_save_path(CASE, f"CorrectedYieldPerEvent_{ANA_MB}_1999_19_1029_3059")
save_histograms([*HISTOS, *ERRS_GR_TOT, *ERRS_GR_FD, *ERRS_GR_WOFD], SAVE_PATH)
GRFD_PK0S = extract_histo("gNbCorrConservative", FILE_PK0S2)

DICTEXTRA_PKPI = {}
HISTOEFF_PKPI = extract_histo("hDirectEffpt", FILE_PKPI)
ERROREFF_PKPI = []
for i in range(HISTOEFF_PKPI.GetNbinsX()):
    print(HISTOEFF_PKPI.GetBinCenter(i + 1))
    RELERREFF = HISTOEFF_PKPI.GetBinError(i +
                                          1) / HISTOEFF_PKPI.GetBinContent(i +
                                                                           1)
    if i == 0:
        ERROREFF_PKPI.append([0, 0, 99, 99])
    else:
        ERROREFF_PKPI.append([0, 0, RELERREFF, RELERREFF])
DICTEXTRA_PKPI["statunceff"] = ERROREFF_PKPI
ERRSPKPI = Errors(PTBINS)
ERRSPKPI.read(ERROR_PKPI, DICTEXTRA_PKPI)

DICTEXTRA_PK0S = {}
HISTOEFF_PK0S = extract_histo("hDirectEffpt", FILE_PK0S)
ERROREFF_PK0S = []
for i in range(HISTOEFF_PK0S.GetNbinsX()):
    RELERREFF = HISTOEFF_PK0S.GetBinError(i +
                                          1) / HISTOEFF_PK0S.GetBinContent(i +
                                                                           1)
    ERROREFF_PK0S.append([0, 0, RELERREFF, RELERREFF])
DICTEXTRA_PK0S["statunceff"] = ERROREFF_PK0S
ERRSPK0S = Errors(PTBINS)
ERRSPK0S.read(ERROR_PK0S, DICTEXTRA_PK0S)

MATCHPKPI = [-99, 1, 2, 3, 4, 5]