[Rivet] scaling 2d histograms

Jonas Lindert lindert at physik.uzh.ch
Fri Oct 16 16:37:01 BST 2015


Hi Holgar,

for example in the yoda file I sent you the ratio between the bins

((30,100),(30,100)) / ((100,200),(30,100)) = 1.6800665396007495
((30,100),(30,100)) / ((100,200),(100,200)) = 10.362426278417804

(which is correct)

while in the dat-file from rivet-cmphisto the ratios are

((30,100),(30,100)) / ((100,200),(30,100)) = 1.1760461535641622
((30,100),(30,100)) / ((100,200),(100,200)) = 5.07758844116815


cheers,
Jonas




On 10/16/15 14:23, Holger Schulz wrote:
> On 16/10/15 10:46, Jonas Lindert wrote:
>> Hi Andy,
>>
>> attached you find a yoda file with a 2D Histogram (and the result I 
>> get with rivet-cmphistos).
> Hi Jonas,
>
> this is a bit hard to debug. Could you please tell me what shape/plot 
> you would expect?
>
> I attached the plot I get from you yoda file when setting LogZ=1.
>
> Maybe we can use that as a basis for discussion.
>
> Thanks,
> Holger
>>
>> 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
>>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet
>


-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 --------------
An HTML attachment was scrubbed...
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20151016/c44ddda6/attachment.html>


More information about the Rivet mailing list