[Rivet] Bug in analysis MC_GENERIC

David Bjergaard david.bjergaard at gmail.com
Mon Jul 7 17:19:54 BST 2014


Hi,

Here's the output of rivet-cmphistos:
> $ rivet-cmphistos Rivet.yoda 
> terminate called after throwing an instance of 'YODA::WeightError'
>   what():  Undefined weighted variance
> Aborted (core dumped)
My directory contains:
> -rw-rw-r--   1 dave dave 2.1K Jul  7 12:11 MC_GENERIC_EtaChPMRatio.dat
> -rw-rw-r--   1 dave dave 3.6K Jul  7 12:11 MC_GENERIC_Phi.dat
> -rw-rw-r--   1 dave dave  20K Jul  7 12:11 MC_GENERIC_PtCh.dat
> -rw-------   1 dave dave 119K Jun 30 16:46 Rivet.yoda

> [snip]
> One of the other developers has told me that they got YODA exception
> errors when trying to plot your file. I recently made some changes to
> how YODA creates x,y values and errors where there are not enough stats
> in a bin to calculate a correct mean or variance -- for now setting them
> to zero but maybe later we'll do something cleverer.
I think this is the cause,  I'm conflicted over whether or not the
YODA exceptions are annoying or a good feature.  In this case, I think
setting to zero is OK for now, but maybe the histogram structure could
handle NaN and inf properly.  In this case (the variance), it should be
NaN and not zero. In the case of computing fractions, I would really
like it if +/-inf when to overflow/underflow rather than crashing with
an exception.  

The alternative view is that YODA exceptions are there for a reason and
its the programmer's responsibility to handle them appropriately.  They
force you to avoid ill-defined situations which is usually a good thing.

    Dave


More information about the Rivet mailing list