JelleAalbers / blueice

Build Likelihoods Using Efficient Interpolations and monte-Carlo generated Events
BSD 3-Clause "New" or "Revised" License
9 stars 9 forks source link

Should skip the data points out of analysis space for unbinned loglikelihood #44

Open yuema137 opened 4 months ago

yuema137 commented 4 months ago

In BinnedLogLikelihood we set the data with the bins defined by analysis space: https://github.com/JelleAalbers/blueice/blob/f12c2adffc0698e874a5fa25cbb7436fc5c58d54/blueice/likelihood.py#L488-L490 Therefore, the data is automatically chopped. However in UnbinnedLogLikelihood there is no such an operation. As the pdfs are interpolated & extrapolated, the program doesn't know which data points are out of bound, and therefore perform a lot of redundant calculations for the cost function which slow down the call a lot.