** To compute Luminosity Equivalent Benefit of S/B separation * run in PAW, just change the `r=' line below to what you want. * and re-run. *r is the b/s ratio r=100 message Background/Signal is [r] *number of points... make it *even* n=800 *straddle the middle nl=[n]/2-0.5 nh=[n]/2+0.5 *number of sigma on either side... sig=8 *set to zero i=0 *loop over the separation in sigma message sep(sigma) cut(sigma) eff Lumi message ---------- ---------- -------- do xv=1.7,10.0,0.1 i=[i]+1 * p is likelihood of background sigma p=[r]/([r]+1) * y is generic array sigma y=([sig]/[nl])*(array([n],1#[n])-[nh]) v/cr x(1) R [xv] * here are the error functions * for the background... sigma optbot=1-0.5*erfc(-(x-y)/sqrt(2)) * for the signal... sigma opttop=0.5*erfc(-y/sqrt(2)) * and here is the S/(S+B) sigma opt=(1-p)*opttop/sqrt((1-p)*opttop+p*optbot) *the normalization... the first xv will set the denominator, * here initialize if ([i]=1) then optnrm=1.0 endif * rescale sigma opt=opt/[optnrm] * now find the peak sigma themax=lvmax(opt) tm=themax(1) v/cr o(1) R v/copy opt([tm]) o(1) sigma o=o*o * report the output v/wr x(1),y([tm]),o if ([i]=1) then optnrm=opt([tm]) endif v/del * enddo