Skip to content

Ghost probability update for HLT2 assuming low UT efficiency

Maarten Van Veghel requested to merge mveghel-ghostprob-ut-update into 2024-patches

Updates ghost probability for Long assuming 90% UT hit efficiency (see also slides)

Needs lhcb-datapkg/ParamFiles!102 (merged)

Reweighting done like this

# reweight UT hits
from math import comb
def reweight_ut_hits(data, eff):
    nhits = data['nUTHits']
    sigs  = data['sig']
    uniforms = np.random.uniform(0,1,len(nhits))
    new_hits = []
    effs4 = []
    for i in range(5):
        effs4.append(comb(4,i) * eff**(4-i) * (1-eff)**i)
    eff_3to3hit = eff**3
    for u, hit, sig in zip(uniforms,nhits,sigs):
        new_hit = hit
        if sig:
            # only assume 4 hits are true hits (the extra hits are unchanged)
            if hit>=4:
                x = 1.
                less_hits = 0
                for eff in effs4:
                    x -= eff
                    if u < x: less_hits+=1
                new_hit -= less_hits
            elif hit==3:
                if u > eff_3to3hit:
                    new_hit = 0
        if new_hit<3: new_hit=0
        new_hits.append(new_hit)
    return np.array(new_hits)

df['nUTHits_reweighted'] = reweight_ut_hits(df,0.9)

Result in MC

Screenshot_from_2024-07-05_20-46-47

Comparison in data (very clean KS2pipi)

Screenshot_from_2024-07-05_20-48-49

Efficiency determination on KS2pipi data (very clean, but somewhat conservative as number VELO hits are relatively low for this channel)

ghostprob_effs_reweighted_UT_vs_pt

ghostprob_effs_reweighted_UT_vs_eta

Edited by Maarten Van Veghel

Merge request reports