[Rivet] Two-dimensional histograms

Andy Buckley andy.buckley at cern.ch
Tue Sep 16 19:58:38 BST 2014


In fact, there is even an efficiency(pass, tot) function that takes 1D
histos and returns a Scatter2D with appropriate binomial statistics
treatment!

Andy


On 16/09/14 19:00, David Bjergaard wrote:
> Hi James,
> 
> Why can't you hold two histos:
> hist_pass and hist_fail?
> 
> Then the 1D (operator+= ) methods for adding and dividing would work (under the
> assumptions imposed by dividing). Then you can do:
> hist_denom+=hist_pass;
> hist_denom+=hist_fail;
> divide(hist_pass,hist_denom);
> 
> I (personally) keep a std::map<std::string,Histo1DPtr> container indexed
> by string for bookkeeping.   
> 
>     Dave
> 
> James Robinson <james.robinson at cern.ch> writes:
> 
>> Dear experts,
>>
>> I would like to fill a 2D histogram in Rivet's analyze() function,
>> which I then turn into a 1D histogram during finalize(). This would be
>> done by iterating along the x-axis and calculating y_bin[0] / (y_bin
>> [0] + y_bin[1]). It's basically an efficiency histogram, but there
>> doesn't seem to be an existing class that can handle this natively.
>> However, naively using bookHisto2D and Histo2DPtr analogously to
>> Histo1D doesn't work: these types don't seem to exist.
>>
>> How would you suggest I go about making the histogram that I need
>> using Rivet 2?
>>
>> Thanks,
>> James
>>
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> https://www.hepforge.org/lists/listinfo/rivet
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> https://www.hepforge.org/lists/listinfo/rivet
> 


-- 
Dr Andy Buckley, Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow / PH Dept, CERN


More information about the Rivet mailing list