gcowan / RapidSim

Phase space generation of b hadron decays
MIT License
18 stars 29 forks source link

Errors from evalPID due to negative bins #32

Closed dcraik closed 6 years ago

dcraik commented 6 years ago

The following error is sometimes produced when evaluating PID features:

Error in : Bin content is negative - return a NaN value

This can probably be fixed by setting any negative bins to zero in each PID TH3.

gcowan commented 6 years ago

I have put a fix for this by looping over all bins in each histogram when they are loaded in RapidConfig. If a bin content is < 0 then it is explicitly set to 0. It slows down generation a little bit. Maybe we don’t want to do this and just leave it up to the person making the histograms to ensure it happens?

gcowan commented 6 years ago

Now done 4624b0f

bifani commented 6 years ago

if this is too slow I can produce a new set of histos where negative bins are already reset to zero

gcowan commented 6 years ago

We should make this new histos anyway, but we left in the loop (after first checking getMinimum) for safety in case people make their own and are not aware of the negative entries.

bifani commented 6 years ago

agreed I am running jobs for the new histos, will let you know when done

bifani commented 6 years ago

@gcowan , you can find the new histos at the same web address I passed you the other day (getPIDHistograms_01_*)