|
[Rivet] scaling 2d histogramsAndy Buckley andy.buckley at cern.chFri Oct 16 10:05:05 BST 2015
Hi Jonas, Could you send us a .yoda file with your 2D histogram in it, and we'll do some testing / bugfixing? Thanks. Andy On 15/10/15 23:56, Jonas Lindert wrote: > Hi Andy, > > i’ve got another Problem with 2D Histograms. This time on the yoda side. > The histogram rivet-cmphistos produces for a 2D yoda does not seem to be > correct. > > Look at the attached yoda file and the resulting dat-file from > rivet-cmphistos. The shape of the two histograms is completely different. > > cheers, > Jonas > > > > > > > > >> On 15 Oct 2015, at 01:33, Jonas Lindert <lindert at physik.uzh.ch >> <mailto:lindert at physik.uzh.ch>> wrote: >> >> Hi Andy, >> >> thanks a lot - this seems to work! >> >> I will let you know if I have further issues with 2D histograms. >> >> cheers, >> Jonas >> >> >> >>> On 14 Oct 2015, at 16:05, Andy Buckley <andy.buckley at cern.ch >>> <mailto:andy.buckley at cern.ch>> wrote: >>> >>> Hi Jonas, >>> >>> Hmm, this does seem to be a bug. I'm not sure how the compiler >>> allowed a method of Analysis to be declared but never defined, but >>> that's what happened. In the development trunk I have added the lines >>> below to src/Core/Analysis.cc <http://analysis.cc/>-- feel free to do >>> the same to your local copy, and let us know if it works! >>> >>> This will go into the next patch release. Thanks for the report, and >>> please let us know if you have any more trouble with 2D histograms >>> since until recently they haven't been used much in Rivet/YODA. >>> >>> >>> Patch: >>> ---- >>> >>> void Analysis::normalize(Histo2DPtr histo, double norm, bool >>> includeoverflows) { >>> if (!histo) { >>> MSG_ERROR("Failed to normalize histo=NULL in analysis " << >>> name() << " (norm=" << norm << ")"); >>> return; >>> } >>> MSG_TRACE("Normalizing histo " << histo->path() << " to " << norm); >>> try { >>> histo->normalize(norm, includeoverflows); >>> } catch (YODA::Exception& we) { >>> MSG_WARNING("Could not normalize histo " << histo->path()); >>> return; >>> } >>> } >>> >>> >>> void Analysis::scale(Histo2DPtr histo, double scale) { >>> if (!histo) { >>> MSG_ERROR("Failed to scale histo=NULL in analysis " << name() << >>> " (scale=" << scale << ")"); >>> return; >>> } >>> if (std::isnan(scale) || std::isinf(scale)) { >>> MSG_ERROR("Failed to scale histo=" << histo->path() << " in >>> analysis: " << name() << " (invalid scale factor = " << scale << ")"); >>> scale = 0; >>> } >>> MSG_TRACE("Scaling histo " << histo->path() << " by factor " << >>> scale); >>> try { >>> histo->scaleW(scale); >>> } catch (YODA::Exception& we) { >>> MSG_WARNING("Could not scale histo " << histo->path()); >>> return; >>> } >>> } >>> >>> ---- >>> >>> Cheers, >>> Andy >>> >>> >>> On 14/10/15 14:45, Jonas Lindert wrote: >>>> Dear Rivet/Yoda Developers, >>>> >>>> I have got a problem with 2D Histograms within Rivet 2.3. In particular >>>> normalizing them via >>>> >>>> scale (Histo2DPtr histo, double scale) >>>> >>>> gives: >>>> >>>> Rivet.Analysis.Handler: INFO Finalising analyses >>>> python: symbol lookup error: /zbox/user/lindert/rivet/RivetTwoD_test.so: >>>> undefined symbol: >>>> _ZN5Rivet8Analysis5scaleEN5boost10shared_ptrIN4YODA7Histo2DEEEd >>>> >>>> where I use the standalone version of Rivet. >>>> >>>> Attached you find an example including an hepmc file. >>>> >>>> Am I using 2D histograms in a wrong way or is there a bug in Rivet/Yoda? >>>> >>>> >>>> cheers, >>>> Jonas >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rivet mailing list >>>> Rivet at projects.hepforge.org <mailto:Rivet at projects.hepforge.org> >>>> https://www.hepforge.org/lists/listinfo/rivet >>>> >>> >>> >>> -- >>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow >>> Particle Physics Expt Group, University of Glasgow >> > -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |