Angular analysis of B+->K*+(K+pi0)mumu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
785 B

import matplotlib.pyplot as plt
import mplhep
mplhep.style.use("LHCb2")
def reweight_comparing_plot(original_feature: list, target_feature: list, weights: list, n_bins: int, suptitle: str, titles: list[str], save: str) -> None:
if len(original_feature) != len(weights):
raise ValueError(f"original_feature and weights need to have the same dimension!")
fig, ax = plt.subplots(nrows = 1, ncols = 3, figsize = (30, 12.5))
ax[0].hist(original_feature, bins = n_bins)
ax[0].set_ylabel("counts/a.u.")
ax[0].set_title(titles[0])
ax[1].hist(original_feature, bins = n_bins, weights = weights)
ax[1].set_title(titles[1])
ax[2].hist(target_feature, bins = n_bins)
ax[2].set_title(titles[2])
fig.suptitle(suptitle)
fig.savefig(f"{save}")