function[thresh,frac,delay]=cfd_params(maxsig);
% cfd param
% frac for constant fraction  .15
frac=0.3;
% thresh for real CFD triggering .2*s, .15
s=mean(maxsig);
thresh=0.2*s;
% delay for real CFD differentiation 50ps
delay=370e-12;
