[Rivet] Two-dimensional histograms

Andy Buckley andy.buckley at ed.ac.uk
Tue Oct 13 21:50:27 BST 2009


In the end, we didn't actually use a 2D histo here, because it turned 
out that it could be done with using a temporary histo for binning in 
each event. This might be a neater way, and if just using for storage I 
think it's (much) nicer to use the LWH histo classes directly rather 
than going through all the AIDA interface rubbish (and then having to 
remove them from the tree afterwards...)

Andy



James Monk wrote:
> I just re-discovered this (brief) thread because I want to do the same 
> thing now.  For people in the future doing the same I point out here 
> that there is the BinnedHistogram<T> object, which is a more convenient 
> way of storing multiple one-dim histograms (that's the idea, anyway!).  
> With that you should be able to do
> 
>     myBinnedHistogram.fill(x, y, weight);
> 
> It is not really a two-dim histogram, since you have to populate it with 
> a set of 1-dim histos (which is easy enough to do), but it's better then 
> nothing.
> 
> cheers, and sorry I didn't think of this until I had the same issue!
> 
> James
> 
> On 25 Aug 2009, at 11:49, Andy Buckley wrote:
> 
>> Holger Schulz wrote:
>>> Hi,
>>>
>>> do we have two-dimensional histograms in Rivet?
>>> I  need them for data storage reasons only.
>>> I want to fill a profile histo with its contents.
>>
>> Afraid not! You might have to roll your own from vector<vector<double> >
>> or similar... if you do so, please put an e.g. "/// @todo Replace with
>> proper 2D histo" comment in the code so we know to clean it up later. Of
>> course, if you fancy implementing a 2D histo in YODA... ;)
>>
>> Andy
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> http://www.hepforge.org/lists/listinfo/rivet
> 
> 



More information about the Rivet mailing list