|
[Rivet] scaling 2d histogramsAndy Buckley andy.buckley at cern.chWed Oct 14 15:05:33 BST 2015
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 -- 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 > https://www.hepforge.org/lists/listinfo/rivet > -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |