diff --git a/machine_learning_hep/analysis/analyzerdhadrons.py b/machine_learning_hep/analysis/analyzerdhadrons.py index 0f9703b06e..6771db0e14 100644 --- a/machine_learning_hep/analysis/analyzerdhadrons.py +++ b/machine_learning_hep/analysis/analyzerdhadrons.py @@ -293,7 +293,7 @@ def makenormyields(self): # pylint: disable=import-outside-toplevel, too-many-b yield_filename = self.make_file_path(self.d_resultsallpdata, self.yields_filename, "root", None, [self.case, self.typean]) - fileouteff = "/data8/majak/crosssec/merged_yields_fdd_approvals_fd_0.00_0.00_0.00_0.00_0.00_0.00_0.00_0.00_0.00.root" + yield_filename = "/data8/majak/crosssec/merged_yields_fdd_approvals_fd_0.00_0.00_0.00_0.00_0.00_0.00_0.00_0.00_0.00.root" if not os.path.exists(yield_filename): self.logger.fatal( "Yield file %s could not be found", yield_filename) diff --git a/machine_learning_hep/data/data_run3/database_ml_parameters_LcToPKPi_multiclass.yml b/machine_learning_hep/data/data_run3/database_ml_parameters_LcToPKPi_multiclass.yml index 50ea3fd7cb..438d72c99d 100644 --- a/machine_learning_hep/data/data_run3/database_ml_parameters_LcToPKPi_multiclass.yml +++ b/machine_learning_hep/data/data_run3/database_ml_parameters_LcToPKPi_multiclass.yml @@ -380,11 +380,12 @@ LcpKpi: probcutoptimal: [[0.02, 0.0, %fd12%], [0.02, 0.0, %fd23%], [0.02, 0.0, %fd34%], [0.06, 0.0, %fd45%], [0.06, 0.0, %fd56%], [0.10, 0.0, %fd68%], [0.20, 0.0, %fd812%], [%bkg1216%, 0.0, %fd1216%], [%bkg1624%, 0.0, %fd1624%]] #list of nbins analysis: anahptspectrum: "LctopKpi" #D0Kpi, DplusKpipi, DstarD0pi, DsKKpi, LctopKpi, LcK0Sp - fd_method: "dd" # fc, Nb + fd_method: "dd" # fc, Nb, dd, dd_N crosssec_prompt: True # True for prompt, False for non-prompt cctype: "pp" sigmamb: 59.4e+9 # 50.87e+9 pp5TeV, 57.8e+9 pp13TeV, 59.4e+9 pp Run3, pb - inputfonllpred: /data8/majak/fdd-results/07112024-check-approvals/fdd-results-merged-sept-yields-eff/CutVarLc_pp13TeV_LHC24d3.root #inputfonllpred: data/fonll/DmesonLcPredictions_13TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root + inputfonllpred: /data8/majak/fdd-results/07112024-check-approvals/fdd-results-merged-sept-yields-eff/CutVarLc_pp13TeV_LHC24d3.root + #inputfonllpred: data/fonll/DmesonLcPredictions_13TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root dir_general_plots: analysis_plots Run3analysis: diff --git a/machine_learning_hep/hf_analysis_utils.py b/machine_learning_hep/hf_analysis_utils.py index 9b97ebd7f6..251f302458 100644 --- a/machine_learning_hep/hf_analysis_utils.py +++ b/machine_learning_hep/hf_analysis_utils.py @@ -377,7 +377,7 @@ def compute_fraction_dd( der_same_same = (acc_eff_same * (yield_times_acceff_same + yield_times_acceff_other) - \ acc_eff_same**2 * corryields_same) / denom der_same_other = -acc_eff_same * acc_eff_other * corryields_same / denom - unc = np.sqrt(der_same_same**2 * cov_same + der_same_other * cov_other + \ + unc = np.sqrt(der_same_same**2 * cov_same + der_same_other**2 * cov_other + \ 2 * der_same_same * der_same_other * cov_comb) print(f"denom {denom} der_same_same {der_same_same} der_same_other {der_same_other} " \ f"cov same {cov_same} cov other {cov_other} cov comb {cov_comb} final unc {unc}") diff --git a/machine_learning_hep/hf_pt_spectrum.py b/machine_learning_hep/hf_pt_spectrum.py index 9105a91262..d5210828da 100644 --- a/machine_learning_hep/hf_pt_spectrum.py +++ b/machine_learning_hep/hf_pt_spectrum.py @@ -206,7 +206,7 @@ def hf_pt_spectrum(channel, # pylint: disable=too-many-locals, too-many-argument rawy_unc = histos["rawyields"].GetBinError(i_pt + 1) eff_times_acc_prompt = histos["acceffp"].GetBinContent(i_pt + 1) eff_times_acc_nonprompt = histos["acceffnp"].GetBinContent(i_pt + 1) - if frac_method != "dd": + if frac_method not in ("dd", "dd_N"): ptmin_fonll = ( histos["FONLL"]["nonprompt"]["central"].GetXaxis().FindBin(ptmin * 1.0001) ) @@ -267,6 +267,7 @@ def hf_pt_spectrum(channel, # pylint: disable=too-many-locals, too-many-argument histos["covariances"][1 - pnp_ind].GetBinContent(i_pt + 1), histos["covariances"][2].GetBinContent(i_pt + 1)) elif frac_method == "dd_N": + pnp_ind = 0 if crosssec_prompt else 1 frac = [histos["corryields_fdd"][pnp_ind].GetBinContent(i_pt + 1)] * 3