|
[Rivet] scaling 2d histogramsJonas Lindert lindert at physik.uzh.chFri Oct 16 10:46:03 BST 2015
Hi Andy, attached you find a yoda file with a 2D Histogram (and the result I get with rivet-cmphistos). cheers, Jonas On 10/16/15 11:05, Andy Buckley wrote: > 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. Jonas Lindert Universitaet Zuerich Institut fuer Theoretische Physik Winterthurerstrasse 190 CH-8057 Zuerich Email: lindert at physik.uzh.ch Switzerland Web: http://www.physik.uzh.ch/~lindert ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -------------- next part -------------- BEGIN YODA_HISTO2D /Test_2d/pTj1__pTj2 Path=/Test_2d/pTj1__pTj2 ScaledBy=4.7640657875180348e-09 Title= Type=Histo2D XLabel= YLabel= ZLabel= # Mean: (1.286499e+02, 6.705556e+01) # Volume: 3.016454e-01 # ID ID sumw sumw2 sumwx sumwx2 sumwy sumwy2 sumwxy numEntries Total Total 3.016454e-01 2.274749e-08 3.880664e+01 6.698654e+03 2.022700e+01 1.702238e+03 2.959305e+03 4000000 # 2D outflow persistency not currently supported until API is stable # xlow xhigh ylow yhigh sumw sumw2 sumwx sumwx2 sumwy sumwy2 sumwxy numEntries 3.000000e+01 1.000000e+02 3.000000e+01 1.000000e+02 1.283231e-01 9.677020e-09 9.417911e+00 7.259796e+02 6.575908e+00 3.656630e+02 4.983607e+02 1701642 3.000000e+01 1.000000e+02 1.000000e+02 2.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+01 1.000000e+02 2.000000e+02 3.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+01 1.000000e+02 3.000000e+02 4.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+01 1.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+01 1.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+01 1.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 1.000000e+02 2.000000e+02 3.000000e+01 1.000000e+02 1.091140e-01 8.228437e-09 1.476375e+01 2.074797e+03 6.814656e+00 4.662610e+02 9.221663e+02 1446918 1.000000e+02 2.000000e+02 1.000000e+02 2.000000e+02 2.527245e-02 1.905830e-09 3.823686e+00 5.949573e+02 3.067862e+00 3.811082e+02 4.702198e+02 335128 1.000000e+02 2.000000e+02 2.000000e+02 3.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 1.000000e+02 2.000000e+02 3.000000e+02 4.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 1.000000e+02 2.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 1.000000e+02 2.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 1.000000e+02 2.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 2.000000e+02 3.000000e+02 3.000000e+01 1.000000e+02 1.843868e-02 1.390486e-09 4.370783e+00 1.049748e+03 1.149276e+00 7.857852e+01 2.723754e+02 244508 2.000000e+02 3.000000e+02 1.000000e+02 2.000000e+02 9.293318e-03 7.008216e-10 2.204766e+00 5.299745e+02 1.285308e+00 1.847662e+02 3.049841e+02 123235 2.000000e+02 3.000000e+02 2.000000e+02 3.000000e+02 1.150551e-03 8.676460e-11 2.924912e-01 7.511546e+01 2.572883e-01 5.799122e+01 6.571670e+01 15257 2.000000e+02 3.000000e+02 3.000000e+02 4.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 2.000000e+02 3.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 2.000000e+02 3.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 2.000000e+02 3.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+02 4.000000e+02 3.000000e+01 1.000000e+02 4.120476e-03 3.107307e-10 1.397670e+00 4.772716e+02 2.553123e-01 1.737047e+01 8.660845e+01 54640 3.000000e+02 4.000000e+02 1.000000e+02 2.000000e+02 2.095455e-03 1.580211e-10 7.101092e-01 2.422430e+02 2.907509e-01 4.196087e+01 9.853123e+01 27787 3.000000e+02 4.000000e+02 2.000000e+02 3.000000e+02 6.033662e-04 4.550066e-11 2.044564e-01 6.973489e+01 1.455017e-01 3.556030e+01 4.930433e+01 8001 3.000000e+02 4.000000e+02 3.000000e+02 4.000000e+02 1.017299e-04 7.671590e-12 3.630688e-02 1.302277e+01 3.305139e-02 1.077974e+01 1.182204e+01 1349 3.000000e+02 4.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+02 4.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 3.000000e+02 4.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 4.000000e+02 6.000000e+02 3.000000e+01 1.000000e+02 1.575192e-03 1.187874e-10 7.356677e-01 3.479377e+02 9.682456e-02 6.538252e+00 4.521338e+01 20888 4.000000e+02 6.000000e+02 1.000000e+02 2.000000e+02 7.555463e-04 5.697677e-11 3.511997e-01 1.652742e+02 1.047049e-01 1.509064e+01 4.866220e+01 10019 4.000000e+02 6.000000e+02 2.000000e+02 3.000000e+02 2.164306e-04 1.632132e-11 1.005758e-01 4.732135e+01 5.210977e-02 1.271612e+01 2.422640e+01 2870 4.000000e+02 6.000000e+02 3.000000e+02 4.000000e+02 9.252973e-05 6.977792e-12 4.324230e-02 2.045652e+01 3.166964e-02 1.091376e+01 1.480978e+01 1227 4.000000e+02 6.000000e+02 4.000000e+02 6.000000e+02 2.594150e-05 1.956284e-12 1.313064e-02 6.715230e+00 1.162567e-02 5.251309e+00 5.913700e+00 344 4.000000e+02 6.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 4.000000e+02 6.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 6.000000e+02 1.000000e+03 3.000000e+01 1.000000e+02 2.665791e-04 2.010309e-11 1.886955e-01 1.359327e+02 1.640797e-02 1.108657e+00 1.159619e+01 3535 6.000000e+02 1.000000e+03 1.000000e+02 2.000000e+02 1.161335e-04 8.757782e-12 8.194112e-02 5.877943e+01 1.601977e-02 2.295376e+00 1.129566e+01 1540 6.000000e+02 1.000000e+03 2.000000e+02 3.000000e+02 3.152194e-05 2.377112e-12 2.210764e-02 1.575511e+01 7.635596e-03 1.874081e+00 5.352195e+00 418 6.000000e+02 1.000000e+03 3.000000e+02 4.000000e+02 1.372487e-05 1.035011e-12 9.685029e-03 6.952853e+00 4.735482e-03 1.646093e+00 3.342901e+00 182 6.000000e+02 1.000000e+03 4.000000e+02 6.000000e+02 1.123629e-05 8.473439e-13 7.969020e-03 5.751227e+00 5.341490e-03 2.568168e+00 3.793332e+00 149 6.000000e+02 1.000000e+03 6.000000e+02 1.000000e+03 3.091865e-06 2.331617e-13 2.481446e-03 2.018530e+00 2.128602e-03 1.480350e+00 1.719296e+00 41 6.000000e+02 1.000000e+03 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 1.000000e+03 1.500000e+03 3.000000e+01 1.000000e+02 1.432816e-05 1.080506e-12 1.628090e-02 1.870365e+01 8.503946e-04 5.551053e-02 9.687803e-01 190 1.000000e+03 1.500000e+03 1.000000e+02 2.000000e+02 5.882085e-06 4.435760e-13 6.696320e-03 7.696673e+00 7.934546e-04 1.120657e-01 8.988895e-01 78 1.000000e+03 1.500000e+03 2.000000e+02 3.000000e+02 1.809872e-06 1.364849e-13 2.047607e-03 2.338018e+00 4.274766e-04 1.024105e-01 4.865361e-01 24 1.000000e+03 1.500000e+03 3.000000e+02 4.000000e+02 6.032908e-07 4.549497e-14 6.539874e-04 7.119848e-01 2.064302e-04 7.113499e-02 2.239306e-01 8 1.000000e+03 1.500000e+03 4.000000e+02 6.000000e+02 3.770568e-07 2.843436e-14 3.936591e-04 4.112363e-01 1.880499e-04 9.439227e-02 1.963039e-01 5 1.000000e+03 1.500000e+03 6.000000e+02 1.000000e+03 3.770568e-07 2.843436e-14 4.258975e-04 4.829309e-01 2.657121e-04 1.889909e-01 2.990930e-01 5 1.000000e+03 1.500000e+03 1.000000e+03 1.500000e+03 7.541135e-08 5.686872e-15 9.182523e-05 1.118117e-01 7.975535e-05 8.434959e-02 9.711474e-02 1 END YODA_HISTO2D -------------- next part -------------- # BEGIN PLOT DrawOnly=Test_2d.yoda/Test_2d/pTj1__pTj2 Legend=1 LogY=1 # END PLOT # BEGIN HISTO2D Test_2d.yoda/Test_2d/pTj1__pTj2 LineColor={[HTML]{EE3311}} LineStyle=solid Path=Test_2d.yoda/Test_2d/pTj1__pTj2 ScaledBy=4.7640657875180348e-09 Title=Test_2d XLabel= YLabel= ZLabel= # xlow xhigh ylow yhigh val errminus errplus 3.000000e+01 1.000000e+02 3.000000e+01 1.000000e+02 2.618839e-05 2.007589e-08 2.007589e-08 3.000000e+01 1.000000e+02 1.000000e+02 2.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+01 1.000000e+02 2.000000e+02 3.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+01 1.000000e+02 3.000000e+02 4.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+01 1.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+01 1.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+01 1.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+02 2.000000e+02 3.000000e+01 1.000000e+02 1.558771e-05 1.295868e-08 1.295868e-08 1.000000e+02 2.000000e+02 1.000000e+02 2.000000e+02 2.527245e-06 4.365581e-09 4.365581e-09 1.000000e+02 2.000000e+02 2.000000e+02 3.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+02 2.000000e+02 3.000000e+02 4.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+02 2.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+02 2.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+02 2.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 2.000000e+02 3.000000e+02 3.000000e+01 1.000000e+02 2.634097e-06 5.327032e-09 5.327032e-09 2.000000e+02 3.000000e+02 1.000000e+02 2.000000e+02 9.293318e-07 2.647304e-09 2.647304e-09 2.000000e+02 3.000000e+02 2.000000e+02 3.000000e+02 1.150551e-07 9.314752e-10 9.314752e-10 2.000000e+02 3.000000e+02 3.000000e+02 4.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 2.000000e+02 3.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 2.000000e+02 3.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 2.000000e+02 3.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+02 4.000000e+02 3.000000e+01 1.000000e+02 5.886394e-07 2.518222e-09 2.518222e-09 3.000000e+02 4.000000e+02 1.000000e+02 2.000000e+02 2.095455e-07 1.257064e-09 1.257064e-09 3.000000e+02 4.000000e+02 2.000000e+02 3.000000e+02 6.033662e-08 6.745418e-10 6.745418e-10 3.000000e+02 4.000000e+02 3.000000e+02 4.000000e+02 1.017299e-08 2.769764e-10 2.769764e-10 3.000000e+02 4.000000e+02 4.000000e+02 6.000000e+02 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+02 4.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 3.000000e+02 4.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 4.000000e+02 6.000000e+02 3.000000e+01 1.000000e+02 1.125137e-07 7.784974e-10 7.784974e-10 4.000000e+02 6.000000e+02 1.000000e+02 2.000000e+02 3.777731e-08 3.774148e-10 3.774148e-10 4.000000e+02 6.000000e+02 2.000000e+02 3.000000e+02 1.082153e-08 2.019983e-10 2.019983e-10 4.000000e+02 6.000000e+02 3.000000e+02 4.000000e+02 4.626486e-09 1.320776e-10 1.320776e-10 4.000000e+02 6.000000e+02 4.000000e+02 6.000000e+02 6.485375e-10 3.496681e-11 3.496681e-11 4.000000e+02 6.000000e+02 6.000000e+02 1.000000e+03 0.000000e+00 0.000000e+00 0.000000e+00 4.000000e+02 6.000000e+02 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 6.000000e+02 1.000000e+03 3.000000e+01 1.000000e+02 9.520682e-09 1.601302e-10 1.601302e-10 6.000000e+02 1.000000e+03 1.000000e+02 2.000000e+02 2.903338e-09 7.398387e-11 7.398387e-11 6.000000e+02 1.000000e+03 2.000000e+02 3.000000e+02 7.880485e-10 3.854471e-11 3.854471e-11 6.000000e+02 1.000000e+03 3.000000e+02 4.000000e+02 3.431217e-10 2.543387e-11 2.543387e-11 6.000000e+02 1.000000e+03 4.000000e+02 6.000000e+02 1.404536e-10 1.150641e-11 1.150641e-11 6.000000e+02 1.000000e+03 6.000000e+02 1.000000e+03 1.932416e-11 3.017926e-12 3.017926e-12 6.000000e+02 1.000000e+03 1.000000e+03 1.500000e+03 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+03 1.500000e+03 3.000000e+01 1.000000e+02 4.093760e-10 2.969925e-11 2.969925e-11 1.000000e+03 1.500000e+03 1.000000e+02 2.000000e+02 1.176417e-10 1.332030e-11 1.332030e-11 1.000000e+03 1.500000e+03 2.000000e+02 3.000000e+02 3.619744e-11 7.388773e-12 7.388773e-12 1.000000e+03 1.500000e+03 3.000000e+02 4.000000e+02 1.206582e-11 4.265910e-12 4.265910e-12 1.000000e+03 1.500000e+03 4.000000e+02 6.000000e+02 3.770568e-12 1.686249e-12 1.686249e-12 1.000000e+03 1.500000e+03 6.000000e+02 1.000000e+03 1.885284e-12 8.431245e-13 8.431245e-13 1.000000e+03 1.500000e+03 1.000000e+03 1.500000e+03 3.016454e-13 3.016454e-13 3.016454e-13 # END HISTO2D
More information about the Rivet mailing list |