[Rivet] Rivet 1.5.0 now?

Ben Waugh waugh at hep.ucl.ac.uk
Wed Mar 9 11:10:12 GMT 2011


Hi Frank,

Not that you asked me, but...

Strictly speaking it is only the denominator that needs to be checked 
anyway, but I agree it makes more sense only to avoid dividing by zero, 
not to avoid negative values.

If you do change this, you will probably have to change some other 
methods to keep the behaviour consistent. For example, sumBinHeights 
also checks for a positive sum of weights.

Cheers,
Ben

On 09/03/11 10:23, Frank Siegert wrote:
> Hi Andy,
> 
> I actually have one last-minute issue: If a Profile1D is to be filled 
> with a distribution that can be negative, there is a bug in its 
> BinHeight function which doesn't allow for negative y. I suppose this 
> was put in to avoid division by zero, so I propose the following patch:
> 
> Index: include/LWH/Profile1D.h
> ===================================================================
> --- include/LWH/Profile1D.h    (revision 3000)
> +++ include/LWH/Profile1D.h    (working copy)
> @@ -340,7 +340,7 @@
>     */
>    double binHeight(int index) const {
>      double bH = 0.;
> -    if (sumw[index+2] > 0. && sumyw[index+2] > 0.)
> +    if (sumw[index+2] != 0. && sumyw[index+2] != 0.)
>        bH = sumyw[index+2]/sumw[index+2];
>      return bH;
>    }
> 
> (unless anybody knows why this >0 restriction should be in there, the 
> code is from Lars according to SVN)
> 
> This would allow me to add a W polarisation analysis (MC_WPOL) which 
> contains profile histos that have negative distributions.
> 
> Cheers,
> Frank
> 
> 
> On 09/03/11 00:07, Andy Buckley wrote:
>> Hi everyone,
>>
>> I think that we've ironed out all the Rivet bugs, niggles, and minor
>> complaints that we're aware of. Anyone else got any last minute
>> problems? If not, let's release asap.
>>
>> I'm going to be busy all day tomorrow with interviewing, but tagging and
>> tarring up this long-awaited release would make my day :)
>>
>> Thanks to everyone who contributed -- it always amazes me how our little
>> package gets better and better with each release!
>>
>> Andy
>>
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> http://www.hepforge.org/lists/listinfo/rivet

-- 
Dr Ben Waugh                                   Tel. +44 (0)20 7679 7223
Dept of Physics and Astronomy                  Internal: 37223
University College London
London WC1E 6BT


More information about the Rivet mailing list