Re: Frequency in Histos

From: xsatya <xsatya_at_gmail.com>
Date: Tue, 13 Apr 2010 14:58:47 +0530


Hello,

Thanks for reply. Probably I couldn't get you. Here I am attaching a small macro with different histograms. Please check.

With regards,
S

On Tue, Apr 13, 2010 at 1:45 PM, Jacques Goldberg <Jacques.Goldberg_at_cern.ch>wrote:

> If the weight of each entry is set to 1 (which is the default), the
> contents of a bin has the same value as the number of events.
> If you want weights different from 1, then just add a second histogram with
> weight set to 1. and use that one to get the numbers of entries in each bin.
>
> There may be fancier solutions, but this one quickly gives the result.
>
> Jacques
>
>
> xsatya wrote:
>
>> Hi,
>>
>> Is there any way to find the frequency of each bin of any Histos? (TH1F,
>> TH2F). GetBinContent(bin) gives only the contenct value, but waht I want is
>> no of Entries in that bin. Could you please let me know if any ways.
>>
>> S
>> --
>> ---------------
>> Research Student,
>> High Energy Physics, India.
>>
>
>

-- 
---------------
Research Student,
High Energy Physics, India.


Received on Tue Apr 13 2010 - 11:28:52 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 13 2010 - 17:50:01 CEST