Ghost probability update for HLT2 assuming low UT efficiency
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
Comparison in data (very clean KS2pipi)
Efficiency determination on KS2pipi data (very clean, but somewhat conservative as number VELO hits are relatively low for this channel)
Edited by Maarten Van Veghel